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

Replace hardcoded memory map in kexec-fiwix with proper e820 passthrough #332

Closed
Googulator opened this issue Nov 16, 2023 · 1 comment
Closed

Comments

@Googulator
Copy link
Collaborator

Kexec-fiwix hardcodes the memory map used by qemu with the particular settings used in live-bootstrap. This can cause problems when bootstrapping on bare metal with a BIOS that reserves memory ranges that would be available in qemu, as well as preventing bootstrap on anything less than 4GB RAM, of which only 3GB ends up usable.

It would be much better if kexec-fiwix could actually query the BIOS using the real e820 mechanism, and pass the received mapping on to Fiwix (which then passes it to Linux).

@Googulator
Copy link
Collaborator Author

This was implemented in #437 for Fiwix & Linux. Builder-hex2 is responsible for querying the memory map (still in 16-bit mode), but it doesn't directly utilize it, instead using a fixed memory map that tries to avoid regions typically used by BIOS & MMIO.
BIOSes that reserve memory in the middle of the range used by builder-hex2 are currently unsupported - so far, all such "BIOSes" turned out to be UEFIs in CSM mode, and the plan is to support them using the UEFI bootstrap mode and posix-runner.

Note that Fiwix currently has a bug related to this, where the memory map passed to Linux after kexec is slightly incorrect, see mikaku/Fiwix#72

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

1 participant