From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (NAM02-DM3-obe.outbound.protection.outlook.com [40.107.95.80]) by mx.groups.io with SMTP id smtpd.web10.22113.1671637898232207283 for ; Wed, 21 Dec 2022 07:51:38 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=FkxovA5k; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.95.80, mailfrom: michael.roth@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QR10UE34qsu3WV6Yq3quHJvpADHNjY7OPYIzKSwqlqa7ZXRsDB1qXMNPRMEzM+lmD77U2OpN8fSewsoTcnHYHR5caU3iW9756sin/jBHhTmFoFvztRCIGUuMCdDD9letaM0beX79+smtAs1hMoYssKmoqXxNbuubDL9i9gF/dTsiTfBb1ewGr+F7jXDXpQmqC54uMcn54UsAecRRcGNwSsiYKJEIKtZ+783I8PPFBaDgGRBGHNZ3seT4iiQy6Hda10FS990cWAolJg1NYHVArb981BvXZuj34BPiJKjfLWvKOEI0UIQDi5lMlEbxXMtET0sl8Xw2Qijd72ZxTroVzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7WO3SlKmCGCEQe/OPJs7lcj4VGzJ/NSoLpbXdkwsbio=; b=DLaOTobVAjMJcv+qDcNbR9CXezPaRp91WFJgChoY3AmnH0g1qmmTthqdXif3QoSVTpiu+rh0v6lwH16hBC6HiMVEN5cY32WXaSKvEvSuAVH4s50jNGImwoaVTT8/E6ls3l6fMD8hTxx7/aUo+Cch9+TxXsgzjJbfdr8S1yM3G3UTl2VLSW9SlwKlIwjdTnWsQDObGaLllggCs/8HOB4phDpxlgPudpqJjkPDpsJbLHRqhoNdJfiJsR8uELu3YocVBD/jqu5ydj7rtzqH4oXfvHZtYlYmssBHLcyRFcipjRKUXS6t7VAuMhpzIzypOT6YgLp84KovS5ZrqpBfzxtM8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7WO3SlKmCGCEQe/OPJs7lcj4VGzJ/NSoLpbXdkwsbio=; b=FkxovA5kdH4opG8QmmJPElD68oQqmvEyKdxY2zcvmT5VPVV6uub3zB4TYApRTUPDYl5gj4jZvKFgNsm4DsDds1tcb5jYdfwnSF8fjA+BFQSTuJWRV4QQS3ZMTEhCx/k4upERBm48IIG6iJdHSq22YI+VpanOMJoMRMyNdo8/0ec= Received: from DM6PR06CA0049.namprd06.prod.outlook.com (2603:10b6:5:54::26) by DM4PR12MB5963.namprd12.prod.outlook.com (2603:10b6:8:6a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Wed, 21 Dec 2022 15:51:36 +0000 Received: from DM6NAM11FT084.eop-nam11.prod.protection.outlook.com (2603:10b6:5:54:cafe::e3) by DM6PR06CA0049.outlook.office365.com (2603:10b6:5:54::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.21 via Frontend Transport; Wed, 21 Dec 2022 15:51:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT084.mail.protection.outlook.com (10.13.172.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5944.10 via Frontend Transport; Wed, 21 Dec 2022 15:51:36 +0000 Received: from localhost (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 21 Dec 2022 09:51:35 -0600 From: "Roth, Michael" To: CC: Tom Lendacky , Subject: [PATCH v4 1/4] MdePkg: Add header for SEV-SNP secrets page struct Date: Wed, 21 Dec 2022 09:50:44 -0600 Message-ID: <20221221155047.180912-2-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221221155047.180912-1-michael.roth@amd.com> References: <20221221155047.180912-1-michael.roth@amd.com> MIME-Version: 1.0 Return-Path: Michael.Roth@amd.com X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT084:EE_|DM4PR12MB5963:EE_ X-MS-Office365-Filtering-Correlation-Id: 30d5a528-613d-4a84-cbb7-08dae36b3dbd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j4FzODiTmXjFtfcPcTOuBCSeu4v6QfM1rNEp2QGRoBCDZhepXZM8H+8+1z9fMjtTtHA5DtOOldYO6KsGLxgKjoh7W97uONYkAqhL3IduTIbQtlhcVfcvNFANf/1gQ19CphRu4Hs4b0m017NZJViEAt2v739CsTEmYaBAzqKeQzHzpYGXwaVk2Og139FwHWu629P6TGqVZZxrWWHDavTxDF/l0UErmsKHbxrIt78HfCKZFRURdCWY3se41Er+RYeNGFMWzC7MDq+soaGoBJmXQ0zkqaJPYCX6HaX504byg60jQ4c+Q+F9b1clDduqMnU9S2ukwKn1U1ONG2EriqwRm2PiLvutGw7KP5Ftje1hmM2apaBd7dkkuSJq/+1cNrEnBeighUg3GJl3CYv1x0sEL9YbfoDZJbM2qSo0h3JNNBFjzk1xy+bX01ZZOnWulI44FNWEafbH3D030fdpVk1s8509xHLUfpNhTKevHHspEioYH5ymwfj0xIcIacBNUo4e9R3lrjEVkLYIUhAGmPZ16Agad7Yo+jRq7Jj16MlrVjQ7CrbFIZ4WDdo563zVwnr8xHIbiG15/GimYEfr9hTOo7MuQ+iZctjSqQpIIhQt8AbmEaS40o8JXi+Se6LCC1kudQIrD9cHAyTu1RNsRxuh7Um/Y9lSt8ibAv5ZWwGfzOOHIpNorwuPqCVUfXL3yKRmCnVFQCLzU3yNFMVNTKWdbApnkjY+f9/aHZc5bWX7keI= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(396003)(39860400002)(376002)(451199015)(40470700004)(36840700001)(46966006)(4326008)(8676002)(54906003)(6916009)(316002)(70206006)(70586007)(8936002)(5660300002)(478600001)(47076005)(44832011)(6666004)(2906002)(426003)(26005)(186003)(16526019)(2616005)(41300700001)(1076003)(336012)(36756003)(40480700001)(36860700001)(83380400001)(356005)(86362001)(82310400005)(40460700003)(82740400003)(81166007)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2022 15:51:36.2263 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 30d5a528-613d-4a84-cbb7-08dae36b3dbd X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT084.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5963 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain This will be needed so that the AP Jump Table address can be stored for use by the operating system later, and possibly for other things in the future. Reviewed-by: Tom Lendacky Signed-off-by: Michael Roth --- MdePkg/Include/Register/Amd/SnpSecretsPage.h | 56 ++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 MdePkg/Include/Register/Amd/SnpSecretsPage.h diff --git a/MdePkg/Include/Register/Amd/SnpSecretsPage.h b/MdePkg/Include/= Register/Amd/SnpSecretsPage.h new file mode 100644 index 0000000000..3188459150 --- /dev/null +++ b/MdePkg/Include/Register/Amd/SnpSecretsPage.h @@ -0,0 +1,56 @@ +/** @file=0D +Definitions for AMD SEV-SNP Secrets Page=0D +=0D +Copyright (c) 2022 AMD Inc. All rights reserved.
=0D +SPDX-License-Identifier: BSD-2-Clause-Patent=0D +=0D +**/=0D +=0D +#ifndef SNP_SECRETS_PAGE_H_=0D +#define SNP_SECRETS_PAGE_H_=0D +=0D +//=0D +// OS-defined area of secrets page=0D +//=0D +// As defined by "SEV-ES Guest-Hypervisor Communication Block Standardizat= ion",=0D +// revision 2.01, section 2.7, "SEV-SNP Secrets Page".=0D +//=0D +typedef PACKED struct _SNP_SECRETS_OS_AREA {=0D + UINT32 Vmpl0MsgSeqNumLo;=0D + UINT32 Vmpl1MsgSeqNumLo;=0D + UINT32 Vmpl2MsgSeqNumLo;=0D + UINT32 Vmpl3MsgSeqNumLo;=0D + UINT64 ApJumpTablePa;=0D + UINT32 Vmpl0MsgSeqNumHi;=0D + UINT32 Vmpl1MsgSeqNumHi;=0D + UINT32 Vmpl2MsgSeqNumHi;=0D + UINT32 Vmpl3MsgSeqNumHi;=0D + UINT8 Reserved2[22];=0D + UINT16 Version;=0D + UINT8 GuestUsage[32];=0D +} SNP_SECRETS_OS_AREA;=0D +=0D +#define VMPCK_KEY_LEN 32=0D +=0D +//=0D +// SEV-SNP Secrets page=0D +//=0D +// As defined by "SEV-SNP Firmware ABI", revision 1.51, section 8.17.2.5,= =0D +// "PAGE_TYPE_SECRETS".=0D +//=0D +typedef PACKED struct _SNP_SECRETS_PAGE {=0D + UINT32 Version;=0D + UINT32 ImiEn : 1,=0D + Reserved : 31;=0D + UINT32 Fms;=0D + UINT32 Reserved2;=0D + UINT8 Gosvw[16];=0D + UINT8 Vmpck0[VMPCK_KEY_LEN];=0D + UINT8 Vmpck1[VMPCK_KEY_LEN];=0D + UINT8 Vmpck2[VMPCK_KEY_LEN];=0D + UINT8 Vmpck3[VMPCK_KEY_LEN];=0D + SNP_SECRETS_OS_AREA OsArea;=0D + UINT8 Reserved3[3840];=0D +} SNP_SECRETS_PAGE;=0D +=0D +#endif=0D --=20 2.25.1