1 //Original:/proj/frio/dv/testcases/seq/se_cc_kill/se_cc_kill.dsp
3 // Verify CC kill under the following condition:
5 // (1) CC = AZ killed in WB
6 // (2) CC = AN killed in WB
7 // (3) CC = AC killed in WB
8 // (4) CC = AV0 killed in WB
9 // (5) CC = AV1 killed in WB
10 // (6) CC = AQ killed in WB
12 # sim: --environment operating
15 .include "testutils.inc"
18 // ----------------------------------------------------------------
20 // ----------------------------------------------------------------
23 include(selfcheck.inc)
27 // ----------------------------------------------------------------
29 // ----------------------------------------------------------------
32 #define STACKSIZE 0x00000010
35 #define ITABLE CODE_ADDR_1 //
39 // ----------------------------------------------------------------
41 // - set the processor operating modes
42 // - initialize registers
44 // ----------------------------------------------------------------
48 // Initialize data registers
59 // Initialize pointer registers
62 // Initialize address registers
68 // Initialize the address of the checkreg data segment
69 // **** THIS IS NEEDED WHENEVER CHECKREG IS USED ****
70 CHECK_INIT_DEF(p5); //CHECK_INIT(p5, 0x00BFFFFC);
72 // Inhibit events during MMR writes
76 LD32_LABEL(sp, USTACK);
80 LD32_LABEL(sp, KSTACK);
82 // Setup frame pointer
85 // Setup event vector table
88 LD32_LABEL(r0, EMU_ISR); // Emulation Handler (EVT0)
90 LD32_LABEL(r0, RST_ISR); // Reset Handler (EVT1)
92 LD32_LABEL(r0, NMI_ISR); // NMI Handler (EVT2)
94 LD32_LABEL(r0, EXC_ISR); // Exception Handler (EVT3)
96 [ P0 ++ ] = R0; // EVT4 not used
97 LD32_LABEL(r0, HWE_ISR); // HW Error Handler (EVT5)
99 LD32_LABEL(r0, TMR_ISR); // Timer Handler (EVT6)
101 LD32_LABEL(r0, IGV7_ISR); // IVG7 Handler
103 LD32_LABEL(r0, IGV8_ISR); // IVG8 Handler
105 LD32_LABEL(r0, IGV9_ISR); // IVG9 Handler
107 LD32_LABEL(r0, IGV10_ISR); // IVG10 Handler
109 LD32_LABEL(r0, IGV11_ISR); // IVG11 Handler
111 LD32_LABEL(r0, IGV12_ISR); // IVG12 Handler
113 LD32_LABEL(r0, IGV13_ISR); // IVG13 Handler
115 LD32_LABEL(r0, IGV14_ISR); // IVG14 Handler
117 LD32_LABEL(r0, IGV15_ISR); // IVG15 Handler
120 // Set the EVT_OVERRIDE MMR
121 LD32(p0, EVT_OVERRIDE);
125 // Disable L1 data cache
126 WR_MMR(DMEM_CONTROL, 0x00000000, p0, r0);
128 // Mask interrupts (*)
131 // Wait for MMR writes to finish
137 // Reset loop counters to deterministic values
147 // Reset other internal regs
152 // Setup the test to run in USER mode
153 LD32_LABEL(r0, USER_CODE);
156 // Setup the test to run in SUPERVISOR mode
157 // Comment the following line for a USER mode test
158 JUMP.S SUPERVISOR_CODE;
162 // Load IVG15 general handler (Int15) with MAIN_CODE
163 LD32_LABEL(p1, MAIN_CODE);
172 // Take Int15 which branch to MAIN_CODE after RTI
177 // Setup the stack pointer and the frame pointer
178 LD32_LABEL(sp, USTACK);
190 // ----------------------------------------------------------------
192 // ----------------------------------------------------------------
195 // ----------------------------------------------------------------
197 // ----------------------------------------------------------------
211 // ----------------------------------------------------------------
213 // ----------------------------------------------------------------
227 // ----------------------------------------------------------------
229 // ----------------------------------------------------------------
243 // ----------------------------------------------------------------
245 // ----------------------------------------------------------------
259 // ----------------------------------------------------------------
261 // ----------------------------------------------------------------
275 // ----------------------------------------------------------------
277 // ----------------------------------------------------------------
291 // ----------------------------------------------------------------
293 // ----------------------------------------------------------------
307 // ----------------------------------------------------------------
309 // ----------------------------------------------------------------
323 // ----------------------------------------------------------------
325 // ----------------------------------------------------------------
339 // ----------------------------------------------------------------
341 // ----------------------------------------------------------------
355 // ----------------------------------------------------------------
357 // ----------------------------------------------------------------
371 // ----------------------------------------------------------------
373 // ----------------------------------------------------------------
387 // ----------------------------------------------------------------
389 // ----------------------------------------------------------------
403 // ----------------------------------------------------------------
405 // ----------------------------------------------------------------
419 // ----------------------------------------------------------------
421 // ----------------------------------------------------------------
425 // Enable interrupts in SUPERVISOR mode
426 // Comment the following line for a USER mode test
429 // Start of the program code
431 // Verify CC kill under the following condition:
433 // (1) CC = AZ killed in WB
438 // (2) CC = AN killed in WB
443 // (3) CC = AC killed in WB
448 // (4) CC = AV0 killed in WB
453 // (5) CC = AV1 killed in WB
458 // (6) CC = AQ killed in WB
467 // ----------------------------------------------------------------
469 // - define kernel and user stacks
470 // ----------------------------------------------------------------