diff options
author | marius <marius@FreeBSD.org> | 2008-09-04 19:41:54 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2008-09-04 19:41:54 +0000 |
commit | f8a9831413e72a339c1d500c85b3ae95a446b932 (patch) | |
tree | 7ea429ffe0dc2dd839c3b36b43d027dc22b9678b /sys/boot/sparc64 | |
parent | 3063f5441146ea8f7e56a89b15d2762379967e4c (diff) | |
download | FreeBSD-src-f8a9831413e72a339c1d500c85b3ae95a446b932.zip FreeBSD-src-f8a9831413e72a339c1d500c85b3ae95a446b932.tar.gz |
Ensure interrupts are off while in {d,i}tlb_va_to_pa_sun4u().
I think this is necessary in order to make sure the workarounds
in {d,i}tlb_get_data_sun4u() work correctly.
Diffstat (limited to 'sys/boot/sparc64')
-rw-r--r-- | sys/boot/sparc64/loader/main.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/boot/sparc64/loader/main.c b/sys/boot/sparc64/loader/main.c index 87158da..34fe4ce 100644 --- a/sys/boot/sparc64/loader/main.c +++ b/sys/boot/sparc64/loader/main.c @@ -396,36 +396,44 @@ itlb_get_data_sun4u(int slot) static vm_offset_t dtlb_va_to_pa_sun4u(vm_offset_t va) { - u_long reg; + u_long pstate, reg; int i; + pstate = rdpr(pstate); + wrpr(pstate, pstate & ~PSTATE_IE, 0); for (i = 0; i < dtlb_slot_max; i++) { reg = ldxa(TLB_DAR_SLOT(i), ASI_DTLB_TAG_READ_REG); if (TLB_TAR_VA(reg) != va) continue; reg = dtlb_get_data_sun4u(i); + wrpr(pstate, pstate, 0); if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) return ((reg & TD_PA_CH_MASK) >> TD_PA_SHIFT); return ((reg & TD_PA_SF_MASK) >> TD_PA_SHIFT); } + wrpr(pstate, pstate, 0); return (-1); } static vm_offset_t itlb_va_to_pa_sun4u(vm_offset_t va) { - u_long reg; + u_long pstate, reg; int i; + pstate = rdpr(pstate); + wrpr(pstate, pstate & ~PSTATE_IE, 0); for (i = 0; i < itlb_slot_max; i++) { reg = ldxa(TLB_DAR_SLOT(i), ASI_ITLB_TAG_READ_REG); if (TLB_TAR_VA(reg) != va) continue; reg = itlb_get_data_sun4u(i); + wrpr(pstate, pstate, 0); if (cpu_impl >= CPU_IMPL_ULTRASPARCIII) return ((reg & TD_PA_CH_MASK) >> TD_PA_SHIFT); return ((reg & TD_PA_SF_MASK) >> TD_PA_SHIFT); } + wrpr(pstate, pstate, 0); return (-1); } |