summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2010-07-16 03:59:50 +0000
committerjkim <jkim@FreeBSD.org>2010-07-16 03:59:50 +0000
commit4006e89baa5d42876680c2a7d00773bc7b0123fb (patch)
tree5b3e9553f9a4ef71a2b63dc0948bcdd4f1fa0e09
parent53abeaa9aa48f499610b84c6aafd101890cb1327 (diff)
downloadFreeBSD-src-4006e89baa5d42876680c2a7d00773bc7b0123fb.zip
FreeBSD-src-4006e89baa5d42876680c2a7d00773bc7b0123fb.tar.gz
Use pmap_mapdev()/pmap_unmapdev() to map device memory instead of using
AcpiOsMapMemory()/AcpiOsUnmapMemory() (-> pmap_mapbios()/pmap_unmapbios()) for AcpiOsReadMemory() and AcpiOsWriteMemory(). Although they do not sound too obvious, these functions are exclusively used to access memory mapped IO in ACPICA.
-rw-r--r--sys/dev/acpica/Osd/OsdMemory.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/acpica/Osd/OsdMemory.c b/sys/dev/acpica/Osd/OsdMemory.c
index 573fa0e..c039b52 100644
--- a/sys/dev/acpica/Osd/OsdMemory.c
+++ b/sys/dev/acpica/Osd/OsdMemory.c
@@ -97,7 +97,7 @@ AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS Address, UINT32 *Value, UINT32 Width)
{
void *LogicalAddress;
- LogicalAddress = AcpiOsMapMemory(Address, Width / 8);
+ LogicalAddress = pmap_mapdev(Address, Width / 8);
if (LogicalAddress == NULL)
return (AE_NOT_EXIST);
@@ -113,7 +113,7 @@ AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS Address, UINT32 *Value, UINT32 Width)
break;
}
- AcpiOsUnmapMemory(LogicalAddress, Width / 8);
+ pmap_unmapdev((vm_offset_t)LogicalAddress, Width / 8);
return (AE_OK);
}
@@ -123,7 +123,7 @@ AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS Address, UINT32 Value, UINT32 Width)
{
void *LogicalAddress;
- LogicalAddress = AcpiOsMapMemory(Address, Width / 8);
+ LogicalAddress = pmap_mapdev(Address, Width / 8);
if (LogicalAddress == NULL)
return (AE_NOT_EXIST);
@@ -139,7 +139,7 @@ AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS Address, UINT32 Value, UINT32 Width)
break;
}
- AcpiOsUnmapMemory(LogicalAddress, Width / 8);
+ pmap_unmapdev((vm_offset_t)LogicalAddress, Width / 8);
return (AE_OK);
}
OpenPOWER on IntegriCloud