|
|
|
@ -14,7 +14,21 @@ _binary_user_riscv_img_start:
|
|
|
|
|
_binary_user_riscv_img_end:
|
|
|
|
|
"#);
|
|
|
|
|
|
|
|
|
|
const LOGO: &str = r#"
|
|
|
|
|
____ __ ____ _____
|
|
|
|
|
/ __ \ __ __ _____ / /_ / __ \/ ___/
|
|
|
|
|
/ /_/ // / / // ___// __// / / /\__ \
|
|
|
|
|
/ _, _// /_/ /(__ )/ /_ / /_/ /___/ /
|
|
|
|
|
/_/ |_| \__,_//____/ \__/ \____//____/
|
|
|
|
|
"#;
|
|
|
|
|
|
|
|
|
|
pub fn show_logo() {
|
|
|
|
|
println!("{}", LOGO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub fn shell() {
|
|
|
|
|
show_logo();
|
|
|
|
|
|
|
|
|
|
#[cfg(target_arch = "riscv32")]
|
|
|
|
|
let device = {
|
|
|
|
|
extern {
|
|
|
|
@ -97,4 +111,4 @@ impl BlockedDevice for &'static ide::DISK1 {
|
|
|
|
|
let buf = unsafe { slice::from_raw_parts(buf.as_ptr() as *mut u32, ide::BLOCK_SIZE / 4) };
|
|
|
|
|
self.0.lock().write(block_id as u64, 1, buf).is_ok()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|