summaryrefslogtreecommitdiffstats
path: root/sys/boot/ia64/efi
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2004-09-23 18:37:36 +0000
committermarcel <marcel@FreeBSD.org>2004-09-23 18:37:36 +0000
commit6834d51c5fc0ebb30ad8365ac4af80e8c9fdbaad (patch)
tree3a8da576e47f9a945a455cf8d54e51170240ea68 /sys/boot/ia64/efi
parentfc52c1f7c1c8270585873f208bb05f75a12323bb (diff)
downloadFreeBSD-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/ia64/efi')
-rw-r--r--sys/boot/ia64/efi/main.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/sys/boot/ia64/efi/main.c b/sys/boot/ia64/efi/main.c
index 30b4f25..6491683 100644
--- a/sys/boot/ia64/efi/main.c
+++ b/sys/boot/ia64/efi/main.c
@@ -387,7 +387,7 @@ print_trs(int type)
struct ia64_pal_result res;
int i, maxtr;
struct {
- struct ia64_pte pte;
+ pt_entry_t pte;
struct ia64_itir itir;
uint64_t ifa;
struct ia64_rr rr;
@@ -436,28 +436,24 @@ print_trs(int type)
continue;
if (!(res.pal_result[0] & 1))
- buf.pte.pte_ar = 0;
+ buf.pte &= ~PTE_AR_MASK;
if (!(res.pal_result[0] & 2))
- buf.pte.pte_pl = 0;
+ buf.pte &= ~PTE_PL_MASK;
if (!(res.pal_result[0] & 4))
- buf.pte.pte_d = 0;
+ buf.pte &= ~PTE_DIRTY;
if (!(res.pal_result[0] & 8))
- buf.pte.pte_ma = 0;
- sprintf(lbuf,
- "%03d %06x %013lx %013lx %4s %d %d %d %d %d %-3s %d %06x\n",
- i,
- buf.rr.rr_rid,
- buf.ifa >> 12,
- buf.pte.pte_ppn,
- psnames[buf.itir.itir_ps],
- buf.pte.pte_ed,
- buf.pte.pte_ar,
- buf.pte.pte_pl,
- buf.pte.pte_d,
- buf.pte.pte_a,
- manames[buf.pte.pte_ma],
- buf.pte.pte_p,
- buf.itir.itir_key);
+ buf.pte &= ~PTE_MA_MASK;
+ sprintf(lbuf, "%03d %06x %013lx %013lx %4s %d %d %d %d %d "
+ "%-3s %d %06x\n", i, buf.rr.rr_rid, buf.ifa >> 12,
+ (buf.pte & PTE_PPN_MASK) >> 12, psnames[buf.itir.ps],
+ (buf.pte & PTE_ED) ? 1 : 0,
+ (int)(buf.pte & PTE_AR_MASK) >> 9,
+ (int)(buf.pte & PTE_PL_MASK) >> 7,
+ (buf.pte & PTE_DIRTY) ? 1 : 0,
+ (buf.pte & PTE_ACCESSED) ? 1 : 0,
+ manames[(buf.pte & PTE_MA_MASK) >> 2],
+ (buf.pte & PTE_PRESENT) ? 1 : 0,
+ buf.itir.key);
pager_output(lbuf);
}
pager_close();
OpenPOWER on IntegriCloud