1 | /** @file
|
---|
2 | MM Communication buffer data.
|
---|
3 |
|
---|
4 | Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
|
---|
5 |
|
---|
6 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
7 |
|
---|
8 | **/
|
---|
9 |
|
---|
10 | #ifndef MM_COMM_BUFFER_H_
|
---|
11 | #define MM_COMM_BUFFER_H_
|
---|
12 |
|
---|
13 | ///
|
---|
14 | /// The GUID of the MM Communication buffer HOB.
|
---|
15 | ///
|
---|
16 | #define MM_COMM_BUFFER_HOB_GUID \
|
---|
17 | { 0x6c2a2520, 0x0131, 0x4aee, { 0xa7, 0x50, 0xcc, 0x38, 0x4a, 0xac, 0xe8, 0xc6 }}
|
---|
18 |
|
---|
19 | ///
|
---|
20 | /// The MM communicate buffer facilitates data sharing between non-MM and MM code.
|
---|
21 | /// The MM IPL code allocates a "fixed" runtime type memory as the MM communication buffer,
|
---|
22 | /// and communicates its address and size to MM Core via MmCommBuffer GUIDed HOB.
|
---|
23 | /// Here, "fixed" implies that the buffer's location remains constant throughout the boot process.
|
---|
24 | /// Data is exchanged between the MM Communication PPI/Protocol and a software MMI handler
|
---|
25 | /// using this fixed MM communication buffer.
|
---|
26 | ///
|
---|
27 | typedef struct {
|
---|
28 | ///
|
---|
29 | /// The address of the 4-KiB aligned fixed MM communication buffer.
|
---|
30 | ///
|
---|
31 | EFI_PHYSICAL_ADDRESS PhysicalStart;
|
---|
32 |
|
---|
33 | ///
|
---|
34 | /// Size of the fixed MM communication buffer, in 4KiB pages.
|
---|
35 | ///
|
---|
36 | UINT64 NumberOfPages;
|
---|
37 |
|
---|
38 | ///
|
---|
39 | /// Point to MM_COMM_BUFFER_STATUS structure.
|
---|
40 | ///
|
---|
41 | EFI_PHYSICAL_ADDRESS Status;
|
---|
42 | } MM_COMM_BUFFER;
|
---|
43 |
|
---|
44 | typedef struct {
|
---|
45 | ///
|
---|
46 | /// Whether the data in the fixed MM communication buffer is valid when entering from non-MM to MM.
|
---|
47 | ///
|
---|
48 | BOOLEAN IsCommBufferValid;
|
---|
49 |
|
---|
50 | ///
|
---|
51 | /// The return status when returning from MM to non-MM.
|
---|
52 | ///
|
---|
53 | UINT64 ReturnStatus;
|
---|
54 |
|
---|
55 | ///
|
---|
56 | /// The size in bytes of the output buffer when returning from MM to non-MM.
|
---|
57 | ///
|
---|
58 | UINT64 ReturnBufferSize;
|
---|
59 | } MM_COMM_BUFFER_STATUS;
|
---|
60 |
|
---|
61 | extern EFI_GUID gMmCommBufferHobGuid;
|
---|
62 |
|
---|
63 | #endif
|
---|