Skip to content

Commit

Permalink
Disabling stack overflow check for nightly CI for ROM 1.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
nquarton committed Jan 28, 2025
1 parent 77823a1 commit e97aeed
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,16 @@ jobs:
rom-logging: false
rom-version: "1.1"

# The current 1.0.x ROM used in CI will overflow the stack into unused space
# We disable the stack overflow check (sw_emu_stack_check_disable) when testing against that ROM
sw-emulator-hw-1_0-full-suite-etrng-log:
name: sw-emulator Suite (etrng, log)
needs: find-latest-release
if: needs.find-latest-release.outputs.create_release
uses: ./.github/workflows/fw-test-emu.yml
with:
artifact-suffix: -sw-emulator-hw-1.0-etrng-log
extra-features: hw-1.0,slow_tests
extra-features: hw-1.0,slow_tests,sw_emu_stack_check_disable
rom-logging: true
rom-version: "1.0"

Expand All @@ -310,7 +312,7 @@ jobs:
uses: ./.github/workflows/fw-test-emu.yml
with:
artifact-suffix: -sw-emulator-hw-1.0-etrng-nolog
extra-features: hw-1.0,slow_tests
extra-features: hw-1.0,slow_tests,sw_emu_stack_check_disable
rom-logging: false
rom-version: "1.0"

Expand All @@ -321,7 +323,7 @@ jobs:
uses: ./.github/workflows/fw-test-emu.yml
with:
artifact-suffix: -sw-emulator-hw-1.0-itrng-log
extra-features: hw-1.0,slow_tests,itrng
extra-features: hw-1.0,slow_tests,itrng,sw_emu_stack_check_disable
rom-logging: true
rom-version: "1.0"

Expand All @@ -332,7 +334,7 @@ jobs:
uses: ./.github/workflows/fw-test-emu.yml
with:
artifact-suffix: -sw-emulator-hw-1.0-itrng-nolog
extra-features: hw-1.0,slow_tests,itrng
extra-features: hw-1.0,slow_tests,itrng,sw_emu_stack_check_disable
rom-logging: false
rom-version: "1.0"

Expand Down
3 changes: 3 additions & 0 deletions sw-emulator/lib/cpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ caliptra-emu-derive.workspace = true
caliptra-emu-types.workspace = true
lazy_static.workspace = true
tock-registers.workspace = true

[features]
"sw_emu_stack_check_disable" = []
1 change: 1 addition & 0 deletions sw-emulator/lib/cpu/src/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ impl<TBus: Bus> Cpu<TBus> {
/// * `RvException` - Exception with cause `RvExceptionCause::IllegalRegister`
pub fn write_xreg(&mut self, reg: XReg, val: RvData) -> Result<(), RvException> {
// XReg::X2 is the sp register.
#[cfg(not(feature = "sw_emu_stack_check_disable"))]
if reg == XReg::X2 {
self.check_stack(val);
}
Expand Down

0 comments on commit e97aeed

Please sign in to comment.