aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/ia64
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2004-11-28 00:30:22 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2004-11-28 00:30:22 +0000
commitf3beed66fa5278d5df254cdd2bc31a9220576781 (patch)
tree70853a6b174692d6235a0b0bf335930e223022ec /sys/boot/ia64
parentb81a1f533f6302e22321a379408d63e08e92d0e6 (diff)
downloadsrc-f3beed66fa5278d5df254cdd2bc31a9220576781.tar.gz
src-f3beed66fa5278d5df254cdd2bc31a9220576781.zip
o Introduce efimd_va2pa() to translate addresses in efi_copy{in|out}()
and efi_readin(). This removes MD code from copy.c. o Don't unconditionally add pal.S to SRCS. It's specific to ia64.
Notes
Notes: svn path=/head/; revision=138141
Diffstat (limited to 'sys/boot/ia64')
-rw-r--r--sys/boot/ia64/common/copy.c33
1 files changed, 10 insertions, 23 deletions
diff --git a/sys/boot/ia64/common/copy.c b/sys/boot/ia64/common/copy.c
index 7bc4edf7e15c..4b4b9bd1385e 100644
--- a/sys/boot/ia64/common/copy.c
+++ b/sys/boot/ia64/common/copy.c
@@ -27,42 +27,29 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-/*
- * MD primitives supporting placement of module data
- */
-#include <stand.h>
-
#include <efi.h>
#include <efilib.h>
-#include <machine/ia64_cpu.h>
-#include <machine/vmparam.h>
+#include <stand.h>
int
-efi_copyin(void *src, vm_offset_t dest, size_t len)
+efi_copyin(void *src, vm_offset_t va, size_t len)
{
- EFI_PHYSICAL_ADDRESS p = IA64_RR_MASK(dest);
-#if 0
- BS->AllocatePages(AllocateAddress, EfiRuntimeServicesData,
- len >> 12, &p);
-#endif
- bcopy(src, (void*) p, len);
+
+ bcopy(src, (void *)efimd_va2pa(va), len);
return (len);
}
int
-efi_copyout(vm_offset_t src, void *dest, size_t len)
+efi_copyout(vm_offset_t va, void *dst, size_t len)
{
- bcopy((void*) IA64_RR_MASK(src), dest, len);
+
+ bcopy((void *)efimd_va2pa(va), dst, len);
return (len);
}
int
-efi_readin(int fd, vm_offset_t dest, size_t len)
+efi_readin(int fd, vm_offset_t va, size_t len)
{
- EFI_PHYSICAL_ADDRESS p = IA64_RR_MASK(dest);
-#if 0
- BS->AllocatePages(AllocateAddress, EfiRuntimeServicesData,
- len >> 12, &p);
-#endif
- return (read(fd, (void*) p, len));
+
+ return (read(fd, (void *)efimd_va2pa(va), len));
}