Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling stack overflow check for nightly CI for ROM 1.0.x #1912

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading