-
Notifications
You must be signed in to change notification settings - Fork 791
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pentest] Manual Cherry Pick of "Add Ibex FI & SCA tests"
This commit manually cherry picks #22269 as the automatic cherry pick failed. This commit adds the following SCA and FI penetration tests: - ibex.fi.address_translation - ibex.fi.address_translation_config - ibex.fi.char.csr_write - ibex.fi.char.csr_read - ibex.sca.key_sideloading The host code is located in lowRISC/ot-sca#350 Signed-off-by: Pascal Nasahl <[email protected]> (cherry picked from commit ea26e1a)
- Loading branch information
Showing
10 changed files
with
1,253 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,234 @@ | ||
// Copyright lowRISC contributors (OpenTitan project). | ||
// Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
/** | ||
* Increments a value 100 times by 1. | ||
* | ||
* As this function is targeted by fault injection, the code is unrolled. | ||
* | ||
* @param a0 initial value which gets incremented. | ||
* @return Initial value incremeted 100 times by 1. | ||
*/ | ||
.globl increment_100x1 | ||
.type increment_100x1, @function | ||
.balign 256 | ||
increment_100x1: | ||
// a0: init value | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
addi a0, a0, 1 | ||
ret | ||
|
||
|
||
/** | ||
* Increments a value 100 times by 10. | ||
* | ||
* As this function is targeted by fault injection, the code is unrolled. | ||
* | ||
* @param a0 initial value which gets incremented. | ||
* @return Initial value incremeted 100 times by 10. | ||
*/ | ||
.globl increment_100x10 | ||
.type increment_100x10, @function | ||
.balign 256 | ||
increment_100x10: | ||
// a0: init value | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
addi a0, a0, 10 | ||
ret |
Oops, something went wrong.