1
0
mirror of https://gitlab.os-k.eu/os-k-team/os-k.git synced 2023-08-25 14:03:10 +02:00

For the terminal stuff

This commit is contained in:
Adrien Bourmault 2019-03-23 20:34:32 +01:00
parent 45920797c3
commit 404b06dc6a
2 changed files with 28 additions and 5 deletions

View File

@ -137,14 +137,15 @@ struct BootInfo_t
// Informations about the video drive // Informations about the video drive
struct { struct {
ushort valid; ushort vbeValid;
uint vbeControl; //vbe_control_info ushort fbuValid;
uint vbeModeInfo; //vbe_mode_info void *vbeControl; //vbe_control_info
void *vbeModeInfo; //vbe_mode_info
ushort vbeMode; //vbe_mode ushort vbeMode; //vbe_mode
ushort vbeInterfaceSeg; //vbe_interface_seg ushort vbeInterfaceSeg; //vbe_interface_seg
ushort vbeInterfaceOff; //vbe_interface_off ushort vbeInterfaceOff; //vbe_interface_off
ushort vbeInterfaceLen; //vbe_interface_len ushort vbeInterfaceLen; //vbe_interface_len
void* framebufferAddr; //framebuffer_addr void *framebufferAddr; //framebuffer_addr
uint framebufferPitch; //framebuffer_pitch uint framebufferPitch; //framebuffer_pitch
uint framebufferWidth; //framebuffer_width uint framebufferWidth; //framebuffer_width
uint framebufferHeight; //framebuffer_height uint framebufferHeight; //framebuffer_height

View File

@ -74,7 +74,25 @@ void InitBootInfo(multiboot_info_t *mbi)
GetBootInfo(memory).mapValid = 1; GetBootInfo(memory).mapValid = 1;
} }
// XXX assign video infos, but unused at this time // Retrieves video mode informations
if (GetBootInfo(btldr).grubFlags & MULTIBOOT_INFO_VBE_INFO) {
GetBootInfo(video).vbeControl = (void*)(ullong)mbi->vbe_control_info;
GetBootInfo(video).vbeModeInfo = (void*)(ullong)mbi->vbe_mode_info;
GetBootInfo(video).vbeMode = mbi->vbe_mode;
GetBootInfo(video).vbeInterfaceSeg = mbi->vbe_interface_seg;
GetBootInfo(video).vbeInterfaceOff = mbi->vbe_interface_off;
GetBootInfo(video).vbeInterfaceLen = mbi->vbe_interface_len;
GetBootInfo(video).vbeValid = 1;
}
if (GetBootInfo(btldr).grubFlags & MULTIBOOT_INFO_FRAMEBUFFER_INFO) {
GetBootInfo(video).framebufferAddr = (void*)(ullong)mbi->framebuffer_addr;
GetBootInfo(video).framebufferPitch = mbi->framebuffer_pitch;
GetBootInfo(video).framebufferWidth = mbi->framebuffer_width;
GetBootInfo(video).framebufferHeight= mbi->framebuffer_height;
GetBootInfo(video).framebufferBpp = mbi->framebuffer_bpp;
GetBootInfo(video).framebufferType = mbi->framebuffer_type;
GetBootInfo(video).fbuValid = 1;
}
// Retrieves the firmware infos // Retrieves the firmware infos
if (GetBootInfo(btldr).grubFlags & MULTIBOOT_INFO_CONFIG_TABLE) { if (GetBootInfo(btldr).grubFlags & MULTIBOOT_INFO_CONFIG_TABLE) {
@ -99,6 +117,10 @@ void InitBootInfo(multiboot_info_t *mbi)
GetBootInfo(memory).memValid ? okStr : noStr); GetBootInfo(memory).memValid ? okStr : noStr);
DebugLog("[InitBootInfo] Memory map %s\n", DebugLog("[InitBootInfo] Memory map %s\n",
GetBootInfo(memory).mapValid ? okStr : noStr); GetBootInfo(memory).mapValid ? okStr : noStr);
DebugLog("[InitBootInfo] Video infos %s\n",
GetBootInfo(video).vbeValid ? okStr : noStr);
DebugLog("[InitBootInfo] Framebuffer %s\n",
GetBootInfo(video).fbuValid ? okStr : noStr);
DebugLog("[InitBootInfo] ROM table %s\n", DebugLog("[InitBootInfo] ROM table %s\n",
GetBootInfo(firmware).romValid ? okStr : noStr); GetBootInfo(firmware).romValid ? okStr : noStr);
DebugLog("[InitBootInfo] APM table %s\n\n", DebugLog("[InitBootInfo] APM table %s\n\n",