]>
Commit | Line | Data |
---|---|---|
1e01ea24 JY |
1 | /** @file\r |
2 | \r | |
d1102dba | 3 | Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r |
9d510e61 | 4 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
1e01ea24 JY |
5 | \r |
6 | **/\r | |
7 | \r | |
8 | #ifndef _PI_SMM_COMMUNICATION_REGION_TABLE_H_\r | |
9 | #define _PI_SMM_COMMUNICATION_REGION_TABLE_H_\r | |
10 | \r | |
11 | #define EDKII_PI_SMM_COMMUNICATION_REGION_TABLE_GUID {\\r | |
12 | 0x4e28ca50, 0xd582, 0x44ac, {0xa1, 0x1f, 0xe3, 0xd5, 0x65, 0x26, 0xdb, 0x34} \\r | |
13 | }\r | |
14 | \r | |
15 | //\r | |
16 | // This table to declare the generic SMM communication buffer location.\r | |
17 | // If this table is present, it means the SMM communication buffer is restricted to\r | |
18 | // EfiReservedMemoryType, EfiACPIMemoryNVS, or EfiRuntimeServicesData.\r | |
19 | //\r | |
20 | // This table is installed to UEFI configuration table by generic driver\r | |
21 | // or platform driver, at early DXE phase.\r | |
d1102dba | 22 | //\r |
1e01ea24 JY |
23 | // The EFI_MEMORY_DESCRIPTOR entry must contain at least one entry.\r |
24 | // The entries must be normal memory region in EfiReservedMemoryType, EfiACPIMemoryNVS,\r | |
25 | // or EfiRuntimeServicesData.\r | |
26 | // If the Entry.Type is EfiConventionalMemory, it means this entry is free to use.\r | |
27 | // If the Entry.Type is other, it means this entry is occupied.\r | |
28 | //\r | |
d1102dba | 29 | // Any non-SMM component may put communication data there, then use\r |
1e01ea24 JY |
30 | // UEFI defined SMM Communication ACPI Table, or PI defined EFI_SMM_COMMUNICATION_PROTOCOL\r |
31 | // to communicate with SMI handler. The process is:\r | |
32 | // 1) Find an entry whose type is EfiConventional.\r | |
33 | // 2) Change type to be EfiReservedMemoryType before use.\r | |
34 | // 3) Use it.\r | |
35 | // 4) Restore type be EfiConventional.\r | |
36 | // The step 2) must be performed as an atomic transaction, if there might be conflict during runtime.\r | |
37 | // For example, on IA-32/x64 platforms, this can be done using the CMPXCHG CPU instruction.\r | |
38 | // If there is guarantee on no conflict during boot time, these steps can be skipped.\r | |
39 | // For example, DXE, UEFI driver and UEFI application runs in sequence.\r | |
40 | //\r | |
41 | // For example, FPDT driver can use this communication buffer to get SMM\r | |
42 | // performance data in SMM. Profile driver can use this communication buffer\r | |
43 | // to get SMM profile data in SMM.\r | |
44 | //\r | |
45 | typedef struct {\r | |
46 | UINT32 Version;\r | |
47 | UINT32 NumberOfEntries;\r | |
48 | UINT32 DescriptorSize;\r | |
49 | UINT32 Reserved;\r | |
50 | //EFI_MEMORY_DESCRIPTOR Entry[1];\r | |
51 | } EDKII_PI_SMM_COMMUNICATION_REGION_TABLE;\r | |
52 | \r | |
53 | #define EDKII_PI_SMM_COMMUNICATION_REGION_TABLE_VERSION 0x00000001\r | |
54 | \r | |
55 | extern EFI_GUID gEdkiiPiSmmCommunicationRegionTableGuid;\r | |
56 | \r | |
57 | #endif\r |