matcha/tock: tidy console messages - pedantic (sel4 -> seL4) - terminate lines w/ \r\n to avoid console config issues - remove debug stuff (maybe should be feature-gated) Change-Id: I1685db52c146ee422b7728ce0c6ec3a3b0deecd1
diff --git a/app/src/main.rs b/app/src/main.rs index dcb381b..6916dda 100644 --- a/app/src/main.rs +++ b/app/src/main.rs
@@ -18,19 +18,17 @@ #[libtock::main] async fn main() -> TockResult<()> { - dprintf!("SEC: sw/matcha/app/src/main.rs::main()\n"); - - dprintf!("SEC: Booting sel4 from TockOS app!\n"); + dprintf!("SEC: Booting seL4 from TockOS app!\r\n"); let _result = syscalls::command(CAPSULE_ELFLOADER, CMD_ELFLOADER_BOOT_SEL4, 0, 0); - dprintf!("SEC: Booting sel4 from TockOS app done!\n"); + dprintf!("SEC: Booting seL4 from TockOS app done!\r\n"); MailboxClient::init(); unsafe { loop { - dprintf!("SEC: Waiting for request\n"); + dprintf!("SEC: Waiting for request\r\n"); let message_size = MailboxClient::wait_message_async(&mut MESSAGE_BUF).await; - dprintf!("SEC: Request arrived, {} bytes\n", message_size); + dprintf!("SEC: Request arrived, {} bytes\r\n", message_size); let dst: *mut u32 = core::mem::transmute(MESSAGE_BUF.as_ptr()); @@ -38,9 +36,9 @@ // tweak the first and last dword of the message so the sender can // tell we were able to modify it. let last = (message_size / 4) - 1; - dprintf!("request[0] = {:X}\n", dst.offset(0).read()); + dprintf!("request[0] = {:X}\r\n", dst.offset(0).read()); dprintf!( - "request[{}] = {:X}\n", + "request[{}] = {:X}\r\n", last, dst.offset(last as isize).read() ); @@ -48,10 +46,10 @@ dst.offset(0).write(0x12345678); dst.offset(last as isize).write(0x87654321); - dprintf!("SEC: Sending response\n"); + dprintf!("SEC: Sending response\r\n"); MailboxClient::send_message_sync(message_size, &MESSAGE_BUF); - dprintf!("SEC: Response sent\n"); + dprintf!("SEC: Response sent\r\n"); } } // Unreachable
diff --git a/capsules/src/mailbox_capsule.rs b/capsules/src/mailbox_capsule.rs index e097131..d0e4206 100644 --- a/capsules/src/mailbox_capsule.rs +++ b/capsules/src/mailbox_capsule.rs
@@ -39,8 +39,6 @@ impl MailboxCapsule { pub fn new(app_data_grant: Grant<AppData>) -> Self { - dprintf!("MailboxCapsule::new()\n"); - return MailboxCapsule { app_data_grant: app_data_grant, mailbox_hal: Cell::new(None),
diff --git a/capsules/src/storage_capsule.rs b/capsules/src/storage_capsule.rs index be6f049..0dbfed1 100644 --- a/capsules/src/storage_capsule.rs +++ b/capsules/src/storage_capsule.rs
@@ -1,6 +1,7 @@ //! Stub StorageManager capsule that doesn't do anything yet. use kernel::{AppId, AppSlice, Callback, Driver, Grant, ReturnCode, Shared}; +// TODO(sleffler): remove dprintf noise once this code does something use matcha_hal::dprintf; #[derive(Default)] @@ -18,7 +19,6 @@ impl StorageCapsule { pub fn new(app_data_grant: Grant<AppData>) -> Self { - dprintf!("StorageManager::new()\n"); return StorageCapsule { app_data_grant: app_data_grant, };