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

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

Change 21951 by marcel@marcel_nfs on 2002/12/04 19:49:41

	Try the machdep.acpi_root sysctl if the current address hint
	is 0. This means that -x overrides the sysctl, which overrides
	the (fatal) low-memory scan. We can now safely run acpidump
	without having to specify where the root is.
	While here, explicitly initialize the address hint (xaddr)
	to make it clear that we depend on it being zero.

Affected files ...

.. //depot/projects/ia64/usr.sbin/acpi/acpidump/acpidump.c#8 edit

Differences ...

==== //depot/projects/ia64/usr.sbin/acpi/acpidump/acpidump.c#8 (text+ko) ====

@@ -36,7 +36,8 @@
 
 #include "acpidump.h"
 
-long xaddr;
+const char machdep_acpi_root[] = "machdep.acpi_root";
+long xaddr = 0;
 
 static void
 asl_dump_from_file(char *file)
@@ -91,6 +92,12 @@
 {
 	struct	ACPIrsdp *rp;
 	struct	ACPIsdt *rsdp;
+	int len;
+
+	if (xaddr == 0) {
+                len = sizeof(xaddr);
+                (void)sysctlbyname(machdep_acpi_root, &xaddr, &len, NULL, 0);
+	}
 
 	rp = acpi_find_rsd_ptr(xaddr);
 	if (!rp)

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?200212050350.gB53oaT9041569>