setup.h 2.7 KB

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