diff options
author | Marvin Borner | 2019-09-25 22:57:33 +0200 |
---|---|---|
committer | Marvin Borner | 2019-09-25 22:57:33 +0200 |
commit | 8ebf584bbb43584b671b79d5166e00268a7c9661 (patch) | |
tree | 466abea4e6da201e7b432d7394e1bf21cbbe1d98 /src/kernel/graphics/vesa.h | |
parent | 16b8a48d1de16a5982cf983a282832fd4ed01f85 (diff) |
Fixed several TTY bugs and improved VESA detection
Diffstat (limited to 'src/kernel/graphics/vesa.h')
-rw-r--r-- | src/kernel/graphics/vesa.h | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/kernel/graphics/vesa.h b/src/kernel/graphics/vesa.h index dd67123..7458a47 100644 --- a/src/kernel/graphics/vesa.h +++ b/src/kernel/graphics/vesa.h @@ -4,39 +4,39 @@ #include <stdint.h> typedef struct __attribute__ ((packed)) { - char signature[4]; // must be "VESA" to indicate valid VBE support - uint32_t version; // VBE version; high byte is major version, low byte is minor version - uint32_t oem; // segment:offset pointer to OEM - uint32_t capabilities; // bitfield that describes card capabilities - uint32_t video_modes; // segment:offset pointer to list of supported video modes - uint32_t video_memory; // amount of video memory in 64KB blocks - uint32_t software_rev; // software revision - uint32_t vendor; // segment:offset to card vendor string - uint32_t product_name; // segment:offset to card model name - uint32_t product_rev; // segment:offset pointer to product revision - char reserved[222]; // reserved for future expansion - char oem_data[256]; // OEM BIOSes store their strings in this area + char signature[4]; + uint32_t version; + uint32_t oem; + uint32_t capabilities; + uint32_t video_modes; + uint32_t video_memory; + uint32_t software_rev; + uint32_t vendor; + uint32_t product_name; + uint32_t product_rev; + char reserved[222]; + char oem_data[256]; } vbe_info; typedef struct __attribute__ ((packed)) { - uint16_t attributes; // deprecated, only bit 7 should be of interest to you, and it indicates the mode supports a linear frame buffer. - uint8_t window_a; // deprecated - uint8_t window_b; // deprecated - uint16_t granularity; // deprecated; used while calculating bank numbers + uint16_t attributes; + uint8_t window_a; + uint8_t window_b; + uint16_t granularity; uint16_t window_size; uint16_t segment_a; uint16_t segment_b; - uint32_t win_func_ptr; // deprecated; used to switch banks from protected mode without returning to real mode - uint16_t pitch; // number of bytes per horizontal line - uint16_t width; // width in pixels - uint16_t height; // height in pixels - uint8_t w_char; // unused... - uint8_t y_char; // ... + uint32_t win_func_ptr; + uint16_t pitch; + uint16_t width; + uint16_t height; + uint8_t w_char; + uint8_t y_char; uint8_t planes; - uint8_t bpp; // bits per pixel in this mode - uint8_t banks; // deprecated; total number of banks in this mode + uint8_t bpp; + uint8_t banks; uint8_t memory_model; - uint8_t bank_size; // deprecated; size of a bank, almost always 64 KB but may be 16 KB... + uint8_t bank_size; uint8_t image_pages; uint8_t reserved0; @@ -50,9 +50,9 @@ typedef struct __attribute__ ((packed)) { uint8_t reserved_position; uint8_t direct_color_attributes; - uint32_t framebuffer; // physical address of the linear frame buffer; write here to draw to the screen + uint32_t framebuffer; uint32_t off_screen_mem_off; - uint16_t off_screen_mem_size; // size of memory in the framebuffer but not being displayed on the screen + uint16_t off_screen_mem_size; uint8_t reserved1[206]; } vbe_mode_info; |