mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-22 07:20:00 +00:00
1b5e5ff68c
Xen PVH entry point requires to modify the environment provided by the boot loader, so that the ACPI RSDP is re-written to use the Xen generated RSDP instead of the native one. The current logic in the PVH entry point reserves a single page (4K) in order to copy the contents of the environment passed from the boot loader, so that the bootloader provided "acpi.rsdp" is dropped and a Xen specific one is added afterwards. This however doesn't scale well, as it's possible for the environment to be bigger than 4K. Bumping the buffer, or attempting to peek at the size of the metadata all seem to just add more complexity to a sensitive path. Instead introduce a new ACPI hook that allows setting the RSDP address directly, and use it from the PVH entry point to set the position of the Xen generated RSDP. This allows to reduce the logic in the PVH metadata processing, as there's no need to parse and filter the bootloader provided environment. Note that modifying the environment blob in-place is likely to not work. The RSDP address is provided as a string, it's possible the new RSDP location is higher than the current one, and the string with the new location would overrun the space used by the previous one. Sponsored by: Cloud Software Group PR: 277200 MFC: 3 days Reviewed by: markj kib Differential revision: https://reviews.freebsd.org/D46089 |
||
---|---|---|
.. | ||
acpi_apm.c | ||
madt.c | ||
OsdEnvironment.c | ||
srat.c |