]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/ResetVector/X64/OvmfSevMetadata.asm
0cc12ad3473f183ef6ff4e8d2e721023a8cd149f
[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 ;
21 ; The section contains the hypervisor pre-populated CPUID values.
22 ; In the case of SEV-SNP, the CPUID values are filtered and measured by
23 ; the SEV-SNP firmware.
24 ; The CPUID format is documented in SEV-SNP firmware spec 0.9 section 7.1
25 ; (CPUID function structure).
26 ;
27 %define OVMF_SECTION_TYPE_CPUID 0x3
28
29
30 ALIGN 16
31
32 TIMES (15 - ((OvmfSevGuidedStructureEnd - OvmfSevGuidedStructureStart + 15) % 16)) DB 0
33
34 OvmfSevGuidedStructureStart:
35 ;
36 ; OvmfSev metadata descriptor
37 ;
38 OvmfSevMetadataGuid:
39
40 _DescriptorSev:
41 DB 'A','S','E','V' ; Signature
42 DD OvmfSevGuidedStructureEnd - _DescriptorSev ; Length
43 DD OVMF_SEV_METADATA_VERSION ; Version
44 DD (OvmfSevGuidedStructureEnd - _DescriptorSev - 16) / 12 ; Number of sections
45
46 ; SEV-SNP Secrets page
47 SevSnpSecrets:
48 DD SEV_SNP_SECRETS_BASE
49 DD SEV_SNP_SECRETS_SIZE
50 DD OVMF_SECTION_TYPE_SNP_SECRETS
51
52 ; CPUID values
53 CpuidSec:
54 DD CPUID_BASE
55 DD CPUID_SIZE
56 DD OVMF_SECTION_TYPE_CPUID
57
58 OvmfSevGuidedStructureEnd:
59 ALIGN 16