-
Glauber Costa authored
The algorithm we follow for memory discovery is quite simple: iterate over the E820h map, and for every type 1 (== RAM) memory, we increment total size, and map it linearly to our address space mappings. That breaks on xen, however. I have no idea what is seabios doing for KVM, but xen's hvmloader will put most of the ACPI tables at a reserved region around physical address 0xfc000000. When we try to parse the ACPI tables, we will reach an unmapped portion of the address space and fault (BTW, those faults are really hard to debug, we're triple faulting directly, at least in my setup) Luckily, the acpi driver code is prepared for such scenarios, and before using any of that memory it will call map and unmap functions - we just don't implement it. This patch implements the necessary map function - and while we are at it, its unmap counterpart. This is all far away from being performance critical, so I am being as dump as possible and just servicing the request without tracking any previous state. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com>
Glauber Costa authoredThe algorithm we follow for memory discovery is quite simple: iterate over the E820h map, and for every type 1 (== RAM) memory, we increment total size, and map it linearly to our address space mappings. That breaks on xen, however. I have no idea what is seabios doing for KVM, but xen's hvmloader will put most of the ACPI tables at a reserved region around physical address 0xfc000000. When we try to parse the ACPI tables, we will reach an unmapped portion of the address space and fault (BTW, those faults are really hard to debug, we're triple faulting directly, at least in my setup) Luckily, the acpi driver code is prepared for such scenarios, and before using any of that memory it will call map and unmap functions - we just don't implement it. This patch implements the necessary map function - and while we are at it, its unmap counterpart. This is all far away from being performance critical, so I am being as dump as possible and just servicing the request without tracking any previous state. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com>
menus NaN GiB