crosvm/x86_64
Daniel Verkamp 123b6f8b82 x86_64: simplify e820 memory map
crosvm originally omitted the region between (just below) 640 KB and up
to the kernel load address (2 MB) from the e820 memory map provided to
the kernel. This region is traditionally used for video memory, BIOS,
and option ROMs in the PC architecture, but crosvm doesn't emulate any
of the legacy hardware that would use this region; all of the low memory
is actually just RAM.

The memory map we report is only used for the direct kernel boot case,
so it does not affect the memory layout reported when booting with a
BIOS/UEFI firmware.

Before:

[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[    0.000000] BIOS-e820: [mem 0x0000000000200000-0x00000000cfffffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000f4000000-0x00000000f7ffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x00000001687fffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000168800000-0x00000001707fffff] reserved

After:

[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x00000000cfffffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000f4000000-0x00000000f7ffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x00000001687fffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000168800000-0x00000001707fffff] reserved

BUG=None
TEST=Boot x86-64 Linux kernel and OVMF

Change-Id: I11fc377e466bc3aacadc21be0aad8db06712c248
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5518127
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2024-05-07 00:19:47 +00:00
..
src x86_64: simplify e820 memory map 2024-05-07 00:19:47 +00:00
tests devices: Allow GPEs to wake up VCPUs 2024-05-02 01:26:42 +00:00
Cargo.toml