[boot-wrapper v3 2/4] aarch64: Enable Armv8-R EL2 boot
Luca Fancellu
Luca.Fancellu at arm.com
Mon Oct 14 11:25:04 PDT 2024
Hi Mark,
>> +
>> #define HCR_EL2_RES1 BIT(1)
>> +#define HCR_EL2_APK_NOTRAP BIT(40)
>> +#define HCR_EL2_API_NOTRAP BIT(41)
>> +#define HCR_EL2_FIEN_NOTRAP BIT(47)
>> +#define HCR_EL2_ENSCXT_NOTRAP BIT(53)
>
> These can drop the '_NOTRAP' suffix; that's only used on some of the
> MDSCR definitions because it's an enumerated value for a field (which
> the architecture doesn't name), whereas these should just be the
> architected names as with their SCR_EL3 counterparts, i.e.
>
> #define HCR_EL2_APK BIT(40)
> #define HCR_EL2_API BIT(41)
> #define HCR_EL2_FIEN BIT(47)
> #define HCR_EL2_EnSCXT BIT(53)
>
> That said, we don't set SCR_EL3.{FIEN,EnSCXT} today for A-class; and
> Linux doesn't currently care -- is that something you're actually using
> on R-class?
>
I see EnSCXT is set currently in TF-A:
https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/refs/heads/master/lib/el3_runtime/aarch64/context_mgmt.c#253
and FIEN as well provided that ENABLE_FEAT_RAS=1:
https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+/refs/heads/master/lib/el3_runtime/aarch64/context_mgmt.c#408
Said so, I’ve done a run without disabling the trap for them and Linux is booting fine, so what do you
prefer here?
Cheers,
Luca
More information about the linux-arm-kernel
mailing list