setup.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #ifndef _ASM_X86_SETUP_H
  2. #define _ASM_X86_SETUP_H
  3. #define COMMAND_LINE_SIZE 2048
  4. #ifndef __ASSEMBLY__
  5. /* Interrupt control for vSMPowered x86_64 systems */
  6. void vsmp_init(void);
  7. #ifdef CONFIG_X86_VISWS
  8. extern void visws_early_detect(void);
  9. extern int is_visws_box(void);
  10. #else
  11. static inline void visws_early_detect(void) { }
  12. static inline int is_visws_box(void) { return 0; }
  13. #endif
  14. extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
  15. extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip);
  16. /*
  17. * Any setup quirks to be performed?
  18. */
  19. struct mpc_config_processor;
  20. struct mpc_config_bus;
  21. struct mp_config_oemtable;
  22. struct x86_quirks {
  23. int (*arch_pre_time_init)(void);
  24. int (*arch_time_init)(void);
  25. int (*arch_pre_intr_init)(void);
  26. int (*arch_intr_init)(void);
  27. int (*arch_trap_init)(void);
  28. char * (*arch_memory_setup)(void);
  29. int (*mach_get_smp_config)(unsigned int early);
  30. int (*mach_find_smp_config)(unsigned int reserve);
  31. int *mpc_record;
  32. int (*mpc_apic_id)(struct mpc_config_processor *m);
  33. void (*mpc_oem_bus_info)(struct mpc_config_bus *m, char *name);
  34. void (*mpc_oem_pci_bus)(struct mpc_config_bus *m);
  35. void (*smp_read_mpc_oem)(struct mp_config_oemtable *oemtable,
  36. unsigned short oemsize);
  37. int (*setup_ioapic_ids)(void);
  38. int (*update_genapic)(void);
  39. };
  40. extern struct x86_quirks *x86_quirks;
  41. extern unsigned long saved_video_mode;
  42. #ifndef CONFIG_PARAVIRT
  43. #define paravirt_post_allocator_init() do {} while (0)
  44. #endif
  45. #endif /* __ASSEMBLY__ */
  46. #ifdef __KERNEL__
  47. #ifdef __i386__
  48. #include <linux/pfn.h>
  49. /*
  50. * Reserved space for vmalloc and iomap - defined in asm/page.h
  51. */
  52. #define MAXMEM_PFN PFN_DOWN(MAXMEM)
  53. #define MAX_NONPAE_PFN (1 << 20)
  54. #endif /* __i386__ */
  55. #define PARAM_SIZE 4096 /* sizeof(struct boot_params) */
  56. #define OLD_CL_MAGIC 0xA33F
  57. #define OLD_CL_ADDRESS 0x020 /* Relative to real mode data */
  58. #define NEW_CL_POINTER 0x228 /* Relative to real mode data */
  59. #ifndef __ASSEMBLY__
  60. #include <asm/bootparam.h>
  61. #ifndef _SETUP
  62. /*
  63. * This is set up by the setup-routine at boot-time
  64. */
  65. extern struct boot_params boot_params;
  66. /*
  67. * Do NOT EVER look at the BIOS memory size location.
  68. * It does not work on many machines.
  69. */
  70. #define LOWMEMSIZE() (0x9f000)
  71. #ifdef __i386__
  72. void __init i386_start_kernel(void);
  73. extern void probe_roms(void);
  74. extern unsigned long init_pg_tables_start;
  75. extern unsigned long init_pg_tables_end;
  76. #else
  77. void __init x86_64_init_pda(void);
  78. void __init x86_64_start_kernel(char *real_mode);
  79. void __init x86_64_start_reservations(char *real_mode_data);
  80. #endif /* __i386__ */
  81. #endif /* _SETUP */
  82. #endif /* __ASSEMBLY__ */
  83. #endif /* __KERNEL__ */
  84. #endif /* _ASM_X86_SETUP_H */