Merge pull request #122 from pitust/trunk

bootboot: fix all the bad bugs
This commit is contained in:
mint 2021-11-04 09:32:25 +01:00 committed by GitHub
commit 5006077c51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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,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;