setup.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * Just a place holder. We don't want to have to test x86 before
  3. * we include stuff
  4. */
  5. #ifndef _i386_SETUP_H
  6. #define _i386_SETUP_H
  7. #define COMMAND_LINE_SIZE 2048
  8. #ifdef __KERNEL__
  9. #include <linux/pfn.h>
  10. /*
  11. * Reserved space for vmalloc and iomap - defined in asm/page.h
  12. */
  13. #define MAXMEM_PFN PFN_DOWN(MAXMEM)
  14. #define MAX_NONPAE_PFN (1 << 20)
  15. #define PARAM_SIZE 4096
  16. #define OLD_CL_MAGIC_ADDR 0x90020
  17. #define OLD_CL_MAGIC 0xA33F
  18. #define OLD_CL_BASE_ADDR 0x90000
  19. #define OLD_CL_OFFSET 0x90022
  20. #define NEW_CL_POINTER 0x228 /* Relative to real mode data */
  21. #ifndef __ASSEMBLY__
  22. #include <asm/bootparam.h>
  23. /*
  24. * This is set up by the setup-routine at boot-time
  25. */
  26. extern struct boot_params boot_params;
  27. #define PARAM ((char *)&boot_params)
  28. #define SCREEN_INFO (*(struct screen_info *) (PARAM+0))
  29. #define EXT_MEM_K (*(unsigned short *) (PARAM+2))
  30. #define ALT_MEM_K (*(unsigned long *) (PARAM+0x1e0))
  31. #define E820_MAP_NR (*(char*) (PARAM+E820NR))
  32. #define E820_MAP ((struct e820entry *) (PARAM+E820MAP))
  33. #define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+0x40))
  34. #define IST_INFO (*(struct ist_info *) (PARAM+0x60))
  35. #define SYS_DESC_TABLE (*(struct sys_desc_table *)(PARAM+0xa0))
  36. #define EFI_SYSTAB ((efi_system_table_t *) *((unsigned long *)(PARAM+0x1c4)))
  37. #define EFI_MEMDESC_SIZE (*((unsigned long *) (PARAM+0x1c8)))
  38. #define EFI_MEMDESC_VERSION (*((unsigned long *) (PARAM+0x1cc)))
  39. #define EFI_MEMMAP ((void *) *((unsigned long *)(PARAM+0x1d0)))
  40. #define EFI_MEMMAP_SIZE (*((unsigned long *) (PARAM+0x1d4)))
  41. #define MOUNT_ROOT_RDONLY (*(unsigned short *) (PARAM+0x1F2))
  42. #define RAMDISK_FLAGS (*(unsigned short *) (PARAM+0x1F8))
  43. #define VIDEO_MODE (*(unsigned short *) (PARAM+0x1FA))
  44. #define ORIG_ROOT_DEV (*(unsigned short *) (PARAM+0x1FC))
  45. #define AUX_DEVICE_INFO (*(unsigned char *) (PARAM+0x1FF))
  46. #define LOADER_TYPE (*(unsigned char *) (PARAM+0x210))
  47. #define KERNEL_START (*(unsigned long *) (PARAM+0x214))
  48. #define INITRD_START (*(unsigned long *) (PARAM+0x218))
  49. #define INITRD_SIZE (*(unsigned long *) (PARAM+0x21c))
  50. #define EDID_INFO (*(struct edid_info *) (PARAM+0x140))
  51. #define EDD_NR (*(unsigned char *) (PARAM+EDDNR))
  52. #define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF))
  53. #define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF))
  54. #define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF))
  55. /*
  56. * Do NOT EVER look at the BIOS memory size location.
  57. * It does not work on many machines.
  58. */
  59. #define LOWMEMSIZE() (0x9f000)
  60. struct e820entry;
  61. char * __init machine_specific_memory_setup(void);
  62. char *memory_setup(void);
  63. int __init copy_e820_map(struct e820entry * biosmap, int nr_map);
  64. int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map);
  65. void __init add_memory_region(unsigned long long start,
  66. unsigned long long size, int type);
  67. extern unsigned long init_pg_tables_end;
  68. #ifndef CONFIG_PARAVIRT
  69. #define paravirt_post_allocator_init() do {} while (0)
  70. #endif
  71. #endif /* __ASSEMBLY__ */
  72. #endif /* __KERNEL__ */
  73. #endif /* _i386_SETUP_H */