gate RAM clearing behind not(simulation-only) feature flag

RAM clearing takes a lot of time in simulation and is not necessary,
hence the feature gate option.
This commit is contained in:
bunnie 2024-11-30 02:22:47 +08:00
parent c72607e0bf
commit a527b3a300

View file

@ -16,7 +16,7 @@ pub extern "C" fn _start(_kernel_args: usize, loader_sig: usize) {
// Stub for clearing IFRAM & RAM on Cramium target. This is required
// to clear the parity check bits, which are randomly set on boot. System will
// eventually hang if these bits aren't cleared.
#[cfg(any(feature = "cramium-soc", feature = "cramium-fpga"))]
#[cfg(all(any(feature = "cramium-soc", feature = "cramium-fpga"), not(feature = "simulation-only")))]
unsafe {
#[rustfmt::skip]
asm! (