diff options
author | marcel <marcel@FreeBSD.org> | 2004-09-23 18:37:36 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2004-09-23 18:37:36 +0000 |
commit | 6834d51c5fc0ebb30ad8365ac4af80e8c9fdbaad (patch) | |
tree | 3a8da576e47f9a945a455cf8d54e51170240ea68 /sys/boot/efi/libefi | |
parent | fc52c1f7c1c8270585873f208bb05f75a12323bb (diff) | |
download | FreeBSD-src-6834d51c5fc0ebb30ad8365ac4af80e8c9fdbaad.zip FreeBSD-src-6834d51c5fc0ebb30ad8365ac4af80e8c9fdbaad.tar.gz |
Redefine a PTE as a 64-bit integral type instead of a struct of
bit-fields. Unify the PTE defines accordingly and update all
uses.
Diffstat (limited to 'sys/boot/efi/libefi')
-rw-r--r-- | sys/boot/efi/libefi/elf_freebsd.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/sys/boot/efi/libefi/elf_freebsd.c b/sys/boot/efi/libefi/elf_freebsd.c index 5f534b2..93cfdbd 100644 --- a/sys/boot/efi/libefi/elf_freebsd.c +++ b/sys/boot/efi/libefi/elf_freebsd.c @@ -137,7 +137,7 @@ elf64_exec(struct preloaded_file *fp) { struct file_metadata *md; Elf_Ehdr *hdr; - struct ia64_pte pte; + pt_entry_t pte; struct bootinfo *bi; u_int64_t psr; UINTN mapkey, pages, size; @@ -193,25 +193,17 @@ elf64_exec(struct preloaded_file *fp) ia64_set_rr(IA64_RR_BASE(6), (6 << 8) | (28 << 2)); ia64_set_rr(IA64_RR_BASE(7), (7 << 8) | (28 << 2)); - bzero(&pte, sizeof(pte)); - pte.pte_p = 1; - pte.pte_ma = PTE_MA_WB; - pte.pte_a = 1; - pte.pte_d = 1; - pte.pte_pl = PTE_PL_KERN; - pte.pte_ar = PTE_AR_RWX; - pte.pte_ppn = 0; + pte = PTE_PRESENT | PTE_MA_WB | PTE_ACCESSED | PTE_DIRTY | + PTE_PL_KERN | PTE_AR_RWX; __asm __volatile("mov cr.ifa=%0" :: "r"(IA64_RR_BASE(7))); __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("srlz.i;;"); - __asm __volatile("itr.i itr[%0]=%1;;" - :: "r"(0), "r"(*(u_int64_t*)&pte)); + __asm __volatile("itr.i itr[%0]=%1;;" :: "r"(0), "r"(pte)); __asm __volatile("srlz.i;;"); - __asm __volatile("itr.d dtr[%0]=%1;;" - :: "r"(0), "r"(*(u_int64_t*)&pte)); + __asm __volatile("itr.d dtr[%0]=%1;;" :: "r"(0), "r"(pte)); __asm __volatile("srlz.i;;"); enter_kernel(hdr->e_entry, bi); |