Hi,
I am configuring the GICD_IGRPMODR[0] with a 0X3FFFFFFF value. Sometimes value is read as 0 sometimes it is 0x3FFFFFFF.
The value of GICD_CTLR is 0x30.
1) Can you please tell me why this register behaves differently?
2) In GIC Spec
https://developer.arm.com/documentation/ihi0069/latest/ Page 567 title: Accessing the GICD_IGRPMODR
There are 2 statements that sound contradictory
A) When GICD_CTLR.ARE_S==0 or GICD_CTLR.DS==1, the GICD_IGRPMODR<n> registers are RES0.
B) When affinity routing is enabled for the Secure state, GICD_IGRPMODR0 is RES0 and equivalent functionality is proved by GICR_IGRPMODR0.
When GICD_IGRPMODR[0] register marked as RES0? When ARE_S=0 or ARE_S=1. In our case DS =0 always
3) What is the value of RES0? Is there any difference between RES and RES0?
Namu said:1) Can you please tell me why this register behaves differently?
There's a few reasons why GICD_IGRPMODn might read as 0 when it in reality it has a different value.
Namu said: B) When affinity routing is enabled for the Secure state, GICD_IGRPMODR0 is RES0 and equivalent functionality is proved by GICR_IGRPMODR0.
It could perhaps be explained better, but it's not a contradiction.
The ARE bits control whether the GIC is in legacy/GICv2 mode (ARE=0 means legacy).
When ARE_S=0, ALL the GICD_IGRPMODR<n> registers are RES0, because these registers didn't exist in GICv2.
When ARE_S=1, specifically GICD_IGRPMODR0 is RES0. This is because GICD_IGRPMODR0 covers INTIDs 0..31, and in GICv3 those INTIDs are controlled via the per-PE GICR registers.
Namu said:3) What is the value of RES0? Is there any difference between RES and RES0?
RES0 means "Reserved, Should be Zero or Preserved". For the full definition of RES0 see the Glossary in the Arm Architecture Reference Manual.
Thanks, Mr. Martin for the details.
I checked the address of the register in the code. The offset of the register is 0x0D04 meanings its GICD_IGRPMODR[1] register.
While accessing GICD_IGRPMODR[1], Our system is in a secure state, and the DS = 0, ARE_s = 1, ARE_NS=1(ie GICD_CTLR = 0x30)
1) Does Any other configuration affect the GICD_IGRPMODR[1] to become RES0?
2) Any idea, How to check what is access mode( Non-secure accesses, and secure access) while accessing the register
Thank you in advance