From 3e8cfab6b0f3ec8cdb50b721336d84c5d5ea8fca Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 20 Jun 2024 01:56:36 +0800 Subject: [PATCH 1/3] fix hosted mode --- kernel/src/mem.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/src/mem.rs b/kernel/src/mem.rs index e3c5dedf4..546d71690 100644 --- a/kernel/src/mem.rs +++ b/kernel/src/mem.rs @@ -589,7 +589,10 @@ impl MemoryManager { flags: MemoryFlags, kind: xous_kernel::MemoryType, ) -> Result { + #[cfg(baremetal)] let mut phys = phys_ptr as usize; + #[cfg(not(baremetal))] + let phys = phys_ptr as usize; let virt = self.find_virtual_address(virt_ptr, size, kind)?; // Determine if a contiguous chunk of RAM needs to be allocated for a device @@ -602,6 +605,7 @@ impl MemoryManager { return self.reserve_range(virt, size, flags); } + #[cfg(baremetal)] if device_ram { // Device RAM allocation: search for contiguous block of physical RAM so we can share // the pages with e.g. DMA or other hardware resources. From 49da62a0ae1ac87e057b8074223945db2f72a196 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 20 Jun 2024 01:56:44 +0800 Subject: [PATCH 2/3] mute warnings on mbox we're not going to implement the remaining features, but leaving them there as idea placeholders --- services/cram-console/src/cmds/mbox.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/cram-console/src/cmds/mbox.rs b/services/cram-console/src/cmds/mbox.rs index 4b7af46e5..385940ba4 100644 --- a/services/cram-console/src/cmds/mbox.rs +++ b/services/cram-console/src/cmds/mbox.rs @@ -13,6 +13,7 @@ const TX_FIFO_DEPTH: u32 = 128; const CLIFFORD_SIZE: usize = 128; #[derive(Copy, Clone, PartialEq, Eq, Debug)] +#[allow(dead_code)] pub enum MboxError { None, NotReady, @@ -48,6 +49,7 @@ impl TryFrom for ToRvOp { #[repr(u16)] #[derive(Copy, Clone, PartialEq, Eq, Debug)] +#[allow(dead_code)] pub enum ToCm7Op { Invalid = 0, From 19dd39c7c832c236196382273ffc168f57f38999 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 20 Jun 2024 01:57:11 +0800 Subject: [PATCH 3/3] quiet warnings in hosted mode --- services/keyboard/src/api.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/services/keyboard/src/api.rs b/services/keyboard/src/api.rs index ea2840da3..6aae7ef49 100644 --- a/services/keyboard/src/api.rs +++ b/services/keyboard/src/api.rs @@ -2,6 +2,7 @@ use std::fmt::Display; pub const SERVER_NAME_KBD: &str = "_Matrix keyboard driver_"; +#[allow(dead_code)] #[derive(Debug, Default, Copy, Clone)] pub struct ScanCode { /// base key value