diff options
author | dfr <dfr@FreeBSD.org> | 2001-09-14 08:26:00 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2001-09-14 08:26:00 +0000 |
commit | 83cd82c3c456ae4ee2836038d81b0bb1a8636608 (patch) | |
tree | 9221c426f2ee2acb78c69140a08350c3b4e8ad3a /sys/boot/ia64/common | |
parent | c7273783389ef486b17288ac2c28fa2dc4cbba50 (diff) | |
download | FreeBSD-src-83cd82c3c456ae4ee2836038d81b0bb1a8636608.zip FreeBSD-src-83cd82c3c456ae4ee2836038d81b0bb1a8636608.tar.gz |
Make this do the right thing (mostly). We should still reserve the pages
that the kernel loads into using the EFI AllocatePages call.
Diffstat (limited to 'sys/boot/ia64/common')
-rw-r--r-- | sys/boot/ia64/common/copy.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/boot/ia64/common/copy.c b/sys/boot/ia64/common/copy.c index 01c31d8..a2bb6fe 100644 --- a/sys/boot/ia64/common/copy.c +++ b/sys/boot/ia64/common/copy.c @@ -31,8 +31,6 @@ static const char rcsid[] = /* * MD primitives supporting placement of module data - * - * XXX should check load address/size against memory top. */ #include <stand.h> @@ -43,19 +41,29 @@ static const char rcsid[] = int efi_copyin(void *src, vm_offset_t dest, size_t len) { - bcopy(src, (void*) dest, len); + EFI_PHYSICAL_ADDRESS p = IA64_RR_MASK(dest); +#if 0 + BS->AllocatePages(AllocateAddress, EfiRuntimeServicesData, + len >> 12, &p); +#endif + bcopy(src, (void*) p, len); return (len); } int efi_copyout(vm_offset_t src, void *dest, size_t len) { - bcopy((void*) src, dest, len); + bcopy((void*) IA64_RR_MASK(src), dest, len); return (len); } int efi_readin(int fd, vm_offset_t dest, size_t len) { - return (read(fd, (void*) dest, 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)); } |