Last change
on this file since 311 was
232,
checked in by alain, 13 years ago
|
Introducing the elementary tests for a TSAR mono-cluster
mono-processor platform with MMU using the vci_cc_vcache_v4
such as the "tsarv4_mono_mmu".
(assemby level tests written by Manuel Bouyer)
|
File size:
867 bytes
|
Line | |
---|
1 | /* |
---|
2 | * Check that the exeption vector is called on exception. |
---|
3 | * We use a load to an unaligned address to trigger the exception. |
---|
4 | */ |
---|
5 | #include <registers.h> |
---|
6 | #include <misc.h> |
---|
7 | |
---|
8 | .text |
---|
9 | .globl _start |
---|
10 | _start: |
---|
11 | .set noreorder |
---|
12 | la k0, TTY_BASE |
---|
13 | la k1, EXIT_BASE |
---|
14 | |
---|
15 | PRINT(startstr) |
---|
16 | |
---|
17 | li a0, 1 |
---|
18 | lw a0, 0(a0) /* fault */ |
---|
19 | |
---|
20 | /* we shouldn't get there */ |
---|
21 | EXIT(1) |
---|
22 | |
---|
23 | .globl excep |
---|
24 | excep: |
---|
25 | .set noreorder |
---|
26 | PRINT(statusstr) |
---|
27 | mfc0 a0, COP0_STATUS |
---|
28 | PRINTX |
---|
29 | |
---|
30 | PRINT(causestr) |
---|
31 | mfc0 a0, COP0_CAUSE |
---|
32 | PRINTX |
---|
33 | |
---|
34 | PRINT(pcstr) |
---|
35 | mfc0 a0, COP0_EXPC |
---|
36 | PRINTX |
---|
37 | |
---|
38 | PRINT(badvastr) |
---|
39 | mfc0 a0, COP_0_BADVADDR |
---|
40 | PRINTX |
---|
41 | |
---|
42 | li a0, '\n' |
---|
43 | sb a0, 0(k0) |
---|
44 | |
---|
45 | EXIT(0) |
---|
46 | |
---|
47 | .rodata: |
---|
48 | statusstr: .ascii "status \0" |
---|
49 | causestr: .ascii " cause \0" |
---|
50 | pcstr: .ascii " pc \0" |
---|
51 | badvastr: .ascii " badva \0" |
---|
52 | startstr: .ascii "start\n\0" |
---|
53 | |
---|
54 | .org EXCEP_ADDRESS - BOOT_ADDRESS |
---|
55 | .globl evect |
---|
56 | evect: |
---|
57 | j excep |
---|
58 | nop |
---|
59 | .data |
---|
60 | myvar: .word 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.