[PATCH 2/2] ARM: axxia: remove TEXT_OFFSET override hack

Russell King - ARM Linux admin linux at armlinux.org.uk
Wed Jan 13 16:26:22 EST 2021


On Wed, Jan 13, 2021 at 06:49:17PM +0100, Ard Biesheuvel wrote:
> If you are going to fix the bootloader, better to let it relocate
> itself to the top of DRAM as is usually done.
> 
> The boot requirements [0] state that the uncompressed image must be
> placed TEXT_OFFSET - PAGE_OFFSET bytes from the start of system

No, that is incorrect on several counts.

1. PAGE_OFFSET is the virtual address offset of the start of RAM as
   seen by the kernel; the boot loader has no knowledge of this. You
   mean essentially what the kernel calls PHYS_OFFSET.

2. TEXT_OFFSET is the offset from the start of RAM to the kernel image
   both in terms of what the kernel calls PAGE_OFFSET and PHYS_OFFSET.

Essentially, the page mapped at PAGE_OFFSET in the kernel's virtual
address space is the physical page at PHYS_OFFSET when the MMU is off.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list