From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/4] arm64: move early boot code to the .init segment
Date: Thu, 14 Apr 2016 17:32:36 +0100 [thread overview]
Message-ID: <20160414163235.GE4584@arm.com> (raw)
In-Reply-To: <1459352589-28721-3-git-send-email-ard.biesheuvel@linaro.org>
Hi Ard,
On Wed, Mar 30, 2016 at 05:43:07PM +0200, Ard Biesheuvel wrote:
> Apart from the arm64/linux and EFI header data structures, there is nothing
> in the .head.text section that must reside at the beginning of the Image.
> So let's move it to the .init section where it belongs.
>
> Note that this involves some minor tweaking of the EFI header, primarily
> because the address of 'stext' no longer coincides with the start of the
> .text section. It also requires a couple of relocated symbol references
> to be slightly rewritten or their definition moved to the linker script.
[...]
> ENTRY(stext)
> bl preserve_boot_args
> bl el2_setup // Drop to EL1, w20=cpu_boot_mode
> @@ -223,12 +224,12 @@ ENTRY(stext)
> * the TCR will have been set.
> */
> ldr x27, 0f // address to jump to after
> - // MMU has been enabled
> + neg x27, x27 // MMU has been enabled
> adr_l lr, __enable_mmu // return (PIC) address
> b __cpu_setup // initialise processor
> ENDPROC(stext)
> .align 3
> -0: .quad __mmap_switched - (_head - TEXT_OFFSET) + KIMAGE_VADDR
> +0: .quad (_text - TEXT_OFFSET) - __mmap_switched - KIMAGE_VADDR
I'm struggling to understand why you need to change this. Furthermore,
it looks like the gas docs for expressions require that addition/subtraction
can only be performed on arguments that are in the same section, so
this feels pretty rickety.
What's the problem you're solving here?
Will
next prev parent reply other threads:[~2016-04-14 16:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 15:43 [PATCH v2 0/4] arm64: simplify and optimize kernel mapping Ard Biesheuvel
2016-03-30 15:43 ` [PATCH v2 1/4] arm64: use 'segment' rather than 'chunk' to describe mapped kernel regions Ard Biesheuvel
2016-03-31 10:55 ` Mark Rutland
2016-03-30 15:43 ` [PATCH v2 2/4] arm64: move early boot code to the .init segment Ard Biesheuvel
2016-04-14 16:32 ` Will Deacon [this message]
2016-04-14 16:39 ` Ard Biesheuvel
2016-04-15 7:57 ` Ard Biesheuvel
2016-03-30 15:43 ` [PATCH v2 3/4] arm64: cover the .head.text section in the .text segment mapping Ard Biesheuvel
2016-03-30 15:43 ` [PATCH v2 4/4] arm64: simplify kernel segment mapping granularity Ard Biesheuvel
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=20160414163235.GE4584@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).