remove unused assembly code

This commit is contained in:
bunnie 2025-10-01 23:37:03 +08:00
parent 07e7197517
commit 60d6e37b7d

View file

@ -23,33 +23,6 @@ pub extern "C" fn _start(_kernel_args: usize, loader_sig: usize) {
ram_top = in(reg) (platform::RAM_BASE + platform::RAM_SIZE),
);
}
// Stub for clearing IFRAM & RAM on bao1x 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(all(any(feature = "bao1x"), not(feature = "simulation-only")))]
unsafe {
#[rustfmt::skip]
asm! (
// twiddle duart
"li t0, 0x40042000",
// setup etuc
"sw x0, 0x4(t0)", // CR is 0
"li t1, 34", // tuned based on ringosc & oscope. not guaranteed to be precise
"sw t1, 0xc(t0)",
"li t1, 0x1",
"sw t1, 0x4(t0)", // CR is 1
// print 32 instances of 'Z' (0x5A) (provided to measure baud)
"li t2, 32",
"li t1, 0x5A",
"10:",
"sw t1, 0x0(t0)",
"11:",
"lw t3, 0x8(t0)", // check SR
"bne x0, t3, 11b", // wait for 0
"addi t2, t2, -1",
"bne x0, t2, 10b",
);
}
unsafe {
#[rustfmt::skip]
asm! (