From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail03.groups.io (mail03.groups.io [45.79.227.220]) by spool.mail.gandi.net (Postfix) with ESMTPS id BEEA9AC1267 for ; Fri, 12 Apr 2024 14:34:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=QgMD0xqKHoTUZE+mCjvbQzDvwssvMMbuuzNde4yuGyo=; c=relaxed/simple; d=groups.io; h=Received-SPF:Received-SPF:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:NoDisclaimer:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240206; t=1712932452; v=1; b=gA4ANu/wBIRQrCpc0VqwS4ye8AVhQsGeL0FrU9dfW1sTzb70esuwI5Mm+2Ut0iTzLaSinpPL AbywWviFlUQREWeapZEVnnAAbJgvxdKPusJ/gr5ROpGoQUG8F6J03bOTjX9GuQ408bPzPn6kVBH 3FZ/smvL63IdAjteqpF29uF0h9476zn3ETiEDdwvcWZfRUwS3IEIKSJjyW1u8lkxlNXoCzDlY48 hz2EgK+KCSpNtmxc+R2UuuB2xzLgTWYbSwHseWy5dHIb/kBK5LJND/JrxpvN5F3kb0svEQuF08S rF5+JA4y/2Obn5xqL6nu4VhFK+Get0UaVPENLx5bMM2AQ== X-Received: by 127.0.0.2 with SMTP id y0CNYY7687511xcBZvzPlmoi; Fri, 12 Apr 2024 07:34:12 -0700 X-Received: from EUR01-HE1-obe.outbound.protection.outlook.com (EUR01-HE1-obe.outbound.protection.outlook.com [40.107.13.48]) by mx.groups.io with SMTP id smtpd.web11.47971.1712932445204635913 for ; Fri, 12 Apr 2024 07:34:05 -0700 X-Received: from DB8P191CA0007.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::17) by DB4PR08MB8031.eurprd08.prod.outlook.com (2603:10a6:10:389::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.56; Fri, 12 Apr 2024 14:34:01 +0000 X-Received: from DU2PEPF00028CFE.eurprd03.prod.outlook.com (2603:10a6:10:130:cafe::3b) by DB8P191CA0007.outlook.office365.com (2603:10a6:10:130::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26 via Frontend Transport; Fri, 12 Apr 2024 14:34:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DU2PEPF00028CFE.mail.protection.outlook.com (10.167.242.182) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Fri, 12 Apr 2024 14:34:00 +0000 X-Received: ("Tessian outbound caed45120527:v313"); Fri, 12 Apr 2024 14:34:00 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 350d36477833efe0 X-CR-MTA-TID: 64aa7808 X-Received: from 64afae710599.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 44EC0ECF-9A4D-4309-889B-E0E6A54C8AEC.1; Fri, 12 Apr 2024 14:33:53 +0000 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 64afae710599.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 12 Apr 2024 14:33:53 +0000 X-Received: from DB6PR0301CA0083.eurprd03.prod.outlook.com (2603:10a6:6:30::30) by DBBPR08MB6140.eurprd08.prod.outlook.com (2603:10a6:10:20a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Fri, 12 Apr 2024 14:33:50 +0000 X-Received: from DU2PEPF00028CFF.eurprd03.prod.outlook.com (2603:10a6:6:30:cafe::b2) by DB6PR0301CA0083.outlook.office365.com (2603:10a6:6:30::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26 via Frontend Transport; Fri, 12 Apr 2024 14:33:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C X-Received: from nebula.arm.com (40.67.248.234) by DU2PEPF00028CFF.mail.protection.outlook.com (10.167.242.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7452.22 via Frontend Transport; Fri, 12 Apr 2024 14:33:50 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 12 Apr 2024 14:33:43 +0000 X-Received: from E114225.Arm.com (10.1.196.56) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Fri, 12 Apr 2024 14:33:43 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , Subject: [edk2-devel] [PATCH v2 36/45] ArmVirtPkg: RMM 1.0-eac2 - Update RsiRealmConfig structure Date: Fri, 12 Apr 2024 15:33:13 +0100 Message-ID: <20240412143322.5244-37-sami.mujawar@arm.com> In-Reply-To: <20240412143322.5244-1-sami.mujawar@arm.com> References: <20240412143322.5244-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DU2PEPF00028CFF:EE_|DBBPR08MB6140:EE_|DU2PEPF00028CFE:EE_|DB4PR08MB8031:EE_ X-MS-Office365-Filtering-Correlation-Id: 0cd7c274-aab6-4c1d-5fc3-08dc5afd985c x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: /p68biTVuAo2sQoGdA/1MrjoMC27ReOfxTQWBsLFa8nBpf3ezkvMpAQrkKPaolua3J5XkSJivyG94PBqxfLlWophVPIvavVD0N1cQMlIO5GXGbZ+1X2/9tzsDzmQN/GtDEPa0UpbTwQPRs8YdEqghRCikbX2932OyAm/BEr2+nMwv5RICET9/+bkSQAWxdWOJhhLtJ+ylAKLTz+LddBtl9fNkofbgQmkEP3wb5ShI5OiEaodf++Bya2TWeZPiyyNvzDcUE/QmPmvvuhbMyStQFVbmK1uyFocBG6ZY+uowUxELBkCKo54xXf33sqYnvDIPQx/MosyHZ6RDbO9ieKqMTkA7eWibr1DJhtRpcoPH5idYUmnwfhr7RSVl/fFIJELioHEKy79C4xvbEGnTMXQA324YYd9uAZ5M9L4WgVGxt0o3cxkyorq8uCLIp/AO1qEbOQEoN8cN4REhiN/aYQHeiL9J1q1dIfPTsG+ZMZrV+SxqgHSwJNKpWmRb9rFvgdgEx6z/Qj7YSCq9S+m6o1IcnOlmAR4O+UJ2lXtsUeIvy3y3+idn/HdHAsx3NZuHCjIikzl0nsCOhQjsZeVL8aaTPNSQlBhHv/f3W0uNG/MZfHrDtkgBxt7iuxz4BWsj+m+ukXFVL0lR9cHIzb0NNi7Dq3H3ofnKmufl9wXo3IRmK1oazW1LrWfiXfV2RkbmvXSVweRahgFNm45CMpJCytHq1pTDSmptGkibvxxSSSSqilSvFBWownKIHTRpAqqoiEv X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(376005)(1800799015)(82310400014)(36860700004);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB6140 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU2PEPF00028CFE.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 0b2f89c7-2e08-4af7-1ab0-08dc5afd9242 X-Microsoft-Antispam-Message-Info: zukJ/SeSweFBuQatTWy7cPunOe+iiv7y6AeGsonfW7uCNvWNYaBYaVKMzH6LzzVapkcDZ8dBtPaLeCxfI9VdA57Yljr3N3B/qv4yIV866HlPJgoJg9lCjaZzyEh8B9Hej+uvedunJLiSw1BkdEhIz9r1jp10jPjA0T60NedyOxgP3AxdjZCL9RgGTRvk+wZAaI+xtsIxNx6v4zRDsWNsYWKvm8hSe0n79DeZbEgdGG/pZ/qPOE+iKIA42LLaE79O4P9jRkESlT2SYy8H2ZlOjauUKewkgBGzpJd3L9NoUoduGdn6MljETlwxBPraq0n/keCfo6RC0vbpO/Ti2xYrrow36PbUMFap5RPru7+5PMqwU+aVtCuHYEqPb+Vtg74Phn7dy9tn3E19fYfmgzi34aLa+0XnkIni+OSftwHzwxAwHzVmUmow9Ta+e/c60s2IxUbSXhukczpA9ZlvyEHjTBjQbJIAaeEG58M+6cd4KqOyan32wxwZM1lr5cDFG2uFVeBtMcEGgLVgQ2ZTInKav/o7fBtKa24TpLu1lD/Oy4ILRQqboXK3IXmHDBQ1eaTliq5TnfCLm9tOB/UYMMrTtJJgIRSsW5awpd66DRrYEuAEOwgnjtz6C/RbkwphGZKsRSOHGSeP+JradAzvwziGk36Y4l8q28mViPssBbUluz1L7k10HW/GGuGTndi09xzuVRMrDI9mma44C/b2svllKYOqy/AykEEENwlwJSNc/F0Pk1Mo9zmHqtmXfbJhpezb X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 14:34:00.9184 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0cd7c274-aab6-4c1d-5fc3-08dc5afd985c X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028CFE.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR08MB8031 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Fri, 12 Apr 2024 07:34:05 -0700 Resent-From: sami.mujawar@arm.com Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 46JRFn9l8R9woWeYsybIvRpMx7686176AA= Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b="gA4ANu/w"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.227.220 as permitted sender) smtp.mailfrom=bounce@groups.io 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 Cc: Leif Lindholm Cc: Gerd Hoffmann Signed-off-by: Sami Mujawar --- 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/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-