summaryrefslogtreecommitdiff
path: root/test/mpu.c
Commit message (Collapse)AuthorAgeFilesLines
* ish: Trim down the release branchstabilize-wristpin-14469.59.B-ishstabilize-voshyr-14637.B-ishstabilize-quickfix-14695.187.B-ishstabilize-quickfix-14695.124.B-ishstabilize-quickfix-14526.91.B-ishstabilize-14695.85.B-ishstabilize-14695.107.B-ishstabilize-14682.B-ishstabilize-14633.B-ishstabilize-14616.B-ishstabilize-14589.B-ishstabilize-14588.98.B-ishstabilize-14588.14.B-ishstabilize-14588.123.B-ishstabilize-14536.B-ishstabilize-14532.B-ishstabilize-14528.B-ishstabilize-14526.89.B-ishstabilize-14526.84.B-ishstabilize-14526.73.B-ishstabilize-14526.67.B-ishstabilize-14526.57.B-ishstabilize-14498.B-ishstabilize-14496.B-ishstabilize-14477.B-ishstabilize-14469.9.B-ishstabilize-14469.8.B-ishstabilize-14469.58.B-ishstabilize-14469.41.B-ishstabilize-14442.B-ishstabilize-14438.B-ishstabilize-14411.B-ishstabilize-14396.B-ishstabilize-14395.B-ishstabilize-14388.62.B-ishstabilize-14388.61.B-ishstabilize-14388.52.B-ishstabilize-14385.B-ishstabilize-14345.B-ishstabilize-14336.B-ishstabilize-14333.B-ishrelease-R99-14469.B-ishrelease-R98-14388.B-ishrelease-R102-14695.B-ishrelease-R101-14588.B-ishrelease-R100-14526.B-ishfirmware-cherry-14454.B-ishfirmware-brya-14505.B-ishfirmware-brya-14505.71.B-ishfactory-kukui-14374.B-ishfactory-guybrush-14600.B-ishfactory-cherry-14455.B-ishfactory-brya-14517.B-ishJack Rosenthal2021-11-051-222/+0
| | | | | | | | | | | | | | | | | | | | | | In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* test: Pass commandline arguments to run_testTom Hughes2020-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | run_test is called by the "runtest" console command. Console commands can take arguments, so pass along the arguments to run_test to allow parameters to be passed to run_test. The following command was used for automatic replacement: git grep --name-only 'void run_test(void)' |\ xargs sed -i 's#void run_test(void)#void run_test(int argc, char **argv)##' BRANCH=none BUG=b:155897971 TEST=make buildall -j TEST=Build and flash flash_write_protect test > runtest 1 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ib20b955d5ec6b98f525c94c24aadefd7a6a320a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2209418 Reviewed-by: Yicheng Li <yichengli@chromium.org> Commit-Queue: Yicheng Li <yichengli@chromium.org> Tested-by: Yicheng Li <yichengli@chromium.org>
* test: Add on-device test for calculating MPU regions for RWYicheng Li2020-05-301-0/+23
| | | | | | | | | | | | | | | | MPU logic needs to represent RW with no more than 2 MPU regions when locking RW. Add on-device unit test for this calculation. BRANCH=none BUG=b:155410753 TEST=make -j BOARD=bloonchipper TEST=make -j BOARD=nucleo-f412zg test-mpu Then flash the test binary to nucleo board runtest on device ==> Pass Change-Id: Idc746efa9419d31cdae9c6fccc499c92160ac593 Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2218595
* test: Check the current image when running the MPU testTom Hughes2020-05-301-4/+20
| | | | | | | | | | | | | | | | | Locking RO or RW prevents code execution, so we can only test locking the region that is not running. BRANCH=none BUG=b:155410753 TEST=With dragonclaw v0.2 connected to Segger J-Trace and servo micro: ./test/run_device_tests.py -t mpu_ro mpu_rw => PASS Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I4d4e135a79d8d3bc383cd1b5a60d42c1b68def4e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2222975 Commit-Queue: Yicheng Li <yichengli@chromium.org> Reviewed-by: Yicheng Li <yichengli@chromium.org>
* test: Test return code on all public MPU functionsTom Hughes2020-05-291-0/+56
| | | | | | | | | | | | | | | | | | | | | | | Note that test_mpu_lock_rw_flash currently fails on bloonchipper since we're trying to protect a size that's not power-of-two aligned to the address. This will be fixed in a followup commit. BRANCH=none BUG=b:151105339, b:155229277 TEST=Build and flash MPU test on bloonchipper: > runtest => Fails Running test_mpu_lock_rw_flash... 129: ASSERTION failed: rv == EC_SUCCESS EVAL: -5 == 0 Fail Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I82104bd7d4df5d15bb048b4649a3e52c8b426d9f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2217052 Commit-Queue: Yicheng Li <yichengli@chromium.org> Reviewed-by: Yicheng Li <yichengli@chromium.org>
* test: Add on-device MPU unit testTom Hughes2020-05-221-0/+127
BRANCH=none BUG=b:151105339, b:155229277 TEST=make BOARD=bloonchipper test-mpu -j && \ ./util/flash_jlink.py --board bloonchipper \ --image ./build/bloonchipper/mpu/mpu.bin => On console: "runtest" => All tests pass, except last which correctly panics: Data access violation, mfar = 20000000 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I1c759f50da5075b1e9027cdba253d8c06843be5a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2202852 Commit-Queue: Yicheng Li <yichengli@chromium.org> Tested-by: Yicheng Li <yichengli@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>