Finished basic task switching mechansim

PCB is local to a process's address space.
Context switches are written in assembly.
Moved x86 headers to include/x86
This commit is contained in:
2021-04-19 03:40:33 -05:00
parent 086dfe546a
commit 5efc389935
22 changed files with 246 additions and 162 deletions

View File

@@ -1,7 +1,7 @@
#include "mmgr.h"
#include "allocator.h"
#include "apic.h"
#include "msr.h"
#include "x86/apic.h"
#include "x86/msr.h"
#include "stdio.h"
#include <stddef.h>
@@ -38,6 +38,7 @@ void apic_enable(struct page_stact_t *page_stack)
map_page(page_stack, apic_registers, msr.apic_base << 12, PAGE_RW);
printf("MSR_APIC_BASE: %016x\n", *((uint32_t*)&msr));
apic_registers->spurious_iv.value = apic_registers->spurious_iv.value | 0x1FF;
apic_registers->destination_format.value = 0xFFFFFFFF;
}
void apic_eoi()