1/** 2 * \file 3 * \brief Struct definition for the boot param struct supplied by the 4 * K1OM boot loader 5 */ 6 7/* 8 * Copyright (c) 2013 ETH Zurich. 9 * All rights reserved. 10 * 11 * This file is distributed under the terms in the attached LICENSE file. 12 * If you do not find this file, copies can be found by writing to: 13 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. 14 * 15 * This is adapted from the Linux kernel (kernel.org) 16 * 17 */ 18#ifndef KERNEL_SCREEN_INFO_H 19#define KERNEL_SCREEN_INFO_H 20 21/* 22 * These are set up by the setup-routine at boot-time: 23 */ 24 25struct screen_info 26{ 27 uint8_t orig_x; /* 0x00 */ 28 uint8_t orig_y; /* 0x01 */ 29 uint16_t ext_mem_k; /* 0x02 */ 30 uint16_t orig_video_page; /* 0x04 */ 31 uint8_t orig_video_mode; /* 0x06 */ 32 uint8_t orig_video_cols; /* 0x07 */ 33 uint8_t flags; /* 0x08 */ 34 uint8_t unused2; /* 0x09 */ 35 uint16_t orig_video_ega_bx; /* 0x0a */ 36 uint16_t unused3; /* 0x0c */ 37 uint8_t orig_video_lines; /* 0x0e */ 38 uint8_t orig_video_isVGA; /* 0x0f */ 39 uint16_t orig_video_points; /* 0x10 */ 40 41 /* VESA graphic mode -- linear frame buffer */ 42 uint16_t lfb_width; /* 0x12 */ 43 uint16_t lfb_height; /* 0x14 */ 44 uint16_t lfb_depth; /* 0x16 */ 45 uint32_t lfb_base; /* 0x18 */ 46 uint32_t lfb_size; /* 0x1c */ 47 uint16_t cl_magic, cl_offset; /* 0x20 */ 48 uint16_t lfb_linelength; /* 0x24 */ 49 uint8_t red_size; /* 0x26 */ 50 uint8_t red_pos; /* 0x27 */ 51 uint8_t green_size; /* 0x28 */ 52 uint8_t green_pos; /* 0x29 */ 53 uint8_t blue_size; /* 0x2a */ 54 uint8_t blue_pos; /* 0x2b */ 55 uint8_t rsvd_size; /* 0x2c */ 56 uint8_t rsvd_pos; /* 0x2d */ 57 uint16_t vesapm_seg; /* 0x2e */ 58 uint16_t vesapm_off; /* 0x30 */ 59 uint16_t pages; /* 0x32 */ 60 uint16_t vesa_attributes; /* 0x34 */ 61 uint32_t capabilities; /* 0x36 */ 62 uint8_t _reserved[6]; /* 0x3a */ 63}__attribute__((packed)); 64 65#define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */ 66#define VIDEO_TYPE_CGA 0x11 /* CGA Display */ 67#define VIDEO_TYPE_EGAM 0x20 /* EGA/VGA in Monochrome Mode */ 68#define VIDEO_TYPE_EGAC 0x21 /* EGA in Color Mode */ 69#define VIDEO_TYPE_VGAC 0x22 /* VGA+ in Color Mode */ 70#define VIDEO_TYPE_VLFB 0x23 /* VESA VGA in graphic mode */ 71 72#define VIDEO_TYPE_PICA_S3 0x30 /* ACER PICA-61 local S3 video */ 73#define VIDEO_TYPE_MIPS_G364 0x31 /* MIPS Magnum 4000 G364 video */ 74#define VIDEO_TYPE_SGI 0x33 /* Various SGI graphics hardware */ 75 76#define VIDEO_TYPE_TGAC 0x40 /* DEC TGA */ 77 78#define VIDEO_TYPE_SUN 0x50 /* Sun frame buffer. */ 79#define VIDEO_TYPE_SUNPCI 0x51 /* Sun PCI based frame buffer. */ 80 81#define VIDEO_TYPE_PMAC 0x60 /* PowerMacintosh frame buffer. */ 82 83#define VIDEO_TYPE_EFI 0x70 /* EFI graphic mode */ 84 85#define VIDEO_FLAGS_NOCURSOR (1<<0) /* The video mode has no cursor set */ 86 87#define VIDEO_CAPABILITY_SKIP_QUIRKS (1 << 0) 88 89#endif /* KERNEL_SCREEN_INFO_H */ 90