Use CSR initialization for clearing ITCM.

Clears the ITCM in one go before loading an ELF file using the
hardware initialization CSRs.
DTCM is not cleared as it's temporarily larger than the CSRs can fit.

Tested manually.

Change-Id: Ie4620508404cebc8724771eb579c873fcc0cf0ee
GitOrigin-RevId: ef5de7003c22a1871ab0f74a23fce34593b73fe1
This commit is contained in:
Adam Jesionowski
2021-12-10 10:23:23 -08:00
committed by Sam Leffler
parent af833e8d19
commit 4ed5fc91fd
3 changed files with 26 additions and 8 deletions

View File

@@ -7,7 +7,6 @@ pub trait MlCoordinatorInterface {
pub trait MlCoreInterface {
fn enable_interrupts(&mut self, enabled: bool);
fn clear_tcm(&mut self, start: *const u32, len: usize);
fn run(&mut self);
fn load_elf(&mut self, elf_slice: &[u8]) -> Result<(), &'static str>;
fn get_return_code() -> u32;