diff options
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/memory.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index bee10fcf7e8..a547ee598c6 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h @@ -68,6 +68,13 @@ #error Top of user space clashes with start of module space #endif +/* + * The XIP kernel gets mapped at the bottom of the module vm area. + * Since we use sections to map it, this macro replaces the physical address + * with its virtual address while keeping offset from the base section. + */ +#define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff)) + #ifndef __ASSEMBLY__ /* |