mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
Merge pull request #738 from betrusted-io/sec-ci
fix boot0 write test & ensure pins are setup in baremetal
This commit is contained in:
commit
d531330514
2 changed files with 10 additions and 2 deletions
|
|
@ -98,7 +98,15 @@ pub fn early_init() {
|
|||
bao1x_hal::board::setup_camera_pins(&iox);
|
||||
bao1x_hal::board::setup_kb_pins(&iox);
|
||||
bao1x_hal::board::setup_oled_power_pin(&iox);
|
||||
bao1x_hal::board::setup_trng_power_pin(&iox);
|
||||
|
||||
let trng_power = bao1x_hal::board::setup_trng_power_pin(&iox);
|
||||
// kernel expects the TRNG to be on
|
||||
iox.set_gpio_pin(trng_power.0, trng_power.1, bao1x_api::IoxValue::High);
|
||||
|
||||
let (port, pin) = bao1x_hal::board::setup_dcdc2_pin(&iox);
|
||||
// low connects DCDC2 to the chip
|
||||
iox.set_gpio_pin(port, pin, IoxValue::Low);
|
||||
|
||||
// make sure SE0 is cleared
|
||||
let (port, pin) = bao1x_hal::board::setup_usb_pins(&iox);
|
||||
iox.set_gpio_pin(port, pin, IoxValue::High);
|
||||
|
|
|
|||
|
|
@ -925,7 +925,7 @@ impl Repl {
|
|||
let base = ref_data[0]; // increment whatever is in the original area
|
||||
let try_write = [base + 1 + i as u8; 32];
|
||||
// crate::println!("orig ({:x}): {:x?}", region, test_data);
|
||||
rram.write_slice(region, &try_write).unwrap();
|
||||
rram.write_slice(region, &try_write).ok(); // we expect write errors, don't panic on failure
|
||||
if writable {
|
||||
if ref_data != try_write {
|
||||
crate::println!(
|
||||
|
|
|
|||
Loading…
Reference in a new issue