1 ;-----------------------------------------------------------------------------
3 ; OVMF metadata for the AMD SEV confidential computing guests
5 ; Copyright (c) 2021, AMD Inc. All rights reserved.<BR>
7 ; SPDX-License-Identifier: BSD-2-Clause-Patent
8 ;-----------------------------------------------------------------------------
12 %define OVMF_SEV_METADATA_VERSION 1
14 ; The section must be accepted or validated by the VMM before the boot
15 %define OVMF_SECTION_TYPE_SNP_SEC_MEM 0x1
17 ; AMD SEV-SNP specific sections
18 %define OVMF_SECTION_TYPE_SNP_SECRETS 0x2
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).
27 %define OVMF_SECTION_TYPE_CPUID 0x3
32 TIMES (15 - ((OvmfSevGuidedStructureEnd - OvmfSevGuidedStructureStart + 15) % 16)) DB 0
34 OvmfSevGuidedStructureStart:
36 ; OvmfSev metadata descriptor
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
46 ; SEV-SNP Secrets page
48 DD SEV_SNP_SECRETS_BASE
49 DD SEV_SNP_SECRETS_SIZE
50 DD OVMF_SECTION_TYPE_SNP_SECRETS
56 DD OVMF_SECTION_TYPE_CPUID
58 OvmfSevGuidedStructureEnd: