From owner-p4-projects Wed Dec 4 19:18:13 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4CB6C37B404; Wed, 4 Dec 2002 19:18:10 -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 D6B7037B401 for ; Wed, 4 Dec 2002 19:18:09 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 72B6A43EB2 for ; Wed, 4 Dec 2002 19:18:09 -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 gB53DpmV029141 for ; Wed, 4 Dec 2002 19:13:51 -0800 (PST) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gB53Dp4S029138 for perforce@freebsd.org; Wed, 4 Dec 2002 19:13:51 -0800 (PST) Date: Wed, 4 Dec 2002 19:13:51 -0800 (PST) Message-Id: <200212050313.gB53Dp4S029138@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar Subject: PERFORCE change 21950 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=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 +#include +#include #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