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