summaryrefslogtreecommitdiff
path: root/stand/efi
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2020-02-20 00:46:16 +0000
committerWarner Losh <imp@FreeBSD.org>2020-02-20 00:46:16 +0000
commited2a65769a5d04fcfc2acff3fa11d6b69394fd88 (patch)
tree3edf48f516249d1ac6940eeef5df9dddb9bc219c /stand/efi
parent65252dc903ed1acffb01b717a537db7f99c40e5c (diff)
downloadsrc-test-ed2a65769a5d04fcfc2acff3fa11d6b69394fd88.tar.gz
src-test-ed2a65769a5d04fcfc2acff3fa11d6b69394fd88.zip
Create ptov() function.
Create a ptov() function. It's basically the same as the btx PTOV macro, but works everywhere. smbios needs this to translate addresses, but the translation differs between BIOS booting and EFI booting. Make it a function so one smbios.o can be used everywhere. Provide definitions for it in the two loaders affected. Differential Revision: https://reviews.freebsd.org/D23660
Notes
Notes: svn path=/head/; revision=358135
Diffstat (limited to 'stand/efi')
-rw-r--r--stand/efi/loader/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c
index 700ad6bec5a42..143c003adbb17 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[])