]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/ResetVector/X64/OvmfSevMetadata.asm
2bc7790bd8085bfd4a1844f8ce9d56fcf63a5483
[mirror_edk2.git] / OvmfPkg / ResetVector / X64 / OvmfSevMetadata.asm
1 ;-----------------------------------------------------------------------------
2 ; @file
3 ; OVMF metadata for the AMD SEV confidential computing guests
4 ;
5 ; Copyright (c) 2021, AMD Inc. All rights reserved.<BR>
6 ;
7 ; SPDX-License-Identifier: BSD-2-Clause-Patent
8 ;-----------------------------------------------------------------------------
9
10 BITS 64
11
12 %define OVMF_SEV_METADATA_VERSION 1
13
14 ; The section must be accepted or validated by the VMM before the boot
15 %define OVMF_SECTION_TYPE_SNP_SEC_MEM 0x1
16
17 ; AMD SEV-SNP specific sections
18 %define OVMF_SECTION_TYPE_SNP_SECRETS 0x2
19
20 ALIGN 16
21
22 TIMES (15 - ((OvmfSevGuidedStructureEnd - OvmfSevGuidedStructureStart + 15) % 16)) DB 0
23
24 OvmfSevGuidedStructureStart:
25 ;
26 ; OvmfSev metadata descriptor
27 ;
28 OvmfSevMetadataGuid:
29
30 _DescriptorSev:
31 DB 'A','S','E','V' ; Signature
32 DD OvmfSevGuidedStructureEnd - _DescriptorSev ; Length
33 DD OVMF_SEV_METADATA_VERSION ; Version
34 DD (OvmfSevGuidedStructureEnd - _DescriptorSev - 16) / 12 ; Number of sections
35
36 ; SEV-SNP Secrets page
37 SevSnpSecrets:
38 DD SEV_SNP_SECRETS_BASE
39 DD SEV_SNP_SECRETS_SIZE
40 DD OVMF_SECTION_TYPE_SNP_SECRETS
41
42 OvmfSevGuidedStructureEnd:
43 ALIGN 16