From b5fd832d94bed02786da899c3158b44fbd7664fc Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 25 Apr 2006 18:42:22 +0000 Subject: Use PTOV() to convert physical addresses to appropriate virtual addresses in the loader when searching for the ACPI RSDP. (The loader runs in a flat mode with va 0 == pa 0xa000.) --- sys/boot/i386/libi386/biosacpi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/boot/i386/libi386/biosacpi.c b/sys/boot/i386/libi386/biosacpi.c index cb20215611011..ccdd0be5547fc 100644 --- a/sys/boot/i386/libi386/biosacpi.c +++ b/sys/boot/i386/libi386/biosacpi.c @@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include "libi386.h" #include "acfreebsd.h" #include "acconfig.h" @@ -93,7 +95,7 @@ biosacpi_find_rsdp(void) uint16_t *addr; /* EBDA is the 1 KB addressed by the 16 bit pointer at 0x40E. */ - addr = (uint16_t *)0x40E; + addr = (uint16_t *)PTOV(0x40E); if ((rsdp = biosacpi_search_rsdp((char *)(*addr << 4), 0x400)) != NULL) return (rsdp); @@ -113,7 +115,7 @@ biosacpi_search_rsdp(char *base, int length) /* search on 16-byte boundaries */ for (ofs = 0; ofs < length; ofs += 16) { - rsdp = (RSDP_DESCRIPTOR *)(base + ofs); + rsdp = (RSDP_DESCRIPTOR *)PTOV(base + ofs); /* compare signature, validate checksum */ if (!strncmp(rsdp->Signature, RSDP_SIG, strlen(RSDP_SIG))) { -- cgit v1.3