From ec9aed29dddd1840fb6f544caad96832dc9b45b3 Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 1 Oct 2025 23:35:24 +0800 Subject: [PATCH] fix kernel offset so signature doesn't shift the image the image needs to be page-aligned so it can do direct-map to memory. --- libs/bao1x-api/src/offsets.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/bao1x-api/src/offsets.rs b/libs/bao1x-api/src/offsets.rs index 80cf1eac2..829c0e049 100644 --- a/libs/bao1x-api/src/offsets.rs +++ b/libs/bao1x-api/src/offsets.rs @@ -5,7 +5,8 @@ pub const BOOT0_START: usize = 0x6000_0000; pub const BOOT1_START: usize = 0x6002_0000; pub const LOADER_START: usize = 0x6006_0000; pub const BAREMETAL_START: usize = LOADER_START; -pub const KERNEL_START: usize = 0x6008_0000; +// kernel needs to start on a page boundary, so eat into the loader area a bit to allow that to happen. +pub const KERNEL_START: usize = 0x6008_0000 - crate::signatures::SIGBLOCK_LEN; // total storage area available in RRAM. Above this are reserved vectors for security apparatus. pub const RRAM_STORAGE_LEN: usize = 0x3D_A000;