path: root/arch/arm/include/asm/memory.h
diff options
authorLinus Walleij <linus.walleij@linaro.org>2021-06-03 09:51:21 +0100
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2021-06-13 18:16:41 +0100
commita91da54570856e3d3af4ba2884db71fbce06f70b (patch)
tree6a7cfbf300f11676e139292794744a472cef7e1b /arch/arm/include/asm/memory.h
parentARM: 9088/1: Split KERNEL_OFFSET from PAGE_OFFSET (diff)
ARM: 9089/1: Define kernel physical section start and end
When we are mapping the initial sections in head.S we know very well where the start and end of the kernel image in physical memory is placed. Later on it gets hard to determine this. Save the information into two variables named kernel_sec_start and kernel_sec_end for convenience for later work involving the physical start and end of the kernel. These variables are section-aligned corresponding to the early section mappings set up in head.S. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/memory.h')
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index a5f1d1826a98..ca213d7d095f 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -159,6 +159,13 @@ extern unsigned long vectors_base;
#ifndef __ASSEMBLY__
+ * Physical start and end address of the kernel sections. These addresses are
+ * 2MB-aligned to match the section mappings placed over the kernel.
+ */
+extern phys_addr_t kernel_sec_start;
+extern phys_addr_t kernel_sec_end;
* Physical vs virtual RAM address space conversion. These are
* private definitions which should NOT be used outside memory.h
* files. Use virt_to_phys/phys_to_virt/__pa/__va instead.