From 797e5bd7c49772fe146899c7faa0050755bd02be Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 17 Jan 2022 23:52:58 +0800 Subject: [PATCH] follow-on set of commits related to the previous revert --- loader/src/generate_fonts.py | 2 +- loader/src/secboot.rs | 1 + services/graphics-server/src/fontmap.rs | 2 +- xous-rs/src/definitions.rs | 6 +++--- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/loader/src/generate_fonts.py b/loader/src/generate_fonts.py index 72ef305e1..aac925080 100755 --- a/loader/src/generate_fonts.py +++ b/loader/src/generate_fonts.py @@ -73,7 +73,7 @@ def main(): mapfile.write("#![allow(dead_code)]\n") # Python iterators are deterministic, right......? so if I used the same iterator to make the link order it'll be the same here....right? offset = 0 - mapfile.write("pub const FONT_BASE: usize = 0x{:08x};\n".format(0x20520000)) + mapfile.write("pub const FONT_BASE: usize = 0x{:08x};\n".format(0x20530000)) for k,v in fontdict.items(): length = int(v) * 4 mapfile.write("pub const {}_OFFSET: usize = 0x{:08x};\n".format(k.upper(), offset)) diff --git a/loader/src/secboot.rs b/loader/src/secboot.rs index dccba22b0..8b2b49c21 100644 --- a/loader/src/secboot.rs +++ b/loader/src/secboot.rs @@ -377,6 +377,7 @@ pub fn validate_xous_img(xous_img_offset: *const u32) -> bool { let ed25519_signature = ed25519_dalek::Signature::from(sig.signature); use ed25519_dalek::Verifier; + gfx.msg("Checking signature...\n\r", &mut cursor); if pubkey.verify(image, &ed25519_signature).is_ok() { gfx.msg("Signature check passed\n\r", &mut cursor); println!("Signature check passed"); diff --git a/services/graphics-server/src/fontmap.rs b/services/graphics-server/src/fontmap.rs index f1fc694ab..f56d41174 100644 --- a/services/graphics-server/src/fontmap.rs +++ b/services/graphics-server/src/fontmap.rs @@ -1,7 +1,7 @@ // This file is autogenerated by xous-core/loader/src/generate_fonts.py. Do not edit. // This makes probably bad assumptions about how link order is computed. Be suspicious of these offsets. #![allow(dead_code)] -pub const FONT_BASE: usize = 0x20520000; +pub const FONT_BASE: usize = 0x20530000; pub const BOLD_OFFSET: usize = 0x00000000; pub const BOLD_LEN: usize = 0x00001774; pub const EMOJI_OFFSET: usize = 0x00001774; diff --git a/xous-rs/src/definitions.rs b/xous-rs/src/definitions.rs index 073dd5864..95e1db67e 100644 --- a/xous-rs/src/definitions.rs +++ b/xous-rs/src/definitions.rs @@ -21,9 +21,9 @@ pub const SOC_STAGING_GW_LOC: u32 = 0x0028_0000; // gateware - staging copy pub const SOC_STAGING_GW_LEN: u32 = 0x0028_0000; pub const LOADER_LOC: u32 = 0x0050_0000; // loader - base -pub const LOADER_CODE_LEN: u32 = 0x0002_0000; // code region only -pub const LOADER_FONT_LOC: u32 = 0x0052_0000; // should be the same as graphics-server/src/fontmap.rs/FONT_BASE -pub const LOADER_FONT_LEN: u32 = 0x0046_0000; // length of font region only +pub const LOADER_CODE_LEN: u32 = 0x0003_0000; // code region only +pub const LOADER_FONT_LOC: u32 = 0x0053_0000; // should be the same as graphics-server/src/fontmap.rs/FONT_BASE +pub const LOADER_FONT_LEN: u32 = 0x0045_0000; // length of font region only pub const LOADER_TOTAL_LEN: u32 = LOADER_CODE_LEN + LOADER_FONT_LEN; // code + font pub const KERNEL_LOC: u32 = 0x0098_0000; // kernel start