bunch of work in progress on getting x86_64 bootstrap working.
[newos.git] / boot / x86_64 / vesa.h
blob6a5a47c6e98a6f238a75285c848f93a30897ad4b
1 /*
2 ** Copyright 2001, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
4 */
5 #ifndef _STAGE2_VESA_H
6 #define _STAGE2_VESA_H
8 #include <newos/types.h>
10 struct VBEInfoBlock {
11 char signature[4]; // should be 'VESA'
12 uint16 version;
13 uint32 oem_ptr;
14 uint32 capabilities;
15 uint32 video_ptr;
16 uint16 total_memory;
17 // VESA 2.x stuff
18 uint16 oem_software_rev;
19 uint32 oem_vendor_name_ptr;
20 uint32 oem_product_name_ptr;
21 uint32 oem_product_rev_ptr;
22 uint8 reserved[222];
23 uint8 oem_data[256];
24 } _PACKED;
26 struct VBEModeInfoBlock {
27 uint16 attributes;
28 uint8 wina_attributes;
29 uint8 winb_attributes;
30 uint16 win_granulatiry;
31 uint16 win_size;
32 uint16 wina_segment;
33 uint16 winb_segment;
34 uint32 win_function_ptr;
35 uint16 bytes_per_scanline;
37 uint16 x_resolution;
38 uint16 y_resolution;
39 uint8 x_charsize;
40 uint8 y_charsize;
41 uint8 num_planes;
42 uint8 bits_per_pixel;
43 uint8 num_banks;
44 uint8 memory_model;
45 uint8 bank_size;
46 uint8 num_image_pages;
47 uint8 _reserved;
49 uint8 red_mask_size;
50 uint8 red_field_position;
51 uint8 green_mask_size;
52 uint8 green_field_position;
53 uint8 blue_mask_size;
54 uint8 blue_field_position;
55 uint8 reserved_mask_size;
56 uint8 reserved_field_position;
57 uint8 direct_color_mode_info;
59 uint32 phys_base_ptr;
60 uint32 offscreen_mem_offset;
61 uint16 offscreen_mem_size;
62 uint8 _reserved2[206];
63 } _PACKED;
65 #endif