mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
kernel: syscall: don't error on unaligned memory when Hosted
When running in a Hosted environment, unaligned memory is not an error, so don't return `BadAlignment`. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
95ab9d3c02
commit
b3d918358e
1 changed files with 2 additions and 1 deletions
|
|
@ -253,7 +253,8 @@ fn return_memory(pid: PID, tid: TID, sender: MessageSender, buf: MemoryRange) ->
|
|||
let mut result = Ok(xous_kernel::Result::Ok);
|
||||
let virt = range.addr.get();
|
||||
let size = range.size.get();
|
||||
if virt & 0xfff != 0 {
|
||||
if cfg!(baremetal) && virt & 0xfff != 0 {
|
||||
print!(" [VIRT NOT DIVISIBLE BY 4: {:08x}]", virt);
|
||||
return Err(xous_kernel::Error::BadAlignment);
|
||||
}
|
||||
for addr in (virt..(virt + size)).step_by(PAGE_SIZE) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue