Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

early boot #59

Open
xiaolongwu01 opened this issue Jul 19, 2021 · 6 comments
Open

early boot #59

xiaolongwu01 opened this issue Jul 19, 2021 · 6 comments

Comments

@xiaolongwu01
Copy link

Does boxy current support early booting?
Is there an API in Bareflank for send IPI interrupt?

@rianquinn
Copy link
Member

There are no APIs for IPIs. The best way to do that is to send an INIT to the CPU you want to interrupt. We do that in MicroV/mono if you want to see it in action. Boxy itself does handle early boot, and will boot into Windows or Linux. This is possible because Boxy uses the old monolithic version of Bareflank which has that code. Early boot with the Microkernel has not been completed yet.

@xiaolongwu01
Copy link
Author

Thanks, Rain. You said Boxy does handle early boot and will boot into linux, does that mean it already support it or will support it soon?
By the way when you say the old monolithic version of Bareflank which has that code. could you help to point out the code path or functions that I should look at? (So the current Bareflank version in the website: https://github.com/Bareflank/hypervisor is microkernel, right? where I can check the monolithic version of Bareflank?)Thank you very much!

@rianquinn
Copy link
Member

Boxy itself should download the version of Bareflank that it uses, but it is roughly based on version 2.1 in the release history. It already supports booting into Linux but is no longer actively developed. The link you provided is where you would get the microkernel which is in the master branch and is where we are actively developing version 3.0. To get the monolithic version, go to the releases and grab a 2.x version.

@xiaolongwu01
Copy link
Author

Thanks for your kind answer. I have download the version 2.1. But I haven't find the code for early booting os. Could you also further tell me the code and function path? is it an extension within the example or somewhere else such as bfelf_loader. (By the way, could you also point out for me which code place in Boxy using this extension?) Thank you very much!

@rianquinn
Copy link
Member

Extensions in the old code do not work the same way. Here are all of the examples that we provide for the old code:
https://github.com/Bareflank/hypervisor/tree/d2203d8fa44339e1c7dd0ce8264f5248b43a7648/examples

These are our integration tests for the old code, and they too work as good examples:
https://github.com/Bareflank/hypervisor/tree/d2203d8fa44339e1c7dd0ce8264f5248b43a7648/bfvmm/integration/arch/intel_x64

The EFI integration tests all you to boot into Linux. Boxy itself is just an extension. So in other words, you cannot really "extend" Boxy as it is the extension. But, you are free to fork Boxy and add whatever code you want to it.

@xiaolongwu01
Copy link
Author

Thanks, Rain. But it seems that all of these code are not about the exact code of early booting OS. I mean the code of "unrestricted mode enabled in the VMCS, proper handling of INIT/SIPI and some CR0/CR4 trapping to properly handle flipping of control bits in the VMCS and TLB flushing"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants