couple of bits on the x86_64 boot code
[newos.git] / boot / pc / x86_64 / vesa.h
blob7ccd9e33f937b51dccddc77f398962a89efed4ad
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>
9 #include <newos/compiler.h>
11 struct VBEInfoBlock {
12 char signature[4]; // should be 'VESA'
13 uint16 version;
14 uint32 oem_ptr;
15 uint32 capabilities;
16 uint32 video_ptr;
17 uint16 total_memory;
18 // VESA 2.x stuff
19 uint16 oem_software_rev;
20 uint32 oem_vendor_name_ptr;
21 uint32 oem_product_name_ptr;
22 uint32 oem_product_rev_ptr;
23 uint8 reserved[222];
24 uint8 oem_data[256];
25 } _PACKED;
27 struct VBEModeInfoBlock {
28 uint16 attributes;
29 uint8 wina_attributes;
30 uint8 winb_attributes;
31 uint16 win_granulatiry;
32 uint16 win_size;
33 uint16 wina_segment;
34 uint16 winb_segment;
35 uint32 win_function_ptr;
36 uint16 bytes_per_scanline;
38 uint16 x_resolution;
39 uint16 y_resolution;
40 uint8 x_charsize;
41 uint8 y_charsize;
42 uint8 num_planes;
43 uint8 bits_per_pixel;
44 uint8 num_banks;
45 uint8 memory_model;
46 uint8 bank_size;
47 uint8 num_image_pages;
48 uint8 _reserved;
50 uint8 red_mask_size;
51 uint8 red_field_position;
52 uint8 green_mask_size;
53 uint8 green_field_position;
54 uint8 blue_mask_size;
55 uint8 blue_field_position;
56 uint8 reserved_mask_size;
57 uint8 reserved_field_position;
58 uint8 direct_color_mode_info;
60 uint32 phys_base_ptr;
61 uint32 offscreen_mem_offset;
62 uint16 offscreen_mem_size;
63 uint8 _reserved2[206];
64 } _PACKED;
66 #endif