Skip to content

Commit c5a9c63

Browse files
committed
WIP: Fix npcx/zephyr flash layout
Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 8414b7e commit c5a9c63

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • framework_lib/src/chromium_ec

framework_lib/src/chromium_ec/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const FLASH_RO_BASE: u32 = 0x0;
7070
const FLASH_RO_SIZE: u32 = 0x3C000;
7171
const FLASH_RW_BASE: u32 = 0x40000;
7272
const FLASH_RW_SIZE: u32 = 0x39000;
73+
const NPC_FLASH_RORW_SIZE: u32 = 0x3F000;
7374
const MEC_FLASH_FLAGS: u32 = 0x80000;
7475
const NPC_FLASH_FLAGS: u32 = 0x7F000;
7576
const FLASH_PROGRAM_OFFSET: u32 = 0x1000;
@@ -842,9 +843,9 @@ impl CrosEc {
842843
///
843844
/// NPC/Zephyr
844845
/// | Start | End | Size | Region |
845-
/// | 00000 | 3BFFF | 3C000 | RO Region |
846-
/// | 3C000 | 3FFFF | 04000 | Preserved |
847-
/// | 40000 | 78FFF | 39000 | RW Region |
846+
/// | 00000 | 3EFFF | 3F000 | RO Region |
847+
/// | 3F000 | 3FFFF | 01000 | Reserved |
848+
/// | 40000 | 7EFFF | 3F000 | RW Region |
848849
/// | 7F000 | 7FFFF | 01000 | Flash Flags |
849850
pub fn reflash(&self, data: &[u8], ft: EcFlashType, dry_run: bool) -> EcResult<()> {
850851
let mut res = Ok(());

0 commit comments

Comments
 (0)