The RMM 1.0-eac2 specification updates the RsiRealmConfig
structure to add a new member to identify the Realm hash
algorithm.

Therefore, update the REALM_CONFIG structure to add a
new member HashAlgorithm that represents the Realm hash
value. Also add macros to define the RsiHashAlgorithm
enumeration values SHA-256 and SHA-512.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Leif Lindholm <quic_llind...@quicinc.com>
Cc: Gerd Hoffmann <kra...@redhat.com>
Signed-off-by: Sami Mujawar <sami.muja...@arm.com>
---
 ArmVirtPkg/Include/Library/ArmCcaRsiLib.h | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/ArmVirtPkg/Include/Library/ArmCcaRsiLib.h 
b/ArmVirtPkg/Include/Library/ArmCcaRsiLib.h
index 
3d6ace866def5f10dd74afd4e9340530150f6f43..2b72ad09da85a9fd2f067db1c511d12f636d3dda
 100644
--- a/ArmVirtPkg/Include/Library/ArmCcaRsiLib.h
+++ b/ArmVirtPkg/Include/Library/ArmCcaRsiLib.h
@@ -11,7 +11,7 @@
     - REM          - Realm Extensible Measurement
 
   @par Reference(s):
-   - Realm Management Monitor (RMM) Specification, version 1.0-bet2
+   - Realm Management Monitor (RMM) Specification, version 1.0-eac2
      (https://developer.arm.com/documentation/den0137/)
 **/
 
@@ -61,6 +61,16 @@
 #define MIN_REM_INDEX  1
 #define MAX_REM_INDEX  4
 
+/* The values of the RsiHashAlgorithm enumeration.
+   SHA-256 (Secure Hash Standard (SHS))
+*/
+#define RSI_HASH_SHA_256  0
+
+/* The values of the RsiHashAlgorithm enumeration.
+   SHA-512 (Secure Hash Standard (SHS))
+*/
+#define RSI_HASH_SHA_512  1
+
 /** An enum describing the RSI RIPAS.
    See Section A5.2.2 Realm IPA state, RMM Specification, version A-bet0
 */
@@ -71,14 +81,16 @@ typedef enum Ripas {
 } RIPAS;
 
 /** A structure describing the Realm Configuration.
-  See Section B4.4.4 RsiRealmConfig type, RMM Specification, version A-bet0
+  See Section B4.4.5 RsiRealmConfig type, RMM Specification, version 1.0-eac2
   The width of the RsiRealmConfig structure is 4096 (0x1000) bytes.
 */
 typedef struct RealmConfig {
   // Width of IPA in bits.
   UINT64    IpaWidth;
+  // Width of the RsiHashAlgorithm enumeration is 8 bits.
+  UINT8     HashAlgorithm;
   // Unused bits of the RsiRealmConfig structure should be zero.
-  UINT8     Reserved[SIZE_4KB - sizeof (UINT64)];
+  UINT8     Reserved[SIZE_4KB - (sizeof (UINT64) + sizeof (UINT8))];
 } REALM_CONFIG;
 
 /** A structure describing the Host Call arguments
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117698): https://edk2.groups.io/g/devel/message/117698
Mute This Topic: https://groups.io/mt/105483441/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to