aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-12-16Makefile: Force non-PIC codegenHEADmasterPeter Maydell
The Ubuntu arm-linux-gnueabihf-gcc now defaults to generating PIC code. This breaks our test executables because it means the code wants to indirect through a GOT and we don't set that up. There's no point in producing position-independent code for baremetal binaries anyway, so just explicitly disable it with -fno-pic. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-12-16test9: Correct expected SYST_CSR valuePeter Maydell
In QEMU commit a40e10f1dc3e0fedd we fixed a bug in our systick timer implementation where we always implemented a 1MHz reference clock, whether the board had a reference clock or not. For the Stellaris board which we run these test cases on, there is no reference clock; the reset value of SYST_CSR has therefore changed to its correct value of 4 (with the CLKSOURCE bit set to indicate that the systick clock is running on the CPU clock). Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-12-16test15: Add execution tests from small MPU regionsPeter Maydell
Add some tests of execution from small MPU regions. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-12-16Add test15 to test small MPU regionsPeter Maydell
Add a test which checks the functionality of MPU regions which are smaller than 1K in size. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-12-16tests: Correct _bss_end alignmentPhilippe Mathieu-Daudé
Fixes: arm-none-eabi/bin/ld: __bss_end alignment collect2: error: ld returned 1 exit status Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-12-16test9: Declare _main_stack_top as external symbolPhilippe Mathieu-Daudé
Fixes: arm-none-eabi/bin/ld: test9.o:/Users/philmd/source/m-profile-tests/test9.c:6: multiple definition of `_main_stack_top'; init-m-test9.o:(.bss+0x400): first defined here Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2022-12-16tests: Fix format string using PRIx32 definitionPhilippe Mathieu-Daudé
test7.c: In function 'svc': test7.c:105:29: error: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=] 105 | testDiag("New xPSR %x", sframe[7]); | ~^ ~~~~~~~~~ | | | | | uint32_t {aka long unsigned int} | unsigned int | %lx Using gcc version 12.2.0 (Arm GNU Toolchain 12.2.MPACBTI-Bet1 (Build arm-12-mpacbti.16)) Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-04-11test11: Add to runtestsPeter Maydell
Add test11 to the set of tests run from the shell script. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-04-11test11: Record and check FAR valuesPeter Maydell
Record and check FAR values as well as FSR and fault type. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-04-11test11: Disable tests that rely on IMPDEF behaviourPeter Maydell
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>
2017-04-11test11: Update to tapit output formatPeter Maydell
Update test11 to the tapit output format. (Much of the code for handling faults is copied across from test13.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-04-11test8: Add to runtests.shPeter Maydell
Now that test8 autodetects no-MPU configurations we can add it to the runtests.sh script. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-04-11test8: Support no-MPU configurationsPeter Maydell
Check whether the system under test implements the MPU by looking at the MPU_TYPE register, and skip the tests that require the MPU if the MPU is not implemented. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-04-11test8: Provide nicer human-readable diagnostics for checkfault()Peter Maydell
When checking whether we got the kind of fault we expected, provide a more easily human-readable description of what happened. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-04-11test8: Use symbolic constants for expect_fault valuesPeter Maydell
Use symbolic constants for expect_fault values rather than hardcoded magic numbers. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-04-06test8: Update to tapit formatPeter Maydell
Update the MPU tests in test8 to use tapit format. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-04-06test8: Fix indentationPeter Maydell
Fix the indentation to 4-space indent; whitespace only change. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-02-24Don't check ICSR.RETTOBASE outside an exception handlerPeter Maydell
The ICSR.RETTOBASE bit value is UNKNOWN when not inside an exception handler, so don't try to test it in that situation. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-02-14test14: New test testing bitbandingPeter Maydell
Add a new test that makes some simple checks of the bitbanding functionality for the RAM bitbanding alias. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-02-14armv7m.h: Macroise in/out functions and add missing versionsPeter Maydell
Macroise the creation of the in32/out32 etc functions and add the missing variations out16, int8 and in16. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-02-10test7: Complete rewrite to cover all exception return checksPeter Maydell
Rewrite test7 and expand it to cover all the architectural checks on exception return integrity. The original test7 test (jump to magic exception-return address from thread mode) is retained, but for the moment it is ifdeffed out, because QEMU doesn't implement it correctly yet. The test is also updated to use tapit output and added to the set run by runtests.sh. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-02-09test12: Update to output tapit and check CFSRPeter Maydell
Update test12 to output tapit format and to check the CFSR for what kind of UsageFault is raised, so we can distinguish the correct INVSTATE UsageFault from other possibilities like UNDEFINSTR. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-02-09test3: Update to use tapit output format and add to runtestsPeter Maydell
Update the test3 code to use tapit output format so we can add it to the tests run by the runtests script. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-31README: Update and overhaulPeter Maydell
Update the Makefile: * note that gnueabihf gcc will work too * document how to run runtests.sh and present it as the primary way to run the tests * clean up the list of tests and add the new test13 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-31runtest.sh: Take QEMU binary and compiler prefix as argumentsPeter Maydell
Rather than hardcoding where we find the QEMU binary and the compiler toolchain as being environment variables, take them as command line arguments. This makes things more flexible for running tests locally as well as via travis. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-31Makefile: relax wildcarding used to find GCCPeter Maydell
An arm-linux-gnueabihf-gcc will work for building these tests, so relax the wildcard we use to find our default GCC to include that. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-31test5: Abort if we failed to get back to privileged modePeter Maydell
This test switches between unprivileged and privileged modes, which use different stack pointers. If we failed to get back to privileged mode at the end of the test, then returning from main() will cause a guest crash (which will result in an infinite loop of exceptions). Avoid this by calling abort() if we didn't manage to get back to the stack pointer we need to safely return from main(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-31test9: Drop the check of XPSR reset valuePeter Maydell
The XPSR is architecturally UNKNOWN on reset, so don't try to test its value. (QEMU happens to start up with the Z flag set and others clear.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-31test13: New test for USAGEFAULT testingPeter Maydell
Add a new test case test13 which handles checks for various kinds of USAGEFAULT. For the moment we only test a simple UDF (which passes) and a CDP (which fails since QEMU doesn't get the FSR bit right). Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-20test4.c, test5.c: Avoid format string errorsPeter Maydell
Rather than passing a variable string as a printf format string, use "%s". This avoids a warning from compilers which check for this common bug. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-20Makefile: Add -Wl,--build-id=none to CFLAGSPeter Maydell
Some ARM toolchains emit the .note.gnu.build-id section, which by default ends up at the start of the binary where the vector table should be. Use -Wl,--build-id=none in the CFLAGS to suppress the build-id section entirely so the binary starts with the vector table as it should. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-07-09reformat test5Michael Davidsaver
2016-07-09more printingMichael Davidsaver
2016-07-09reformat test4Michael Davidsaver
2016-07-09add printkMichael Davidsaver
2016-07-09deinlineMichael Davidsaver
2016-07-09convert test10Michael Davidsaver
2016-07-08travis-ciMichael Davidsaver
2016-07-08testme for 1 and 9Michael Davidsaver
2016-04-06minorMichael Davidsaver
2015-12-05setup sysclockMichael Davidsaver
2015-11-28update READMEMichael Davidsaver
2015-11-28drop broken test2Michael Davidsaver
2015-11-28more test11Michael Davidsaver
2015-11-28use dmbMichael Davidsaver
wrong barrier...
2015-11-28add test12Michael Davidsaver
2015-11-27minorMichael Davidsaver
2015-11-27test8: fixup mpu configMichael Davidsaver
qemu is picky about alignment
2015-11-27minorMichael Davidsaver
2015-11-27test5 restore original stack on exitMichael Davidsaver