diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 700ad6bec5a4..143c003adbb1 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -852,7 +852,11 @@ read_loader_env(const char *name, char *def_fn, bool once) } } - +caddr_t +ptov(uintptr_t x) +{ + return ((caddr_t)x); +} EFI_STATUS main(int argc, CHAR16 *argv[]) diff --git a/stand/i386/libi386/smbios.c b/stand/i386/libi386/smbios.c index 2aa62fa85df7..c621114d9107 100644 --- a/stand/i386/libi386/smbios.c +++ b/stand/i386/libi386/smbios.c @@ -28,16 +28,9 @@ __FBSDID("$FreeBSD$"); #include -#include #include -#ifdef EFI -/* In EFI, we don't need PTOV(). */ -#define PTOV(x) (caddr_t)(x) -#else -#include "btxv86.h" -#endif -#include "smbios.h" +#define PTOV(x) ptov(x) /* * Detect SMBIOS and export information about the SMBIOS into the diff --git a/stand/i386/loader/main.c b/stand/i386/loader/main.c index 2d0d63a12b37..880553a52082 100644 --- a/stand/i386/loader/main.c +++ b/stand/i386/loader/main.c @@ -86,6 +86,12 @@ extern char end[]; static void *heap_top; static void *heap_bottom; +caddr_t +ptov(uintptr_t x) +{ + return (PTOV(x)); +} + int main(void) { diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h index 5ad1166d4f67..6d566219c186 100644 --- a/stand/libsa/stand.h +++ b/stand/libsa/stand.h @@ -452,4 +452,9 @@ const char *x86_hypervisor(void); #define reallocf(x, y) Reallocf(x, y, NULL, 0) #endif +/* + * va <-> pa routines. MD code must supply. + */ +caddr_t ptov(uintptr_t); + #endif /* STAND_H */