]>
Commit | Line | Data |
---|---|---|
fce4ecd9 MM |
1 | /** @file\r |
2 | This library will parse the coreboot table in memory and extract those required\r | |
3 | information.\r | |
4 | \r | |
5 | Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r | |
6 | This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | #include <Guid/FrameBufferInfoGuid.h>\r | |
16 | \r | |
17 | /**\r | |
18 | Acquire the memory information from the coreboot table in memory.\r | |
19 | \r | |
20 | @param pLowMemorySize Pointer to the variable of low memory size\r | |
21 | @param pHighMemorySize Pointer to the variable of high memory size\r | |
22 | \r | |
23 | @retval RETURN_SUCCESS Successfully find out the memory information.\r | |
24 | @retval RETURN_INVALID_PARAMETER Invalid input parameters.\r | |
25 | @retval RETURN_NOT_FOUND Failed to find the memory information.\r | |
26 | \r | |
27 | **/\r | |
28 | RETURN_STATUS\r | |
29 | CbParseMemoryInfo (\r | |
30 | IN UINT64* pLowMemorySize,\r | |
31 | IN UINT64* pHighMemorySize\r | |
32 | );\r | |
33 | \r | |
34 | /**\r | |
35 | Acquire the coreboot memory table with the given table id\r | |
36 | \r | |
37 | @param TableId Table id to be searched\r | |
38 | @param pMemTable Pointer to the base address of the memory table\r | |
39 | @param pMemTableSize Pointer to the size of the memory table\r | |
40 | \r | |
41 | @retval RETURN_SUCCESS Successfully find out the memory table.\r | |
42 | @retval RETURN_INVALID_PARAMETER Invalid input parameters.\r | |
43 | @retval RETURN_NOT_FOUND Failed to find the memory table.\r | |
44 | \r | |
45 | **/\r | |
46 | RETURN_STATUS\r | |
47 | CbParseCbMemTable (\r | |
48 | IN UINT32 TableId, \r | |
49 | IN VOID** pMemTable,\r | |
50 | IN UINT32* pMemTableSize\r | |
51 | );\r | |
52 | \r | |
53 | /**\r | |
54 | Acquire the acpi table from coreboot\r | |
55 | \r | |
56 | @param pMemTable Pointer to the base address of the memory table\r | |
57 | @param pMemTableSize Pointer to the size of the memory table\r | |
58 | \r | |
59 | @retval RETURN_SUCCESS Successfully find out the memory table.\r | |
60 | @retval RETURN_INVALID_PARAMETER Invalid input parameters.\r | |
61 | @retval RETURN_NOT_FOUND Failed to find the memory table.\r | |
62 | \r | |
63 | **/\r | |
64 | RETURN_STATUS\r | |
65 | CbParseAcpiTable (\r | |
2e1fffce | 66 | IN VOID** pMemTable,\r |
fce4ecd9 MM |
67 | IN UINT32* pMemTableSize\r |
68 | );\r | |
69 | \r | |
70 | /**\r | |
71 | Acquire the smbios table from coreboot\r | |
72 | \r | |
73 | @param pMemTable Pointer to the base address of the memory table\r | |
74 | @param pMemTableSize Pointer to the size of the memory table\r | |
75 | \r | |
76 | @retval RETURN_SUCCESS Successfully find out the memory table.\r | |
77 | @retval RETURN_INVALID_PARAMETER Invalid input parameters.\r | |
78 | @retval RETURN_NOT_FOUND Failed to find the memory table.\r | |
79 | \r | |
80 | **/\r | |
81 | RETURN_STATUS\r | |
82 | CbParseSmbiosTable (\r | |
83 | IN VOID** pMemTable,\r | |
84 | IN UINT32* pMemTableSize\r | |
85 | );\r | |
86 | \r | |
87 | /**\r | |
88 | Find the required fadt information\r | |
89 | \r | |
90 | @param pPmCtrlReg Pointer to the address of power management control register\r | |
91 | @param pPmTimerReg Pointer to the address of power management timer register\r | |
92 | @param pResetReg Pointer to the address of system reset register\r | |
93 | @param pResetValue Pointer to the value to be writen to the system reset register\r | |
cb3e201f GD |
94 | @param pPmEvtReg Pointer to the address of power management event register\r |
95 | @param pPmGpeEnReg Pointer to the address of power management GPE enable register\r | |
fce4ecd9 MM |
96 | \r |
97 | @retval RETURN_SUCCESS Successfully find out all the required fadt information.\r | |
98 | @retval RETURN_NOT_FOUND Failed to find the fadt table.\r | |
99 | \r | |
100 | **/\r | |
101 | RETURN_STATUS\r | |
102 | CbParseFadtInfo (\r | |
103 | IN UINTN* pPmCtrlReg,\r | |
104 | IN UINTN* pPmTimerReg,\r | |
105 | IN UINTN* pResetReg,\r | |
cb3e201f GD |
106 | IN UINTN* pResetValue,\r |
107 | IN UINTN* pPmEvtReg,\r | |
108 | IN UINTN* pPmGpeEnReg\r | |
fce4ecd9 MM |
109 | );\r |
110 | \r | |
111 | /**\r | |
112 | Find the serial port information\r | |
113 | \r | |
114 | @param pRegBase Pointer to the base address of serial port registers\r | |
115 | @param pRegAccessType Pointer to the access type of serial port registers\r | |
116 | @param pBaudrate Pointer to the serial port baudrate\r | |
117 | \r | |
118 | @retval RETURN_SUCCESS Successfully find the serial port information.\r | |
119 | @retval RETURN_NOT_FOUND Failed to find the serial port information .\r | |
120 | \r | |
121 | **/\r | |
122 | RETURN_STATUS\r | |
123 | CbParseSerialInfo (\r | |
124 | IN UINT32* pRegBase,\r | |
125 | IN UINT32* pRegAccessType,\r | |
126 | IN UINT32* pBaudrate\r | |
127 | );\r | |
128 | \r | |
129 | /**\r | |
130 | Search for the coreboot table header\r | |
131 | \r | |
132 | @param Level Level of the search depth\r | |
133 | @param HeaderPtr Pointer to the pointer of coreboot table header\r | |
134 | \r | |
135 | @retval RETURN_SUCCESS Successfully find the coreboot table header .\r | |
136 | @retval RETURN_NOT_FOUND Failed to find the coreboot table header .\r | |
137 | \r | |
138 | **/\r | |
139 | RETURN_STATUS\r | |
140 | CbParseGetCbHeader (\r | |
141 | IN UINTN Level,\r | |
142 | IN VOID** HeaderPtr\r | |
143 | );\r | |
144 | \r | |
145 | /**\r | |
146 | Find the video frame buffer information\r | |
147 | \r | |
148 | @param pFbInfo Pointer to the FRAME_BUFFER_INFO structure\r | |
149 | \r | |
150 | @retval RETURN_SUCCESS Successfully find the video frame buffer information.\r | |
151 | @retval RETURN_NOT_FOUND Failed to find the video frame buffer information .\r | |
152 | \r | |
153 | **/\r | |
154 | RETURN_STATUS\r | |
155 | CbParseFbInfo (\r | |
156 | IN FRAME_BUFFER_INFO* pFbInfo\r | |
157 | );\r | |
158 | \r |