diff options
author | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-07-30 00:32:15 +0000 |
---|---|---|
committer | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-07-30 00:32:15 +0000 |
commit | 4684b66f261ffb74fa7575ed10df43cc0645a42f (patch) | |
tree | 60aca4f9a2359bab6cb85d445a970ba1acf11b26 /AppPkg/Applications/Sockets/WebServer/BootServicesTable.c | |
parent | d7ce700605e1af0e455e31ec11f19ff21d26b525 (diff) | |
download | edk2-platforms-4684b66f261ffb74fa7575ed10df43cc0645a42f.tar.xz |
Add Socket Library applications.
Modify AppPkg.dsc file to include StdLib.inc which contains the Boilerplate text for Standard Library based Applications.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12062 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'AppPkg/Applications/Sockets/WebServer/BootServicesTable.c')
-rw-r--r-- | AppPkg/Applications/Sockets/WebServer/BootServicesTable.c | 481 |
1 files changed, 481 insertions, 0 deletions
diff --git a/AppPkg/Applications/Sockets/WebServer/BootServicesTable.c b/AppPkg/Applications/Sockets/WebServer/BootServicesTable.c new file mode 100644 index 0000000000..ab0164976f --- /dev/null +++ b/AppPkg/Applications/Sockets/WebServer/BootServicesTable.c @@ -0,0 +1,481 @@ +/*++ + This file contains an 'Intel UEFI Application' and is + licensed for Intel CPUs and chipsets under the terms of your + license agreement with Intel or your vendor. This file may + be modified by the user, subject to additional terms of the + license agreement +--*/ +/*++ + +Copyright (c) 2011 Intel Corporation. All rights reserved +This software and associated documentation (if any) is furnished +under a license and may only be used or copied in accordance +with the terms of the license. Except as permitted by such +license, no part of this software or documentation may be +reproduced, stored in a retrieval system, or transmitted in any +form or by any means without the express written consent of +Intel Corporation. + +--*/ + +/** @file + Display the boot services table + +**/ + +#include <WebServer.h> + +/** + Respond with the boot 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 +BootServicesTablePage ( + IN int SocketFD, + IN WSDT_PORT * pPort, + OUT BOOLEAN * pbDone + ) +{ + EFI_STATUS Status; + + DBG_ENTER ( ); + + // + // Send the boot services page + // + for ( ; ; ) { + // + // Send the page and table header + // + Status = TableHeader ( SocketFD, pPort, L"Boot Services Table", gBS ); + if ( EFI_ERROR ( Status )) { + break; + } + + /// + /// The table header for the EFI Boot Services Table. + /// + Status = EfiTableHeader ( SocketFD, + pPort, + &gBS->Hdr ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Task Priority Services + // + Status = RowPointer ( SocketFD, + pPort, + "RaiseTPL", + (CONST VOID *)gBS->RaiseTPL, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "RestoreTPL", + (CONST VOID *)gBS->RestoreTPL, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Memory Services + // + Status = RowPointer ( SocketFD, + pPort, + "AllocatePages", + (CONST VOID *)gBS->AllocatePages, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "FreePages", + (CONST VOID *)gBS->FreePages, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "GetMemoryMap", + (CONST VOID *)gBS->GetMemoryMap, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "AllocatePool", + (CONST VOID *)gBS->AllocatePool, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "FreePool", + (CONST VOID *)gBS->FreePool, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Event & Timer Services + // + Status = RowPointer ( SocketFD, + pPort, + "CreateEvent", + (CONST VOID *)gBS->CreateEvent, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "SetTimer", + (CONST VOID *)gBS->SetTimer, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "WaitForEvent", + (CONST VOID *)gBS->WaitForEvent, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "SignalEvent", + (CONST VOID *)gBS->SignalEvent, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "CloseEvent", + (CONST VOID *)gBS->CloseEvent, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "CheckEvent", + (CONST VOID *)gBS->CheckEvent, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Protocol Handler Services + // + Status = RowPointer ( SocketFD, + pPort, + "InstallProtocolInterface", + (CONST VOID *)gBS->InstallProtocolInterface, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "ReinstallProtocolInterface", + (CONST VOID *)gBS->ReinstallProtocolInterface, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "UninstallProtocolInterface", + (CONST VOID *)gBS->UninstallProtocolInterface, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "HandleProtocol", + (CONST VOID *)gBS->HandleProtocol, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "Reserved", + (CONST VOID *)gBS->Reserved, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "RegisterProtocolNotify", + (CONST VOID *)gBS->RegisterProtocolNotify, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "LocateHandle", + (CONST VOID *)gBS->LocateHandle, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "LocateDevicePath", + (CONST VOID *)gBS->LocateDevicePath, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "InstallConfigurationTable", + (CONST VOID *)gBS->InstallConfigurationTable, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Image Services + // + Status = RowPointer ( SocketFD, + pPort, + "LoadImage", + (CONST VOID *)gBS->LoadImage, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "StartImage", + (CONST VOID *)gBS->StartImage, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "Exit", + (CONST VOID *)gBS->Exit, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "UnloadImage", + (CONST VOID *)gBS->UnloadImage, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "ExitBootServices", + (CONST VOID *)gBS->ExitBootServices, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Miscellaneous Services + // + Status = RowPointer ( SocketFD, + pPort, + "GetNextMonotonicCount", + (CONST VOID *)gBS->GetNextMonotonicCount, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "Stall", + (CONST VOID *)gBS->Stall, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "SetWatchdogTimer", + (CONST VOID *)gBS->SetWatchdogTimer, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // DriverSupport Services + // + Status = RowPointer ( SocketFD, + pPort, + "ConnectController", + (CONST VOID *)gBS->ConnectController, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "DisconnectController", + (CONST VOID *)gBS->DisconnectController, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Open and Close Protocol Services + // + Status = RowPointer ( SocketFD, + pPort, + "OpenProtocol", + (CONST VOID *)gBS->OpenProtocol, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "CloseProtocol", + (CONST VOID *)gBS->CloseProtocol, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "OpenProtocolInformation", + (CONST VOID *)gBS->OpenProtocolInformation, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Library Services + // + Status = RowPointer ( SocketFD, + pPort, + "ProtocolsPerHandle", + (CONST VOID *)gBS->ProtocolsPerHandle, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "LocateHandleBuffer", + (CONST VOID *)gBS->LocateHandleBuffer, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "LocateProtocol", + (CONST VOID *)gBS->LocateProtocol, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "InstallMultipleProtocolInterfaces", + (CONST VOID *)gBS->InstallMultipleProtocolInterfaces, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "UninstallMultipleProtocolInterfaces", + (CONST VOID *)gBS->UninstallMultipleProtocolInterfaces, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // 32-bit CRC Services + // + Status = RowPointer ( SocketFD, + pPort, + "CalculateCrc32", + (CONST VOID *)gBS->CalculateCrc32, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + + // + // Miscellaneous Services + // + Status = RowPointer ( SocketFD, + pPort, + "CopyMem", + (CONST VOID *)gBS->CopyMem, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "SetMem", + (CONST VOID *)gBS->SetMem, + NULL ); + if ( EFI_ERROR ( Status )) { + break; + } + Status = RowPointer ( SocketFD, + pPort, + "CreateEventEx", + (CONST VOID *)gBS->CreateEventEx, + 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; +} |