Merge pull request #558 from betrusted-io/build-fixup

Build fixup
This commit is contained in:
bunnie 2024-06-20 01:59:01 +08:00 committed by GitHub
commit 3027b895dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 0 deletions

View file

@ -589,7 +589,10 @@ impl MemoryManager {
flags: MemoryFlags,
kind: xous_kernel::MemoryType,
) -> Result<xous_kernel::MemoryRange, xous_kernel::Error> {
#[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.

View file

@ -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<u16> for ToRvOp {
#[repr(u16)]
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
#[allow(dead_code)]
pub enum ToCm7Op {
Invalid = 0,

View file

@ -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