trampoline.c 454 B

123456789101112131415161718
  1. #include <linux/io.h>
  2. #include <asm/trampoline.h>
  3. /* ready for x86_64 and x86 */
  4. unsigned char *trampoline_base = __va(TRAMPOLINE_BASE);
  5. /*
  6. * Currently trivial. Write the real->protected mode
  7. * bootstrap into the page concerned. The caller
  8. * has made sure it's suitably aligned.
  9. */
  10. unsigned long setup_trampoline(void)
  11. {
  12. memcpy(trampoline_base, trampoline_data,
  13. trampoline_end - trampoline_data);
  14. return virt_to_phys(trampoline_base);
  15. }