Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
Add some tests of execution from small MPU regions.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Add test11 to the set of tests run from the shell script.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
|
Record and check FAR values as well as FSR and fault type.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Use symbolic constants for expect_fault values rather than hardcoded
magic numbers.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
|
Update the MPU tests in test8 to use tapit format.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
|
Fix the indentation to 4-space indent; whitespace only change.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wrong barrier...
|
|
|
|
|
|
qemu is picky about alignment
|
|
|
|
|