Document the requirement needed to boot Xen on Armv8-R platforms.
Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
---
v4 changes:
 - New patch
---
 docs/misc/arm/booting.txt | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/docs/misc/arm/booting.txt b/docs/misc/arm/booting.txt
index 21ae74837dcc..719af74f1e69 100644
--- a/docs/misc/arm/booting.txt
+++ b/docs/misc/arm/booting.txt
@@ -62,6 +62,14 @@ Xen relies on some settings the firmware has to configure in EL3 before starting
 
 * The bit SCR_EL3.HCE (resp. SCR.HCE for 32-bit ARM) must be set to 1.
 
+When Xen runs on Armv8-R, the highest exception level is EL2 and the only
+available state is secure (S) on Arm64 and non secure (NS) on Arm32, hence the
+above requirements need to be adjusted to this case:
+
+* Xen must be entered in S EL2 mode on Arm64 and in NS EL2 mode on Arm32.
+
+* Xen must be entered with MPU off and data cache disabled (SCTLR_EL2.M bit and
+  SCTLR_EL2.C set to 0).
 
 [1] linux/Documentation/arm/booting.rst
 Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arch/arm/booting.rst
-- 
2.34.1On 29/04/2025 16:20, Luca Fancellu wrote: > Document the requirement needed to boot Xen on Armv8-R platforms. > > Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> > --- > v4 changes: > - New patch > --- > docs/misc/arm/booting.txt | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/docs/misc/arm/booting.txt b/docs/misc/arm/booting.txt > index 21ae74837dcc..719af74f1e69 100644 > --- a/docs/misc/arm/booting.txt > +++ b/docs/misc/arm/booting.txt > @@ -62,6 +62,14 @@ Xen relies on some settings the firmware has to configure in EL3 before starting > > * The bit SCR_EL3.HCE (resp. SCR.HCE for 32-bit ARM) must be set to 1. > > +When Xen runs on Armv8-R, the highest exception level is EL2 and the only > +available state is secure (S) on Arm64 and non secure (NS) on Arm32, hence the > +above requirements need to be adjusted to this case: > +> +* Xen must be entered in S EL2 mode on Arm64 and in NS EL2 mode on Arm32. I think it would be better to update the line "Xen must be entered in NS EL2 mode" to clarify the state for 64-bit Arm. > +> +* Xen must be entered with MPU off and data cache disabled (SCTLR_EL2.M bit and > + SCTLR_EL2.C set to 0). This line is valid for Armv8-A/Armv7-A when using the Image/zImage protocol. > > [1] linux/Documentation/arm/booting.rst > Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arch/arm/booting.rst -- Julien Grall
Hi Julien, > On 6 May 2025, at 12:44, Julien Grall <julien@xen.org> wrote: > > > > On 29/04/2025 16:20, Luca Fancellu wrote: >> Document the requirement needed to boot Xen on Armv8-R platforms. >> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> >> --- >> v4 changes: >> - New patch >> --- >> docs/misc/arm/booting.txt | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> diff --git a/docs/misc/arm/booting.txt b/docs/misc/arm/booting.txt >> index 21ae74837dcc..719af74f1e69 100644 >> --- a/docs/misc/arm/booting.txt >> +++ b/docs/misc/arm/booting.txt >> @@ -62,6 +62,14 @@ Xen relies on some settings the firmware has to configure in EL3 before starting >> * The bit SCR_EL3.HCE (resp. SCR.HCE for 32-bit ARM) must be set to 1. >> +When Xen runs on Armv8-R, the highest exception level is EL2 and the only >> +available state is secure (S) on Arm64 and non secure (NS) on Arm32, hence the >> +above requirements need to be adjusted to this case: > > +> +* Xen must be entered in S EL2 mode on Arm64 and in NS EL2 mode on Arm32. > > I think it would be better to update the line "Xen must be entered in NS EL2 mode" to clarify the state for 64-bit Arm. > > > +> +* Xen must be entered with MPU off and data cache disabled (SCTLR_EL2.M bit and >> + SCTLR_EL2.C set to 0). > > This line is valid for Armv8-A/Armv7-A when using the Image/zImage protocol. > >> [1] linux/Documentation/arm/booting.rst >> Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arch/arm/booting.rst Just to be sure to be on the same page, are you suggesting these changes on the original file? diff --git a/docs/misc/arm/booting.txt b/docs/misc/arm/booting.txt index 21ae74837dcc..c00c651805d7 100644 --- a/docs/misc/arm/booting.txt +++ b/docs/misc/arm/booting.txt @@ -58,10 +58,14 @@ Firmware/bootloader requirements Xen relies on some settings the firmware has to configure in EL3 before starting Xen. -* Xen must be entered in NS EL2 mode +* Xen must be entered in: + * Non-Secure EL2 mode for Armv8-A Arm64 and Arm32, Armv8-R Arm32. + * Secure EL2 mode for Armv8-R Arm64. * The bit SCR_EL3.HCE (resp. SCR.HCE for 32-bit ARM) must be set to 1. +* Xen must be entered with MMU/MPU off and data cache disabled (SCTLR_EL2.M bit + and SCTLR_EL2.C set to 0). [1] linux/Documentation/arm/booting.rst Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arch/arm/booting.rst Cheers, Luca
On 06/05/2025 13:24, Luca Fancellu wrote: > Hi Julien, Hi Luca, > >> On 6 May 2025, at 12:44, Julien Grall <julien@xen.org> wrote: >> >> >> >> On 29/04/2025 16:20, Luca Fancellu wrote: >>> Document the requirement needed to boot Xen on Armv8-R platforms. >>> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> >>> --- >>> v4 changes: >>> - New patch >>> --- >>> docs/misc/arm/booting.txt | 8 ++++++++ >>> 1 file changed, 8 insertions(+) >>> diff --git a/docs/misc/arm/booting.txt b/docs/misc/arm/booting.txt >>> index 21ae74837dcc..719af74f1e69 100644 >>> --- a/docs/misc/arm/booting.txt >>> +++ b/docs/misc/arm/booting.txt >>> @@ -62,6 +62,14 @@ Xen relies on some settings the firmware has to configure in EL3 before starting >>> * The bit SCR_EL3.HCE (resp. SCR.HCE for 32-bit ARM) must be set to 1. >>> +When Xen runs on Armv8-R, the highest exception level is EL2 and the only >>> +available state is secure (S) on Arm64 and non secure (NS) on Arm32, hence the >>> +above requirements need to be adjusted to this case: >>> +> +* Xen must be entered in S EL2 mode on Arm64 and in NS EL2 mode on Arm32. >> >> I think it would be better to update the line "Xen must be entered in NS EL2 mode" to clarify the state for 64-bit Arm. >> >>> +> +* Xen must be entered with MPU off and data cache disabled (SCTLR_EL2.M bit and >>> + SCTLR_EL2.C set to 0). >> >> This line is valid for Armv8-A/Armv7-A when using the Image/zImage protocol. >> >>> [1] linux/Documentation/arm/booting.rst >>> Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arch/arm/booting.rst > > Just to be sure to be on the same page, are you suggesting these changes on the original file? Yes with one tweak. > > diff --git a/docs/misc/arm/booting.txt b/docs/misc/arm/booting.txt > index 21ae74837dcc..c00c651805d7 100644 > --- a/docs/misc/arm/booting.txt > +++ b/docs/misc/arm/booting.txt > @@ -58,10 +58,14 @@ Firmware/bootloader requirements > > Xen relies on some settings the firmware has to configure in EL3 before starting Xen. I think you want to update this sentence to remove the reference to EL3. Even on A-profile EL3 is not mandatory (I vaguely remember one of the platform I worked on had no EL3). > > -* Xen must be entered in NS EL2 mode > +* Xen must be entered in: > + * Non-Secure EL2 mode for Armv8-A Arm64 and Arm32, Armv8-R Arm32. > + * Secure EL2 mode for Armv8-R Arm64. > > * The bit SCR_EL3.HCE (resp. SCR.HCE for 32-bit ARM) must be set to 1. And then here: "When EL3 is supported, ...". This would also cover the R-profile change. Cheers, > > +* Xen must be entered with MMU/MPU off and data cache disabled (SCTLR_EL2.M bit > + and SCTLR_EL2.C set to 0). > > [1] linux/Documentation/arm/booting.rst > Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arch/arm/booting.rst > > Cheers, > Luca > -- Julien Grall
Hi Julien, >> Just to be sure to be on the same page, are you suggesting these changes on the original file? > > Yes with one tweak. > > > > diff --git a/docs/misc/arm/booting.txt b/docs/misc/arm/booting.txt >> index 21ae74837dcc..c00c651805d7 100644 >> --- a/docs/misc/arm/booting.txt >> +++ b/docs/misc/arm/booting.txt >> @@ -58,10 +58,14 @@ Firmware/bootloader requirements >> Xen relies on some settings the firmware has to configure in EL3 before starting Xen. > > I think you want to update this sentence to remove the reference to EL3. Even on A-profile EL3 is not mandatory (I vaguely remember one of the platform I worked on had no EL3). > >> -* Xen must be entered in NS EL2 mode >> +* Xen must be entered in: >> + * Non-Secure EL2 mode for Armv8-A Arm64 and Arm32, Armv8-R Arm32. >> + * Secure EL2 mode for Armv8-R Arm64. >> * The bit SCR_EL3.HCE (resp. SCR.HCE for 32-bit ARM) must be set to 1. > > And then here: "When EL3 is supported, ...". This would also cover the R-profile change. > Thanks for the clarification, @Michal, @Ayan, are you ok if I retain your R-by with these changes or should I drop it? > Cheers, > >> +* Xen must be entered with MMU/MPU off and data cache disabled (SCTLR_EL2.M bit >> + and SCTLR_EL2.C set to 0). >> [1] linux/Documentation/arm/booting.rst >> Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arch/arm/booting.rst Cheers, Luca
On 29/04/2025 17:20, Luca Fancellu wrote: > Document the requirement needed to boot Xen on Armv8-R platforms. > > Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> > --- > v4 changes: > - New patch > --- > docs/misc/arm/booting.txt | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/docs/misc/arm/booting.txt b/docs/misc/arm/booting.txt > index 21ae74837dcc..719af74f1e69 100644 > --- a/docs/misc/arm/booting.txt > +++ b/docs/misc/arm/booting.txt > @@ -62,6 +62,14 @@ Xen relies on some settings the firmware has to configure in EL3 before starting > > * The bit SCR_EL3.HCE (resp. SCR.HCE for 32-bit ARM) must be set to 1. > > +When Xen runs on Armv8-R, the highest exception level is EL2 and the only > +available state is secure (S) on Arm64 and non secure (NS) on Arm32, hence the > +above requirements need to be adjusted to this case: > + > +* Xen must be entered in S EL2 mode on Arm64 and in NS EL2 mode on Arm32. > + > +* Xen must be entered with MPU off and data cache disabled (SCTLR_EL2.M bit and > + SCTLR_EL2.C set to 0). > > [1] linux/Documentation/arm/booting.rst > Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arch/arm/booting.rst Is the goal of this patch to only write firmware/bootloader requirements or accommodate booting protocol in general? Asking because in this file there is a requirement that Xen should be loaded below 10TB which afaict does not fit Armv8-R. Other than that: Reviewed-by: Michal Orzel <michal.orzel@amd.com> ~Michal
Hi Michal, > On 30 Apr 2025, at 07:37, Orzel, Michal <Michal.Orzel@amd.com> wrote: > > > > On 29/04/2025 17:20, Luca Fancellu wrote: >> Document the requirement needed to boot Xen on Armv8-R platforms. >> >> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> >> --- >> v4 changes: >> - New patch >> --- >> docs/misc/arm/booting.txt | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/docs/misc/arm/booting.txt b/docs/misc/arm/booting.txt >> index 21ae74837dcc..719af74f1e69 100644 >> --- a/docs/misc/arm/booting.txt >> +++ b/docs/misc/arm/booting.txt >> @@ -62,6 +62,14 @@ Xen relies on some settings the firmware has to configure in EL3 before starting >> >> * The bit SCR_EL3.HCE (resp. SCR.HCE for 32-bit ARM) must be set to 1. >> >> +When Xen runs on Armv8-R, the highest exception level is EL2 and the only >> +available state is secure (S) on Arm64 and non secure (NS) on Arm32, hence the >> +above requirements need to be adjusted to this case: >> + >> +* Xen must be entered in S EL2 mode on Arm64 and in NS EL2 mode on Arm32. >> + >> +* Xen must be entered with MPU off and data cache disabled (SCTLR_EL2.M bit and >> + SCTLR_EL2.C set to 0). >> >> [1] linux/Documentation/arm/booting.rst >> Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arch/arm/booting.rst > > Is the goal of this patch to only write firmware/bootloader requirements or > accommodate booting protocol in general? Asking because in this file there is a > requirement that Xen should be loaded below 10TB which afaict does not fit Armv8-R. Yes you are right, but I think this still holds since we support 1TB on Armv8-R at the moment? Cheers, Luca
On 30/04/2025 08:58, Luca Fancellu wrote: > Hi Michal, > >> On 30 Apr 2025, at 07:37, Orzel, Michal <Michal.Orzel@amd.com> wrote: >> >> >> >> On 29/04/2025 17:20, Luca Fancellu wrote: >>> Document the requirement needed to boot Xen on Armv8-R platforms. >>> >>> Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> >>> --- >>> v4 changes: >>> - New patch >>> --- >>> docs/misc/arm/booting.txt | 8 ++++++++ >>> 1 file changed, 8 insertions(+) >>> >>> diff --git a/docs/misc/arm/booting.txt b/docs/misc/arm/booting.txt >>> index 21ae74837dcc..719af74f1e69 100644 >>> --- a/docs/misc/arm/booting.txt >>> +++ b/docs/misc/arm/booting.txt >>> @@ -62,6 +62,14 @@ Xen relies on some settings the firmware has to configure in EL3 before starting >>> >>> * The bit SCR_EL3.HCE (resp. SCR.HCE for 32-bit ARM) must be set to 1. >>> >>> +When Xen runs on Armv8-R, the highest exception level is EL2 and the only >>> +available state is secure (S) on Arm64 and non secure (NS) on Arm32, hence the >>> +above requirements need to be adjusted to this case: >>> + >>> +* Xen must be entered in S EL2 mode on Arm64 and in NS EL2 mode on Arm32. >>> + >>> +* Xen must be entered with MPU off and data cache disabled (SCTLR_EL2.M bit and >>> + SCTLR_EL2.C set to 0). >>> >>> [1] linux/Documentation/arm/booting.rst >>> Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arch/arm/booting.rst >> >> Is the goal of this patch to only write firmware/bootloader requirements or >> accommodate booting protocol in general? Asking because in this file there is a >> requirement that Xen should be loaded below 10TB which afaict does not fit Armv8-R. > > Yes you are right, but I think this still holds since we support 1TB on Armv8-R at the moment? No, this value denotes max RAM size you support and not where Xen must be loaded. On ARMv8-A, we support max 2TB of RAM but require Xen to be loaded anywhere up to 10TB. Do we have the same limitation on ARMv8-R? ~Michal
Hi Michal, >>> >>> Is the goal of this patch to only write firmware/bootloader requirements or >>> accommodate booting protocol in general? Asking because in this file there is a >>> requirement that Xen should be loaded below 10TB which afaict does not fit Armv8-R. >> >> Yes you are right, but I think this still holds since we support 1TB on Armv8-R at the moment? > No, this value denotes max RAM size you support and not where Xen must be > loaded. On ARMv8-A, we support max 2TB of RAM but require Xen to be loaded > anywhere up to 10TB. Do we have the same limitation on ARMv8-R? Uhm, right, I’m not aware of limitations > > ~Michal >
Hi Luca, On 29/04/2025 16:20, Luca Fancellu wrote: > CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email. > > > Document the requirement needed to boot Xen on Armv8-R platforms. > > Signed-off-by: Luca Fancellu <luca.fancellu@arm.com> Reviewed-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com> > --- > v4 changes: > - New patch > --- > docs/misc/arm/booting.txt | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/docs/misc/arm/booting.txt b/docs/misc/arm/booting.txt > index 21ae74837dcc..719af74f1e69 100644 > --- a/docs/misc/arm/booting.txt > +++ b/docs/misc/arm/booting.txt > @@ -62,6 +62,14 @@ Xen relies on some settings the firmware has to configure in EL3 before starting > > * The bit SCR_EL3.HCE (resp. SCR.HCE for 32-bit ARM) must be set to 1. > > +When Xen runs on Armv8-R, the highest exception level is EL2 and the only > +available state is secure (S) on Arm64 and non secure (NS) on Arm32, hence the > +above requirements need to be adjusted to this case: > + > +* Xen must be entered in S EL2 mode on Arm64 and in NS EL2 mode on Arm32. > + > +* Xen must be entered with MPU off and data cache disabled (SCTLR_EL2.M bit and > + SCTLR_EL2.C set to 0). > > [1] linux/Documentation/arm/booting.rst > Latest version: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/arch/arm/booting.rst > -- > 2.34.1 > - Ayan
© 2016 - 2025 Red Hat, Inc.