Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Apr 2002 03:38:58 +0900 (JST)
From:      Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
To:        acpi-jp@FreeBSD.org
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: ports/devel/acpicatools Makefile distinfo ports/devel/acpicatools/files patch-20020308 patch-20020404
Message-ID:  <20020412.033858.13779606.iwasaki@jp.FreeBSD.org>
In-Reply-To: <200204110928.g3B9SiK61543@freefall.freebsd.org>
References:  <200204110928.g3B9SiK61543@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

I've updated acpicatools port for 20020404, and did quick hack for sys
sources attaching to this mail.  I hope this can help importing
acpica-unix-20020404 into FreeBSD CVS.

I'm not sure what's better solution of ACPI_FLUSH_CPU_CACHE macro for
i386 and ia64.  Should we have common cpufunc for flushing cache, just
like disable_intr()/enable_intr() ?
Or having acfreebsd_i386.h and acfreebsd_ia64.h separately?
# like include/platform/acwin.h and acwin64.h in ACPICA source tree

Comments welcome.
Thanks

diff -u /tmp/acpica/acfreebsd.h contrib/dev/acpica/acfreebsd.h
--- /tmp/acpica/acfreebsd.h	Thu Apr 11 13:43:28 2002
+++ contrib/dev/acpica/acfreebsd.h	Thu Apr 11 13:54:41 2002
@@ -137,6 +139,11 @@
 #define asm         __asm
 #define __cli()     disable_intr()
 #define __sti()     enable_intr()
+#ifdef __i386__
+#define ACPI_FLUSH_CPU_CACHE()	wbinvd()
+#else
+#define ACPI_FLUSH_CPU_CACHE()	/* XXX ia64_fc()? */
+#endif
 
 #ifdef ACPI_DEBUG
 #ifdef DEBUGGER_THREADING
@@ -156,6 +163,7 @@
 
 #define __cli()
 #define __sti()
+#define ACPI_FLUSH_CPU_CACHE()
 
 #endif /* _KERNEL */
 
diff -u /tmp/acpica/tbget.c contrib/dev/acpica/tbget.c
--- /tmp/acpica/tbget.c	Thu Apr 11 13:43:22 2002
+++ contrib/dev/acpica/tbget.c	Thu Apr 11 13:50:28 2002
@@ -434,6 +434,11 @@
      */
     Address.PointerType   = AcpiGbl_TableFlags;
     Address.Pointer.Value = ACPI_GET_ADDRESS (AcpiGbl_FADT->XDsdt);
+    if (AcpiGbl_DSDT != NULL)
+    {
+        Address.PointerType   = ACPI_LOGICAL_POINTER;
+        Address.Pointer.Value = AcpiGbl_DSDT;
+    }
 
     Status = AcpiTbGetTable (&Address, &TableInfo);
     if (ACPI_FAILURE (Status))


Index: dev/acpica/acpica_support.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/acpica/acpica_support.c,v
retrieving revision 1.4
diff -u -r1.4 acpica_support.c
--- dev/acpica/acpica_support.c	12 Mar 2002 09:45:17 -0000	1.4
+++ dev/acpica/acpica_support.c	11 Apr 2002 05:52:40 -0000
@@ -79,15 +79,13 @@
 
     AcpiHwBitRegisterWrite (ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_LOCK);
 
-    acpi_disable_irqs ();
+    ACPI_DISABLE_IRQS ();
 
     AcpiHwDisableNonWakeupGpes();
 
     /* flush caches */
 
-#ifdef __i386__
-    wbinvd();
-#endif
+    ACPI_FLUSH_CPU_CACHE ();
 
     /* write the value to command port and wait until we enter sleep state */
     do
@@ -99,7 +97,7 @@
 
     AcpiHwEnableNonWakeupGpes();
 
-    acpi_enable_irqs ();
+    ACPI_ENABLE_IRQS ();
 
     return_ACPI_STATUS (AE_OK);
 }
Index: i386/acpica/OsdEnvironment.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/acpica/OsdEnvironment.c,v
retrieving revision 1.3
diff -u -r1.3 OsdEnvironment.c
--- i386/acpica/OsdEnvironment.c	7 Sep 2001 03:00:30 -0000	1.3
+++ i386/acpica/OsdEnvironment.c	11 Apr 2002 03:27:58 -0000
@@ -56,7 +56,7 @@
 ACPI_STATUS
 AcpiOsGetRootPointer(
     UINT32			Flags,
-    ACPI_PHYSICAL_ADDRESS	*RsdpPhysicalAddress)
+    ACPI_POINTER         	*RsdpPhysicalAddress)
 {
     /*
      * The loader passes the physical address at which it found the
Index: ia64/acpica/OsdEnvironment.c
===================================================================
RCS file: /home/ncvs/src/sys/ia64/acpica/OsdEnvironment.c,v
retrieving revision 1.2
diff -u -r1.2 OsdEnvironment.c
--- ia64/acpica/OsdEnvironment.c	29 Oct 2001 02:16:02 -0000	1.2
+++ ia64/acpica/OsdEnvironment.c	11 Apr 2002 04:20:55 -0000
@@ -51,13 +51,18 @@
 }
 
 ACPI_STATUS
-AcpiOsGetRootPointer(UINT32 Flags, ACPI_PHYSICAL_ADDRESS *RsdpPhysicalAddress)
+AcpiOsGetRootPointer(UINT32 Flags, ACPI_POINTER *RsdpAddress)
 {
 
-	if (ia64_efi_acpi20_table)
-		*RsdpPhysicalAddress = ia64_efi_acpi20_table;
-	else if (ia64_efi_acpi_table)
-		*RsdpPhysicalAddress = ia64_efi_acpi_table;
+	if (ia64_efi_acpi20_table) {
+		RsdpAddress->PointerType = ACPI_PHYSICAL_POINTER;
+		RsdpAddress->Pointer.Physical = ia64_efi_acpi20_table;
+
+	}
+	else if (ia64_efi_acpi_table) {
+		RsdpAddress->PointerType = ACPI_PHYSICAL_POINTER;
+		RsdpAddress->Pointer.Physical = ia64_efi_acpi_table;
+	}
 	else
 		return(AE_NOT_FOUND);
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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