]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/realmode: Make the location of the trampoline configurable
authorYunhong Jiang <yunhong.jiang@linux.intel.com>
Wed, 4 Mar 2026 23:41:17 +0000 (15:41 -0800)
committerDexuan Cui <decui@microsoft.com>
Thu, 28 May 2026 20:01:25 +0000 (20:01 +0000)
commita7ac1ea1f06314f6690ac772e9a31d6e2db977fa
treea598ef744b1872ba2411d4729a3fac69f5e1ad16
parent7e4c083ece42ed6c90e4071772847db595081e0e
x86/realmode: Make the location of the trampoline configurable

x86 CPUs boot in real mode. This mode uses a 1MB address space. The
trampoline must reside below this 1MB memory boundary.

There are platforms in which the firmware boots the secondary CPUs,
switches them to long mode and transfers control to the kernel. An example
of such a mechanism is the ACPI Multiprocessor Wakeup Structure.

In this scenario there is no restriction on locating the trampoline under
1MB memory. Moreover, certain platforms (for example, Hyper-V VTL guests)
may not have memory available for allocation below 1MB.

Add a new member to struct x86_init_resources to specify the upper bound
for the location of the trampoline memory. Preserve the default upper bound
of 1MB to conserve the current behavior.

Reviewed-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Originally-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Dexuan Cui <dexuan@kernel.org>
arch/x86/include/asm/x86_init.h
arch/x86/kernel/x86_init.c
arch/x86/realmode/init.c