ArmPkg: Fix the return type of the ReadCCSIDR function
When CCIDX is supported, the Current Cache Size ID Register contains data above 32 bits: namely the number of sets. Avoid truncating this by returning a UINTN instead of UINT32. On AARCH32, the expanded number of sets data can be read via the CCSIDR2 register. Also, add Doxygen comments for the function. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
This commit is contained in:
parent
827a71cc9e
commit
93ff7a4e8e
|
@ -84,7 +84,7 @@ ASM_FUNC(ArmDisableAllExceptions)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
// UINT32
|
// UINTN
|
||||||
// ReadCCSIDR (
|
// ReadCCSIDR (
|
||||||
// IN UINT32 CSSELR
|
// IN UINT32 CSSELR
|
||||||
// )
|
// )
|
||||||
|
|
|
@ -64,7 +64,7 @@ ASM_FUNC(ArmReadIdMmfr4)
|
||||||
mrc p15,0,r0,c0,c2,6 @ Read ID_MMFR4 Register
|
mrc p15,0,r0,c0,c2,6 @ Read ID_MMFR4 Register
|
||||||
bx lr
|
bx lr
|
||||||
|
|
||||||
// UINT32
|
// UINTN
|
||||||
// ReadCCSIDR (
|
// ReadCCSIDR (
|
||||||
// IN UINT32 CSSELR
|
// IN UINT32 CSSELR
|
||||||
// )
|
// )
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
mrc p15,0,r0,c0,c2,6 ; Read ID_MMFR4 Register
|
mrc p15,0,r0,c0,c2,6 ; Read ID_MMFR4 Register
|
||||||
bx LR
|
bx LR
|
||||||
|
|
||||||
// UINT32
|
// UINTN
|
||||||
// ReadCCSIDR (
|
// ReadCCSIDR (
|
||||||
// IN UINT32 CSSELR
|
// IN UINT32 CSSELR
|
||||||
// )
|
// )
|
||||||
|
|
|
@ -61,7 +61,14 @@ CPSRRead (
|
||||||
VOID
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
UINT32
|
/** Reads the CCSIDR register for the specified cache.
|
||||||
|
|
||||||
|
@param CSSELR The CSSELR cache selection register value.
|
||||||
|
|
||||||
|
@return The contents of the CCSIDR_EL1 register for the specified cache, when in AARCH64 mode.
|
||||||
|
Returns the contents of the CCSIDR register in AARCH32 mode.
|
||||||
|
**/
|
||||||
|
UINTN
|
||||||
ReadCCSIDR (
|
ReadCCSIDR (
|
||||||
IN UINT32 CSSELR
|
IN UINT32 CSSELR
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue