]>
Commit | Line | Data |
---|---|---|
6dbd32ca | 1 | /** @file |
2 | Display the DXE services table | |
4684b66f | 3 | |
6dbd32ca | 4 | Copyright (c) 2011 - 2012 Intel Corporation. All rights reserved.<BR>\r |
5 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | --*/\r | |
13 | #include <WebServer.h>\r | |
14 | #include <Guid/DxeServices.h>\r | |
15 | #include <Pi/PiDxeCis.h>\r | |
16 | \r | |
17 | /**\r | |
18 | Respond with the DXE services table\r | |
19 | \r | |
20 | @param[in] SocketFD The socket's file descriptor to add to the list.\r | |
21 | @param[in] pPort The WSDT_PORT structure address\r | |
22 | @param[out] pbDone Address to receive the request completion status\r | |
23 | \r | |
24 | @retval EFI_SUCCESS The request was successfully processed\r | |
25 | \r | |
26 | **/\r | |
27 | EFI_STATUS\r | |
28 | DxeServicesTablePage (\r | |
29 | IN int SocketFD,\r | |
30 | IN WSDT_PORT * pPort,\r | |
31 | OUT BOOLEAN * pbDone\r | |
32 | )\r | |
33 | {\r | |
34 | EFI_DXE_SERVICES * pDS;\r | |
35 | EFI_STATUS Status;\r | |
36 | \r | |
37 | DBG_ENTER ( );\r | |
38 | \r | |
39 | //\r | |
40 | // Send the DXE services page\r | |
41 | //\r | |
42 | for ( ; ; ) {\r | |
43 | //\r | |
44 | // Get the DXE services table\r | |
45 | //\r | |
46 | Status = EfiGetSystemConfigurationTable (&gEfiDxeServicesTableGuid, (VOID **) &pDS);\r | |
47 | if ( EFI_ERROR ( Status )) {\r | |
48 | break;\r | |
49 | }\r | |
50 | \r | |
51 | //\r | |
52 | // Send the page and table header\r | |
53 | //\r | |
54 | Status = TableHeader ( SocketFD, pPort, L"DXE Services Table", pDS );\r | |
55 | if ( EFI_ERROR ( Status )) {\r | |
56 | break;\r | |
57 | }\r | |
58 | \r | |
59 | ///\r | |
60 | /// The table header for the DXE Services Table.\r | |
61 | /// This header contains the DXE_SERVICES_SIGNATURE and DXE_SERVICES_REVISION values.\r | |
62 | ///\r | |
63 | Status = EfiTableHeader ( SocketFD,\r | |
64 | pPort,\r | |
65 | &pDS->Hdr );\r | |
66 | if ( EFI_ERROR ( Status )) {\r | |
67 | break;\r | |
68 | }\r | |
69 | \r | |
70 | //\r | |
71 | // Global Coherency Domain Services\r | |
72 | //\r | |
73 | Status = RowPointer ( SocketFD,\r | |
74 | pPort,\r | |
75 | "AddMemorySpace",\r | |
76 | (VOID *)pDS->AddMemorySpace,\r | |
77 | NULL );\r | |
78 | if ( EFI_ERROR ( Status )) {\r | |
79 | break;\r | |
80 | }\r | |
81 | Status = RowPointer ( SocketFD,\r | |
82 | pPort,\r | |
83 | "AllocateMemorySpace",\r | |
84 | (VOID *)pDS->AllocateMemorySpace,\r | |
85 | NULL );\r | |
86 | if ( EFI_ERROR ( Status )) {\r | |
87 | break;\r | |
88 | }\r | |
89 | Status = RowPointer ( SocketFD,\r | |
90 | pPort,\r | |
91 | "FreeMemorySpace",\r | |
92 | (VOID *)pDS->FreeMemorySpace,\r | |
93 | NULL );\r | |
94 | if ( EFI_ERROR ( Status )) {\r | |
95 | break;\r | |
96 | }\r | |
97 | Status = RowPointer ( SocketFD,\r | |
98 | pPort,\r | |
99 | "RemoveMemorySpace",\r | |
100 | (VOID *)pDS->RemoveMemorySpace,\r | |
101 | NULL );\r | |
102 | if ( EFI_ERROR ( Status )) {\r | |
103 | break;\r | |
104 | }\r | |
105 | Status = RowPointer ( SocketFD,\r | |
106 | pPort,\r | |
107 | "GetMemorySpaceDescriptor",\r | |
108 | (VOID *)pDS->GetMemorySpaceDescriptor,\r | |
109 | NULL );\r | |
110 | if ( EFI_ERROR ( Status )) {\r | |
111 | break;\r | |
112 | }\r | |
113 | Status = RowPointer ( SocketFD,\r | |
114 | pPort,\r | |
115 | "SetMemorySpaceAttributes",\r | |
116 | (VOID *)pDS->SetMemorySpaceAttributes,\r | |
117 | NULL );\r | |
118 | if ( EFI_ERROR ( Status )) {\r | |
119 | break;\r | |
120 | }\r | |
121 | Status = RowPointer ( SocketFD,\r | |
122 | pPort,\r | |
123 | "GetMemorySpaceMap",\r | |
124 | (VOID *)pDS->GetMemorySpaceMap,\r | |
125 | NULL );\r | |
126 | if ( EFI_ERROR ( Status )) {\r | |
127 | break;\r | |
128 | }\r | |
129 | Status = RowPointer ( SocketFD,\r | |
130 | pPort,\r | |
131 | "AddIoSpace",\r | |
132 | (VOID *)pDS->AddIoSpace,\r | |
133 | NULL );\r | |
134 | if ( EFI_ERROR ( Status )) {\r | |
135 | break;\r | |
136 | }\r | |
137 | Status = RowPointer ( SocketFD,\r | |
138 | pPort,\r | |
139 | "AllocateIoSpace",\r | |
140 | (VOID *)pDS->AllocateIoSpace,\r | |
141 | NULL );\r | |
142 | if ( EFI_ERROR ( Status )) {\r | |
143 | break;\r | |
144 | }\r | |
145 | Status = RowPointer ( SocketFD,\r | |
146 | pPort,\r | |
147 | "FreeIoSpace",\r | |
148 | (VOID *)pDS->FreeIoSpace,\r | |
149 | NULL );\r | |
150 | if ( EFI_ERROR ( Status )) {\r | |
151 | break;\r | |
152 | }\r | |
153 | Status = RowPointer ( SocketFD,\r | |
154 | pPort,\r | |
155 | "RemoveIoSpace",\r | |
156 | (VOID *)pDS->RemoveIoSpace,\r | |
157 | NULL );\r | |
158 | if ( EFI_ERROR ( Status )) {\r | |
159 | break;\r | |
160 | }\r | |
161 | Status = RowPointer ( SocketFD,\r | |
162 | pPort,\r | |
163 | "GetIoSpaceDescriptor",\r | |
164 | (VOID *)pDS->GetIoSpaceDescriptor,\r | |
165 | NULL );\r | |
166 | if ( EFI_ERROR ( Status )) {\r | |
167 | break;\r | |
168 | }\r | |
169 | Status = RowPointer ( SocketFD,\r | |
170 | pPort,\r | |
171 | "GetIoSpaceMap",\r | |
172 | (VOID *)pDS->GetIoSpaceMap,\r | |
173 | NULL );\r | |
174 | if ( EFI_ERROR ( Status )) {\r | |
175 | break;\r | |
176 | }\r | |
177 | \r | |
178 | //\r | |
179 | // Dispatcher Services\r | |
180 | //\r | |
181 | Status = RowPointer ( SocketFD,\r | |
182 | pPort,\r | |
183 | "Dispatch",\r | |
184 | (VOID *)pDS->Dispatch,\r | |
185 | NULL );\r | |
186 | if ( EFI_ERROR ( Status )) {\r | |
187 | break;\r | |
188 | }\r | |
189 | Status = RowPointer ( SocketFD,\r | |
190 | pPort,\r | |
191 | "Schedule",\r | |
192 | (VOID *)pDS->Schedule,\r | |
193 | NULL );\r | |
194 | if ( EFI_ERROR ( Status )) {\r | |
195 | break;\r | |
196 | }\r | |
197 | Status = RowPointer ( SocketFD,\r | |
198 | pPort,\r | |
199 | "Trust",\r | |
200 | (VOID *)pDS->Trust,\r | |
201 | NULL );\r | |
202 | if ( EFI_ERROR ( Status )) {\r | |
203 | break;\r | |
204 | }\r | |
205 | \r | |
206 | //\r | |
207 | // Service to process a single firmware volume found in a capsule\r | |
208 | //\r | |
209 | Status = RowPointer ( SocketFD,\r | |
210 | pPort,\r | |
211 | "ProcessFirmwareVolume",\r | |
212 | (VOID *)pDS->ProcessFirmwareVolume,\r | |
213 | NULL );\r | |
214 | if ( EFI_ERROR ( Status )) {\r | |
215 | break;\r | |
216 | }\r | |
217 | \r | |
218 | //\r | |
219 | // Build the table trailer\r | |
220 | //\r | |
221 | Status = TableTrailer ( SocketFD,\r | |
222 | pPort,\r | |
223 | pbDone );\r | |
224 | break;\r | |
225 | }\r | |
226 | \r | |
227 | //\r | |
228 | // Return the operation status\r | |
229 | //\r | |
230 | DBG_EXIT_STATUS ( Status );\r | |
231 | return Status;\r | |
232 | }\r |