Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jul 2010 03:59:51 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r210155 - head/sys/dev/acpica/Osd
Message-ID:  <201007160359.o6G3xpn7093407@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Fri Jul 16 03:59:50 2010
New Revision: 210155
URL: http://svn.freebsd.org/changeset/base/210155

Log:
  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.

Modified:
  head/sys/dev/acpica/Osd/OsdMemory.c

Modified: head/sys/dev/acpica/Osd/OsdMemory.c
==============================================================================
--- head/sys/dev/acpica/Osd/OsdMemory.c	Fri Jul 16 01:44:49 2010	(r210154)
+++ head/sys/dev/acpica/Osd/OsdMemory.c	Fri Jul 16 03:59:50 2010	(r210155)
@@ -97,7 +97,7 @@ AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS A
 {
     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 A
 	break;
     }
 
-    AcpiOsUnmapMemory(LogicalAddress, Width / 8);
+    pmap_unmapdev((vm_offset_t)LogicalAddress, Width / 8);
 
     return (AE_OK);
 }
@@ -123,7 +123,7 @@ AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS 
 {
     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 
 	break;
     }
 
-    AcpiOsUnmapMemory(LogicalAddress, Width / 8);
+    pmap_unmapdev((vm_offset_t)LogicalAddress, Width / 8);
 
     return (AE_OK);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007160359.o6G3xpn7093407>