forked from M-Labs/artiq-zynq
szl: flush now write-buffered dcache of DDR pages before executing instructions in them
This commit is contained in:
parent
f750234cb5
commit
06ad8dfe27
|
@ -7,6 +7,7 @@ use core::mem;
|
||||||
use log::{info, error};
|
use log::{info, error};
|
||||||
use cstr_core::CStr;
|
use cstr_core::CStr;
|
||||||
|
|
||||||
|
use libcortex_a9::cache::dcci_slice;
|
||||||
use libboard_zynq::{
|
use libboard_zynq::{
|
||||||
self as zynq, clocks::Clocks, clocks::source::{ClockSource, ArmPll, IoPll},
|
self as zynq, clocks::Clocks, clocks::source::{ClockSource, ArmPll, IoPll},
|
||||||
logger,
|
logger,
|
||||||
|
@ -48,6 +49,12 @@ pub fn main_core0() {
|
||||||
if result < 0 {
|
if result < 0 {
|
||||||
error!("decompression failed");
|
error!("decompression failed");
|
||||||
} else {
|
} else {
|
||||||
|
// Flush data cache entries for all of DDR, including
|
||||||
|
// Memory/Instruction Symchronization Barriers
|
||||||
|
dcci_slice(unsafe {
|
||||||
|
core::slice::from_raw_parts(ddr.ptr::<u8>(), ddr.size())
|
||||||
|
});
|
||||||
|
|
||||||
// Start core0 only, for compatibility with FSBL.
|
// Start core0 only, for compatibility with FSBL.
|
||||||
info!("executing payload");
|
info!("executing payload");
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
Loading…
Reference in New Issue