1 | /** @file
|
---|
2 |
|
---|
3 | Copyright (c) 2008 - 2012, Intel Corporation. All rights reserved.<BR>
|
---|
4 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
5 |
|
---|
6 | **/
|
---|
7 |
|
---|
8 | #ifndef TDX_ACPI_TABLE_H_
|
---|
9 | #define TDX_ACPI_TABLE_H_
|
---|
10 |
|
---|
11 | #include <PiDxe.h>
|
---|
12 |
|
---|
13 | #include <Protocol/AcpiTable.h>
|
---|
14 | #include <Protocol/FirmwareVolume2.h>
|
---|
15 | #include <Protocol/PciIo.h>
|
---|
16 |
|
---|
17 | #include <Library/BaseLib.h>
|
---|
18 | #include <Library/UefiBootServicesTableLib.h>
|
---|
19 | #include <Library/DebugLib.h>
|
---|
20 | #include <Library/PcdLib.h>
|
---|
21 | #include <IndustryStandard/IntelTdx.h>
|
---|
22 | #include <IndustryStandard/Acpi.h>
|
---|
23 |
|
---|
24 | VOID
|
---|
25 | EFIAPI
|
---|
26 | AsmGetRelocationMap (
|
---|
27 | OUT MP_RELOCATION_MAP *AddressMap
|
---|
28 | );
|
---|
29 |
|
---|
30 | /**
|
---|
31 | At the beginning of system boot, a 4K-aligned, 4K-size memory (Td mailbox) is
|
---|
32 | pre-allocated by host VMM. BSP & APs do the page accept together in that memory
|
---|
33 | region.
|
---|
34 |
|
---|
35 | After that TDVF is designed to relocate the mailbox to a 4K-aligned, 4K-size
|
---|
36 | memory block which is allocated in the ACPI Nvs memory. APs are waken up and
|
---|
37 | spin around the relocated mailbox for further command.
|
---|
38 |
|
---|
39 | @return EFI_PHYSICAL_ADDRESS Address of the relocated mailbox
|
---|
40 | **/
|
---|
41 | EFI_PHYSICAL_ADDRESS
|
---|
42 | EFIAPI
|
---|
43 | RelocateMailbox (
|
---|
44 | VOID
|
---|
45 | );
|
---|
46 |
|
---|
47 | /**
|
---|
48 | Alter the MADT when ACPI Table from QEMU is available.
|
---|
49 |
|
---|
50 | @param[in] Event Event whose notification function is being invoked
|
---|
51 | @param[in] Context Pointer to the notification function's context
|
---|
52 | **/
|
---|
53 | VOID
|
---|
54 | EFIAPI
|
---|
55 | AlterAcpiTable (
|
---|
56 | IN EFI_EVENT Event,
|
---|
57 | IN VOID *Context
|
---|
58 | );
|
---|
59 |
|
---|
60 | #endif
|
---|