eboot.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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_PAGE_SIZE (1UL << EFI_PAGE_SHIFT)
  12. #define EFI_READ_CHUNK_SIZE (1024 * 1024)
  13. #define PIXEL_RGB_RESERVED_8BIT_PER_COLOR 0
  14. #define PIXEL_BGR_RESERVED_8BIT_PER_COLOR 1
  15. #define PIXEL_BIT_MASK 2
  16. #define PIXEL_BLT_ONLY 3
  17. #define PIXEL_FORMAT_MAX 4
  18. struct efi_pixel_bitmask {
  19. u32 red_mask;
  20. u32 green_mask;
  21. u32 blue_mask;
  22. u32 reserved_mask;
  23. };
  24. struct efi_graphics_output_mode_info {
  25. u32 version;
  26. u32 horizontal_resolution;
  27. u32 vertical_resolution;
  28. int pixel_format;
  29. struct efi_pixel_bitmask pixel_information;
  30. u32 pixels_per_scan_line;
  31. } __packed;
  32. struct efi_graphics_output_protocol_mode {
  33. u32 max_mode;
  34. u32 mode;
  35. unsigned long info;
  36. unsigned long size_of_info;
  37. u64 frame_buffer_base;
  38. unsigned long frame_buffer_size;
  39. } __packed;
  40. struct efi_graphics_output_protocol {
  41. void *query_mode;
  42. unsigned long set_mode;
  43. unsigned long blt;
  44. struct efi_graphics_output_protocol_mode *mode;
  45. };
  46. struct efi_uga_draw_protocol {
  47. void *get_mode;
  48. void *set_mode;
  49. void *blt;
  50. };
  51. #endif /* BOOT_COMPRESSED_EBOOT_H */