From b126d01e9687e6509c9d49b1b174c95aee603a89 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Thu, 13 Nov 2014 00:35:06 +0100 Subject: fixing implicit functions! --- kernel/vesa.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 kernel/vesa.h (limited to 'kernel/vesa.h') diff --git a/kernel/vesa.h b/kernel/vesa.h new file mode 100644 index 0000000..89cb680 --- /dev/null +++ b/kernel/vesa.h @@ -0,0 +1,45 @@ +#include "lib/int/stdint.h" + +typedef struct foolfont_struct +{ + uint8_t line[10]; //every single fool font consists of 10 lines a 8 bit + +}foolfont; + +typedef struct vbeinfo_struct{ + char VbeSignature[4]; // == "VESA" + uint16_t VbeVersion; // == 0x0300 for VBE 3.0 + uint16_t OemStringPtr[2]; // isa vbeFarPtr + uint8_t Capabilities[4]; + uint16_t VideoModePtr[2]; // isa vbeFarPtr + uint16_t TotalMemory; // as # of 64KB blocks +}vbeinfo; + + +typedef struct ModeInfoBlock { + uint16_t attributes; + uint8_t winA,winB; + uint16_t granularity; + uint16_t winsize; + uint16_t segmentA, segmentB; + uint16_t realFctPtr[2]; +// VBE_FAR(realFctPtr); + uint16_t pitch; // bytes per scanline + + uint16_t Xres, Yres; + uint8_t Wchar, Ychar, planes, bpp, banks; + uint8_t memory_model, bank_size, image_pages; + uint8_t reserved0; + + uint8_t red_mask, red_position; + uint8_t green_mask, green_position; + uint8_t blue_mask, blue_position; + uint8_t rsv_mask, rsv_position; + uint8_t directcolor_attributes; + + volatile uint32_t physbase; // your LFB (Linear Framebuffer) address ;) + uint32_t reserved1; + uint16_t reserved2; +}vbemodeinfo; + +uint32_t vesa_init(vbeinfo *info,vbemodeinfo *mode,foolfont *rawfont); -- cgit v1.2.3