smpboot_hooks.h 1013 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* two abstractions specific to kernel/smpboot.c, mainly to cater to visws
  2. * which needs to alter them. */
  3. static inline void smpboot_clear_io_apic_irqs(void)
  4. {
  5. io_apic_irqs = 0;
  6. }
  7. static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
  8. {
  9. CMOS_WRITE(0xa, 0xf);
  10. local_flush_tlb();
  11. Dprintk("1.\n");
  12. *((volatile unsigned short *) TRAMPOLINE_HIGH) = start_eip >> 4;
  13. Dprintk("2.\n");
  14. *((volatile unsigned short *) TRAMPOLINE_LOW) = start_eip & 0xf;
  15. Dprintk("3.\n");
  16. }
  17. static inline void smpboot_restore_warm_reset_vector(void)
  18. {
  19. /*
  20. * Install writable page 0 entry to set BIOS data area.
  21. */
  22. local_flush_tlb();
  23. /*
  24. * Paranoid: Set warm reset code and vector here back
  25. * to default values.
  26. */
  27. CMOS_WRITE(0, 0xf);
  28. *((volatile long *) phys_to_virt(0x467)) = 0;
  29. }
  30. static inline void smpboot_setup_io_apic(void)
  31. {
  32. /*
  33. * Here we can be sure that there is an IO-APIC in the system. Let's
  34. * go and set it up:
  35. */
  36. if (!skip_ioapic_setup && nr_ioapics)
  37. setup_IO_APIC();
  38. }