]>
Commit | Line | Data |
---|---|---|
3cbfba02 DW |
1 | /** @file\r |
2 | \r | |
3 | The common header file for SMM FVB module and SMM FVB runtime Module.\r | |
4 | \r | |
5 | Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved. <BR>\r | |
6 | \r\r | |
7 | This program and the accompanying materials are licensed and made available under\r\r | |
8 | the terms and conditions of the BSD License that accompanies this distribution. \r\r | |
9 | The full text of the license may be found at \r\r | |
10 | http://opensource.org/licenses/bsd-license.php. \r\r | |
11 | \r\r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r\r | |
13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r\r | |
14 | \r\r | |
15 | \r | |
16 | **/\r | |
17 | \r | |
18 | #ifndef _SMM_FVB_COMMON_H_\r | |
19 | #define _SMM_FVB_COMMON_H_\r | |
20 | \r | |
21 | #include <Protocol/SmmFirmwareVolumeBlock.h>\r | |
22 | \r | |
23 | #define EFI_FUNCTION_GET_ATTRIBUTES 1\r | |
24 | #define EFI_FUNCTION_SET_ATTRIBUTES 2\r | |
25 | #define EFI_FUNCTION_GET_PHYSICAL_ADDRESS 3\r | |
26 | #define EFI_FUNCTION_GET_BLOCK_SIZE 4\r | |
27 | #define EFI_FUNCTION_READ 5\r | |
28 | #define EFI_FUNCTION_WRITE 6\r | |
29 | #define EFI_FUNCTION_ERASE_BLOCKS 7\r | |
30 | \r | |
31 | typedef struct {\r | |
32 | UINTN Function;\r | |
33 | EFI_STATUS ReturnStatus;\r | |
34 | UINT8 Data[1];\r | |
35 | } SMM_FVB_COMMUNICATE_FUNCTION_HEADER;\r | |
36 | \r | |
37 | \r | |
38 | ///\r | |
39 | /// Size of SMM communicate header, without including the payload.\r | |
40 | ///\r | |
41 | #define SMM_COMMUNICATE_HEADER_SIZE (OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data))\r | |
42 | \r | |
43 | ///\r | |
44 | /// Size of SMM FVB communicate function header, without including the payload.\r | |
45 | ///\r | |
46 | #define SMM_FVB_COMMUNICATE_HEADER_SIZE (OFFSET_OF (SMM_FVB_COMMUNICATE_FUNCTION_HEADER, Data))\r | |
47 | \r | |
48 | typedef struct {\r | |
49 | EFI_SMM_FIRMWARE_VOLUME_BLOCK_PROTOCOL *SmmFvb;\r | |
50 | EFI_FVB_ATTRIBUTES_2 Attributes;\r | |
51 | } SMM_FVB_ATTRIBUTES_HEADER;\r | |
52 | \r | |
53 | typedef struct {\r | |
54 | EFI_SMM_FIRMWARE_VOLUME_BLOCK_PROTOCOL *SmmFvb;\r | |
55 | EFI_PHYSICAL_ADDRESS Address;\r | |
56 | } SMM_FVB_PHYSICAL_ADDRESS_HEADER;\r | |
57 | \r | |
58 | typedef struct {\r | |
59 | EFI_SMM_FIRMWARE_VOLUME_BLOCK_PROTOCOL *SmmFvb;\r | |
60 | EFI_LBA Lba;\r | |
61 | UINTN BlockSize;\r | |
62 | UINTN NumOfBlocks;\r | |
63 | } SMM_FVB_BLOCK_SIZE_HEADER;\r | |
64 | \r | |
65 | typedef struct {\r | |
66 | EFI_SMM_FIRMWARE_VOLUME_BLOCK_PROTOCOL *SmmFvb;\r | |
67 | EFI_LBA Lba;\r | |
68 | UINTN Offset;\r | |
69 | UINTN NumBytes;\r | |
70 | } SMM_FVB_READ_WRITE_HEADER;\r | |
71 | \r | |
72 | typedef struct {\r | |
73 | EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *SmmFvb;\r | |
74 | EFI_LBA StartLba;\r | |
75 | UINTN NumOfLba;\r | |
76 | } SMM_FVB_BLOCKS_HEADER;\r | |
77 | \r | |
78 | #endif\r |