/*++
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 system table
**/
#include <WebServer.h>
/**
Display the EFI Table Header
@param [in] SocketFD The socket's file descriptor to add to the list.
@param [in] pPort The WSDT_PORT structure address
@param [in] pHeader Address of the EFI_TABLE_HEADER structure
@retval EFI_SUCCESS The request was successfully processed
**/
)
{
DBG_ENTER ( );
//
// Send the handles page
//
for ( ; ; ) {
///
/// A 64-bit signature that identifies the type of table that follows.
/// Unique signatures have been generated for the EFI System Table,
/// the EFI Boot Services Table, and the EFI Runtime Services Table.
///
"Hdr.Signature",
NULL );
break;
}
///
/// The revision of the EFI Specification to which this table
/// conforms. The upper 16 bits of this field contain the major
/// revision value, and the lower 16 bits contain the minor revision
/// value. The minor revision values are limited to the range of 00..99.
///
"Hdr.Revision",
break;
}
///
/// The size, in bytes, of the entire table including the EFI_TABLE_HEADER.
///
"Hdr.HeaderSize",
pHeader->HeaderSize );
break;
}
///
/// The 32-bit CRC for the entire table. This value is computed by
/// setting this field to 0, and computing the 32-bit CRC for HeaderSize bytes.
///
"Hdr.CRC",
NULL );
break;
}
///
/// Reserved field that must be set to 0.
///
"Hdr.Reserved",
NULL );
break;
}
//
// Return the operation status
//
DBG_EXIT_STATUS ( Status );
return Status;
}
/**
Display a row containing a decimal value
@param [in] SocketFD The socket's file descriptor to add to the list.
@param [in] pPort The WSDT_PORT structure address
@param [in] pName Address of a zero terminated name string
@param [in] Value The value to display
@retval EFI_SUCCESS The request was successfully processed
**/
)
{
DBG_ENTER ( );
//
//
for ( ; ; ) {
"<tr><td>" );
break;
}
pName );
break;
}
"</td><td><code>" );
break;
}
Value );
break;
}
"</code></td></tr>\r\n" );
break;
}
//
// Return the operation status
//
DBG_EXIT_STATUS ( Status );
return Status;
}
/**
Display a row containing a hex value
@param [in] SocketFD The socket's file descriptor to add to the list.
@param [in] pPort The WSDT_PORT structure address
@param [in] pName Address of a zero terminated name string
@param [in] Value The value to display
@param [in] pWebPage Address of a zero terminated web page name
@retval EFI_SUCCESS The request was successfully processed
**/
)
{
DBG_ENTER ( );
//
//
for ( ; ; ) {
"<tr><td>" );
break;
}
pName );
break;
}
"</td><td><code>0x" );
break;
}
"<a target=\"_blank\" href=\"" );
break;
}
pWebPage );
break;
}
"\">" );
break;
}
}
Value );
break;
}
"</a>" );
break;
}
}
"</code></td></tr>\r\n" );
break;
}
//
// Return the operation status
//
DBG_EXIT_STATUS ( Status );
return Status;
}
/**
Display a row containing a pointer
@param [in] SocketFD The socket's file descriptor to add to the list.
@param [in] pPort The WSDT_PORT structure address
@param [in] pName Address of a zero terminated name string
@param [in] pAddress The address to display
@param [in] pWebPage Address of a zero terminated web page name
@retval EFI_SUCCESS The request was successfully processed
**/
)
{
DBG_ENTER ( );
//
//
for ( ; ; ) {
"<tr><td>" );
break;
}
pName );
break;
}
"</td><td><code>" );
break;
}
"<a target=\"_blank\" href=\"" );
break;
}
pWebPage );
break;
}
"\">" );
break;
}
}
"0x" );
break;
}
sizeof ( pAddress ) * 8,
break;
}
"</a>" );
break;
}
}
"</code></td></tr>\r\n" );
break;
}
//
// Return the operation status
//
DBG_EXIT_STATUS ( Status );
return Status;
}
/**
Display a row containing a revision
@param [in] SocketFD The socket's file descriptor to add to the list.
@param [in] pPort The WSDT_PORT structure address
@param [in] pName Address of a zero terminated name string
@param [in] Revision The revision to display
@retval EFI_SUCCESS The request was successfully processed
**/
)
{
DBG_ENTER ( );
//
//
for ( ; ; ) {
"<tr><td>" );
break;
}
pName );
break;
}
"</td><td><code>" );
break;
}
Revision >> 16 );
break;
}
'.' );
break;
}
Revision & 0xFFFF );
break;
}
"</code></td></tr>\r\n" );
break;
}
//
// Return the operation status
//
DBG_EXIT_STATUS ( Status );
return Status;
}
/**
Display a row containing a unicode string
@param [in] SocketFD The socket's file descriptor to add to the list.
@param [in] pPort The WSDT_PORT structure address
@param [in] pName Address of a zero terminated name string
@param [in] pString Address of a zero terminated unicode string
@retval EFI_SUCCESS The request was successfully processed
**/
)
{
DBG_ENTER ( );
//
//
for ( ; ; ) {
"<tr><td>" );
break;
}
pName );
break;
}
"</td><td>" );
break;
}
pString );
break;
}
"</td></tr>\r\n" );
break;
}
//
// Return the operation status
//
DBG_EXIT_STATUS ( Status );
return Status;
}
/**
Start the table page
@param [in] SocketFD The socket's file descriptor to add to the list.
@param [in] pPort The WSDT_PORT structure address
@param [in] pName Address of a zero terminated name string
@param [in] pTable Address of the table
@retval EFI_SUCCESS The request was successfully processed
**/
)
{
DBG_ENTER ( );
//
//
for ( ; ; ) {
//
// Send the page header
//
break;
}
//
// Build the table header
//
"<h1>" );
break;
}
pName );
break;
}
": 0x" );
break;
}
sizeof ( pTable ) * 8,
break;
}
}
"</h1>\r\n"
"<table border=\"1\">\r\n"
" <tr bgcolor=\"c0c0ff\"><th>Field Name</th><th>Value</th></tr>\r\n" );
break;
}
//
// Return the operation status
//
DBG_EXIT_STATUS ( Status );
return Status;
}
/**
End the table page
@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
**/
)
{
DBG_ENTER ( );
//
//
for ( ; ; ) {
//
// Build the table trailer
//
"</table>\r\n" );
break;
}
//
// Send the page trailer
//
break;
}
//
// Return the operation status
//
DBG_EXIT_STATUS ( Status );
return Status;
}
/**
Respond with the system 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
**/
)
{
DBG_ENTER ( );
//
// Send the system table page
//
for ( ; ; ) {
//
// Send the page and table header
//
break;
}
///
/// The table header for the EFI System Table.
///
break;
}
///
/// A pointer to a null terminated string that identifies the vendor
/// that produces the system firmware for the platform.
///
"FirmwareVendor",
gST->FirmwareVendor );
break;
}
///
/// A firmware vendor specific value that identifies the revision
/// of the system firmware for the platform.
///
"FirmwareRevision",
gST->FirmwareRevision );
break;
}
///
/// The handle for the active console input device. This handle must support
/// EFI_SIMPLE_TEXT_INPUT_PROTOCOL and EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.
///
"ConsoleInHandle",
NULL );
break;
}
///
/// A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL interface that is
/// associated with ConsoleInHandle.
///
"ConIn",
NULL );
break;
}
///
/// The handle for the active console output device.
///
"ConsoleOutHandle",
NULL );
break;
}
///
/// A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface
/// that is associated with ConsoleOutHandle.
///
"ConOut",
NULL );
break;
}
///
/// The handle for the active standard error console device.
/// This handle must support the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.
///
"StandardErrorHandle",
NULL );
break;
}
///
/// A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface
/// that is associated with StandardErrorHandle.
///
"StdErr",
NULL );
break;
}
///
/// A pointer to the EFI Runtime Services Table.
///
"RuntimeServices",
///
/// A pointer to the EFI Boot Services Table.
///
"BootServices",
break;
}
///
/// The number of system configuration tables in the buffer ConfigurationTable.
///
"NumberOfTableEntries",
break;
}
///
/// A pointer to the system configuration tables.
/// The number of entries in the table is NumberOfTableEntries.
///
"ConfigurationTable",
break;
}
//
// Build the table trailer
//
pbDone );
break;
}
//
// Return the operation status
//
DBG_EXIT_STATUS ( Status );
return Status;
}