mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
commit
3027b895dc
3 changed files with 7 additions and 0 deletions
|
|
@ -589,7 +589,10 @@ impl MemoryManager {
|
||||||
flags: MemoryFlags,
|
flags: MemoryFlags,
|
||||||
kind: xous_kernel::MemoryType,
|
kind: xous_kernel::MemoryType,
|
||||||
) -> Result<xous_kernel::MemoryRange, xous_kernel::Error> {
|
) -> Result<xous_kernel::MemoryRange, xous_kernel::Error> {
|
||||||
|
#[cfg(baremetal)]
|
||||||
let mut phys = phys_ptr as usize;
|
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)?;
|
let virt = self.find_virtual_address(virt_ptr, size, kind)?;
|
||||||
|
|
||||||
// Determine if a contiguous chunk of RAM needs to be allocated for a device
|
// 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);
|
return self.reserve_range(virt, size, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(baremetal)]
|
||||||
if device_ram {
|
if device_ram {
|
||||||
// Device RAM allocation: search for contiguous block of physical RAM so we can share
|
// Device RAM allocation: search for contiguous block of physical RAM so we can share
|
||||||
// the pages with e.g. DMA or other hardware resources.
|
// the pages with e.g. DMA or other hardware resources.
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ const TX_FIFO_DEPTH: u32 = 128;
|
||||||
const CLIFFORD_SIZE: usize = 128;
|
const CLIFFORD_SIZE: usize = 128;
|
||||||
|
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub enum MboxError {
|
pub enum MboxError {
|
||||||
None,
|
None,
|
||||||
NotReady,
|
NotReady,
|
||||||
|
|
@ -48,6 +49,7 @@ impl TryFrom<u16> for ToRvOp {
|
||||||
|
|
||||||
#[repr(u16)]
|
#[repr(u16)]
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub enum ToCm7Op {
|
pub enum ToCm7Op {
|
||||||
Invalid = 0,
|
Invalid = 0,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ use std::fmt::Display;
|
||||||
|
|
||||||
pub const SERVER_NAME_KBD: &str = "_Matrix keyboard driver_";
|
pub const SERVER_NAME_KBD: &str = "_Matrix keyboard driver_";
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
#[derive(Debug, Default, Copy, Clone)]
|
#[derive(Debug, Default, Copy, Clone)]
|
||||||
pub struct ScanCode {
|
pub struct ScanCode {
|
||||||
/// base key value
|
/// base key value
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue