summaryrefslogtreecommitdiffstats
path: root/sys/boot/ia64
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2010-07-07 19:06:53 +0000
committermarcel <marcel@FreeBSD.org>2010-07-07 19:06:53 +0000
commit77cfe5af280a84ffe46befeac8278b0e24cba94c (patch)
treeb410422fdd2d1f009893e7438f879d001ef1641f /sys/boot/ia64
parent2449809d828b5150d531d1e687e6611bf8328117 (diff)
downloadFreeBSD-src-77cfe5af280a84ffe46befeac8278b0e24cba94c.zip
FreeBSD-src-77cfe5af280a84ffe46befeac8278b0e24cba94c.tar.gz
Use the kernel's start address to determine what to map. This allows
us to link the kernel at different addresses without needing to build a corresponding loader.
Diffstat (limited to 'sys/boot/ia64')
-rw-r--r--sys/boot/ia64/common/exec.c7
-rw-r--r--sys/boot/ia64/efi/version2
2 files changed, 6 insertions, 3 deletions
diff --git a/sys/boot/ia64/common/exec.c b/sys/boot/ia64/common/exec.c
index 6b451f2..1a8094f 100644
--- a/sys/boot/ia64/common/exec.c
+++ b/sys/boot/ia64/common/exec.c
@@ -106,11 +106,12 @@ elf64_exec(struct preloaded_file *fp)
pte = PTE_PRESENT | PTE_MA_WB | PTE_ACCESSED | PTE_DIRTY |
PTE_PL_KERN | PTE_AR_RWX | PTE_ED;
+ pte |= IA64_RR_MASK(hdr->e_entry) & PTE_PPN_MASK;
- __asm __volatile("mov cr.ifa=%0" :: "r"(IA64_RR_BASE(7)));
+ __asm __volatile("mov cr.ifa=%0" :: "r"(hdr->e_entry));
__asm __volatile("mov cr.itir=%0" :: "r"(28 << 2));
- __asm __volatile("ptr.i %0,%1" :: "r"(IA64_RR_BASE(7)), "r"(28<<2));
- __asm __volatile("ptr.d %0,%1" :: "r"(IA64_RR_BASE(7)), "r"(28<<2));
+ __asm __volatile("ptr.i %0,%1" :: "r"(hdr->e_entry), "r"(28<<2));
+ __asm __volatile("ptr.d %0,%1" :: "r"(hdr->e_entry), "r"(28<<2));
__asm __volatile("srlz.i;;");
__asm __volatile("itr.i itr[%0]=%1;;" :: "r"(0), "r"(pte));
__asm __volatile("srlz.i;;");
diff --git a/sys/boot/ia64/efi/version b/sys/boot/ia64/efi/version
index 148ed4c..a31d87d 100644
--- a/sys/boot/ia64/efi/version
+++ b/sys/boot/ia64/efi/version
@@ -3,6 +3,8 @@ $FreeBSD$
NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this
file is important. Make sure the current version number is on line 6.
+2.2: Create direct mapping based on start address instead of mapping
+ first 256M.
2.1: Add support for "-dev <part>" argument parsing.
2.0: Provide devices based on the block I/O protocol, rather than the
simple file services protocol. Use the FreeBSD file system code
OpenPOWER on IntegriCloud