Docs: arm64: booting: clarify boot requirements

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>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
Mark Rutland 2013-10-11 14:52:07 +01:00 коммит произвёл Catalin Marinas
Родитель 2a3f912c78
Коммит 4fcd6e1416
1 изменённых файлов: 31 добавлений и 14 удалений

Просмотреть файл

@ -115,9 +115,10 @@ Before jumping into the kernel, the following conditions must be met:
External caches (if present) must be configured and disabled. External caches (if present) must be configured and disabled.
- Architected timers - Architected timers
CNTFRQ must be programmed with the timer frequency. CNTFRQ must be programmed with the timer frequency and CNTVOFF must
If entering the kernel at EL1, CNTHCTL_EL2 must have EL1PCTEN (bit 0) be programmed with a consistent value on all CPUs. If entering the
set where available. kernel at EL1, CNTHCTL_EL2 must have EL1PCTEN (bit 0) set where
available.
- Coherency - Coherency
All CPUs to be booted by the kernel must be part of the same 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 the kernel image will be entered must be initialised by software at a
higher exception level to prevent execution in an UNKNOWN state. 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 The boot loader is expected to enter the kernel on each CPU in the
following manner: following manner:
- The primary CPU must jump directly to the first instruction of the - The primary CPU must jump directly to the first instruction of the
kernel image. The device tree blob passed by this CPU must contain kernel image. The device tree blob passed by this CPU must contain
for each CPU node: an 'enable-method' property for each cpu node. The supported
enable-methods are described below.
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.
It is expected that the bootloader will generate these device tree It is expected that the bootloader will generate these device tree
properties and insert them into the blob prior to kernel entry. properties and insert them into the blob prior to kernel entry.
- Any secondary CPUs must spin outside of the kernel in a reserved area - CPUs with a "spin-table" enable-method must have a 'cpu-release-addr'
of memory (communicated to the kernel by a /memreserve/ region in the 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 device tree) polling their cpu-release-addr location, which must be
contained in the reserved region. A wfe instruction may be inserted 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 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 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 cpu-release-addr returns a non-zero value, the CPU must jump to this
to this value. 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 - Secondary CPU general-purpose register settings
x0 = 0 (reserved for future use) x0 = 0 (reserved for future use)