void * AcpiOsMapMemory(ACPI_PHYSICAL_ADDRESS PhysicalAddress, ACPI_SIZE Size) { int i; /* * If the iopaic address table is populated, check if trying * to access an ioapic. Instead, return a pointer to a dummy ioapic. */ for (i = 0; i < napics_found; i++) { if ((PhysicalAddress & PAGEMASK) == ioapic_paddr[i]) return (dummy_ioapicadr); } /* FUTUREWORK: test PhysicalAddress for > 32 bits */ return (psm_map_new((paddr_t)PhysicalAddress, (size_t)Size, PSM_PROT_WRITE | PSM_PROT_READ)); }
caddr_t psm_map(uint32_t addr, size_t len, int prot) { return (psm_map_new((paddr_t)(addr & 0xffffffff), len, prot)); }