All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Alexander Sverdlin <alexander.sverdlin@nokia.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/2] ARM: axxia: remove TEXT_OFFSET override hack
Date: Wed, 13 Jan 2021 23:43:34 +0100	[thread overview]
Message-ID: <CAMj1kXHDztciyOMuh85Mewy6BJm5i3JT3hKyAtuudbBKB+As8g@mail.gmail.com> (raw)
In-Reply-To: <20210113212622.GK1551@shell.armlinux.org.uk>

On Wed, 13 Jan 2021 at 22:26, Russell King - ARM Linux admin
<linux@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!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2021-01-13 22:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 10:30 [PATCH 0/2] ARM: remove TEXT_OFFSET override for Axxia Ard Biesheuvel
2021-01-11 10:30 ` [PATCH 1/2] ARM: take memreserve FDT entries into account when discovering base of RAM Ard Biesheuvel
2021-01-11 10:30 ` [PATCH 2/2] ARM: axxia: remove TEXT_OFFSET override hack Ard Biesheuvel
2021-01-12 10:34   ` Alexander Sverdlin
2021-01-12 10:40     ` Ard Biesheuvel
2021-01-12 11:22       ` Alexander Sverdlin
2021-01-12 13:55       ` Alexander Sverdlin
2021-01-12 14:05         ` Ard Biesheuvel
2021-01-12 14:21           ` Alexander Sverdlin
2021-01-13 17:49             ` Ard Biesheuvel
2021-01-13 21:26               ` Russell King - ARM Linux admin
2021-01-13 22:43                 ` Ard Biesheuvel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMj1kXHDztciyOMuh85Mewy6BJm5i3JT3hKyAtuudbBKB+As8g@mail.gmail.com \
    --to=ardb@kernel.org \
    --cc=alexander.sverdlin@nokia.com \
    --cc=arnd@arndb.de \
    --cc=geert+renesas@glider.be \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.