aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/core
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2015-03-09 20:21:20 +0100
committerAlex Auvolat <alex@adnab.me>2015-03-09 20:21:20 +0100
commitf6acdfb863038a45709f0dc57884742c51fa6f07 (patch)
treed6a6e5a463ecf7a5f09dbc5a0cb73da32dc2b449 /src/kernel/core
parent45e1c020ae18c18ed0b31f7c12c53ccda2e4ac3a (diff)
downloadkogata-f6acdfb863038a45709f0dc57884742c51fa6f07.tar.gz
kogata-f6acdfb863038a45709f0dc57884742c51fa6f07.zip
Implement V86 monitor and VESA mode detection.
Diffstat (limited to 'src/kernel/core')
-rw-r--r--src/kernel/core/gdt.c3
-rw-r--r--src/kernel/core/kmain.c2
-rw-r--r--src/kernel/core/paging.c1
3 files changed, 4 insertions, 2 deletions
diff --git a/src/kernel/core/gdt.c b/src/kernel/core/gdt.c
index ed7abe0..d6b1e8d 100644
--- a/src/kernel/core/gdt.c
+++ b/src/kernel/core/gdt.c
@@ -50,6 +50,7 @@ typedef struct {
uint32_t ldt; // Unused...
uint16_t trap;
uint16_t iomap_base;
+ uint8_t iomap[8192];
} __attribute__((packed)) tss_entry_t;
// ========================= //
@@ -87,7 +88,7 @@ void gdt_init() {
tss_entry.ss0 = 0x10;
tss_entry.esp0 = 0;
- tss_entry.iomap_base = sizeof(tss_entry_t);
+ tss_entry.iomap_base = sizeof(tss_entry_t) - 8192;
uint32_t tss_base = (uint32_t)&tss_entry;
uint32_t tss_limit = tss_base + sizeof(tss_entry_t);
diff --git a/src/kernel/core/kmain.c b/src/kernel/core/kmain.c
index 9c81ca3..d23df1a 100644
--- a/src/kernel/core/kmain.c
+++ b/src/kernel/core/kmain.c
@@ -27,6 +27,7 @@
#include <dev/pci.h>
#include <dev/pciide.h>
+#include <dev/vesa.h>
#include <fs/iso9660.h>
#ifndef PRNG_INIT_ENTROPY
@@ -151,6 +152,7 @@ void kernel_init_stage2(void* data) {
// Scan for devices
pci_setup();
pciide_detect(iofs);
+ vesa_detect(iofs);
// Register FS drivers
register_iso9660_driver();
diff --git a/src/kernel/core/paging.c b/src/kernel/core/paging.c
index eec21f6..03a973f 100644
--- a/src/kernel/core/paging.c
+++ b/src/kernel/core/paging.c
@@ -200,7 +200,6 @@ bool pd_map_page(void* vaddr, uint32_t frame_id, bool rw) {
const uint32_t page = PAGE_OF_ADDR(vaddr);
ASSERT((size_t)vaddr < PD_MIRROR_ADDR);
- ASSERT(frame_id != 0);
bool on_kernel_pd = (size_t)vaddr >= K_HIGHHALF_ADDR || current_thread == 0;