#include "assym.h"
#include <sys/asm_linkage.h>
#include <sys/mmu.h>
#include <vm/hat_sfmmu.h>
#include <sys/machparam.h>
#include <sys/machcpuvar.h>
#include <sys/machthread.h>
#include <sys/machtrap.h>
#include <sys/privregs.h>
#include <sys/asm_linkage.h>
#include <sys/trap.h>
#include <sys/opl_olympus_regs.h>
#include <sys/opl_module.h>
#include <sys/xc_impl.h>
#include <sys/intreg.h>
#include <sys/async.h>
#include <sys/clock.h>
#include <sys/cmpregs.h>
#ifdef TRAPTRACE
#include <sys/traptrace.h>
#endif
#define ECACHE_FLUSHALL(arg1, arg2, arg3, tmp1) \
mov ASI_L2_CTRL_U2_FLUSH, arg1; \
mov ASI_L2_CTRL_RW_ADDR, arg2; \
stxa arg1, [arg2]ASI_L2_CTRL
ENTRY_NP(vtag_flushpage)
rdpr %pstate, %o5
#ifdef DEBUG
PANIC_IF_INTR_DISABLED_PSTR(%o5, opl_di_l3, %g1)
#endif
andn %o5, PSTATE_IE, %o4
wrpr %o4, 0, %pstate
sethi %hi(ksfmmup), %o3
ldx [%o3 + %lo(ksfmmup)], %o3
cmp %o3, %o1
bne,pt %xcc, 1f ! if not kernel as, go to 1
sethi %hi(FLUSH_ADDR), %o3
stxa %g0, [%o0]ASI_DTLB_DEMAP
stxa %g0, [%o0]ASI_ITLB_DEMAP
flush %o3
retl
wrpr %g0, %o5, %pstate
1:
SFMMU_CPU_CNUM(%o1, %g1, %g2) ! %g1 = sfmmu cnum on this CPU
ldub [%o1 + SFMMU_CEXT], %o4 ! %o4 = sfmmup->sfmmu_cext
sll %o4, CTXREG_EXT_SHIFT, %o4
or %g1, %o4, %g1 ! %g1 = primary pgsz | cnum
wrpr %g0, 1, %tl
set MMU_PCONTEXT, %o4
or DEMAP_PRIMARY | DEMAP_PAGE_TYPE, %o0, %o0
ldxa [%o4]ASI_DMMU, %o2 ! %o2 = save old ctxnum
srlx %o2, CTXREG_NEXT_SHIFT, %o1 ! need to preserve nucleus pgsz
sllx %o1, CTXREG_NEXT_SHIFT, %o1 ! %o1 = nucleus pgsz
or %g1, %o1, %g1 ! %g1 = nucleus pgsz | primary pgsz | cnum
stxa %g1, [%o4]ASI_DMMU ! wr new ctxum
stxa %g0, [%o0]ASI_DTLB_DEMAP
stxa %g0, [%o0]ASI_ITLB_DEMAP
stxa %o2, [%o4]ASI_DMMU
flush %o3
wrpr %g0, 0, %tl
retl
wrpr %g0, %o5, %pstate
SET_SIZE(vtag_flushpage)
ENTRY_NP2(vtag_flushall, demap_all)
sethi %hi(FLUSH_ADDR), %o3
set DEMAP_ALL_TYPE, %g1
stxa %g0, [%g1]ASI_DTLB_DEMAP
stxa %g0, [%g1]ASI_ITLB_DEMAP
flush %o3
retl
nop
SET_SIZE(demap_all)
SET_SIZE(vtag_flushall)
ENTRY_NP(vtag_flushpage_tl1)
srln %g1, MMU_PAGESHIFT, %g1
sethi %hi(ksfmmup), %g3
ldx [%g3 + %lo(ksfmmup)], %g3
cmp %g3, %g2
bne,pt %xcc, 1f ! if not kernel as, go to 1
slln %g1, MMU_PAGESHIFT, %g1
or DEMAP_NUCLEUS | DEMAP_PAGE_TYPE, %g1, %g1
stxa %g0, [%g1]ASI_DTLB_DEMAP
stxa %g0, [%g1]ASI_ITLB_DEMAP
retry
1:
or DEMAP_PRIMARY | DEMAP_PAGE_TYPE, %g1, %g1
SFMMU_CPU_CNUM(%g2, %g6, %g3) ! %g6 = sfmmu cnum on this CPU
ldub [%g2 + SFMMU_CEXT], %g4 ! %g4 = sfmmup->cext
sll %g4, CTXREG_EXT_SHIFT, %g4
or %g6, %g4, %g6 ! %g6 = primary pgsz | cnum
set MMU_PCONTEXT, %g4
ldxa [%g4]ASI_DMMU, %g5 ! %g5 = save old ctxnum
srlx %g5, CTXREG_NEXT_SHIFT, %g2 ! %g2 = nucleus pgsz
sllx %g2, CTXREG_NEXT_SHIFT, %g2 ! preserve nucleus pgsz
or %g6, %g2, %g6 ! %g6 = nucleus pgsz | primary pgsz | cnum
stxa %g6, [%g4]ASI_DMMU ! wr new ctxum
stxa %g0, [%g1]ASI_DTLB_DEMAP
stxa %g0, [%g1]ASI_ITLB_DEMAP
stxa %g5, [%g4]ASI_DMMU ! restore old ctxnum
retry
SET_SIZE(vtag_flushpage_tl1)
ENTRY_NP(vtag_flush_pgcnt_tl1)
set SFMMU_PGCNT_MASK, %g4
and %g4, %g2, %g3
add %g3, 1, %g3
andn %g2, SFMMU_PGCNT_MASK, %g2
srln %g1, MMU_PAGESHIFT, %g1
sethi %hi(ksfmmup), %g4
ldx [%g4 + %lo(ksfmmup)], %g4
cmp %g4, %g2
bne,pn %xcc, 1f
slln %g1, MMU_PAGESHIFT, %g1
or DEMAP_NUCLEUS | DEMAP_PAGE_TYPE, %g1, %g1
set MMU_PAGESIZE, %g2
sethi %hi(FLUSH_ADDR), %g5
4:
stxa %g0, [%g1]ASI_DTLB_DEMAP
stxa %g0, [%g1]ASI_ITLB_DEMAP
flush %g5 ! flush required by immu
deccc %g3
bnz,pt %icc,4b
add %g1, %g2, %g1
retry
1:
SFMMU_CPU_CNUM(%g2, %g5, %g6) ! %g5 = sfmmu cnum on this CPU
or DEMAP_PRIMARY | DEMAP_PAGE_TYPE, %g1, %g1
ldub [%g2 + SFMMU_CEXT], %g4 ! %g4 = sfmmup->cext
sll %g4, CTXREG_EXT_SHIFT, %g4
or %g5, %g4, %g5
set MMU_PCONTEXT, %g4
ldxa [%g4]ASI_DMMU, %g6
srlx %g6, CTXREG_NEXT_SHIFT, %g2
sllx %g2, CTXREG_NEXT_SHIFT, %g2
or %g5, %g2, %g5
stxa %g5, [%g4]ASI_DMMU
set MMU_PAGESIZE, %g2
sethi %hi(FLUSH_ADDR), %g5
3:
stxa %g0, [%g1]ASI_DTLB_DEMAP
stxa %g0, [%g1]ASI_ITLB_DEMAP
flush %g5 ! flush required by immu
deccc %g3
bnz,pt %icc,3b
add %g1, %g2, %g1
stxa %g6, [%g4]ASI_DMMU
retry
SET_SIZE(vtag_flush_pgcnt_tl1)
ENTRY_NP(vtag_flushall_tl1)
set DEMAP_ALL_TYPE, %g4
stxa %g0, [%g4]ASI_DTLB_DEMAP
stxa %g0, [%g4]ASI_ITLB_DEMAP
retry
SET_SIZE(vtag_flushall_tl1)
ENTRY(vac_flushpage)
retl
nop
SET_SIZE(vac_flushpage)
ENTRY_NP(vac_flushpage_tl1)
retry
SET_SIZE(vac_flushpage_tl1)
ENTRY(vac_flushcolor)
retl
nop
SET_SIZE(vac_flushcolor)
ENTRY(vac_flushcolor_tl1)
retry
SET_SIZE(vac_flushcolor_tl1)
ENTRY(idsr_busy)
ldxa [%g0]ASI_INTR_DISPATCH_STATUS, %g1
clr %o0
btst IDSR_BUSY, %g1
bz,a,pt %xcc, 1f
mov 1, %o0
1:
retl
nop
SET_SIZE(idsr_busy)
.global _dispatch_status_busy
_dispatch_status_busy:
.asciz "ASI_INTR_DISPATCH_STATUS error: busy"
.align 4
.seg "text"
ENTRY(init_mondo)
#ifdef DEBUG
!
! IDSR should not be busy at the moment
!
ldxa [%g0]ASI_INTR_DISPATCH_STATUS, %g1
btst IDSR_BUSY, %g1
bz,pt %xcc, 1f
nop
sethi %hi(_dispatch_status_busy), %o0
call panic
or %o0, %lo(_dispatch_status_busy), %o0
#endif
ALTENTRY(init_mondo_nocheck)
!
! interrupt vector dispatch data reg 0
!
1:
mov IDDR_0, %g1
mov IDDR_1, %g2
mov IDDR_2, %g3
stxa %o0, [%g1]ASI_INTR_DISPATCH
!
! interrupt vector dispatch data reg 1
!
stxa %o1, [%g2]ASI_INTR_DISPATCH
!
! interrupt vector dispatch data reg 2
!
stxa %o2, [%g3]ASI_INTR_DISPATCH
membar #Sync
retl
nop
SET_SIZE(init_mondo_nocheck)
SET_SIZE(init_mondo)
ENTRY_NP(shipit)
sll %o0, IDCR_PID_SHIFT, %g1 ! IDCR<23:14> = agent id
sll %o1, IDCR_BN_SHIFT, %g2 ! IDCR<28:24> = b/n pair
or %g1, IDCR_OFFSET, %g1 ! IDCR<13:0> = 0x70
or %g1, %g2, %g1
stxa %g0, [%g1]ASI_INTR_DISPATCH ! interrupt vector dispatch
membar #Sync
retl
nop
SET_SIZE(shipit)
ENTRY(flush_instr_mem)
flush %o0 ! address irrelevant
retl
nop
SET_SIZE(flush_instr_mem)
ENTRY(flush_ecache)
ECACHE_FLUSHALL(%o1, %o2, %o0, %o4)
retl
nop
SET_SIZE(flush_ecache)
ENTRY(kdi_flush_idcache)
retl
nop
SET_SIZE(kdi_flush_idcache)
#ifdef TRAPTRACE
#define OPL_TRAPTRACE(ptr, scr1, scr2, label) \
CPU_INDEX(scr1, ptr); \
sll scr1, TRAPTR_SIZE_SHIFT, scr1; \
set trap_trace_ctl, ptr; \
add ptr, scr1, scr1; \
ld [scr1 + TRAPTR_LIMIT], ptr; \
tst ptr; \
be,pn %icc, label##1; \
ldx [scr1 + TRAPTR_PBASE], ptr; \
ld [scr1 + TRAPTR_OFFSET], scr1; \
add ptr, scr1, ptr; \
rd %asi, scr2; \
wr %g0, TRAPTR_ASI, %asi; \
rd STICK, scr1; \
stxa scr1, [ptr + TRAP_ENT_TICK]%asi; \
rdpr %tl, scr1; \
stha scr1, [ptr + TRAP_ENT_TL]%asi; \
rdpr %tt, scr1; \
stha scr1, [ptr + TRAP_ENT_TT]%asi; \
rdpr %tpc, scr1; \
stna scr1, [ptr + TRAP_ENT_TPC]%asi; \
rdpr %tstate, scr1; \
stxa scr1, [ptr + TRAP_ENT_TSTATE]%asi; \
stna %sp, [ptr + TRAP_ENT_SP]%asi; \
stna %g0, [ptr + TRAP_ENT_TR]%asi; \
stna %g0, [ptr + TRAP_ENT_F1]%asi; \
stna %g0, [ptr + TRAP_ENT_F2]%asi; \
stna %g0, [ptr + TRAP_ENT_F3]%asi; \
stna %g0, [ptr + TRAP_ENT_F4]%asi; \
wr %g0, scr2, %asi; \
CPU_INDEX(ptr, scr1); \
sll ptr, TRAPTR_SIZE_SHIFT, ptr; \
set trap_trace_ctl, scr1; \
add scr1, ptr, ptr; \
ld [ptr + TRAPTR_OFFSET], scr1; \
ld [ptr + TRAPTR_LIMIT], scr2; \
st scr1, [ptr + TRAPTR_LAST_OFFSET]; \
add scr1, TRAP_ENT_SIZE, scr1; \
sub scr2, TRAP_ENT_SIZE, scr2; \
cmp scr1, scr2; \
movge %icc, 0, scr1; \
st scr1, [ptr + TRAPTR_OFFSET]; \
label##1:
#endif
#define OPL_SAVE_GLOBAL(reg1, reg2, reg3) \
stxa reg1, [%g0]ASI_SCRATCHPAD ;\
mov OPL_SCRATCHPAD_SAVE_AG2, reg1 ;\
stxa reg2, [reg1]ASI_SCRATCHPAD ;\
mov OPL_SCRATCHPAD_SAVE_AG3, reg1 ;\
stxa reg3, [reg1]ASI_SCRATCHPAD
#define OPL_RESTORE_GLOBAL(reg1, reg2, reg3) \
mov OPL_SCRATCHPAD_SAVE_AG3, reg1 ;\
ldxa [reg1]ASI_SCRATCHPAD, reg3 ;\
mov OPL_SCRATCHPAD_SAVE_AG2, reg1 ;\
ldxa [reg1]ASI_SCRATCHPAD, reg2 ;\
ldxa [%g0]ASI_SCRATCHPAD, reg1
#define LOG_REG(pa, offset, val) \
add pa, offset, pa ;\
stxa val, [pa]ASI_MEM
#define FLUSH_ALL_TLB(tmp1) \
set DEMAP_ALL_TYPE, tmp1 ;\
stxa %g0, [tmp1]ASI_ITLB_DEMAP ;\
stxa %g0, [tmp1]ASI_DTLB_DEMAP ;\
sethi %hi(FLUSH_ADDR), tmp1 ;\
flush tmp1
#define LOG_ADDR(pa) \
mov OPL_SCRATCHPAD_ERRLOG, pa ;\
ldxa [pa]ASI_SCRATCHPAD, pa ;\
sllx pa, 64-ERRLOG_REG_EIDR_SHIFT, pa ;\
srlx pa, 64-ERRLOG_REG_EIDR_SHIFT+ERRLOG_REG_ERR_SHIFT, pa ;\
sllx pa, ERRLOG_REG_ERR_SHIFT, pa
#define UPDATE_LOGADD(logpa, bufmask, tmp) \
set OPL_SCRATCHPAD_ERRLOG, tmp ;\
ldxa [tmp]ASI_SCRATCHPAD, logpa ;\
set (ERRLOG_BUFSZ-1), bufmask ;\
andn logpa, bufmask, tmp ;\
add logpa, ERRLOG_SZ, logpa ;\
and logpa, bufmask, logpa ;\
or tmp, logpa, logpa ;\
set OPL_SCRATCHPAD_ERRLOG, tmp ;\
stxa logpa, [tmp]ASI_SCRATCHPAD
#define LOG_SYNC_REG(sfsr, sfar, tmp) \
LOG_ADDR(tmp) ;\
LOG_REG(tmp, LOG_SFSR_OFF, sfsr) ;\
LOG_ADDR(tmp) ;\
mov tmp, sfsr ;\
LOG_REG(tmp, LOG_SFAR_OFF, sfar) ;\
rd STICK, sfar ;\
mov sfsr, tmp ;\
LOG_REG(tmp, LOG_STICK_OFF, sfar) ;\
rdpr %tl, tmp ;\
sllx tmp, 32, sfar ;\
rdpr %tt, tmp ;\
or sfar, tmp, sfar ;\
mov sfsr, tmp ;\
LOG_REG(tmp, LOG_TL_OFF, sfar) ;\
set OPL_SCRATCHPAD_ERRLOG, tmp ;\
ldxa [tmp]ASI_SCRATCHPAD, sfar ;\
mov sfsr, tmp ;\
LOG_REG(tmp, LOG_ASI3_OFF, sfar) ;\
rdpr %tpc, sfar ;\
mov sfsr, tmp ;\
LOG_REG(tmp, LOG_TPC_OFF, sfar) ;\
UPDATE_LOGADD(sfsr, sfar, tmp)
#define LOG_UGER_REG(uger, tmp, tmp2) \
LOG_ADDR(tmp) ;\
mov tmp, tmp2 ;\
LOG_REG(tmp2, LOG_UGER_OFF, uger) ;\
mov tmp, uger ;\
rd STICK, tmp2 ;\
LOG_REG(tmp, LOG_STICK_OFF, tmp2) ;\
rdpr %tl, tmp ;\
sllx tmp, 32, tmp2 ;\
rdpr %tt, tmp ;\
or tmp2, tmp, tmp2 ;\
mov uger, tmp ;\
LOG_REG(tmp, LOG_TL_OFF, tmp2) ;\
set OPL_SCRATCHPAD_ERRLOG, tmp2 ;\
ldxa [tmp2]ASI_SCRATCHPAD, tmp2 ;\
mov uger, tmp ;\
LOG_REG(tmp, LOG_ASI3_OFF, tmp2) ;\
rdpr %tstate, tmp2 ;\
mov uger, tmp ;\
LOG_REG(tmp, LOG_TSTATE_OFF, tmp2) ;\
rdpr %tpc, tmp2 ;\
mov uger, tmp ;\
LOG_REG(tmp, LOG_TPC_OFF, tmp2) ;\
UPDATE_LOGADD(uger, tmp, tmp2)
#define UPDATE_STICK_COMPARE(tmp1, tmp2) \
CPU_ADDR(tmp1, tmp2) ;\
lduh [tmp1 + CPU_FLAGS], tmp2 ;\
andcc tmp2, CPU_ENABLE, %g0 ;\
set OPL_UGER_STICK_DIFF, tmp2 ;\
rd STICK, tmp1 ;\
add tmp1, tmp2, tmp1 ;\
mov 1, tmp2 ;\
sllx tmp2, TICKINT_DIS_SHFT, tmp2 ;\
or tmp1, tmp2, tmp2 ;\
movnz %xcc, tmp1, tmp2 ;\
wr tmp2, %g0, STICK_COMPARE
#define IAG_CRE(tmp1, tmp2) \
set OPL_SCRATCHPAD_ERRLOG, tmp1 ;\
ldxa [tmp1]ASI_SCRATCHPAD, tmp1 ;\
srlx tmp1, ERRLOG_REG_EIDR_SHIFT, tmp1 ;\
set ERRLOG_REG_EIDR_MASK, tmp2 ;\
and tmp1, tmp2, tmp1 ;\
stxa tmp1, [%g0]ASI_EIDR ;\
wr %g0, 0, SOFTINT ;\
sethi %hi(hres_last_tick), tmp1 ;\
ldx [tmp1 + %lo(hres_last_tick)], tmp1 ;\
set OPL_UGER_STICK_DIFF, tmp2 ;\
add tmp1, tmp2, tmp1 ;\
wr tmp1, %g0, STICK ;\
UPDATE_STICK_COMPARE(tmp1, tmp2)
#define CLEAR_FPREGS(tmp) \
wr %g0, FPRS_FEF, %fprs ;\
wr %g0, %g0, %gsr ;\
sethi %hi(opl_clr_freg), tmp ;\
or tmp, %lo(opl_clr_freg), tmp ;\
ldx [tmp], %fsr ;\
fzero %d0 ;\
fzero %d2 ;\
fzero %d4 ;\
fzero %d6 ;\
fzero %d8 ;\
fzero %d10 ;\
fzero %d12 ;\
fzero %d14 ;\
fzero %d16 ;\
fzero %d18 ;\
fzero %d20 ;\
fzero %d22 ;\
fzero %d24 ;\
fzero %d26 ;\
fzero %d28 ;\
fzero %d30 ;\
fzero %d32 ;\
fzero %d34 ;\
fzero %d36 ;\
fzero %d38 ;\
fzero %d40 ;\
fzero %d42 ;\
fzero %d44 ;\
fzero %d46 ;\
fzero %d48 ;\
fzero %d50 ;\
fzero %d52 ;\
fzero %d54 ;\
fzero %d56 ;\
fzero %d58 ;\
fzero %d60 ;\
fzero %d62 ;\
wr %g0, %g0, %fprs
#define CLEAR_GLOBALS() \
mov %g0, %g1 ;\
mov %g0, %g2 ;\
mov %g0, %g3 ;\
mov %g0, %g4 ;\
mov %g0, %g5 ;\
mov %g0, %g6 ;\
mov %g0, %g7
#define CLEAR_GEN_REGS(tmp1, label) \
set TSTATE_KERN, tmp1 ;\
wrpr %g0, tmp1, %tstate ;\
mov %g0, %y ;\
mov %g0, %asi ;\
mov %g0, %ccr ;\
mov %g0, %l0 ;\
mov %g0, %l1 ;\
mov %g0, %l2 ;\
mov %g0, %l3 ;\
mov %g0, %l4 ;\
mov %g0, %l5 ;\
mov %g0, %l6 ;\
mov %g0, %l7 ;\
mov %g0, %i0 ;\
mov %g0, %i1 ;\
mov %g0, %i2 ;\
mov %g0, %i3 ;\
mov %g0, %i4 ;\
mov %g0, %i5 ;\
mov %g0, %i6 ;\
mov %g0, %i7 ;\
mov %g0, %o1 ;\
mov %g0, %o2 ;\
mov %g0, %o3 ;\
mov %g0, %o4 ;\
mov %g0, %o5 ;\
mov %g0, %o6 ;\
mov %g0, %o7 ;\
mov %g0, %o0 ;\
mov %g0, %g4 ;\
mov %g0, %g5 ;\
mov %g0, %g6 ;\
mov %g0, %g7 ;\
rdpr %tl, tmp1 ;\
cmp tmp1, 1 ;\
be,pt %xcc, label##1 ;\
rdpr %pstate, tmp1 ;\
wrpr tmp1, PSTATE_AG|PSTATE_IG, %pstate ;\
CLEAR_GLOBALS() ;\
rdpr %pstate, tmp1 ;\
wrpr tmp1, PSTATE_IG|PSTATE_MG, %pstate ;\
CLEAR_GLOBALS() ;\
rdpr %pstate, tmp1 ;\
wrpr tmp1, PSTATE_MG|PSTATE_AG, %pstate ;\
ba,pt %xcc, label##2 ;\
nop ;\
label##1: ;\
wrpr tmp1, PSTATE_AG, %pstate ;\
CLEAR_GLOBALS() ;\
rdpr %pstate, tmp1 ;\
wrpr tmp1, PSTATE_AG, %pstate ;\
label##2:
#define RESET_WINREG(tmp) \
sethi %hi(nwin_minus_one), tmp ;\
ld [tmp + %lo(nwin_minus_one)], tmp ;\
wrpr %g0, tmp, %cwp ;\
wrpr %g0, tmp, %cleanwin ;\
sub tmp, 1, tmp ;\
wrpr %g0, tmp, %cansave ;\
wrpr %g0, %g0, %canrestore ;\
wrpr %g0, %g0, %otherwin ;\
wrpr %g0, PIL_MAX, %pil ;\
wrpr %g0, WSTATE_KERN, %wstate
#define RESET_PREV_TSTATE(tmp1, tmp2, label) \
rdpr %tl, tmp1 ;\
subcc tmp1, 1, tmp1 ;\
bz,pt %xcc, label##1 ;\
nop ;\
wrpr tmp1, %g0, %tl ;\
set TSTATE_KERN, tmp2 ;\
wrpr tmp2, %g0, %tstate ;\
wrpr %g0, %g0, %tpc ;\
wrpr %g0, %g0, %tnpc ;\
add tmp1, 1, tmp1 ;\
wrpr tmp1, %g0, %tl ;\
label##1:
#define RESET_CUR_TSTATE(tmp) \
set TSTATE_KERN, tmp ;\
wrpr %g0, tmp, %tstate ;\
wrpr %g0, 0, %tpc ;\
wrpr %g0, 0, %tnpc ;\
RESET_WINREG(tmp)
#define RESET_MMU_REGS(tmp1, tmp2, tmp3) \
FLUSH_ALL_TLB(tmp1) ;\
set MMU_PCONTEXT, tmp1 ;\
sethi %hi(kcontextreg), tmp2 ;\
ldx [tmp2 + %lo(kcontextreg)], tmp2 ;\
stxa tmp2, [tmp1]ASI_DMMU ;\
set MMU_SCONTEXT, tmp1 ;\
stxa tmp2, [tmp1]ASI_DMMU ;\
sethi %hi(ktsb_base), tmp1 ;\
ldx [tmp1 + %lo(ktsb_base)], tmp2 ;\
mov MMU_TSB, tmp3 ;\
stxa tmp2, [tmp3]ASI_IMMU ;\
stxa tmp2, [tmp3]ASI_DMMU ;\
membar #Sync ;\
RESET_WINREG(tmp1)
#define RESET_TSB_TAGPTR(tmp) \
set MMU_TAG_ACCESS, tmp ;\
stxa %g0, [tmp]ASI_IMMU ;\
stxa %g0, [tmp]ASI_DMMU ;\
membar #Sync
#define RESET_TSB_PREFETCH(tmp) \
set VA_UTSBPREF_8K, tmp ;\
stxa %g0, [tmp]ASI_ITSB_PREFETCH ;\
set VA_UTSBPREF_4M, tmp ;\
stxa %g0, [tmp]ASI_ITSB_PREFETCH ;\
set VA_KTSBPREF_8K, tmp ;\
stxa %g0, [tmp]ASI_ITSB_PREFETCH ;\
set VA_KTSBPREF_4M, tmp ;\
stxa %g0, [tmp]ASI_ITSB_PREFETCH ;\
set VA_UTSBPREF_8K, tmp ;\
stxa %g0, [tmp]ASI_DTSB_PREFETCH ;\
set VA_UTSBPREF_4M, tmp ;\
stxa %g0, [tmp]ASI_DTSB_PREFETCH ;\
set VA_KTSBPREF_8K, tmp ;\
stxa %g0, [tmp]ASI_DTSB_PREFETCH ;\
set VA_KTSBPREF_4M, tmp ;\
stxa %g0, [tmp]ASI_DTSB_PREFETCH
#define RESET_SHARED_CTXT(tmp) \
set MMU_SHARED_CONTEXT, tmp ;\
stxa %g0, [tmp]ASI_DMMU
#define RESET_TO_PRIV(tmp, tmp1, tmp2, local) \
RESET_MMU_REGS(tmp, tmp1, tmp2) ;\
CPU_ADDR(tmp, tmp1) ;\
ldx [tmp + CPU_THREAD], local ;\
ldx [local + T_STACK], tmp ;\
sub tmp, STACK_BIAS, %sp ;\
rdpr %pstate, tmp ;\
wrpr tmp, PSTATE_AG, %pstate ;\
mov local, %g7 ;\
rdpr %pstate, local ;\
wrpr local, PSTATE_AG, %pstate ;\
wrpr %g0, 1, %tl ;\
set TSTATE_KERN, tmp ;\
rdpr %cwp, tmp1 ;\
or tmp, tmp1, tmp ;\
wrpr tmp, %g0, %tstate ;\
wrpr %g0, %tpc
.align 128
ENTRY_NP(ce_err)
mov AFSR_ECR, %g1
ldxa [%g1]ASI_ECR, %g1
andcc %g1, ASI_ECR_RTE_UE | ASI_ECR_RTE_CEDG, %g0
bz,pn %xcc, 1f
nop
retry
1:
set trap, %g1
rdpr %tt, %g3
sethi %hi(sys_trap), %g5
jmp %g5 + %lo(sys_trap)
sub %g0, 1, %g4
SET_SIZE(ce_err)
ENTRY_NP(ce_err_tl1)
set trap, %g1
rdpr %tt, %g3
sethi %hi(sys_trap), %g5
jmp %g5 + %lo(sys_trap)
sub %g0, 1, %g4
SET_SIZE(ce_err_tl1)
ENTRY_NP(async_err)
set trap, %g1
rdpr %tt, %g3
sethi %hi(sys_trap), %g5
jmp %g5 + %lo(sys_trap)
sub %g0, 1, %g4
SET_SIZE(async_err)
.seg ".data"
.global opl_clr_freg
.global opl_cpu0_err_log
.align 16
opl_clr_freg:
.word 0
.align 16
.align MMU_PAGESIZE
opl_cpu0_err_log:
.skip MMU_PAGESIZE
ENTRY_NP(opl_sync_trap)
#ifdef TRAPTRACE
OPL_TRAPTRACE(%g1, %g2, %g3, opl_sync_trap_lb)
rdpr %tt, %g1
#endif
cmp %g1, T_INSTR_ERROR
bne,pt %xcc, 0f
mov MMU_SFSR, %g3
ldxa [%g3]ASI_IMMU, %g1 ! IAE trap case tt = 0xa
andcc %g1, SFSR_FV, %g0
bz,a,pn %xcc, 2f ! Branch if SFSR is invalid and
rdpr %tpc, %g2 ! use %tpc for faultaddr instead
sethi %hi(SFSR_UE|SFSR_BERR|SFSR_TO), %g3
andcc %g1, %g3, %g0 ! Check for UE/BERR/TO errors
bz,a,pt %xcc, 1f ! Branch if not UE/BERR/TO and
rdpr %tpc, %g2 ! use %tpc as faultaddr
set OPL_MMU_SFPAR, %g3 ! In the UE/BERR/TO cases, use
ba,pt %xcc, 2f ! SFPAR as faultaddr
ldxa [%g3]ASI_IMMU, %g2
0:
ldxa [%g3]ASI_DMMU, %g1 ! DAE trap case tt = 0x32
andcc %g1, SFSR_FV, %g0
bnz,pt %xcc, 7f ! branch if SFSR.FV is valid
mov MMU_SFAR, %g2 ! set %g2 to use SFAR
ba,pt %xcc, 2f ! SFSR.FV is not valid, read SFAR
ldxa [%g2]ASI_DMMU, %g2 ! for faultaddr
7:
sethi %hi(SFSR_UE|SFSR_BERR|SFSR_TO), %g3
andcc %g1, %g3, %g0 ! Check UE/BERR/TO for valid SFPAR
movnz %xcc, OPL_MMU_SFPAR, %g2 ! Use SFPAR instead of SFAR for
ldxa [%g2]ASI_DMMU, %g2 ! faultaddr
1:
sethi %hi(SFSR_TLB_PRT), %g3
andcc %g1, %g3, %g0
bz,pt %xcc, 8f ! branch for TLB multi-hit check
nop
FLUSH_ALL_TLB(%g3)
set OPL_SCRATCHPAD_ERRLOG, %g3
ldxa [%g3]ASI_SCRATCHPAD, %g3 ! Read errlog scratchreg
and %g3, ERRLOG_REG_NUMERR_MASK, %g3! Extract the error count
subcc %g3, 1, %g0 ! Subtract one from the count
bz,pn %xcc, 2f ! too many TLB parity errs in a certain
nop ! period, branch to generate ereport
LOG_SYNC_REG(%g1, %g2, %g3) ! Record into the error log
set OPL_SCRATCHPAD_ERRLOG, %g3
ldxa [%g3]ASI_SCRATCHPAD, %g2
sub %g2, 1, %g2 ! decrement error counter by 1
stxa %g2, [%g3]ASI_SCRATCHPAD ! update the errlog scratchreg
OPL_RESTORE_GLOBAL(%g1, %g2, %g3)
retry
8:
sethi %hi(SFSR_TLB_MUL), %g3
andcc %g1, %g3, %g0
bz,pt %xcc, 2f ! check for the TLB multi-hit errors
nop
FLUSH_ALL_TLB(%g3)
2:
mov %g1, %g5 ! %g5 = SFSR
mov %g2, %g6 ! %g6 = SFPAR or SFAR/tpc
LOG_SYNC_REG(%g1, %g2, %g3) ! Record into the error log
rdpr %tt, %g4 ! %g4 == ttype
rdpr %tl, %g1 ! %g1 == tl
cmp %g1, 1 ! Check if TL == 1
be,pt %xcc, 3f ! branch if we came from TL=0
nop
andcc %g5, SFSR_FV, %g0 ! see if SFSR.FV is valid
bz,pn %xcc, 4f ! branch, checking UE is meaningless
sethi %hi(SFSR_UE), %g2
andcc %g5, %g2, %g0 ! check for UE
bz,pt %xcc, 4f ! branch if not UE
nop
RESET_WINREG(%g1) ! reset windows to prevent spills
4:
RESET_USER_RTT_REGS(%g2, %g3, opl_sync_trap_resetskip)
opl_sync_trap_resetskip:
mov %g5, %g3 ! pass SFSR to the 3rd arg
mov %g6, %g2 ! pass SFAR to the 2nd arg
set opl_cpu_isync_tl1_error, %g1
set opl_cpu_dsync_tl1_error, %g6
cmp %g4, T_INSTR_ERROR
movne %icc, %g6, %g1
ba,pt %icc, 6f
nop
3:
mov %g5, %g3 ! pass SFSR to the 3rd arg
mov %g6, %g2 ! pass SFAR to the 2nd arg
set opl_cpu_isync_tl0_error, %g1
set opl_cpu_dsync_tl0_error, %g6
cmp %g4, T_INSTR_ERROR
movne %icc, %g6, %g1
6:
sethi %hi(sys_trap), %g5
jmp %g5 + %lo(sys_trap)
mov PIL_15, %g4
SET_SIZE(opl_sync_trap)
ENTRY_NP(opl_uger_trap)
set ASI_UGERSR, %g2
ldxa [%g2]ASI_AFSR, %g1 ! Read the UGERSR reg
set UGESR_MULTI, %g2
andcc %g1, %g2, %g0 ! Check for Multi-errs
bz,pt %xcc, opl_uger_is_recover ! branch if not Multi-errs
nop
set AFSR_ECR, %g2
ldxa [%g2]ASI_AFSR, %g3 ! Enable Weak error
or %g3, ASI_ECR_WEAK_ED, %g3 ! detect mode to prevent
stxa %g3, [%g2]ASI_AFSR ! potential error storms
ba %xcc, opl_uger_panic1
nop
opl_uger_is_recover:
set UGESR_CAN_RECOVER, %g2 ! Check for recoverable
andcc %g1, %g2, %g0 ! errors i.e.IUG_DTLB,
bz,pt %xcc, opl_uger_cre ! IUG_ITLB or COREERR
nop
FLUSH_ALL_TLB(%g3)
rdpr %tl, %g3 ! Read TL
cmp %g3, 1 ! Check if we came from TL=0
bne,pt %xcc, opl_uger_panic ! branch if came from TL>0
nop
srlx %g1, 4, %g2 ! shift INSTEND[5:4] -> [1:0]
and %g2, 3, %g2 ! extract the shifted [1:0] bits
cmp %g2, 3 ! check if INSTEND is recoverable
be,pt %xcc, opl_uger_panic ! panic if ([1:0] = 11b)
nop
set OPL_SCRATCHPAD_ERRLOG, %g3
ldxa [%g3]ASI_SCRATCHPAD, %g2 ! Read errlog scratch reg
and %g2, ERRLOG_REG_NUMERR_MASK, %g3! Extract error count and
subcc %g3, 1, %g3 ! subtract one from it
bz,pt %xcc, opl_uger_panic ! If count reached zero, too many
nop ! errors, branch to generate ereport
sub %g2, 1, %g2 ! Subtract one from the count
set OPL_SCRATCHPAD_ERRLOG, %g3 ! and write back the updated
stxa %g2, [%g3]ASI_SCRATCHPAD ! count into the errlog reg
LOG_UGER_REG(%g1, %g2, %g3) ! Log the error info
#ifdef TRAPTRACE
OPL_TRAPTRACE(%g1, %g2, %g3, opl_uger_trap_lb)
#endif
retry ! retry - no ereport
opl_uger_cre:
set UGESR_IAUG_CRE, %g2
andcc %g1, %g2, %g0
bz,pt %xcc, opl_uger_ctxt
nop
IAG_CRE(%g2, %g3)
set AFSR_ECR, %g2
ldxa [%g2]ASI_AFSR, %g3
or %g3, ASI_ECR_WEAK_ED, %g3
stxa %g3, [%g2]ASI_AFSR
ba %xcc, opl_uger_panic
nop
opl_uger_ctxt:
set UGESR_IAUG_TSBCTXT, %g2
andcc %g1, %g2, %g0
bz,pt %xcc, opl_uger_tsbp
nop
GET_CPU_IMPL(%g2)
cmp %g2, JUPITER_IMPL
bne %xcc, 1f
nop
RESET_SHARED_CTXT(%g2)
1:
RESET_MMU_REGS(%g2, %g3, %g4)
ba %xcc, opl_uger_panic
nop
opl_uger_tsbp:
set UGESR_IUG_TSBP, %g2
andcc %g1, %g2, %g0
bz,pt %xcc, opl_uger_pstate
nop
GET_CPU_IMPL(%g2)
cmp %g2, JUPITER_IMPL
bne %xcc, 1f
nop
RESET_TSB_PREFETCH(%g2)
1:
RESET_TSB_TAGPTR(%g2)
RESET_MMU_REGS(%g2, %g3, %g4)
ba %xcc, opl_uger_panic
nop
opl_uger_pstate:
set UGESR_IUG_PSTATE, %g2
andcc %g1, %g2, %g0
bz,pt %xcc, opl_uger_tstate
nop
RESET_CUR_TSTATE(%g2)
ba %xcc, opl_uger_panic1
nop
opl_uger_tstate:
set UGESR_IUG_TSTATE, %g2
andcc %g1, %g2, %g0
bz,pt %xcc, opl_uger_f
nop
RESET_PREV_TSTATE(%g2, %g3, opl_uger_tstate_1)
ba %xcc, opl_uger_panic1
nop
opl_uger_f:
set UGESR_IUG_F, %g2
andcc %g1, %g2, %g0
bz,pt %xcc, opl_uger_r
nop
CLEAR_FPREGS(%g2)
ba %xcc, opl_uger_panic
nop
opl_uger_r:
set UGESR_IUG_R, %g2
andcc %g1, %g2, %g0
bz,pt %xcc, opl_uger_panic1
nop
CLEAR_GEN_REGS(%g2, opl_uger_r_1)
ba %xcc, opl_uger_panic1
nop
opl_uger_panic:
mov %g1, %g2 ! %g2 = arg #1
LOG_UGER_REG(%g1, %g3, %g4)
ba %xcc, opl_uger_panic_cmn
nop
opl_uger_panic1:
mov %g1, %g2 ! %g2 = arg #1
LOG_UGER_REG(%g1, %g3, %g4)
RESET_TO_PRIV(%g1, %g3, %g4, %l0)
opl_uger_panic_cmn:
RESET_USER_RTT_REGS(%g4, %g5, opl_uger_panic_resetskip)
opl_uger_panic_resetskip:
rdpr %tl, %g3 ! arg #2
set opl_cpu_urgent_error, %g1 ! pc
sethi %hi(sys_trap), %g5
jmp %g5 + %lo(sys_trap)
mov PIL_15, %g4
SET_SIZE(opl_uger_trap)
#define RESTORE_WREGS(tmp1, tmp2) \
CPU_INDEX(tmp1, tmp2) ;\
sethi %hi(opl_ta3_save), tmp2 ;\
ldx [tmp2 +%lo(opl_ta3_save)], tmp2 ;\
sllx tmp1, 7, tmp1 ;\
add tmp2, tmp1, tmp2 ;\
ldx [tmp2 + 0], %l0 ;\
ldx [tmp2 + 8], %l1 ;\
ldx [tmp2 + 16], %l2 ;\
ldx [tmp2 + 24], %l3 ;\
ldx [tmp2 + 32], %l4 ;\
ldx [tmp2 + 40], %l5 ;\
ldx [tmp2 + 48], %l6 ;\
ldx [tmp2 + 56], %l7 ;\
ldx [tmp2 + 64], %i0 ;\
ldx [tmp2 + 72], %i1 ;\
ldx [tmp2 + 80], %i2 ;\
ldx [tmp2 + 88], %i3 ;\
ldx [tmp2 + 96], %i4 ;\
ldx [tmp2 + 104], %i5 ;\
ldx [tmp2 + 112], %i6 ;\
ldx [tmp2 + 120], %i7
#define SAVE_WREGS(tmp1, tmp2) \
CPU_INDEX(tmp1, tmp2) ;\
sethi %hi(opl_ta3_save), tmp2 ;\
ldx [tmp2 +%lo(opl_ta3_save)], tmp2 ;\
sllx tmp1, 7, tmp1 ;\
add tmp2, tmp1, tmp2 ;\
stx %l0, [tmp2 + 0] ;\
stx %l1, [tmp2 + 8] ;\
stx %l2, [tmp2 + 16] ;\
stx %l3, [tmp2 + 24] ;\
stx %l4, [tmp2 + 32] ;\
stx %l5, [tmp2 + 40] ;\
stx %l6, [tmp2 + 48] ;\
stx %l7, [tmp2 + 56] ;\
stx %i0, [tmp2 + 64] ;\
stx %i1, [tmp2 + 72] ;\
stx %i2, [tmp2 + 80] ;\
stx %i3, [tmp2 + 88] ;\
stx %i4, [tmp2 + 96] ;\
stx %i5, [tmp2 + 104] ;\
stx %i6, [tmp2 + 112] ;\
stx %i7, [tmp2 + 120]
ENTRY_NP(opl_ta3_trap)
set trap, %g1
mov T_FLUSHW, %g3
sub %g0, 1, %g4
rdpr %cwp, %g5
SAVE_WREGS(%g2, %g6)
save
flushw
rdpr %cwp, %g6
wrpr %g5, %cwp
RESTORE_WREGS(%g2, %g5)
wrpr %g6, %cwp
restored
restore
ba,a fast_trap_done
SET_SIZE(opl_ta3_trap)
ENTRY_NP(opl_cleanw_subr)
set trap, %g1
mov T_FLUSHW, %g3
sub %g0, 1, %g4
rdpr %cwp, %g5
SAVE_WREGS(%g2, %g6)
save
flushw
rdpr %cwp, %g6
wrpr %g5, %cwp
RESTORE_WREGS(%g2, %g5)
wrpr %g6, %cwp
restored
restore
jmp %g7
nop
SET_SIZE(opl_cleanw_subr)
ENTRY_NP(opl_serr_instr)
OPL_SAVE_GLOBAL(%g1,%g2,%g3)
sethi %hi(opl_sync_trap), %g3
jmp %g3 + %lo(opl_sync_trap)
rdpr %tt, %g1
.align 32
SET_SIZE(opl_serr_instr)
ENTRY_NP(opl_ugerr_instr)
sethi %hi(opl_uger_trap), %g3
jmp %g3 + %lo(opl_uger_trap)
nop
.align 32
SET_SIZE(opl_ugerr_instr)
ENTRY_NP(opl_ta3_instr)
sethi %hi(opl_ta3_trap), %g3
jmp %g3 + %lo(opl_ta3_trap)
nop
.align 32
SET_SIZE(opl_ta3_instr)
ENTRY_NP(opl_ta4_instr)
sethi %hi(opl_cleanw_subr), %g3
add %g3, %lo(opl_cleanw_subr), %g3
jmpl %g3, %g7
add %g7, 8, %g7
nop
nop
nop
SET_SIZE(opl_ta4_instr)
ENTRY_NP(stick_timestamp)
rd STICK, %g1 ! read stick reg
sllx %g1, 1, %g1
srlx %g1, 1, %g1 ! clear npt bit
retl
stx %g1, [%o0] ! store the timestamp
SET_SIZE(stick_timestamp)
ENTRY_NP(stick_adj)
rdpr %pstate, %g1 ! save processor state
andn %g1, PSTATE_IE, %g3
ba 1f ! cache align stick adj
wrpr %g0, %g3, %pstate ! turn off interrupts
.align 16
1: nop
rd STICK, %g4 ! read stick reg
add %g4, %o0, %o1 ! adjust stick with skew
wr %o1, %g0, STICK ! write stick reg
retl
wrpr %g1, %pstate ! restore processor state
SET_SIZE(stick_adj)
ENTRY_NP(kdi_get_stick)
rd STICK, %g1
stx %g1, [%o0]
retl
mov %g0, %o0
SET_SIZE(kdi_get_stick)
ENTRY(dtrace_blksuword32)
save %sp, -SA(MINFRAME + 4), %sp
rdpr %pstate, %l1
andn %l1, PSTATE_IE, %l2 ! disable interrupts to
wrpr %g0, %l2, %pstate ! protect our FPU diddling
rd %fprs, %l0
andcc %l0, FPRS_FEF, %g0
bz,a,pt %xcc, 1f ! if the fpu is disabled
wr %g0, FPRS_FEF, %fprs ! ... enable the fpu
st %f0, [%fp + STACK_BIAS - 4] ! save %f0 to the stack
1:
set 0f, %l5
ld [%i1], %f0 ! modify the block
membar #Sync
stn %l5, [THREAD_REG + T_LOFAULT] ! set up the lofault handler
stda %d0, [%i0]ASI_BLK_COMMIT_S ! store the modified block
membar #Sync
flush %i0 ! flush instruction pipeline
stn %g0, [THREAD_REG + T_LOFAULT] ! remove the lofault handler
bz,a,pt %xcc, 1f
wr %g0, %l0, %fprs ! restore %fprs
ld [%fp + STACK_BIAS - 4], %f0 ! restore %f0
1:
wrpr %g0, %l1, %pstate ! restore interrupts
ret
restore %g0, %g0, %o0
0:
membar #Sync
stn %g0, [THREAD_REG + T_LOFAULT] ! remove the lofault handler
bz,a,pt %xcc, 1f
wr %g0, %l0, %fprs ! restore %fprs
ld [%fp + STACK_BIAS - 4], %f0 ! restore %f0
1:
wrpr %g0, %l1, %pstate ! restore interrupts
brnz,pt %i2, 1f
nop
ret
restore %g0, -1, %o0
1:
call dtrace_blksuword32_err
restore
SET_SIZE(dtrace_blksuword32)
ENTRY_NP(ras_cntr_reset)
set OPL_SCRATCHPAD_ERRLOG, %o1
ldxa [%o1]ASI_SCRATCHPAD, %o0
or %o0, ERRLOG_REG_NUMERR_MASK, %o0
retl
stxa %o0, [%o1]ASI_SCRATCHPAD
SET_SIZE(ras_cntr_reset)
ENTRY_NP(opl_error_setup)
ldxa [%g0]ASI_EIDR, %o2
sethi %hi(ERRLOG_REG_EIDR_MASK), %o1
or %o1, %lo(ERRLOG_REG_EIDR_MASK), %o1
and %o2, %o1, %o3
sllx %o3, ERRLOG_REG_EIDR_SHIFT, %o2
or %o2, %o0, %o3
or %o3, ERRLOG_REG_NUMERR_MASK, %o0
set OPL_SCRATCHPAD_ERRLOG, %o1
stxa %o0, [%o1]ASI_SCRATCHPAD
mov AFSR_ECR, %o1
ldxa [%o1]ASI_AFSR, %o0
andn %o0, ASI_ECR_RTE_UE|ASI_ECR_RTE_CEDG, %o0
retl
stxa %o0, [%o1]ASI_AFSR
SET_SIZE(opl_error_setup)
ENTRY_NP(cpu_early_feature_init)
mov LSU_MCNTL, %o0
ldxa [%o0] ASI_MCNTL, %o1
or %o1, MCNTL_MPG_SITLB | MCNTL_MPG_SDTLB, %o1
stxa %o1, [%o0] ASI_MCNTL
sethi %hi(FLUSH_ADDR), %o1
set DEMAP_ALL_TYPE, %o0
stxa %g0, [%o0]ASI_DTLB_DEMAP
stxa %g0, [%o0]ASI_ITLB_DEMAP
retl
flush %o1
SET_SIZE(cpu_early_feature_init)
ENTRY(cpu_feature_init)
!
! get the device_id and store the device_id
! in the appropriate cpunodes structure
! given the cpus index
!
CPU_INDEX(%o0, %o1)
mulx %o0, CPU_NODE_SIZE, %o0
set cpunodes + DEVICE_ID, %o1
ldxa [%g0] ASI_DEVICE_SERIAL_ID, %o2
stx %o2, [%o0 + %o1]
!
! initialize CPU registers
!
ba opl_cpu_reg_init
nop
SET_SIZE(cpu_feature_init)
ENTRY_NP(cpu_clearticknpt)
rdpr %pstate, %g1
andn %g1, PSTATE_IE, %g3
wrpr %g0, %g3, %pstate
rdpr %tick, %g2
brgez,pn %g2, 1f
mov 1, %g3
sllx %g3, 63, %g3
ba,a,pt %xcc, 2f
.align 8
2:
rdpr %tick, %g2
wrpr %g3, %g2, %tick
1:
rd STICK, %g2
brgez,pn %g2, 3f
mov 1, %g3
sllx %g3, 63, %g3
ba,a,pt %xcc, 4f
.align 8
4:
rd STICK, %g2
wr %g3, %g2, STICK
3:
jmp %g4 + 4
wrpr %g0, %g1, %pstate
SET_SIZE(cpu_clearticknpt)
ENTRY_NP(cpu_halt_cpu)
.word 0x81b01040
retl
nop
SET_SIZE(cpu_halt_cpu)
ENTRY_NP(cpu_smt_pause)
.word 0x81b01060
retl
nop
SET_SIZE(cpu_smt_pause)