mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
increase verbosity of pl230 output for co-debugging
This commit is contained in:
parent
64520cf5a3
commit
fe45f40cb7
2 changed files with 28 additions and 6 deletions
|
|
@ -5,7 +5,7 @@ pub fn report_api(desc: &str, d: u32) {
|
|||
{
|
||||
use core::fmt::Write;
|
||||
let mut uart = crate::debug::Uart {};
|
||||
writeln!(uart, "pl230: [{}] 0x{:x}", desc, d).ok();
|
||||
writeln!(uart, "pl230: [{}] 0x{:x}\r", desc, d).ok();
|
||||
}
|
||||
#[cfg(not(feature = "baremetal"))]
|
||||
log::info!("pl230: [{}] 0x{:x}", desc, d);
|
||||
|
|
|
|||
|
|
@ -69,12 +69,18 @@ pub fn basic_tests(pl230: &mut Pl230) -> bool {
|
|||
// report_api("dma_len", DMA_LEN as u32);
|
||||
report_api("baseptr", cc_struct.channels.as_ptr() as u32);
|
||||
report_api("src start", region_a.as_ptr() as u32);
|
||||
// report_api("baseptr[0]", unsafe{cc_struct.channels.as_ptr().read()}.src_end_ptr);
|
||||
report_api("baseptr[0]", unsafe { cc_struct.channels.as_ptr().read() }.src_end_ptr);
|
||||
report_api("dst start", region_b.as_ptr() as u32);
|
||||
// report_api("baseptr[1]", unsafe{cc_struct.channels.as_ptr().read()}.dst_end_ptr);
|
||||
// report_api("baseptr[2]", unsafe{cc_struct.channels.as_ptr().read()}.control);
|
||||
// report_api("baseptr[3]", unsafe{cc_struct.channels.as_ptr().read()}.reserved);
|
||||
// report_api("baseptr reg", pl230.csr.r(utra::pl230::CTRLBASEPTR));
|
||||
report_api("baseptr[1]", unsafe { cc_struct.channels.as_ptr().read() }.dst_end_ptr);
|
||||
report_api("baseptr[2]", unsafe { cc_struct.channels.as_ptr().read() }.control);
|
||||
report_api("baseptr[3]", unsafe { cc_struct.channels.as_ptr().read() }.reserved);
|
||||
report_api("baseptr reg", pl230.csr.r(utra::pl230::CTRLBASEPTR));
|
||||
|
||||
unsafe {
|
||||
for i in 0..16 {
|
||||
report_api("pl230 reg ", pl230.csr.base().add(i as usize).read_volatile());
|
||||
}
|
||||
}
|
||||
|
||||
// this should kick off the DMA
|
||||
pl230.csr.wo(utra::pl230::CHNLSWREQUEST, 1);
|
||||
|
|
@ -123,6 +129,22 @@ pub fn basic_tests(pl230: &mut Pl230) -> bool {
|
|||
}
|
||||
report_api("basic dma result (1=pass)", if passing { 1 } else { 0 });
|
||||
report_api("errs: ", errs);
|
||||
|
||||
report_api("baseptr", cc_struct.channels.as_ptr() as u32);
|
||||
report_api("src start", region_a.as_ptr() as u32);
|
||||
report_api("baseptr[0]", unsafe { cc_struct.channels.as_ptr().read() }.src_end_ptr);
|
||||
report_api("dst start", region_b.as_ptr() as u32);
|
||||
report_api("baseptr[1]", unsafe { cc_struct.channels.as_ptr().read() }.dst_end_ptr);
|
||||
report_api("baseptr[2]", unsafe { cc_struct.channels.as_ptr().read() }.control);
|
||||
report_api("baseptr[3]", unsafe { cc_struct.channels.as_ptr().read() }.reserved);
|
||||
report_api("baseptr reg", pl230.csr.r(utra::pl230::CTRLBASEPTR));
|
||||
|
||||
unsafe {
|
||||
for i in 0..16 {
|
||||
report_api("pl230 reg ", pl230.csr.base().add(i as usize).read_volatile());
|
||||
}
|
||||
}
|
||||
|
||||
passing
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue