3 Display the runtime services table
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
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.
16 #include <WebServer.h>
17 #include <Library/UefiRuntimeServicesTableLib.h>
20 Respond with the runtime services table
22 @param [in] SocketFD The socket's file descriptor to add to the list.
23 @param [in] pPort The WSDT_PORT structure address
24 @param [out] pbDone Address to receive the request completion status
26 @retval EFI_SUCCESS The request was successfully processed
30 RuntimeSservicesTablePage (
41 // Send the runtime services page
45 // Send the page and table header
47 Status
= TableHeader ( SocketFD
, pPort
, L
"Runtime Services Table", gRT
);
48 if ( EFI_ERROR ( Status
)) {
53 /// The table header for the EFI Runtime Services Table.
55 Status
= EfiTableHeader ( SocketFD
,
58 if ( EFI_ERROR ( Status
)) {
65 Status
= RowPointer ( SocketFD
,
70 if ( EFI_ERROR ( Status
)) {
73 Status
= RowPointer ( SocketFD
,
78 if ( EFI_ERROR ( Status
)) {
81 Status
= RowPointer ( SocketFD
,
84 (VOID
*)gRT
->GetWakeupTime
,
86 if ( EFI_ERROR ( Status
)) {
89 Status
= RowPointer ( SocketFD
,
92 (VOID
*)gRT
->SetWakeupTime
,
94 if ( EFI_ERROR ( Status
)) {
99 // Virtual Memory Services
101 Status
= RowPointer ( SocketFD
,
103 "SetVirtualAddressMap",
104 (VOID
*)gRT
->SetVirtualAddressMap
,
106 if ( EFI_ERROR ( Status
)) {
109 Status
= RowPointer ( SocketFD
,
112 (VOID
*)gRT
->ConvertPointer
,
114 if ( EFI_ERROR ( Status
)) {
121 Status
= RowPointer ( SocketFD
,
124 (VOID
*)gRT
->GetVariable
,
126 if ( EFI_ERROR ( Status
)) {
129 Status
= RowPointer ( SocketFD
,
131 "GetNextVariableName",
132 (VOID
*)gRT
->GetNextVariableName
,
134 if ( EFI_ERROR ( Status
)) {
137 Status
= RowPointer ( SocketFD
,
140 (VOID
*)gRT
->SetVariable
,
142 if ( EFI_ERROR ( Status
)) {
147 // Miscellaneous Services
149 Status
= RowPointer ( SocketFD
,
151 "GetNextHighNonotonicCount",
152 (VOID
*)gRT
->GetNextHighMonotonicCount
,
154 if ( EFI_ERROR ( Status
)) {
157 Status
= RowPointer ( SocketFD
,
160 (VOID
*)gRT
->ResetSystem
,
162 if ( EFI_ERROR ( Status
)) {
167 // Determine if the structures supports 2.0 services
169 if ( 2 <= ( gRT
->Hdr
.Revision
>> 16 )) {
171 // UEFI 2.0 Capsule Services
173 Status
= RowPointer ( SocketFD
,
176 (VOID
*)gRT
->UpdateCapsule
,
178 if ( EFI_ERROR ( Status
)) {
181 Status
= RowPointer ( SocketFD
,
183 "QueryCapsuleCapabilities",
184 (VOID
*)gRT
->QueryCapsuleCapabilities
,
186 if ( EFI_ERROR ( Status
)) {
191 // Miscellaneous UEFI 2.0 Service
193 Status
= RowPointer ( SocketFD
,
196 (VOID
*)gRT
->QueryVariableInfo
,
198 if ( EFI_ERROR ( Status
)) {
204 // Build the table trailer
206 Status
= TableTrailer ( SocketFD
,
213 // Return the operation status
215 DBG_EXIT_STATUS ( Status
);