linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: matthew.leach@arm.com (Matthew Leach)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/14] Docs: arm64: booting: clarify boot requirements
Date: Fri, 11 Oct 2013 14:52:07 +0100	[thread overview]
Message-ID: <1381499540-28794-2-git-send-email-matthew.leach@arm.com> (raw)
In-Reply-To: <1381499540-28794-1-git-send-email-matthew.leach@arm.com>

From: Mark Rutland <mark.rutland@arm.com>

There are a few points in the arm64 booting document which are unclear
(such as the initial state of secondary CPUs), and/or have not been
documented (PSCI is a supported mechanism for booting secondary CPUs).

This patch amends the arm64 boot document to better express the
(existing) requirements, and to describe PSCI as a supported booting
mechanism.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Martin <dave.martin@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Fu Wei <tekkamanninja@gmail.com>
---
 Documentation/arm64/booting.txt |   45 +++++++++++++++++++++++++++------------
 1 file changed, 31 insertions(+), 14 deletions(-)

diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt
index 98df4a0..a9691cc 100644
--- a/Documentation/arm64/booting.txt
+++ b/Documentation/arm64/booting.txt
@@ -115,9 +115,10 @@ Before jumping into the kernel, the following conditions must be met:
   External caches (if present) must be configured and disabled.
 
 - Architected timers
-  CNTFRQ must be programmed with the timer frequency.
-  If entering the kernel at EL1, CNTHCTL_EL2 must have EL1PCTEN (bit 0)
-  set where available.
+  CNTFRQ must be programmed with the timer frequency and CNTVOFF must
+  be programmed with a consistent value on all CPUs.  If entering the
+  kernel at EL1, CNTHCTL_EL2 must have EL1PCTEN (bit 0) set where
+  available.
 
 - Coherency
   All CPUs to be booted by the kernel must be part of the same coherency
@@ -130,30 +131,46 @@ Before jumping into the kernel, the following conditions must be met:
   the kernel image will be entered must be initialised by software at a
   higher exception level to prevent execution in an UNKNOWN state.
 
+The requirements described above for CPU mode, caches, MMUs, architected
+timers, coherency and system registers apply to all CPUs.  All CPUs must
+enter the kernel in the same exception level.
+
 The boot loader is expected to enter the kernel on each CPU in the
 following manner:
 
 - The primary CPU must jump directly to the first instruction of the
   kernel image.  The device tree blob passed by this CPU must contain
-  for each CPU node:
-
-    1. An 'enable-method' property. Currently, the only supported value
-       for this field is the string "spin-table".
-
-    2. A 'cpu-release-addr' property identifying a 64-bit,
-       zero-initialised memory location.
+  an 'enable-method' property for each cpu node.  The supported
+  enable-methods are described below.
 
   It is expected that the bootloader will generate these device tree
   properties and insert them into the blob prior to kernel entry.
 
-- Any secondary CPUs must spin outside of the kernel in a reserved area
-  of memory (communicated to the kernel by a /memreserve/ region in the
+- CPUs with a "spin-table" enable-method must have a 'cpu-release-addr'
+  property in their cpu node.  This property identifies a
+  naturally-aligned 64-bit zero-initalised memory location.
+
+  These CPUs should spin outside of the kernel in a reserved area of
+  memory (communicated to the kernel by a /memreserve/ region in the
   device tree) polling their cpu-release-addr location, which must be
   contained in the reserved region.  A wfe instruction may be inserted
   to reduce the overhead of the busy-loop and a sev will be issued by
   the primary CPU.  When a read of the location pointed to by the
-  cpu-release-addr returns a non-zero value, the CPU must jump directly
-  to this value.
+  cpu-release-addr returns a non-zero value, the CPU must jump to this
+  value.  The value will be written as a single 64-bit little-endian
+  value, so CPUs must convert the read value to their native endianness
+  before jumping to it.
+
+- CPUs with a "psci" enable method should remain outside of
+  the kernel (i.e. outside of the regions of memory described to the
+  kernel in the memory node, or in a reserved area of memory described
+  to the kernel by a /memreserve/ region in the device tree).  The
+  kernel will issue CPU_ON calls as described in ARM document number ARM
+  DEN 0022A ("Power State Coordination Interface System Software on ARM
+  processors") to bring CPUs into the kernel.
+
+  The device tree should contain a 'psci' node, as described in
+  Documentation/devicetree/bindings/arm/psci.txt.
 
 - Secondary CPU general-purpose register settings
   x0 = 0 (reserved for future use)
-- 
1.7.9.5

  reply	other threads:[~2013-10-11 13:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-11 13:52 [PATCH 00/14] AArch64 BE Support Matthew Leach
2013-10-11 13:52 ` Matthew Leach [this message]
2013-10-11 13:52 ` [PATCH 02/14] arm64: big-endian: add big-endian support to top-level arch Makefile Matthew Leach
2013-10-11 13:52 ` [PATCH 03/14] arm64: big-endian: fix byteorder include Matthew Leach
2013-10-11 13:52 ` [PATCH 04/14] arm64: ELF: add support for big-endian executables Matthew Leach
2013-10-11 13:52 ` [PATCH 05/14] arm64: setup: report ELF_PLATFORM as the machine for utsname Matthew Leach
2013-10-11 13:52 ` [PATCH 06/14] arm64: compat: add support for big-endian (BE8) AArch32 binaries Matthew Leach
2013-10-11 14:36   ` Mark Rutland
2013-10-11 13:52 ` [PATCH 07/14] arm64: compat: correct register concatenation for syscall wrappers Matthew Leach
2013-10-11 13:52 ` [PATCH 08/14] arm64: big-endian: don't treat code as data when copying sigret code Matthew Leach
2013-10-11 13:52 ` [PATCH 09/14] arm64: asm: add CPU_LE & CPU_BE assembler helpers Matthew Leach
2013-10-11 13:52 ` [PATCH 10/14] arm64: head: create a new function for setting the boot_cpu_mode flag Matthew Leach
2013-10-11 13:52 ` [PATCH 11/14] arm64: big-endian: set correct endianess on kernel entry Matthew Leach
2013-10-15 18:46   ` Christopher Covington
2013-10-24 15:46   ` Catalin Marinas
2013-10-11 13:52 ` [PATCH 12/14] arm64: big-endian: write CPU holding pen address as LE Matthew Leach
2013-10-11 13:52 ` [PATCH 13/14] arm64: kconfig: allow CPU_BIG_ENDIAN to be selected Matthew Leach
2013-10-11 13:52 ` [PATCH 14/14] net: smc91x: dont't use SMC_outw for fixing up halfword-aligned data Matthew Leach
2013-10-11 20:41   ` Nicolas Pitre
2013-10-11 21:56   ` David Miller

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=1381499540-28794-2-git-send-email-matthew.leach@arm.com \
    --to=matthew.leach@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).