[arch][x86] a few little tweaks while looking at some older code

This commit is contained in:
Travis Geiselbrecht
2024-11-27 21:34:05 -08:00
parent adde2d64ba
commit 77eb84d152

View File

@@ -40,7 +40,11 @@ struct mmu_initial_mapping mmu_initial_mappings[] = {
{
.phys = MEMBASE,
.virt = KERNEL_BASE,
#if X86_LEGACY
.size = 16*MB, /* only map the first 16MB on legacy x86 due to page table usage */
#else
.size = 1*GB, /* x86 maps first 1GB by default */
#endif
.flags = 0,
.name = "kernel"
},
@@ -66,8 +70,6 @@ void arch_early_init(void) {
/* enable caches here for now */
clear_in_cr0(X86_CR0_NW | X86_CR0_CD);
memset(&system_tss, 0, sizeof(system_tss));
#if ARCH_X86_32
system_tss.esp0 = 0;
system_tss.ss0 = DATA_SELECTOR;