- if (((int)mcl & PAGE_MASK) == 0)
- mcl_paddr[((char *)mcl - (char *)mbutl)/PAGE_SIZE] = pmap_extract(kernel_pmap, (char *)mcl);
+ if (((int)mcl & PAGE_MASK) == 0) {
+ ppnum_t offset = ((char *)mcl - (char *)mbutl)/PAGE_SIZE;
+ ppnum_t new_page = pmap_find_phys(kernel_pmap, (vm_address_t) mcl);
+
+ /*
+ * In the case of no mapper being available
+ * the following code nops and returns the
+ * input page, if there is a mapper the I/O
+ * page appropriate is returned.
+ */
+ new_page = IOMapperInsertPage(mcl_paddr_base, offset, new_page);
+ mcl_paddr[offset] = new_page << 12;
+ }