]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Include/TdxCommondefs.inc
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / OvmfPkg / Include / TdxCommondefs.inc
1 ;------------------------------------------------------------------------------
2 ; @file
3 ; TDX Common defitions used by the APs in mailbox
4 ;
5 ; Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
6 ; SPDX-License-Identifier: BSD-2-Clause-Patent
7 ;
8 ;------------------------------------------------------------------------------
9
10 CommandOffset equ 00h
11 ApicidOffset equ 04h
12 WakeupVectorOffset equ 08h
13 OSArgsOffset equ 10h
14 FirmwareArgsOffset equ 800h
15 WakeupArgsRelocatedMailBox equ 800h
16 AcceptPageArgsPhysicalStart equ 800h
17 AcceptPageArgsPhysicalEnd equ 808h
18 AcceptPageArgsChunkSize equ 810h
19 AcceptPageArgsPageSize equ 818h
20 CpuArrivalOffset equ 900h
21 CpusExitingOffset equ 0a00h
22 TalliesOffset equ 0a08h
23 ErrorsOffset equ 0e08h
24
25 SIZE_4KB equ 1000h
26 SIZE_2MB equ 200000h
27 SIZE_1GB equ 40000000h
28
29 PAGE_ACCEPT_LEVEL_4K equ 0
30 PAGE_ACCEPT_LEVEL_2M equ 1
31 PAGE_ACCEPT_LEVEL_1G equ 2
32
33 TDX_PAGE_ALREADY_ACCEPTED equ 0x00000b0a
34 TDX_PAGE_SIZE_MISMATCH equ 0xc0000b0b
35
36 ; Errors of APs in Mailbox
37 ERROR_NON equ 0
38 ERROR_INVALID_ACCEPT_PAGE_SIZE equ 1
39 ERROR_ACCEPT_PAGE_ERROR equ 2
40 ERROR_INVALID_FALLBACK_PAGE_LEVEL equ 3
41
42 MpProtectedModeWakeupCommandNoop equ 0
43 MpProtectedModeWakeupCommandWakeup equ 1
44 MpProtectedModeWakeupCommandSleep equ 2
45 MpProtectedModeWakeupCommandAcceptPages equ 3
46
47 MailboxApicIdInvalid equ 0xffffffff
48 MailboxApicidBroadcast equ 0xfffffffe
49
50 %define TDCALL_TDINFO 0x1
51 %define TDCALL_TDACCEPTPAGE 0x6