aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox/include/asm/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox/include/asm/io.h')
-rw-r--r--arch/sandbox/include/asm/io.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h
index 3c0a102697..a23bd64994 100644
--- a/arch/sandbox/include/asm/io.h
+++ b/arch/sandbox/include/asm/io.h
@@ -231,5 +231,21 @@ static inline void unmap_sysmem(const void *vaddr)
unmap_physmem(vaddr, MAP_WRBACK);
}
+/**
+ * nomap_sysmem() - pass through an address unchanged
+ *
+ * This is used to indicate an address which should NOT be mapped, e.g. in
+ * SMBIOS tables. Using this function instead of a case shows that the sandbox
+ * conversion has been done
+ */
+static inline void *nomap_sysmem(phys_addr_t paddr, unsigned long len)
+{
+ return (void *)(uintptr_t)paddr;
+}
+
+static inline phys_addr_t nomap_to_sysmem(const void *ptr)
+{
+ return (phys_addr_t)(uintptr_t)ptr;
+}
#endif