Just found a little bit of spare time in between assignment and exams and am going back over some ELF code I have trying to make it better. I've noticed a lot of calls like this:
Code: Select all
MapPage( newcr3, prghdrs[i].p_vaddr + (0x1000 * z), ((uint32_t) secptr) + (0x1000 * z), pageflags );
MapPage( 0xfffff000, 0xf2000000 + (0x1000 * z), ((uint32_t) secptr) + (0x1000 * z), PF_PRESENT | PF_READWRITE | PF_USER | PF_KERNELPAGE );
Is it plausible to switch page directories when creating a new task and avoid this mapping mess? I know for sure caches will be a problem with switching the page directories, but is switching a better way than what I'm doing now? Thanks in advance!