bootboot: fix all the bad bugs

This commit is contained in:
pitust 2021-11-04 07:56:54 +00:00
parent db3af4b523
commit 8308cfb3f2
1 changed files with 5 additions and 2 deletions

View File

@ -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,6 +266,9 @@ void bootboot_load(char *config) {
rm_int(0x15, &r, &r);
#endif
pic_mask_all();
io_apic_mask_all();
irq_flush_type = IRQ_PIC_ONLY_FLUSH;
for (size_t i = 0;i < numcores;i++) {