RTIO DMA: Compiled but not working.

* Cache flush should be done before playback instead when getting the
  handler.
* `csr::rtio_dma::enable_read()` would loop forever, probably bug in the
  gateware.
This commit was merged in pull request #73.
This commit is contained in:
2020-07-21 16:57:14 +08:00
parent 64dad88a32
commit 0310421085
10 changed files with 369 additions and 2 deletions

View File

@@ -8,3 +8,5 @@ name = "dyld"
[dependencies]
log = "0.4"
libcortex_a9 = { git = "https://git.m-labs.hk/M-Labs/zc706.git" }

View File

@@ -2,6 +2,7 @@
extern crate alloc;
extern crate log;
extern crate libcortex_a9;
use core::{convert, fmt, str};
use alloc::string::String;

View File

@@ -7,6 +7,10 @@ use super::{
image::Image,
Library,
};
use libcortex_a9::{
cache::{dcci_slice, iciallu, bpiall},
asm::{dsb, isb},
};
pub trait Relocatable {
fn offset(&self) -> usize;
@@ -154,6 +158,13 @@ pub fn rebind(
_ => {}
}
}
// FIXME: the cache maintainance operations may be more than enough,
// may cause performance degradation.
dcci_slice(lib.image.data);
iciallu();
bpiall();
dsb();
isb();
Ok(())
}