bootsetup.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef _X86_64_BOOTSETUP_H
  2. #define _X86_64_BOOTSETUP_H 1
  3. #define BOOT_PARAM_SIZE 4096
  4. extern char x86_boot_params[BOOT_PARAM_SIZE];
  5. /*
  6. * This is set up by the setup-routine at boot-time
  7. */
  8. #define PARAM ((unsigned char *)x86_boot_params)
  9. #define SCREEN_INFO (*(struct screen_info *) (PARAM+0))
  10. #define EXT_MEM_K (*(unsigned short *) (PARAM+2))
  11. #define ALT_MEM_K (*(unsigned int *) (PARAM+0x1e0))
  12. #define E820_MAP_NR (*(char*) (PARAM+E820NR))
  13. #define E820_MAP ((struct e820entry *) (PARAM+E820MAP))
  14. #define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+0x40))
  15. #define DRIVE_INFO (*(struct drive_info_struct *) (PARAM+0x80))
  16. #define SYS_DESC_TABLE (*(struct sys_desc_table_struct*)(PARAM+0xa0))
  17. #define MOUNT_ROOT_RDONLY (*(unsigned short *) (PARAM+0x1F2))
  18. #define RAMDISK_FLAGS (*(unsigned short *) (PARAM+0x1F8))
  19. #define SAVED_VIDEO_MODE (*(unsigned short *) (PARAM+0x1FA))
  20. #define ORIG_ROOT_DEV (*(unsigned short *) (PARAM+0x1FC))
  21. #define AUX_DEVICE_INFO (*(unsigned char *) (PARAM+0x1FF))
  22. #define LOADER_TYPE (*(unsigned char *) (PARAM+0x210))
  23. #define KERNEL_START (*(unsigned int *) (PARAM+0x214))
  24. #define INITRD_START (*(unsigned int *) (PARAM+0x218))
  25. #define INITRD_SIZE (*(unsigned int *) (PARAM+0x21c))
  26. #define EDID_INFO (*(struct edid_info *) (PARAM+0x140))
  27. #define EDD_NR (*(unsigned char *) (PARAM+EDDNR))
  28. #define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF))
  29. #define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF))
  30. #define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF))
  31. #define COMMAND_LINE boot_command_line
  32. #define RAMDISK_IMAGE_START_MASK 0x07FF
  33. #define RAMDISK_PROMPT_FLAG 0x8000
  34. #define RAMDISK_LOAD_FLAG 0x4000
  35. #endif