Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | |
2 | :#define MAIN_PAGE_NUCLEUS_ALSO | |
3 | :#define MAIN_PAGE_HV_ALSO | |
4 | :#define DMMU_SKIP_IF_NO_TTE | |
5 | :#define CREGS_PIL 0x0 | |
6 | ||
7 | :#include "mmu_custom_intr_handlers.s" | |
8 | :#include "hboot.s" | |
9 | ||
10 | :/************************************************************************ | |
11 | : Test case code start | |
12 | : ************************************************************************/ | |
13 | ||
14 | :.text | |
15 | :.global main | |
16 | ||
17 | :main: /* test begin */ | |
18 | ||
19 | ||
20 | :! Thread 0 Start | |
21 | ||
22 | :!main_t0: | |
23 | ||
24 | ||
25 | : set 0x5842C232, %l3 ! Count DTLB References to L2 | |
26 | ||
27 | : ! Execute Main Diag .. | |
28 | : ta T_CHANGE_PRIV ! Should cause Watchdog_reset trap | |
29 | ||
30 | ||
31 | :Cnt_DTLB_References: | |
32 | : wr %l3, %g0, %pcr ! count DTLB References | |
33 | : setx 0xFFFFFFE7FFFFFF00, %l5, %l6 | |
34 | : wr %l6, %g0, %pic ! zero out the counter | |
35 | ||
36 | : setx 0x60040000, %g4, %g5 | |
37 | ||
38 | for ($i = 0; $i <10; $i++) { | |
39 | : ta T_CHANGE_HPRIV | |
40 | : set 0x80, %g1 | |
41 | : stxa %g1, [%g1] 0x5f | |
42 | : ta T_CHANGE_NONHPRIV | |
43 | : ldx [%g5], %g2 | |
44 | } | |
45 | ||
46 | :fail: | |
47 | : EXIT_BAD /* bad count */ | |
48 | ||
49 | :/************************************************************************ | |
50 | : Test case data start | |
51 | : ************************************************************************/ | |
52 | :.data | |
53 | :user_data_start: | |
54 | :scratch_area: | |
55 | :.align 16 | |
56 | :load_1: | |
57 | :.word 0xFFFF2e2d | |
58 | :.word 0x2e2dFFFF | |
59 | :.align 16 | |
60 | ||
61 | :store_1: | |
62 | :.align 16 | |
63 | :.word 0xDEADBEEF | |
64 | :.word 0xAAAAAAAA | |
65 | :.align 16 | |
66 | ||
67 | :.end |