setup.h 2.5 KB

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