Skip the shitty e1000s on c89
[akaros.git] / kern / arch / x86 / pmap32.c
index 4a42fc2..526202b 100644 (file)
@@ -211,10 +211,10 @@ vm_init(void)
 
        // APIC mapping: using PAT (but not *the* PAT flag) to make these type UC
        // IOAPIC
-       boot_map_segment(pgdir, IOAPIC_BASE, PGSIZE, IOAPIC_PBASE, 
+       boot_map_segment(pgdir, IOAPIC_BASE, APIC_SIZE, IOAPIC_PBASE,
                         PTE_PCD | PTE_PWT | PTE_W | PTE_G);
        // Local APIC
-       boot_map_segment(pgdir, LAPIC_BASE, PGSIZE, LAPIC_PBASE,
+       boot_map_segment(pgdir, LAPIC_BASE, APIC_SIZE, LAPIC_PBASE,
                         PTE_PCD | PTE_PWT | PTE_W | PTE_G);
 
        // Check that the initial page directory has been set up correctly.
@@ -666,9 +666,8 @@ int env_user_mem_walk(env_t* e, void* start, size_t len,
                                      PTX(end) : NPTENTRIES );
                int ret;
                for (pteno = pteno_start; pteno < pteno_end; pteno++) {
-                       if (!PAGE_UNMAPPED(pt[pteno]))
-                               if((ret = callback(e, &pt[pteno], PGADDR(pdeno, pteno, 0), arg)))
-                                       return ret;
+                       if((ret = callback(e, &pt[pteno], PGADDR(pdeno, pteno, 0), arg)))
+                               return ret;
                }
        }
        return 0;