/* SPDX-License-Identifier: GPL-2.0-or-later */1/* ----------------------------------------------------------------------- *2*3* Copyright 1999-2007 H. Peter Anvin - All Rights Reserved4*5* ----------------------------------------------------------------------- */67#ifndef BOOT_VESA_H8#define BOOT_VESA_H910typedef struct {11u16 off, seg;12} far_ptr;1314/* VESA General Information table */15struct vesa_general_info {16u32 signature; /* 0 Magic number = "VESA" */17u16 version; /* 4 */18far_ptr vendor_string; /* 6 */19u32 capabilities; /* 10 */20far_ptr video_mode_ptr; /* 14 */21u16 total_memory; /* 18 */2223u8 reserved[236]; /* 20 */24} __attribute__ ((packed));2526#define VESA_MAGIC ('V' + ('E' << 8) + ('S' << 16) + ('A' << 24))2728struct vesa_mode_info {29u16 mode_attr; /* 0 */30u8 win_attr[2]; /* 2 */31u16 win_grain; /* 4 */32u16 win_size; /* 6 */33u16 win_seg[2]; /* 8 */34far_ptr win_scheme; /* 12 */35u16 logical_scan; /* 16 */3637u16 h_res; /* 18 */38u16 v_res; /* 20 */39u8 char_width; /* 22 */40u8 char_height; /* 23 */41u8 memory_planes; /* 24 */42u8 bpp; /* 25 */43u8 banks; /* 26 */44u8 memory_layout; /* 27 */45u8 bank_size; /* 28 */46u8 image_planes; /* 29 */47u8 page_function; /* 30 */4849u8 rmask; /* 31 */50u8 rpos; /* 32 */51u8 gmask; /* 33 */52u8 gpos; /* 34 */53u8 bmask; /* 35 */54u8 bpos; /* 36 */55u8 resv_mask; /* 37 */56u8 resv_pos; /* 38 */57u8 dcm_info; /* 39 */5859u32 lfb_ptr; /* 40 Linear frame buffer address */60u32 offscreen_ptr; /* 44 Offscreen memory address */61u16 offscreen_size; /* 48 */6263u8 reserved[206]; /* 50 */64} __attribute__ ((packed));6566#endif /* LIB_SYS_VESA_H */676869