mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
add frequency/voltage exports from api into the hal
also cleanup some small debug messages
This commit is contained in:
parent
12e6292325
commit
c6fb0565ff
4 changed files with 14 additions and 7 deletions
|
|
@ -39,6 +39,7 @@ ed25519-dalek = { package = "ed25519-dalek-bao1x", path = "../../bao1x-boot/ed25
|
|||
"zeroize",
|
||||
], optional = true }
|
||||
sha2-bao1x = { path = "../../bao1x-boot/sha2-bao1x", optional = true, default-features = false }
|
||||
linked_list_allocator = { version = "0.10.5", optional = true }
|
||||
|
||||
# [target.'cfg(target_os = "xous")'.dependencies]
|
||||
xous = { version = "0.9.66", features = ["v2p"] }
|
||||
|
|
@ -54,7 +55,7 @@ camera-gc2145 = []
|
|||
display-sh1107 = []
|
||||
axp2101 = []
|
||||
bmp180 = []
|
||||
sigcheck = ["ed25519-dalek", "sha2-bao1x", "digest"]
|
||||
sigcheck = ["ed25519-dalek", "sha2-bao1x", "digest", "linked_list_allocator"]
|
||||
board-baosec = [
|
||||
"std",
|
||||
"camera-gc2145",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Constants that define pin locations, RAM offsets, etc. for the BaoSec board
|
||||
use bao1x_api::*;
|
||||
|
||||
pub const DEFAULT_FCLK_FREQUENCY: u32 = 800_000_000;
|
||||
pub const DEFAULT_FCLK_FREQUENCY: u32 = bao1x_api::offsets::baosec::DEFAULT_FCLK_FREQUENCY;
|
||||
|
||||
pub const I2C_AXP2101_ADR: u8 = 0x34;
|
||||
pub const I2C_TUSB320_ADR: u8 = 0x47;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
use bao1x_api::*;
|
||||
|
||||
/// Run at 400MHz to ensure we can boot even without an external VDD85 regulator!
|
||||
pub const DEFAULT_FCLK_FREQUENCY: u32 = 400_000_000;
|
||||
pub const DEFAULT_FCLK_FREQUENCY: u32 = bao1x_api::offsets::dabao::DEFAULT_FCLK_FREQUENCY;
|
||||
|
||||
// console uart buffer - needs to be fixed here because it matches dabao. Keeps the code base
|
||||
// simple between the two variants for shared paths in the bootloader.
|
||||
|
|
@ -30,7 +29,7 @@ pub const IFRAM0_RESERVED_PAGE_RANGE: [usize; 2] = [31 - 4, 31];
|
|||
pub const IFRAM1_RESERVED_PAGE_RANGE: [usize; 2] = [31 - 0, 31];
|
||||
|
||||
const SE0_PIN: u8 = 13;
|
||||
const SE0_PORT: IoxPort::PC;
|
||||
const SE0_PORT: IoxPort = IoxPort::PC;
|
||||
/// Sets the SE0 pin to drive and returns the port number. Note this side-effects the boot switch reading.
|
||||
pub fn setup_usb_pins<T: IoSetup + IoGpio>(iox: &T) -> (IoxPort, u8) {
|
||||
iox.setup_pin(
|
||||
|
|
@ -117,3 +116,12 @@ pub const SPINOR_PAGE_LEN: u32 = 0x100;
|
|||
pub const SPINOR_ERASE_SIZE: u32 = 0x1000; // this is the smallest sector size.
|
||||
pub const SPINOR_BULK_ERASE_SIZE: u32 = 0x1_0000; // this is the bulk erase size.
|
||||
pub const SPINOR_LEN: u32 = 16384 * 1024;
|
||||
|
||||
// sentinel used by test infrastructure to assist with parsing
|
||||
// The format of any test infrastructure output to recover is as follows:
|
||||
// _|TT|_<ident>,<data separated by commas>,_|TE|_
|
||||
// where _|TT|_ and _|TE|_ are bookends around the data to be reported
|
||||
// <ident> is a single-word identifier that routes the data to a given parser
|
||||
// <data> is free-form data, which will be split at comma boundaries by the parser
|
||||
pub const BOOKEND_START: &str = "_|TT|_";
|
||||
pub const BOOKEND_END: &str = "_|TE|_";
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ pub fn validate_image(
|
|||
auto_jump: bool,
|
||||
mut spim: Option<&mut Spim>,
|
||||
) -> Result<usize, String> {
|
||||
crate::println!("validate_image");
|
||||
// Copy the signature into a structure so we can unpack it.
|
||||
let mut sig = SignatureInFlash::default();
|
||||
if let Some(ref mut spim) = spim {
|
||||
|
|
@ -90,7 +89,6 @@ pub fn validate_image(
|
|||
crate::println!("Key at index {} is revoked ({}), skipping", i, revocation_value);
|
||||
continue;
|
||||
}
|
||||
|
||||
let verifying_key =
|
||||
ed25519_dalek::VerifyingKey::from_bytes(key).or(Err(String::from("invalid public key")))?;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue