-
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.
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]>
- Loading branch information
Showing
8 changed files
with
654 additions
and
4 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,228 @@ | ||
// Copyright lowRISC contributors. | ||
// 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. | ||
* | ||
* @param a0 initial value which gets incremented. | ||
*/ | ||
.globl target_function | ||
.type target_function, @function | ||
.balign 256 | ||
target_function: | ||
// 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. | ||
* | ||
* @param a0 initial value which gets incremented. | ||
*/ | ||
.globl expected_function | ||
.type expected_function, @function | ||
.balign 256 | ||
expected_function: | ||
// 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.