mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +00:00
modify pddb size on key testing
this allows for faster reboots through CI cycles as a state transition from secure->insecure always triggers a PDDB format
This commit is contained in:
parent
0aeb9daa37
commit
f6bf8f9bf1
2 changed files with 6 additions and 1 deletions
|
|
@ -26,6 +26,9 @@ arbitrary-int = "1.2"
|
||||||
num_enum = { version = "0.5", default-features = false }
|
num_enum = { version = "0.5", default-features = false }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
# testing flag that causes the PDDB to be small
|
||||||
|
key-testing = []
|
||||||
|
|
||||||
std = ["derive-rkyv", "xous-names", "xous-ipc"]
|
std = ["derive-rkyv", "xous-names", "xous-ipc"]
|
||||||
derive-rkyv = ["rkyv"]
|
derive-rkyv = ["rkyv"]
|
||||||
bio = []
|
bio = []
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ use xous::arch::PAGE_SIZE;
|
||||||
|
|
||||||
use crate::offsets::{PartitionAccess, RwPerms, SlotIndex};
|
use crate::offsets::{PartitionAccess, RwPerms, SlotIndex};
|
||||||
|
|
||||||
// we actually have 16MiB on the initial prototypes, but constraining to smaller for cost reduction
|
|
||||||
pub const SPI_FLASH_LEN: usize = 8192 * 1024;
|
pub const SPI_FLASH_LEN: usize = 8192 * 1024;
|
||||||
pub const SPI_FLASH_ID_MASK: u32 = 0xff_ff_ff;
|
pub const SPI_FLASH_ID_MASK: u32 = 0xff_ff_ff;
|
||||||
|
|
||||||
|
|
@ -29,7 +28,10 @@ pub const SWAP_HEADER_LEN: usize = PAGE_SIZE;
|
||||||
// PDDB takes up "the rest of the space" - about 4MiB envisioned. Should be
|
// PDDB takes up "the rest of the space" - about 4MiB envisioned. Should be
|
||||||
// "enough" for storing a few hundred, passwords, dozens of x.509 certs, dozens of private keys, etc.
|
// "enough" for storing a few hundred, passwords, dozens of x.509 certs, dozens of private keys, etc.
|
||||||
pub const PDDB_ORIGIN: usize = SWAP_FLASH_ORIGIN + SWAP_FLASH_RESERVED_LEN;
|
pub const PDDB_ORIGIN: usize = SWAP_FLASH_ORIGIN + SWAP_FLASH_RESERVED_LEN;
|
||||||
|
#[cfg(not(feature = "key-testing"))]
|
||||||
pub const PDDB_LEN: usize = SPI_FLASH_LEN - PDDB_ORIGIN;
|
pub const PDDB_LEN: usize = SPI_FLASH_LEN - PDDB_ORIGIN;
|
||||||
|
#[cfg(feature = "key-testing")]
|
||||||
|
pub const PDDB_LEN: usize = 256 * 1024; // 256k - big enough to do something with, but much faster to init
|
||||||
|
|
||||||
// Location of on-chip application segment, as offset from RRAM start
|
// Location of on-chip application segment, as offset from RRAM start
|
||||||
pub const APP_RRAM_OFFSET: usize = 0;
|
pub const APP_RRAM_OFFSET: usize = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue