setup.h 2.6 KB

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