Skip to content

Commit

Permalink
[arch][x86] a few little tweaks while looking at some older code
Browse files Browse the repository at this point in the history
  • Loading branch information
travisg committed Nov 28, 2024
1 parent adde2d6 commit 77eb84d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/x86/arch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -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;
Expand Down

0 comments on commit 77eb84d

Please sign in to comment.