[PATCH 2/2] ARM: axxia: remove TEXT_OFFSET override hack
Ard Biesheuvel
ardb at kernel.org
Wed Jan 13 17:43:34 EST 2021
On Wed, 13 Jan 2021 at 22:26, Russell King - ARM Linux admin
<linux at armlinux.org.uk> wrote:
>
> 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.
>
Nevertheless, it is literally what booting.rst claims:
"""
When booting a raw (non-zImage) kernel the constraints are tighter.
In this case the kernel must be loaded at an offset into system equal
to TEXT_OFFSET - PAGE_OFFSET.
"""
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm/booting.rst#n180
so we might want to fix that.
> 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