setup.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. };
  36. extern struct x86_quirks *x86_quirks;
  37. extern unsigned long saved_video_mode;
  38. #ifndef CONFIG_PARAVIRT
  39. #define paravirt_post_allocator_init() do {} while (0)
  40. #endif
  41. #endif /* __ASSEMBLY__ */
  42. #ifdef __KERNEL__
  43. #ifdef __i386__
  44. #include <linux/pfn.h>
  45. /*
  46. * Reserved space for vmalloc and iomap - defined in asm/page.h
  47. */
  48. #define MAXMEM_PFN PFN_DOWN(MAXMEM)
  49. #define MAX_NONPAE_PFN (1 << 20)
  50. #endif /* __i386__ */
  51. #define PARAM_SIZE 4096 /* sizeof(struct boot_params) */
  52. #define OLD_CL_MAGIC 0xA33F
  53. #define OLD_CL_ADDRESS 0x020 /* Relative to real mode data */
  54. #define NEW_CL_POINTER 0x228 /* Relative to real mode data */
  55. #ifndef __ASSEMBLY__
  56. #include <asm/bootparam.h>
  57. #ifndef _SETUP
  58. /*
  59. * This is set up by the setup-routine at boot-time
  60. */
  61. extern struct boot_params boot_params;
  62. /*
  63. * Do NOT EVER look at the BIOS memory size location.
  64. * It does not work on many machines.
  65. */
  66. #define LOWMEMSIZE() (0x9f000)
  67. #ifdef __i386__
  68. void __init i386_start_kernel(void);
  69. extern void probe_roms(void);
  70. extern unsigned long init_pg_tables_start;
  71. extern unsigned long init_pg_tables_end;
  72. #else
  73. void __init x86_64_init_pda(void);
  74. void __init x86_64_start_kernel(char *real_mode);
  75. void __init x86_64_start_reservations(char *real_mode_data);
  76. #endif /* __i386__ */
  77. #endif /* _SETUP */
  78. #endif /* __ASSEMBLY__ */
  79. #endif /* __KERNEL__ */
  80. #endif /* ASM_X86__SETUP_H */