summaryrefslogtreecommitdiffstats
path: root/sys/boot/efi/loader/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/efi/loader/main.c')
-rw-r--r--sys/boot/efi/loader/main.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/sys/boot/efi/loader/main.c b/sys/boot/efi/loader/main.c
index 30b4f25..6491683 100644
--- a/sys/boot/efi/loader/main.c
+++ b/sys/boot/efi/loader/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