Skip to content

Commit

Permalink
Bugfix: replace 0x80400000 with TARGET_PAYLOAD_ADDRESS
Browse files Browse the repository at this point in the history
We have one hardcoded address in protect_payload.rs which won't work for the board
  • Loading branch information
francois141 authored and CharlyCst committed Dec 18, 2024
1 parent 20fb3dd commit 4f0cb97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/policy/protect_payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl PolicyModule for ProtectPayloadPolicy {
// In this policy module, if we receive an interrupt from Miralis, it implies we need to lock the memory
fn on_interrupt(&mut self, _ctx: &mut VirtContext, mctx: &mut MiralisContext) {
// Lock memory
mctx.pmp.set_inactive(POLICY_OFFSET, 0x80400000);
mctx.pmp.set_inactive(POLICY_OFFSET, TARGET_PAYLOAD_ADDRESS);
mctx.pmp
.set_tor(POLICY_OFFSET + 1, usize::MAX, pmpcfg::NO_PERMISSIONS);
}
Expand Down

0 comments on commit 4f0cb97

Please sign in to comment.