linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 7/7] arm64: head.S: document the use of callee saved registers
Date: Wed, 31 Aug 2016 12:05:17 +0100	[thread overview]
Message-ID: <1472641517-15362-8-git-send-email-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <1472641517-15362-1-git-send-email-ard.biesheuvel@linaro.org>

Now that the only remaining occurrences of the use of callee saved
registers are on the primary boot path, add a comment to the code
which register is used for what.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 arch/arm64/kernel/head.S | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
index 29a734ee0770..427f6d3f084c 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -208,6 +208,16 @@ efi_header_end:
 
 	__INIT
 
+	/*
+	 * The following callee saved general purpose registers are used on the
+	 * primary lowlevel boot path:
+	 *
+	 *  Register   Scope                      Purpose
+	 *  x21        stext() .. start_kernel()  FDT pointer passed at boot in x0
+	 *  x23        stext() .. start_kernel()  physical misalignment/KASLR offset
+	 *  x28        __create_page_tables()     callee preserved temp register
+	 *  x19/x20    __primary_switch()         callee preserved temp registers
+	 */
 ENTRY(stext)
 	bl	preserve_boot_args
 	bl	el2_setup			// Drop to EL1, w0=cpu_boot_mode
-- 
2.7.4

      parent reply	other threads:[~2016-08-31 11:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-31 11:05 [PATCH v3 0/7] arm64: clean up early boot function calls Ard Biesheuvel
2016-08-31 11:05 ` [PATCH v3 1/7] arm64: kernel: fix style issues in sleep.S Ard Biesheuvel
2016-09-03 20:08   ` Ard Biesheuvel
2016-09-05  9:02     ` Will Deacon
2016-08-31 11:05 ` [PATCH v3 2/7] arm64: kernel: use ordinary return/argument register for el2_setup() Ard Biesheuvel
2016-08-31 11:05 ` [PATCH v3 3/7] arm64: head.S: move KASLR processing out of __enable_mmu() Ard Biesheuvel
2016-08-31 11:05 ` [PATCH v3 4/7] arm64: kernel: use x30 for __enable_mmu return address Ard Biesheuvel
2016-08-31 11:05 ` [PATCH v3 5/7] arm64: kernel: drop use of x24 from primary boot path Ard Biesheuvel
2016-08-31 11:05 ` [PATCH v3 6/7] arm64: head.S: use ordinary stack frame for __primary_switched() Ard Biesheuvel
2016-08-31 11:05 ` 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=1472641517-15362-8-git-send-email-ard.biesheuvel@linaro.org \
    --to=ard.biesheuvel@linaro.org \
    --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).