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