Skip to content

Commit

Permalink
sync-platform: remove ram field
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurélien Nicolas committed Dec 12, 2024
1 parent 4373f07 commit ec8ed09
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 1 addition & 6 deletions ceno_emul/src/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use crate::addr::{Addr, RegIdx};
#[derive(Clone, Debug)]
pub struct Platform {
pub prog_code: Range<Addr>,
pub ram: Range<Addr>, // TODO: remove.
pub prog_data: Option<HashSet<Addr>>,
pub stack: Range<Addr>,
pub heap: Range<Addr>,
Expand All @@ -22,7 +21,6 @@ pub struct Platform {

pub const CENO_PLATFORM: Platform = Platform {
prog_code: 0x2000_0000..0x3000_0000,
ram: 0x8000_0000..0xFFFF_0000,
prog_data: None, // This is an `Option` to allow `const` here.
stack: 0xB0000000..0xC0000000,
heap: 0x8000_0000..0xFFFF_0000,
Expand All @@ -39,10 +37,7 @@ impl Platform {
}

pub fn is_ram(&self, addr: Addr) -> bool {
self.ram.contains(&addr)
|| self.stack.contains(&addr)
|| self.heap.contains(&addr)
|| self.is_prog_data(addr)
self.stack.contains(&addr) || self.heap.contains(&addr) || self.is_prog_data(addr)
}

pub fn is_prog_data(&self, addr: Addr) -> bool {
Expand Down
1 change: 0 additions & 1 deletion ceno_zkvm/src/e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ pub fn setup_platform(
Preset::Sp1 => Platform {
// The stack section is not mentioned in ELF headers, so we repeat the constant STACK_TOP here.
stack: 0x0020_0400..0x0020_0400,
ram: 0x0010_0000..0xFFFF_0000,
unsafe_ecall_nop: true,
..CENO_PLATFORM
},
Expand Down

0 comments on commit ec8ed09

Please sign in to comment.