1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

check if the apic_table raises a page boundary

=> if yes, map next page frame to the kernel space
This commit is contained in:
Stefan Lankes 2015-10-31 09:09:12 +01:00
parent 22c698619e
commit 262f809378

View file

@ -457,6 +457,13 @@ found_mp:
addr = (size_t) apic_config;
addr += sizeof(apic_config_table_t);
// does the apic table raise the page boundary? => map additional page
if (apic_config->entry_count * 20 + addr > ((size_t) apic_config & PAGE_MASK) + PAGE_SIZE)
{
page_map(((size_t) apic_config & PAGE_MASK) + PAGE_SIZE, ((size_t) apic_config & PAGE_MASK) + PAGE_SIZE, 1, PG_GLOBAL | PG_RW | PG_PCD);
vma_add( ((size_t) apic_config & PAGE_MASK) + PAGE_SIZE, ((size_t) apic_config & PAGE_MASK) + 2*PAGE_SIZE, VMA_READ|VMA_WRITE);
}
// search the ISA bus => required to redirect the IRQs
for(i=0; i<apic_config->entry_count; i++) {
switch(*((uint8_t*) addr)) {