From owner-p4-projects Wed Dec 4 19:54:57 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 89E9537B406; Wed, 4 Dec 2002 19:54:55 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3842C37B401 for ; Wed, 4 Dec 2002 19:54:55 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D8E1443ECF for ; Wed, 4 Dec 2002 19:54:54 -0800 (PST) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gB53oamV041581 for ; Wed, 4 Dec 2002 19:50:36 -0800 (PST) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gB53oaT9041569 for perforce@freebsd.org; Wed, 4 Dec 2002 19:50:36 -0800 (PST) Date: Wed, 4 Dec 2002 19:50:36 -0800 (PST) Message-Id: <200212050350.gB53oaT9041569@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar Subject: PERFORCE change 21951 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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