Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / verif / diag / assembly / uarch / pmu / diag / dtlbSl3.pal
CommitLineData
86530b38
AT
1
2:#define MAIN_PAGE_NUCLEUS_ALSO
3:#define MAIN_PAGE_HV_ALSO
4:#define DMMU_SKIP_IF_NO_TTE
5
6:#include "hboot.s"
7
8:/************************************************************************
9: Test case code start
10: ************************************************************************/
11
12:.text
13:.global main
14
15:main: /* test begin */
16
17
18:! Thread 0 Start
19
20:!main_t0:
21
22
23: set 0x5842C202, %l3 ! Count DTLB References to L2
24
25: ! Execute Main Diag ..
26: ta T_CHANGE_PRIV ! Should cause Watchdog_reset trap
27
28
29:Cnt_DTLB_References:
30: wr %l3, %g0, %pcr ! count DTLB References
31: wr %g0, %g0, %pic ! zero out the counter
32
33: setx 0x60040000, %g4, %g5
34
35for ($i = 0; $i <10; $i++) {
36: ta T_CHANGE_HPRIV
37: set 0x80, %g1
38: stxa %g1, [%g1] 0x5f
39: ta T_CHANGE_NONHPRIV
40: ldx [%g5], %g2
41}
42
43
44$myValue = 'a';
45
46
47:!
48:! Add DTLB References
49:!
50:Check_DTLB_References:
51: setx 0x0000000${myValue}0000000${myValue}, %o4, %g5 ! count DTLB References
52: rd %pic, %g2 ! load the current pic value into %g2
53: xor %g2, %g5, %g6 ! Compare expected results with actual
54: brnz %g6, fail
55: nop
56
57
58:done:
59: EXIT_GOOD /* test finish */
60:fail:
61: EXIT_BAD /* bad count */
62
63:/************************************************************************
64: Test case data start
65: ************************************************************************/
66:.data
67:user_data_start:
68:scratch_area:
69:.align 16
70:load_1:
71:.word 0xFFFF2e2d
72:.word 0x2e2dFFFF
73:.align 16
74
75:store_1:
76:.align 16
77:.word 0xDEADBEEF
78:.word 0xAAAAAAAA
79:.align 16
80
81:.end