diff options
author | marcel <marcel@FreeBSD.org> | 2004-09-19 03:50:46 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2004-09-19 03:50:46 +0000 |
commit | 60944a9fd4aa73054c54a0943f35653950f21737 (patch) | |
tree | 89a60da91b2c3905e4fe6e3a6a6519b5f400e88f /sys/ia64/acpica | |
parent | 78d7eda383c8601a0076d9fde2d78795be629740 (diff) | |
download | FreeBSD-src-60944a9fd4aa73054c54a0943f35653950f21737.zip FreeBSD-src-60944a9fd4aa73054c54a0943f35653950f21737.tar.gz |
MFp4:
Completely remove the remaining EFI includes and add our own (type)
definitions instead. While here, abstract more of the internals by
providing interface functions.
Diffstat (limited to 'sys/ia64/acpica')
-rw-r--r-- | sys/ia64/acpica/OsdEnvironment.c | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/sys/ia64/acpica/OsdEnvironment.c b/sys/ia64/acpica/OsdEnvironment.c index a6a62f6..7419e6f 100644 --- a/sys/ia64/acpica/OsdEnvironment.c +++ b/sys/ia64/acpica/OsdEnvironment.c @@ -23,58 +23,52 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ -/* - * 6.1 : Environmental support - */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + #include <sys/types.h> #include <sys/linker_set.h> #include <sys/sysctl.h> +#include <machine/efi.h> #include "acpi.h" -extern u_int64_t ia64_efi_acpi_table; -extern u_int64_t ia64_efi_acpi20_table; +static struct uuid acpi_root_uuid = EFI_TABLE_ACPI20; -static u_long ia64_acpi_root; +static u_long acpi_root_phys; -SYSCTL_ULONG(_machdep, OID_AUTO, acpi_root, CTLFLAG_RD, &ia64_acpi_root, 0, - "The physical address of the RSDP"); +SYSCTL_ULONG(_machdep, OID_AUTO, acpi_root, CTLFLAG_RD, &acpi_root_phys, 0, + "The physical address of the RSDP"); ACPI_STATUS AcpiOsInitialize(void) { + return(AE_OK); } ACPI_STATUS AcpiOsTerminate(void) { + return(AE_OK); } ACPI_STATUS AcpiOsGetRootPointer(UINT32 Flags, ACPI_POINTER *RsdpAddress) { - 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 + void *acpi_root; + + if (acpi_root_phys == 0) { + acpi_root = efi_get_table(&acpi_root_uuid); + if (acpi_root == NULL) return (AE_NOT_FOUND); + acpi_root_phys = IA64_RR_MASK((u_long)acpi_root); } RsdpAddress->PointerType = ACPI_PHYSICAL_POINTER; - RsdpAddress->Pointer.Physical = ia64_acpi_root; + RsdpAddress->Pointer.Physical = acpi_root_phys; return (AE_OK); } |