Hi Amit

It looks like you are using some older version of TF-A as RAS_ALLOW_ERR_REC_ACCESS_NS has been replaced with RAS_TRAP_NS_ERR_REC_ACCESS.

To have basic RAS FFH support you just need to enable following two macros ENABLE_FEAT_RAS and HANDLE_EA_EL3_FIRST_NS

FAULT_INJECTION_SUPPORT is mainly used for testing purpose on FVP platform (injecting error) as we do not have source for RAS errors. If source of error is present in your platform, you can use it directly and you don't need to enable this macro.

RAS_ALLOW_ERR_REC_ACCESS_NS/RAS_TRAP_NS_ERR_REC_ACCESS : Is used to support hybrid mode of Error handling, for example if you want to restrict the error record access to NS world then you can use this macro.

Please find answers to your specific question, 
1. RAS_ALLOW_ERR_REC_ACCESS_NS - is it right to enable this option to trap RAS exception injected from EL2 at EL3 on armv8.2 platform ?
   [MP] : This option is not about trapping but about accessing the error records
2. why on FVP platform , instead of RAS_ALLOW_ERR_REC_ACCESS_NS , FAULT_INJECTION_SUPPORT is used to trap RAS exceptions at EL3 ?
   [MP] : FAULT_INJECTION_SUPPORT is also not about trapping but creating an error
   
Additionally, you can refer to https://neoverse-reference-design.docs.arm.com/en/latest/platforms/rdfremont/docs/ras/ras.html documentation of RAS handling on neoverse reference design.

As i said earlier, to start with basic RAS FFH support, just use ENABLE_FEAT_RAS and HANDLE_EA_EL3_FIRST_NS.

Thanks
Manish


From: Nagal, Amit via TF-A <tf-a@lists.trustedfirmware.org>
Sent: 27 March 2024 15:33
To: Manish Pandey2 <Manish.Pandey2@arm.com>; tf-a@lists.trustedfirmware.org <tf-a@lists.trustedfirmware.org>
Subject: [TF-A] Re: RAS exceptions TRAP at EL3
 
Hi Manish ,

Thanks for reply.
I have gone through the documentation section 4.11.4 already .

As I mentioned below , in the documentation , 2 flags are mentioned to trap RAS errors from lower exception levels to EL3 .
1. FAULT_INJECTION_SUPPORT -  As I understand this will not work on armv8.2 .( refer docs/getting_started/build-options.rst).
2. RAS_ALLOW_ERR_REC_ACCESS_NS -  When I enable this option , I could see RAS exception injected at EL2 is getting trapped at EL3 , but then I see this print in my log : "Unhandled Exception from lower EL"
----
Running test suite 'Single fault'
Description: Single fault injection

> Executing 'Inject SError and wait'
New Unhandled Exception from lower EL.
x0             = 0x0000000000000000
x1             = 0x0000000000000010
x2             = 0x0000000000000000
----

Can u please let me know :
1. RAS_ALLOW_ERR_REC_ACCESS_NS - is it right to enable this option to trap RAS exception injected from EL2 at EL3 on armv8.2 platform ?
2. why on FVP platform , instead of RAS_ALLOW_ERR_REC_ACCESS_NS , FAULT_INJECTION_SUPPORT is used to trap RAS exceptions at EL3 ?

Regards
Amit

From: Manish Pandey2 via TF-A <tf-a@lists.trustedfirmware.org>
Sent: Wednesday, March 27, 2024 8:32 PM
To: tf-a@lists.trustedfirmware.org; Nagal, Amit <amit.nagal@amd.com>
Subject: [TF-A] Re: RAS exceptions TRAP at EL3

Hi Amit,

The pdf you referred to is from one of the tech forums when we were discussing about our implementation approach.
I would recommend you to refer https://trustedfirmware-a.readthedocs.io/en/latest/components/ras.html and to understand the build options refer to section 4.11.4 in above page.

thanks
Manish Pandey

________________________________________
From: Nagal, Amit via TF-A <mailto:tf-a@lists.trustedfirmware.org>
Sent: 27 March 2024 14:51
To: mailto:tf-a@lists.trustedfirmware.org <mailto:tf-a@lists.trustedfirmware.org>
Subject: [TF-A] RAS exceptions TRAP at EL3
 
Hi ,

I am using TF-A tests tests-single-fault.mk to inject RAS errors on AMD Xilinx platform which is cortex a-78 armv8.2 based.

With this test , I can see RAS exceptions are getting triggered at EL2 .

I want to trap this exception at EL3 and handle RAS errors further using FFH approach.

From code , I could see fvp platform using FAULT_INJECTION_SUPPORT=1 , but from documentation it is meant from ARMv8.4 .

I am following https://www.trustedfirmware.org/docs/RAS_Tech_Forum.pdf .
Another option is RAS_ALLOW_ERR_REC_ACCESS_NS , but in the pdf , for FFH it is mentioned RAS_ALLOW_ERR_REC_ACCESS_NS should be 0.

Can I be advised what should be done to trap the RAS exception at EL3 on armv8.2 cortex a78 platform ?

Regards
Amit



 
--
TF-A mailing list -- mailto:tf-a@lists.trustedfirmware.org
To unsubscribe send an email to mailto:tf-a-leave@lists.trustedfirmware.org
--
TF-A mailing list -- tf-a@lists.trustedfirmware.org
To unsubscribe send an email to tf-a-leave@lists.trustedfirmware.org