Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Dec 2002 19:13:51 -0800 (PST)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 21950 for review
Message-ID:  <200212050313.gB53Dp4S029138@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=21950

Change 21950 by marcel@marcel_nfs on 2002/12/04 19:13:33

	Slightly reorganize AcpiOsGetRootPointer(). We maintain a
	single variable (ia64_acpi_root) that will be used as the
	address of the RSDP. When first called, we initialize it
	to either the ACPI1.0 or ACPI2.0 pointer passed to us by
	the loader. Note that the ACPI spec says that if there's
	an ACPI2.0 address, it should be used (provided you have
	the support). We therefore don't care if the ACPI1.x address
	is valid or not (acpidump can be used to see if both
	pointers are set).
	We export ia64_acpi_root to userland through the sysctl
	variable `machdep.acpi_root'. Since this is not being used
	yet, we have to keep the verbosity. Eventually we want to
	put it under bootverbose though...

Affected files ...

.. //depot/projects/ia64/sys/ia64/acpica/OsdEnvironment.c#5 edit

Differences ...

==== //depot/projects/ia64/sys/ia64/acpica/OsdEnvironment.c#5 (text+ko) ====

@@ -30,12 +30,20 @@
 /*
  * 6.1 : Environmental support
  */
+#include <sys/types.h>
+#include <sys/linker_set.h>
+#include <sys/sysctl.h>
 
 #include "acpi.h"
 
 extern u_int64_t ia64_efi_acpi_table;
 extern u_int64_t ia64_efi_acpi20_table;
 
+u_int64_t ia64_acpi_root;
+
+SYSCTL_ULONG(_machdep, OID_AUTO, acpi_root, CTLFLAG_RD, &ia64_acpi_root, 0,
+    "The physical address of the RSDP");
+
 ACPI_STATUS
 AcpiOsInitialize(void)
 {
@@ -54,25 +62,22 @@
 AcpiOsGetRootPointer(UINT32 Flags, ACPI_POINTER *RsdpAddress)
 {
 
-	if (ia64_efi_acpi20_table) {
-printf("ACPI 2.0 table at 0x%lx\n", ia64_efi_acpi20_table);
-	}
-	if (ia64_efi_acpi_table) {
-printf("ACPI 1.x table at 0x%lx\n", ia64_efi_acpi_table);
+	if (ia64_acpi_root == 0) {
+		if (ia64_efi_acpi20_table) {
+			/* XXX put under bootverbose. */
+			printf("Using ACPI2.0 table at 0x%lx\n",
+			    ia64_efi_acpi20_table);
+			ia64_acpi_root = ia64_efi_acpi20_table;
+		} else if (ia64_efi_acpi_table) {
+			/* XXX put under bootverbose. */
+			printf("Using ACPI1.x table at 0x%lx\n",
+			    ia64_efi_acpi_table);
+			ia64_acpi_root = ia64_efi_acpi_table;
+		} else
+			return(AE_NOT_FOUND);
 	}
-	if (ia64_efi_acpi20_table) {
-printf("Using ACPI2.0 table\n");
-		RsdpAddress->PointerType = ACPI_PHYSICAL_POINTER;
-		RsdpAddress->Pointer.Physical = ia64_efi_acpi20_table;
 
-	}
-	else if (ia64_efi_acpi_table) {
-printf("Using ACPI1.x table\n");
-		RsdpAddress->PointerType = ACPI_PHYSICAL_POINTER;
-		RsdpAddress->Pointer.Physical = ia64_efi_acpi_table;
-	}
-	else
-		return(AE_NOT_FOUND);
-
+	RsdpAddress->PointerType = ACPI_PHYSICAL_POINTER;
+	RsdpAddress->Pointer.Physical = ia64_acpi_root;
 	return(AE_OK);
 }

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




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