aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-04-10 18:44:17 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-04-11 11:54:38 +0100
commit6cace9f09aa49f7e73ab8cab5e54b598ff50cb5f (patch)
tree7b93e1faa16cb2b941a94ee259c82630a930bc43
parent26711b3dfbbe538bcbc8ed5824559898f82366b0 (diff)
test11: Disable tests that rely on IMPDEF behaviour
The tests in test11 have some problems; notably they assume BusFaults for some behaviour where they either must MemFault or it's IMPDEF or UNPREDICTABLE. Disable those tests, with a comment about why the behaviour is IMPDEF. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--test11-buserr.c37
1 files changed, 35 insertions, 2 deletions
diff --git a/test11-buserr.c b/test11-buserr.c
index c48972b..0f695e3 100644
--- a/test11-buserr.c
+++ b/test11-buserr.c
@@ -208,31 +208,47 @@ void main(void)
run_table.usage = usage_entry;
run_table.hard = hard;
- testInit(32);
+ testInit(14);
out32(SCB(0xd24), 0x70000); /* Enable Bus, Mem, and Usage Faults */
testDiag("# w/o MPU, hits background mapping");
+#if 0
testDiag("1. Cause BusFault 0xe1000ff0");
+ // this is in the vendor-defined bit of the PPB. it's impdef whether
+ // we get a busfault or not. QEMU doesn't.
out32((void*)0xe1000ff0, 0);
check_fault(2, 0x200);
testDiag("Back in Main");
+#endif
+#if 0
testDiag("2. Another BusFault 0x10000000");
+ // in the flash memory section. impdef whether this is w/o or not
+ // in the MPU default memory map, could MemFault, BusFault or
+ // be write-ignored
out32((void*)0x10000000, 0);
check_fault(2, 0x200);
testDiag("Back in Main");
+#endif
+#if 0
testDiag("3. Another BusFault 0x01000000");
+ // Ditto.
out32((void*)0x01000000, 0);
check_fault(2, 0x200);
testDiag("Back in Main");
+#endif
+#if 0
testDiag("4. Another BusFault 0xfffffffe");
+ // This is UNPREDICTABLE since it wraps around the address space.
+ // QEMU MemFaults.
out32((void*)0xfffffffe, 0);
check_fault(2, 0x200);
testDiag("Back in Main");
+#endif
testDiag("5.1 MemFault (jump to 0xf1000001)");
jumpff(0xf1000001);
@@ -248,25 +264,37 @@ void main(void)
" still hits background mapping");
enable_mpu(1,0,0);
+#if 0
+ // impdef like test 1
testDiag("6. Cause BusFault 0xe1000ff0");
out32((void*)0xe1000ff0, 0);
check_fault(2, 0x200);
testDiag("Back in Main");
+#endif
+#if 0
+ // impdef like test 2
testDiag("7. Another BusFault 0x10000000");
out32((void*)0x10000000, 0);
check_fault(2, 0x200);
testDiag("Back in Main");
+#endif
+#if 0
+ // impdef like test 3
testDiag("8. Another BusFault 0x01000000");
out32((void*)0x01000000, 0);
check_fault(2, 0x200);
testDiag("Back in Main");
+#endif
+#if 0
+ // UNPREDICTABLE like test 4
testDiag("9. Another BusFault 0xfffffffe");
out32((void*)0xfffffffe, 0);
check_fault(2, 0x200);
testDiag("Back in Main");
+#endif
// this jump works, and TI has hidden so data here
// testDiag("5. MemFault (jump to 0x01000001)");
@@ -290,24 +318,29 @@ void main(void)
testDiag("# Enable MPU, including privlaged");
enable_mpu(1,1,0);
+#if 0
// MPU allows through, but no one is home == BusFault
+ // IMPDEF
testDiag("11. Cause BusFault 0xe1000ff0");
out32((void*)0xe1000ff0, 0);
check_fault(2, 0x200);
testDiag("Back in Main");
+#endif
+ // MemFault because not in any region
testDiag("12. Another MemFault 0x10000000");
out32((void*)0x10000000, 0);
check_fault(1, 0x82);
testDiag("Back in Main");
- // MPU allows through, no one is home, but still MemFault...?
+ // MemFault because of RO mapping
testDiag("13. Another MemFault 0x05000000");
out32((void*)0x05000000, 0);
check_fault(1, 0x82);
testDiag("Back in Main");
testDiag("14. Another MemFault 0xfffffffe");
+ // UNPREDICTABLE? but as it happens QEMU does this
out32((void*)0xfffffffe, 0);
check_fault(1, 0x82);
testDiag("Back in Main");