|
@@ -12,21 +12,19 @@
|
|
|
#endif
|
|
|
|
|
|
/* ready for x86_64 and x86 */
|
|
|
-unsigned char *__trampinitdata trampoline_base = __va(TRAMPOLINE_BASE);
|
|
|
+unsigned char *__trampinitdata trampoline_base;
|
|
|
|
|
|
void __init reserve_trampoline_memory(void)
|
|
|
{
|
|
|
-#ifdef CONFIG_X86_32
|
|
|
- /*
|
|
|
- * But first pinch a few for the stack/trampoline stuff
|
|
|
- * FIXME: Don't need the extra page at 4K, but need to fix
|
|
|
- * trampoline before removing it. (see the GDT stuff)
|
|
|
- */
|
|
|
- reserve_early(PAGE_SIZE, PAGE_SIZE + PAGE_SIZE, "EX TRAMPOLINE");
|
|
|
-#endif
|
|
|
+ unsigned long mem;
|
|
|
+
|
|
|
/* Has to be in very low memory so we can execute real-mode AP code. */
|
|
|
- reserve_early(TRAMPOLINE_BASE, TRAMPOLINE_BASE + TRAMPOLINE_SIZE,
|
|
|
- "TRAMPOLINE");
|
|
|
+ mem = find_e820_area(0, 1<<20, TRAMPOLINE_SIZE, PAGE_SIZE);
|
|
|
+ if (mem == -1L)
|
|
|
+ panic("Cannot allocate trampoline\n");
|
|
|
+
|
|
|
+ trampoline_base = __va(mem);
|
|
|
+ reserve_early(mem, mem + TRAMPOLINE_SIZE, "TRAMPOLINE");
|
|
|
}
|
|
|
|
|
|
/*
|