eboot.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. #ifndef BOOT_COMPRESSED_EBOOT_H
  2. #define BOOT_COMPRESSED_EBOOT_H
  3. #define SEG_TYPE_DATA (0 << 3)
  4. #define SEG_TYPE_READ_WRITE (1 << 1)
  5. #define SEG_TYPE_CODE (1 << 3)
  6. #define SEG_TYPE_EXEC_READ (1 << 1)
  7. #define SEG_TYPE_TSS ((1 << 3) | (1 << 0))
  8. #define SEG_OP_SIZE_32BIT (1 << 0)
  9. #define SEG_GRANULARITY_4KB (1 << 0)
  10. #define DESC_TYPE_CODE_DATA (1 << 0)
  11. #define EFI_CONSOLE_OUT_DEVICE_GUID \
  12. EFI_GUID(0xd3b36f2c, 0xd551, 0x11d4, 0x9a, 0x46, 0x0, 0x90, 0x27, \
  13. 0x3f, 0xc1, 0x4d)
  14. #define PIXEL_RGB_RESERVED_8BIT_PER_COLOR 0
  15. #define PIXEL_BGR_RESERVED_8BIT_PER_COLOR 1
  16. #define PIXEL_BIT_MASK 2
  17. #define PIXEL_BLT_ONLY 3
  18. #define PIXEL_FORMAT_MAX 4
  19. struct efi_pixel_bitmask {
  20. u32 red_mask;
  21. u32 green_mask;
  22. u32 blue_mask;
  23. u32 reserved_mask;
  24. };
  25. struct efi_graphics_output_mode_info {
  26. u32 version;
  27. u32 horizontal_resolution;
  28. u32 vertical_resolution;
  29. int pixel_format;
  30. struct efi_pixel_bitmask pixel_information;
  31. u32 pixels_per_scan_line;
  32. } __packed;
  33. struct efi_graphics_output_protocol_mode_32 {
  34. u32 max_mode;
  35. u32 mode;
  36. u32 info;
  37. u32 size_of_info;
  38. u64 frame_buffer_base;
  39. u32 frame_buffer_size;
  40. } __packed;
  41. struct efi_graphics_output_protocol_mode_64 {
  42. u32 max_mode;
  43. u32 mode;
  44. u64 info;
  45. u64 size_of_info;
  46. u64 frame_buffer_base;
  47. u64 frame_buffer_size;
  48. } __packed;
  49. struct efi_graphics_output_protocol_mode {
  50. u32 max_mode;
  51. u32 mode;
  52. unsigned long info;
  53. unsigned long size_of_info;
  54. u64 frame_buffer_base;
  55. unsigned long frame_buffer_size;
  56. } __packed;
  57. struct efi_graphics_output_protocol_32 {
  58. u32 query_mode;
  59. u32 set_mode;
  60. u32 blt;
  61. u32 mode;
  62. };
  63. struct efi_graphics_output_protocol_64 {
  64. u64 query_mode;
  65. u64 set_mode;
  66. u64 blt;
  67. u64 mode;
  68. };
  69. struct efi_graphics_output_protocol {
  70. void *query_mode;
  71. unsigned long set_mode;
  72. unsigned long blt;
  73. struct efi_graphics_output_protocol_mode *mode;
  74. };
  75. struct efi_uga_draw_protocol_32 {
  76. u32 get_mode;
  77. u32 set_mode;
  78. u32 blt;
  79. };
  80. struct efi_uga_draw_protocol_64 {
  81. u64 get_mode;
  82. u64 set_mode;
  83. u64 blt;
  84. };
  85. struct efi_uga_draw_protocol {
  86. void *get_mode;
  87. void *set_mode;
  88. void *blt;
  89. };
  90. struct efi_config {
  91. u64 image_handle;
  92. u64 table;
  93. u64 allocate_pool;
  94. u64 allocate_pages;
  95. u64 get_memory_map;
  96. u64 free_pool;
  97. u64 free_pages;
  98. u64 locate_handle;
  99. u64 handle_protocol;
  100. u64 exit_boot_services;
  101. u64 text_output;
  102. efi_status_t (*call)(unsigned long, ...);
  103. bool is64;
  104. } __packed;
  105. #endif /* BOOT_COMPRESSED_EBOOT_H */