Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | # 1 "pmu_sl4_mask_n2.pal" |
2 | ||
3 | :#define MAIN_PAGE_NUCLEUS_ALSO | |
4 | :#define MAIN_PAGE_HV_ALSO | |
5 | :#define DMMU_SKIP_IF_NO_TTE | |
6 | ||
7 | :#include "hboot.s" | |
8 | ||
9 | : | |
10 | ||
11 | ||
12 | ||
13 | :.text | |
14 | :.global main | |
15 | ||
16 | :main: | |
17 | ||
18 | ||
19 | :! Thread 0 Start | |
20 | ||
21 | :!main_t0: | |
22 | ||
23 | : set 0x20010044, %l0 ! Reserved | |
24 | : set 0x20110084, %l1 ! Reserved | |
25 | : set 0x5822c102, %l2 ! Count ITLB References to L2 | |
26 | : set 0x1840c202, %l3 ! Count DTLB References to L2 | |
27 | : set 0x20810402, %l4 ! Count ITLB References to L2 which miss in L2 | |
28 | : set 0x21010802, %l5 ! count DTLB References to L2 which miss in L2 | |
29 | : set 0x22011004, %l6 ! Reserved | |
30 | : set 0x24012004, %l7 ! Reserved | |
31 | ||
32 | : ! Execute Main Diag .. | |
33 | : ta T_CHANGE_PRIV ! Should cause Watchdog_reset trap | |
34 | ||
35 | ||
36 | :!Count_ITLB_References: | |
37 | ||
38 | : wr %l2, %g0, %pcr ! count ITLB References | |
39 | : wr %g0, %g0, %pic ! zero out the counter | |
40 | ||
41 | for ($i=0; $i<10; $i++) { | |
42 | : ta T_CHANGE_HPRIV | |
43 | : set 0x80, %g1 | |
44 | : stxa %g1, [%g1] 0x57 | |
45 | : ta T_CHANGE_NONHPRIV | |
46 | : and %g1, %g2, %g3 | |
47 | } | |
48 | ||
49 | ||
50 | :! | |
51 | :! Add ITLB References | |
52 | :! | |
53 | :!Check_ITLB_References: | |
54 | : setx 0x0000001300000013, %o4, %g5 ! Set expected results in %g5 | |
55 | : rd %pic, %g2 ! load the current pic value into %g2 | |
56 | : xor %g2, %g5, %g6 ! Compare expected results with actual | |
57 | : brnz %g6, fail | |
58 | : nop | |
59 | ||
60 | ||
61 | :done: | |
62 | : EXIT_GOOD | |
63 | :fail: | |
64 | : EXIT_BAD | |
65 | ||
66 | ||
67 | ||
68 | ||
69 | :.data | |
70 | :user_data_start: | |
71 | :scratch_area: | |
72 | :.align 16 | |
73 | :load_1: | |
74 | :.word 0xFFFF2e2d | |
75 | :.word 0x2e2dFFFF | |
76 | :.align 16 | |
77 | ||
78 | :store_1: | |
79 | :.align 16 | |
80 | :.word 0xDEADBEEF | |
81 | :.word 0xAAAAAAAA | |
82 | :.align 16 | |
83 | ||
84 | :.end |