mirror of
https://github.com/torvalds/linux.git
synced 2024-11-07 20:51:47 +00:00
5f68563996
Add missing annotations, and make use of include/linux/init.h's macros. Signed-off-by: Jan Beulich <jbeulich@novell.com> LKML-Reference: <4AA0E8F60200007800013703@vpn.id2.novell.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
34 lines
958 B
C
34 lines
958 B
C
#include <linux/io.h>
|
|
|
|
#include <asm/trampoline.h>
|
|
#include <asm/e820.h>
|
|
|
|
/* ready for x86_64 and x86 */
|
|
unsigned char *__cpuinitdata trampoline_base = __va(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
|
|
/* Has to be in very low memory so we can execute real-mode AP code. */
|
|
reserve_early(TRAMPOLINE_BASE, TRAMPOLINE_BASE + TRAMPOLINE_SIZE,
|
|
"TRAMPOLINE");
|
|
}
|
|
|
|
/*
|
|
* Currently trivial. Write the real->protected mode
|
|
* bootstrap into the page concerned. The caller
|
|
* has made sure it's suitably aligned.
|
|
*/
|
|
unsigned long __cpuinit setup_trampoline(void)
|
|
{
|
|
memcpy(trampoline_base, trampoline_data, TRAMPOLINE_SIZE);
|
|
return virt_to_phys(trampoline_base);
|
|
}
|