ArmPkg: Add helper to read the CCSIDR2 register
Add helper function to read the CCSIDR2 register. This is used when CCIDX is supported in AARCH32 mode. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
This commit is contained in:
		
				
					committed by
					
						![mergify[bot]](/avatar/e3df20cd7a67969c41a65f03bea54961?size=40) mergify[bot]
						mergify[bot]
					
				
			
			
				
	
			
			
			
						parent
						
							6e131aff00
						
					
				
				
					commit
					84a6db75b5
				
			| @@ -74,6 +74,16 @@ ASM_FUNC(ReadCCSIDR) | ||||
|   mrc p15,1,r0,c0,c0,0   @ Read current CP15 Cache Size ID Register (CCSIDR) | ||||
|   bx  lr | ||||
|  | ||||
| // UINT32 | ||||
| // ReadCCSIDR2 ( | ||||
| //   IN UINT32 CSSELR | ||||
| //   ) | ||||
| ASM_FUNC(ReadCCSIDR2) | ||||
|   mcr p15,2,r0,c0,c0,0   @ Write Cache Size Selection Register (CSSELR) | ||||
|   isb | ||||
|   mrc p15,1,r0,c0,c0,2   @ Read current CP15 Cache Size ID Register (CCSIDR2) | ||||
|   bx  lr | ||||
|  | ||||
| // UINT32 | ||||
| // ReadCLIDR ( | ||||
| //   IN UINT32 CSSELR | ||||
|   | ||||
| @@ -78,6 +78,16 @@ | ||||
|   mrc p15,1,r0,c0,c0,0 ; Read current CP15 Cache Size ID Register (CCSIDR) | ||||
|   bx  lr | ||||
|  | ||||
| // UINT32 | ||||
| // ReadCCSIDR2 ( | ||||
| //   IN UINT32 CSSELR | ||||
| //   ) | ||||
|  RVCT_ASM_EXPORT ReadCCSIDR2 | ||||
|   mcr p15,2,r0,c0,c0,0 ; Write Cache Size Selection Register (CSSELR) | ||||
|   isb | ||||
|   mrc p15,1,r0,c0,c0,2 ; Read current CP15 Cache Size ID Register (CCSIDR2) | ||||
|   bx  lr | ||||
|  | ||||
| // UINT32 | ||||
| // ReadCLIDR ( | ||||
| //   IN UINT32 CSSELR | ||||
|   | ||||
| @@ -170,6 +170,17 @@ ReadCCSIDR ( | ||||
|   IN UINT32 CSSELR | ||||
|   ); | ||||
|  | ||||
| /** Reads the CCSIDR2 for the specified cache. | ||||
|  | ||||
|   @param CSSELR The CSSELR cache selection register value | ||||
|  | ||||
|   @return The contents of the CCSIDR2 register for the specified cache. | ||||
| **/ | ||||
| UINT32 | ||||
| ReadCCSIDR2 ( | ||||
|   IN UINT32 CSSELR | ||||
|   ); | ||||
|  | ||||
| UINT32 | ||||
| ReadCLIDR ( | ||||
|   VOID | ||||
|   | ||||
		Reference in New Issue
	
	Block a user