1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-28 08:02:54 +00:00
freebsd/sys/x86/include
Roger Pau Monné 1b5e5ff68c xen/pvh: fix initialization of environment
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
2024-08-02 12:41:52 +02:00
..
xen intr/x86: replace use of vector in interface with intsrc 2024-05-09 17:15:07 -06:00
_align.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
_inttypes.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
_limits.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
_stdint.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
_types.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
acpica_machdep.h xen/pvh: fix initialization of environment 2024-08-02 12:41:52 +02:00
apicreg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
apicvar.h Increase IOAPIC_MAX_ID to 255 (from 254) 2024-05-10 15:40:18 -04:00
apm_bios.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
bus_dma.h Deprecate contigfree(9) in favour of free(9) 2024-07-26 10:45:01 +00:00
bus.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
busdma_impl.h busdma: tidy bus_dma_run_filter() functions 2023-12-06 19:11:39 -04:00
clock.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
cputypes.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dump.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
elf.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
endian.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
fdt.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
float.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
fpu.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
frame.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ifunc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
init.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
intr_machdep.h intr/x86: replace use of vector in interface with intsrc 2024-05-09 17:15:07 -06:00
iommu.h x86/iommu: extract useful utilities into x86_iommu.c 2024-05-25 08:32:01 +03:00
kvm.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
legacyvar.h new-bus: Remove the 'rid' and 'type' arguments from BUS_RELEASE_RESOURCE 2024-03-13 15:05:54 -07:00
mca.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
metadata.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mptable.h Retire non-NEW_PCIB code and remove config option 2024-07-18 18:55:12 +01:00
ofw_machdep.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
pci_cfgreg.h x86: Support multiple PCI MCFG regions 2023-11-29 10:32:39 -08:00
ppireg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
procctl.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
psl.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ptrace.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
pvclock.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
reg.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
segments.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
setjmp.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
sigframe.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
signal.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
specialreg.h AMD CPUs: update bits and data from CPUID 0x8000_0008 2024-05-15 02:06:23 +03:00
stack.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
stdarg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
sysarch.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
timerreg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
tls.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
trap.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ucode.h x86/ucode: add support for early loading of CPU ucode on AMD. 2024-02-22 10:04:31 -08:00
ucontext.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vdso.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vmware_guestrpc.h guestrpc module to handle VMware backdoor port GuestRPC functionality 2024-05-01 15:45:45 -04:00
vmware.h guestrpc module to handle VMware backdoor port GuestRPC functionality 2024-05-01 15:45:45 -04:00
x86_ieeefp.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
x86_smp.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
x86_var.h AMD CPUs: update bits and data from CPUID 0x8000_0008 2024-05-15 02:06:23 +03:00