diff --git a/stage23/protos/bootboot.c b/stage23/protos/bootboot.c index 9f5726c4..301e2268 100644 --- a/stage23/protos/bootboot.c +++ b/stage23/protos/bootboot.c @@ -147,7 +147,7 @@ void bootboot_load(char *config) { cfgent[offset] = 0; } - + /// Identity mapping /// for (uint64_t i = 0; i < 0x400000000; i += 0x200000) { map_page(pmap, i, i, 0x03, true); } @@ -249,7 +249,7 @@ void bootboot_load(char *config) { if (e820e[i].type == 3) btype = 2; if (e820e[i].type == 4) btype = 2; - bootboot->mmap[i].size = (e820e[i].length & 0xF) | btype; + bootboot->mmap[i].size = (e820e[i].length & ~0xF) | btype; bootboot->mmap[i].ptr = e820e[i].base; } bootboot->size = 128 + mmapent * 16; @@ -266,7 +266,10 @@ void bootboot_load(char *config) { rm_int(0x15, &r, &r); #endif - irq_flush_type = IRQ_PIC_ONLY_FLUSH; + pic_mask_all(); + io_apic_mask_all(); + + irq_flush_type = IRQ_PIC_APIC_FLUSH; for (size_t i = 0;i < numcores;i++) { cores[i].extra_argument = 0;