-/**
- @file
- Display the DXE services table
+/** @file
+ Display the DXE services table
- Copyright (c) 2011-2012, Intel Corporation
- All rights reserved. This program and the accompanying materials
- are licensed and made available under the terms and conditions of the BSD License
- which accompanies this distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include <WebServer.h>
-#include <Guid/DxeServices.h>
-#include <pi/PiDxeCis.h>
-
-/**
- Respond with the DXE services table
-
- @param [in] SocketFD The socket's file descriptor to add to the list.
- @param [in] pPort The WSDT_PORT structure address
- @param [out] pbDone Address to receive the request completion status
-
- @retval EFI_SUCCESS The request was successfully processed
-
-**/
-EFI_STATUS
-DxeServicesTablePage (
- IN int SocketFD,
- IN WSDT_PORT * pPort,
- OUT BOOLEAN * pbDone
- )
-{
- EFI_DXE_SERVICES * pDS;
- EFI_STATUS Status;
-
- DBG_ENTER ( );
-
- //
- // Send the DXE services page
- //
- for ( ; ; ) {
- //
- // Get the DXE services table
- //
- Status = EfiGetSystemConfigurationTable (&gEfiDxeServicesTableGuid, (VOID **) &pDS);
- if ( EFI_ERROR ( Status )) {
- break;
- }
-
- //
- // Send the page and table header
- //
- Status = TableHeader ( SocketFD, pPort, L"DXE Services Table", pDS );
- if ( EFI_ERROR ( Status )) {
- break;
- }
-
- ///
- /// The table header for the DXE Services Table.
- /// This header contains the DXE_SERVICES_SIGNATURE and DXE_SERVICES_REVISION values.
- ///
- Status = EfiTableHeader ( SocketFD,
- pPort,
- &pDS->Hdr );
- if ( EFI_ERROR ( Status )) {
- break;
- }
-
- //
- // Global Coherency Domain Services
- //
- Status = RowPointer ( SocketFD,
- pPort,
- "AddMemorySpace",
- (VOID *)pDS->AddMemorySpace,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
- Status = RowPointer ( SocketFD,
- pPort,
- "AllocateMemorySpace",
- (VOID *)pDS->AllocateMemorySpace,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
- Status = RowPointer ( SocketFD,
- pPort,
- "FreeMemorySpace",
- (VOID *)pDS->FreeMemorySpace,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
- Status = RowPointer ( SocketFD,
- pPort,
- "RemoveMemorySpace",
- (VOID *)pDS->RemoveMemorySpace,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
- Status = RowPointer ( SocketFD,
- pPort,
- "GetMemorySpaceDescriptor",
- (VOID *)pDS->GetMemorySpaceDescriptor,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
- Status = RowPointer ( SocketFD,
- pPort,
- "SetMemorySpaceAttributes",
- (VOID *)pDS->SetMemorySpaceAttributes,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
- Status = RowPointer ( SocketFD,
- pPort,
- "GetMemorySpaceMap",
- (VOID *)pDS->GetMemorySpaceMap,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
- Status = RowPointer ( SocketFD,
- pPort,
- "AddIoSpace",
- (VOID *)pDS->AddIoSpace,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
- Status = RowPointer ( SocketFD,
- pPort,
- "AllocateIoSpace",
- (VOID *)pDS->AllocateIoSpace,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
- Status = RowPointer ( SocketFD,
- pPort,
- "FreeIoSpace",
- (VOID *)pDS->FreeIoSpace,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
- Status = RowPointer ( SocketFD,
- pPort,
- "RemoveIoSpace",
- (VOID *)pDS->RemoveIoSpace,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
- Status = RowPointer ( SocketFD,
- pPort,
- "GetIoSpaceDescriptor",
- (VOID *)pDS->GetIoSpaceDescriptor,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
- Status = RowPointer ( SocketFD,
- pPort,
- "GetIoSpaceMap",
- (VOID *)pDS->GetIoSpaceMap,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
-
- //
- // Dispatcher Services
- //
- Status = RowPointer ( SocketFD,
- pPort,
- "Dispatch",
- (VOID *)pDS->Dispatch,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
- Status = RowPointer ( SocketFD,
- pPort,
- "Schedule",
- (VOID *)pDS->Schedule,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
- Status = RowPointer ( SocketFD,
- pPort,
- "Trust",
- (VOID *)pDS->Trust,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
-
- //
- // Service to process a single firmware volume found in a capsule
- //
- Status = RowPointer ( SocketFD,
- pPort,
- "ProcessFirmwareVolume",
- (VOID *)pDS->ProcessFirmwareVolume,
- NULL );
- if ( EFI_ERROR ( Status )) {
- break;
- }
-
- //
- // Build the table trailer
- //
- Status = TableTrailer ( SocketFD,
- pPort,
- pbDone );
- break;
- }
-
- //
- // Return the operation status
- //
- DBG_EXIT_STATUS ( Status );
- return Status;
-}
+ Copyright (c) 2011 - 2012 Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+--*/\r
+#include <WebServer.h>\r
+#include <Guid/DxeServices.h>\r
+#include <Pi/PiDxeCis.h>\r
+\r
+/**\r
+ Respond with the DXE services table\r
+\r
+ @param[in] SocketFD The socket's file descriptor to add to the list.\r
+ @param[in] pPort The WSDT_PORT structure address\r
+ @param[out] pbDone Address to receive the request completion status\r
+\r
+ @retval EFI_SUCCESS The request was successfully processed\r
+\r
+**/\r
+EFI_STATUS\r
+DxeServicesTablePage (\r
+ IN int SocketFD,\r
+ IN WSDT_PORT * pPort,\r
+ OUT BOOLEAN * pbDone\r
+ )\r
+{\r
+ EFI_DXE_SERVICES * pDS;\r
+ EFI_STATUS Status;\r
+\r
+ DBG_ENTER ( );\r
+\r
+ //\r
+ // Send the DXE services page\r
+ //\r
+ for ( ; ; ) {\r
+ //\r
+ // Get the DXE services table\r
+ //\r
+ Status = EfiGetSystemConfigurationTable (&gEfiDxeServicesTableGuid, (VOID **) &pDS);\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Send the page and table header\r
+ //\r
+ Status = TableHeader ( SocketFD, pPort, L"DXE Services Table", pDS );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ ///\r
+ /// The table header for the DXE Services Table.\r
+ /// This header contains the DXE_SERVICES_SIGNATURE and DXE_SERVICES_REVISION values.\r
+ ///\r
+ Status = EfiTableHeader ( SocketFD,\r
+ pPort,\r
+ &pDS->Hdr );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Global Coherency Domain Services\r
+ //\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "AddMemorySpace",\r
+ (VOID *)pDS->AddMemorySpace,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "AllocateMemorySpace",\r
+ (VOID *)pDS->AllocateMemorySpace,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "FreeMemorySpace",\r
+ (VOID *)pDS->FreeMemorySpace,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "RemoveMemorySpace",\r
+ (VOID *)pDS->RemoveMemorySpace,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "GetMemorySpaceDescriptor",\r
+ (VOID *)pDS->GetMemorySpaceDescriptor,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "SetMemorySpaceAttributes",\r
+ (VOID *)pDS->SetMemorySpaceAttributes,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "GetMemorySpaceMap",\r
+ (VOID *)pDS->GetMemorySpaceMap,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "AddIoSpace",\r
+ (VOID *)pDS->AddIoSpace,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "AllocateIoSpace",\r
+ (VOID *)pDS->AllocateIoSpace,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "FreeIoSpace",\r
+ (VOID *)pDS->FreeIoSpace,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "RemoveIoSpace",\r
+ (VOID *)pDS->RemoveIoSpace,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "GetIoSpaceDescriptor",\r
+ (VOID *)pDS->GetIoSpaceDescriptor,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "GetIoSpaceMap",\r
+ (VOID *)pDS->GetIoSpaceMap,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Dispatcher Services\r
+ //\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "Dispatch",\r
+ (VOID *)pDS->Dispatch,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "Schedule",\r
+ (VOID *)pDS->Schedule,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "Trust",\r
+ (VOID *)pDS->Trust,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Service to process a single firmware volume found in a capsule\r
+ //\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "ProcessFirmwareVolume",\r
+ (VOID *)pDS->ProcessFirmwareVolume,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Build the table trailer\r
+ //\r
+ Status = TableTrailer ( SocketFD,\r
+ pPort,\r
+ pbDone );\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Return the operation status\r
+ //\r
+ DBG_EXIT_STATUS ( Status );\r
+ return Status;\r
+}\r