mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
mods for hosted mode to work again
This commit is contained in:
parent
25e6bced00
commit
b9f3182bb9
4 changed files with 38 additions and 1 deletions
|
|
@ -250,6 +250,7 @@ mod implementation {
|
|||
#[cfg(not(target_os = "none"))]
|
||||
mod implementation {
|
||||
use log::info;
|
||||
use crate::Sha2Config;
|
||||
|
||||
pub(crate) struct Engine512 {
|
||||
}
|
||||
|
|
@ -265,6 +266,16 @@ mod implementation {
|
|||
}
|
||||
pub(crate) fn reset(&self) {
|
||||
}
|
||||
pub(crate) fn setup(&mut self, _config: Sha2Config) {
|
||||
}
|
||||
pub(crate) fn update(&mut self, _buf: &[u8]) {
|
||||
}
|
||||
pub(crate) fn finalize(&mut self) -> ([u8; 64], u64) {
|
||||
([0; 64], 0)
|
||||
}
|
||||
pub(crate) fn is_idle(&mut self) -> bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -534,6 +534,15 @@ mod implementation {
|
|||
}
|
||||
pub fn usb_int_ena(self, _ena: bool) {
|
||||
}
|
||||
pub fn debug_powerdown(&mut self, _ena: bool) {
|
||||
}
|
||||
pub fn debug_wakeup(&mut self, _ena: bool) {
|
||||
}
|
||||
pub fn activity_get_period(&mut self) -> u32 {
|
||||
12_000_000
|
||||
}
|
||||
pub fn wfi_override(&mut self, _override_: bool) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -186,18 +186,35 @@ fn ecupdate_thread(sid0: usize, sid1: usize, sid2: usize, sid3: usize) {
|
|||
log::error!("couldn't acquire exclusive access to the EC updater mechanism. All other operations will fail!");
|
||||
}
|
||||
|
||||
#[cfg(target_os = "none")]
|
||||
let ec_package = xous::syscall::map_memory(
|
||||
xous::MemoryAddress::new(xous::EC_FW_PKG_LOC as usize),
|
||||
None,
|
||||
xous::EC_FW_PKG_LEN as usize,
|
||||
xous::MemoryFlags::R | xous::MemoryFlags::W,
|
||||
).expect("couldn't map EC firmware package memory range");
|
||||
#[cfg(target_os = "none")]
|
||||
let wf_package = xous::syscall::map_memory(
|
||||
xous::MemoryAddress::new(xous::EC_WF200_PKG_LOC as usize),
|
||||
None,
|
||||
xous::EC_WF200_PKG_LEN as usize,
|
||||
xous::MemoryFlags::R | xous::MemoryFlags::W,
|
||||
).expect("couldn't map EC wf200 package memory range");
|
||||
#[cfg(not(target_os = "none"))]
|
||||
let ec_package = xous::syscall::map_memory(
|
||||
None,
|
||||
None,
|
||||
xous::EC_FW_PKG_LEN as usize,
|
||||
xous::MemoryFlags::R | xous::MemoryFlags::W,
|
||||
).expect("couldn't map EC firmware package memory range");
|
||||
#[cfg(not(target_os = "none"))]
|
||||
let wf_package = xous::syscall::map_memory(
|
||||
None,
|
||||
None,
|
||||
xous::EC_WF200_PKG_LEN as usize,
|
||||
xous::MemoryFlags::R | xous::MemoryFlags::W,
|
||||
).expect("couldn't map EC wf200 package memory range");
|
||||
|
||||
loop {
|
||||
let msg = xous::receive_message(sid).unwrap();
|
||||
log::debug!("EC updater got msg {:?}", msg);
|
||||
|
|
|
|||
|
|
@ -436,7 +436,7 @@ def main():
|
|||
LOC_WF200 = 0x07F80000
|
||||
LOC_EC = 0x07FCE000
|
||||
else:
|
||||
print("SoC is from an unknow rev, use --force to continue anyways with v0.8 firmware offsets")
|
||||
print("SoC is from an unknow rev '{}', use --force to continue anyways with v0.8 firmware offsets".format(pc_usb.load_csrs()))
|
||||
exit(1)
|
||||
|
||||
vexdbg_addr = int(pc_usb.regions['vexriscv_debug'][0], 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue