diff mbox series

arm64: docs: Mandate that the I-cache doesn't hold stale kernel text

Message ID 20200423093658.10602-1-will@kernel.org (mailing list archive)
State Mainlined
Commit e24e03aa00f0248a716ec7859c03f0034bb42fb2
Headers show
Series arm64: docs: Mandate that the I-cache doesn't hold stale kernel text | expand

Commit Message

Will Deacon April 23, 2020, 9:36 a.m. UTC
Although we require that the loaded kernel Image has been cleaned to the
PoC, we neglect to spell out the state of the I-cache. Although this
should be reasonably obvious, it doesn't hurt to be explicit.

Require that the I-cache doesn't hold any stale entries for the kernel
Image at boot.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
---
 Documentation/arm64/booting.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Mark Rutland April 23, 2020, 9:49 a.m. UTC | #1
On Thu, Apr 23, 2020 at 10:36:58AM +0100, Will Deacon wrote:
> Although we require that the loaded kernel Image has been cleaned to the
> PoC, we neglect to spell out the state of the I-cache. Although this
> should be reasonably obvious, it doesn't hurt to be explicit.
> 
> Require that the I-cache doesn't hold any stale entries for the kernel
> Image at boot.
> 
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Signed-off-by: Will Deacon <will@kernel.org>

This was certianly the intent, so:

Acked-by: Mark Rutland <mark.rutland@arm.com>

Thanks,
Mark.

> ---
>  Documentation/arm64/booting.rst | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/arm64/booting.rst b/Documentation/arm64/booting.rst
> index a3f1a47b6f1c..d063c05d5fb0 100644
> --- a/Documentation/arm64/booting.rst
> +++ b/Documentation/arm64/booting.rst
> @@ -173,7 +173,8 @@ Before jumping into the kernel, the following conditions must be met:
>  - Caches, MMUs
>  
>    The MMU must be off.
> -  Instruction cache may be on or off.
> +  The instruction cache may be on or off, and must not hold any stale
> +  entries corresponding to the loaded kernel image.
>    The address range corresponding to the loaded kernel image must be
>    cleaned to the PoC. In the presence of a system cache or other
>    coherent masters with caches enabled, this will typically require
> -- 
> 2.26.1.301.g55bc3eb7cb9-goog
>
Catalin Marinas April 23, 2020, 9:55 a.m. UTC | #2
On Thu, Apr 23, 2020 at 10:36:58AM +0100, Will Deacon wrote:
> Although we require that the loaded kernel Image has been cleaned to the
> PoC, we neglect to spell out the state of the I-cache. Although this
> should be reasonably obvious, it doesn't hurt to be explicit.
> 
> Require that the I-cache doesn't hold any stale entries for the kernel
> Image at boot.
> 
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Signed-off-by: Will Deacon <will@kernel.org>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
diff mbox series

Patch

diff --git a/Documentation/arm64/booting.rst b/Documentation/arm64/booting.rst
index a3f1a47b6f1c..d063c05d5fb0 100644
--- a/Documentation/arm64/booting.rst
+++ b/Documentation/arm64/booting.rst
@@ -173,7 +173,8 @@  Before jumping into the kernel, the following conditions must be met:
 - Caches, MMUs
 
   The MMU must be off.
-  Instruction cache may be on or off.
+  The instruction cache may be on or off, and must not hold any stale
+  entries corresponding to the loaded kernel image.
   The address range corresponding to the loaded kernel image must be
   cleaned to the PoC. In the presence of a system cache or other
   coherent masters with caches enabled, this will typically require