]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Include/Protocol/SevMemoryAcceptance.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / OvmfPkg / Include / Protocol / SevMemoryAcceptance.h
1 /** @file
2 The file provides the protocol that disables the behavior that all memory
3 gets accepted at ExitBootServices(). This protocol is only meant to be called
4 by the OS loader, and not EDK2 itself. The SEV naming is due to the
5 coincidence that only SEV-SNP needs this protocol, since SEV-SNP Linux
6 support was released before it had support for unaccepted memory. The
7 technology enablement thus does not strictly imply support for the unaccepted
8 memory type.
9
10 Copyright (c) 2023, Google LLC. All rights reserved.<BR>
11 SPDX-License-Identifier: BSD-2-Clause-Patent
12 **/
13
14 #ifndef SEV_MEMORY_ACCEPTANCE_H_
15 #define SEV_MEMORY_ACCEPTANCE_H_
16
17 #define OVMF_SEV_MEMORY_ACCEPTANCE_PROTOCOL_GUID \
18 {0xc5a010fe, \
19 0x38a7, \
20 0x4531, \
21 {0x8a, 0x4a, 0x05, 0x00, 0xd2, 0xfd, 0x16, 0x49}}
22
23 typedef struct _OVMF_SEV_MEMORY_ACCEPTANCE_PROTOCOL
24 OVMF_SEV_MEMORY_ACCEPTANCE_PROTOCOL;
25
26 /**
27 @param This A pointer to a OVMF_SEV_MEMORY_ACCEPTANCE_PROTOCOL.
28 **/
29 typedef
30 EFI_STATUS
31 (EFIAPI *OVMF_SEV_ALLOW_UNACCEPTED_MEMORY)(
32 IN OVMF_SEV_MEMORY_ACCEPTANCE_PROTOCOL *This
33 );
34
35 ///
36 /// The OVMF_SEV_MEMORY_ACCEPTANCE_PROTOCOL allows the OS loader to
37 /// indicate to EDK2 that ExitBootServices should not accept all memory.
38 ///
39 struct _OVMF_SEV_MEMORY_ACCEPTANCE_PROTOCOL {
40 OVMF_SEV_ALLOW_UNACCEPTED_MEMORY AllowUnacceptedMemory;
41 };
42
43 #endif