-/*++\r
- This file contains an 'Intel UEFI Application' and is\r
- licensed for Intel CPUs and chipsets under the terms of your\r
- license agreement with Intel or your vendor. This file may\r
- be modified by the user, subject to additional terms of the\r
- license agreement\r
---*/\r
-/*++\r
-\r
-Copyright (c) 2011 Intel Corporation. All rights reserved\r
-This software and associated documentation (if any) is furnished\r
-under a license and may only be used or copied in accordance\r
-with the terms of the license. Except as permitted by such\r
-license, no part of this software or documentation may be\r
-reproduced, stored in a retrieval system, or transmitted in any\r
-form or by any means without the express written consent of\r
-Intel Corporation.\r
-\r
---*/\r
-\r
-/** @file\r
- Display the runtime services table\r
+/**\r
+ @file\r
+ Display the ACPI tables\r
+\r
+ Copyright (c) 2011-2012, Intel Corporation\r
+ All rights reserved. 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.php\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
**/\r
\r
} ACPI_RSDT;\r
\r
\r
+typedef struct {\r
+ UINT32 Signature; // 0\r
+ UINT32 Length; // 4\r
+} ACPI_UNKNOWN;\r
+\r
#pragma pack()\r
\r
\r
\r
\r
CONST TABLE_SIGNATURE mTableId[] = {\r
+ { APIC_SIGNATURE, "APIC", PAGE_ACPI_APIC },\r
+ { BGRT_SIGNATURE, "BGRT", PAGE_ACPI_BGRT },\r
{ DSDT_SIGNATURE, "DSDT", PAGE_ACPI_DSDT },\r
- { FADT_SIGNATURE, "FADT", PAGE_ACPI_FADT }\r
+ { FADT_SIGNATURE, "FADT", PAGE_ACPI_FADT },\r
+ { HPET_SIGNATURE, "HPET", PAGE_ACPI_HPET },\r
+ { MCFG_SIGNATURE, "MCFG", PAGE_ACPI_MCFG },\r
+ { SSDT_SIGNATURE, "SSDT", PAGE_ACPI_SSDT },\r
+ { TCPA_SIGNATURE, "TCPA", PAGE_ACPI_TCPA },\r
+ { UEFI_SIGNATURE, "UEFI", PAGE_ACPI_UEFI }\r
};\r
\r
\r
//\r
Status = EfiGetSystemConfigurationTable ( &gEfiAcpiTableGuid, (VOID **)&pRsdp30 );\r
if ( !EFI_ERROR ( Status )) {\r
- pRsdt = (ACPI_RSDT *)pRsdp30->RsdtAddress;\r
+ pRsdt = (ACPI_RSDT *)(UINTN)pRsdp30->RsdtAddress;\r
}\r
else {\r
Status = EfiGetSystemConfigurationTable (&gEfiAcpi10TableGuid, (VOID **)&pRsdp10b );\r
if ( EFI_ERROR ( Status )) {\r
break;\r
}\r
- pRsdt = (ACPI_RSDT *)pRsdp10b->RsdtAddress;\r
+ pRsdt = (ACPI_RSDT *)(UINTN)pRsdp10b->RsdtAddress;\r
}\r
break;\r
}\r
//\r
Status = EfiGetSystemConfigurationTable ( &gEfiAcpiTableGuid, (VOID **)&pRsdp30 );\r
if ( !EFI_ERROR ( Status )) {\r
- pRsdt = (ACPI_RSDT *)pRsdp30->RsdtAddress;\r
+ pRsdt = (ACPI_RSDT *)(UINTN)pRsdp30->RsdtAddress;\r
}\r
else {\r
Status = EfiGetSystemConfigurationTable (&gEfiAcpi10TableGuid, (VOID **)&pRsdp10b );\r
if ( EFI_ERROR ( Status )) {\r
break;\r
}\r
- pRsdt = (ACPI_RSDT *)pRsdp10b->RsdtAddress;\r
+ pRsdt = (ACPI_RSDT *)(UINTN)pRsdp10b->RsdtAddress;\r
}\r
\r
//\r
// The entry is actually a 32-bit physical table address\r
// The first entry in the table is the 32-bit table signature\r
//\r
- pSignature = (UINT32 *)*pEntry;\r
+ pSignature = (UINT32 *)(UINTN)*pEntry;\r
if ( *pSignature == Signature ) {\r
- return (CONST VOID *) *pEntry;\r
+ return (CONST VOID *)(UINTN)*pEntry;\r
}\r
\r
//\r
}\r
\r
\r
+/**\r
+ Respond with the APIC 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
+AcpiApicPage (\r
+ IN int SocketFD,\r
+ IN WSDT_PORT * pPort,\r
+ OUT BOOLEAN * pbDone\r
+ )\r
+{\r
+ CONST ACPI_UNKNOWN * pApic;\r
+ EFI_STATUS Status;\r
+\r
+ DBG_ENTER ( );\r
+\r
+ //\r
+ // Send the APIC page\r
+ //\r
+ for ( ; ; ) {\r
+ //\r
+ // Locate the APIC\r
+ //\r
+ pApic = (ACPI_UNKNOWN *)LocateTable ( APIC_SIGNATURE );\r
+ if ( NULL == pApic ) {\r
+ Status = EFI_NOT_FOUND;\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Send the page and table header\r
+ //\r
+ Status = TableHeader ( SocketFD, pPort, L"APIC Table", pApic );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Display the header\r
+ //\r
+ Status = RowAnsiArray ( SocketFD,\r
+ pPort,\r
+ "Signature",\r
+ sizeof ( pApic->Signature ),\r
+ (CHAR8 *)&pApic->Signature );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowDecimalValue ( SocketFD,\r
+ pPort,\r
+ "Length",\r
+ pApic->Length );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Display the data from the table\r
+ //\r
+ Status = RowDump ( SocketFD,\r
+ pPort,\r
+ "Data",\r
+ pApic->Length - sizeof ( *pApic ) + 1,\r
+ (UINT8 *)( pApic + 1 ));\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
+\r
+\r
+/**\r
+ Respond with the BGRT 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
+AcpiBgrtPage (\r
+ IN int SocketFD,\r
+ IN WSDT_PORT * pPort,\r
+ OUT BOOLEAN * pbDone\r
+ )\r
+{\r
+ CONST ACPI_UNKNOWN * pBgrt;\r
+ EFI_STATUS Status;\r
+\r
+ DBG_ENTER ( );\r
+\r
+ //\r
+ // Send the BGRT page\r
+ //\r
+ for ( ; ; ) {\r
+ //\r
+ // Locate the BGRT\r
+ //\r
+ pBgrt = (ACPI_UNKNOWN *)LocateTable ( BGRT_SIGNATURE );\r
+ if ( NULL == pBgrt ) {\r
+ Status = EFI_NOT_FOUND;\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Send the page and table header\r
+ //\r
+ Status = TableHeader ( SocketFD, pPort, L"BGRT Table", pBgrt );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Display the header\r
+ //\r
+ Status = RowAnsiArray ( SocketFD,\r
+ pPort,\r
+ "Signature",\r
+ sizeof ( pBgrt->Signature ),\r
+ (CHAR8 *)&pBgrt->Signature );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowDecimalValue ( SocketFD,\r
+ pPort,\r
+ "Length",\r
+ pBgrt->Length );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Display the data from the table\r
+ //\r
+ Status = RowDump ( SocketFD,\r
+ pPort,\r
+ "Data",\r
+ pBgrt->Length - sizeof ( *pBgrt ) + 1,\r
+ (UINT8 *)( pBgrt + 1 ));\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
+\r
+\r
/**\r
Respond with the ACPI DSDT table\r
\r
Status = RowPointer ( SocketFD,\r
pPort,\r
"FIRMWARE_CTRL",\r
- (CONST VOID *)pFadt->FirmwareCtrl,\r
+ (CONST VOID *)(UINTN)pFadt->FirmwareCtrl,\r
NULL );\r
if ( EFI_ERROR ( Status )) {\r
break;\r
Status = RowPointer ( SocketFD,\r
pPort,\r
"DSDT",\r
- (CONST VOID *)pFadt->DSDT,\r
+ (CONST VOID *)(UINTN)pFadt->DSDT,\r
( pFadt->DSDT == pFadt->XDsdt ) ? PAGE_ACPI_DSDT : NULL );\r
if ( EFI_ERROR ( Status )) {\r
break;\r
\r
\r
/**\r
- Respond with the ACPI RSDP 1.0b table\r
+ Respond with the HPET 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
\r
**/\r
EFI_STATUS\r
-AcpiRsdp10Page (\r
+AcpiHpetPage (\r
IN int SocketFD,\r
IN WSDT_PORT * pPort,\r
OUT BOOLEAN * pbDone\r
)\r
{\r
- CONST EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER * pRsdp10b;\r
+ CONST ACPI_UNKNOWN * pHpet;\r
EFI_STATUS Status;\r
\r
DBG_ENTER ( );\r
\r
//\r
- // Send the RSDP page\r
+ // Send the HPET page\r
//\r
for ( ; ; ) {\r
//\r
- // Locate the RSDP\r
+ // Locate the HPET\r
//\r
- Status = EfiGetSystemConfigurationTable ( &gEfiAcpi10TableGuid, (VOID **) &pRsdp10b );\r
- if ( EFI_ERROR ( Status )) {\r
+ pHpet = (ACPI_UNKNOWN *)LocateTable ( HPET_SIGNATURE );\r
+ if ( NULL == pHpet ) {\r
+ Status = EFI_NOT_FOUND;\r
break;\r
}\r
\r
//\r
// Send the page and table header\r
//\r
- Status = TableHeader ( SocketFD, pPort, L"RSDP - ACPI 1.0b Root System Description Pointer", pRsdp10b );\r
+ Status = TableHeader ( SocketFD, pPort, L"HPET Table", pHpet );\r
if ( EFI_ERROR ( Status )) {\r
break;\r
}\r
\r
//\r
- // Display the RSDP\r
+ // Display the header\r
//\r
Status = RowAnsiArray ( SocketFD,\r
pPort,\r
"Signature",\r
- sizeof ( pRsdp10b->Signature ),\r
- (CHAR8 *)&pRsdp10b->Signature );\r
- if ( EFI_ERROR ( Status )) {\r
- break;\r
- }\r
- Status = RowHexValue ( SocketFD,\r
- pPort,\r
- "Checksum",\r
- pRsdp10b->Checksum,\r
- NULL );\r
- if ( EFI_ERROR ( Status )) {\r
- break;\r
- }\r
- Status = RowAnsiArray ( SocketFD,\r
- pPort,\r
- "OemId",\r
- sizeof ( pRsdp10b->OemId ),\r
- (CONST CHAR8 *)&pRsdp10b->OemId[ 0 ]);\r
+ sizeof ( pHpet->Signature ),\r
+ (CHAR8 *)&pHpet->Signature );\r
if ( EFI_ERROR ( Status )) {\r
break;\r
}\r
- Status = RowHexValue ( SocketFD,\r
- pPort,\r
- "Reserved",\r
- pRsdp10b->Reserved,\r
- NULL );\r
+ Status = RowDecimalValue ( SocketFD,\r
+ pPort,\r
+ "Length",\r
+ pHpet->Length );\r
if ( EFI_ERROR ( Status )) {\r
break;\r
}\r
- Status = RowPointer ( SocketFD,\r
- pPort,\r
- "RsdtAddress",\r
- (VOID *)pRsdp10b->RsdtAddress,\r
- PAGE_ACPI_RSDT );\r
+\r
+ //\r
+ // Display the data from the table\r
+ //\r
+ Status = RowDump ( SocketFD,\r
+ pPort,\r
+ "Data",\r
+ pHpet->Length - sizeof ( *pHpet ) + 1,\r
+ (UINT8 *)( pHpet + 1 ));\r
if ( EFI_ERROR ( Status )) {\r
break;\r
}\r
\r
\r
/**\r
- Respond with the ACPI RSDP 3.0 table\r
+ Respond with the MCFG 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
\r
**/\r
EFI_STATUS\r
-AcpiRsdp30Page (\r
+AcpiMcfgPage (\r
IN int SocketFD,\r
IN WSDT_PORT * pPort,\r
OUT BOOLEAN * pbDone\r
)\r
{\r
- CONST EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER * pRsdp30;\r
+ CONST ACPI_UNKNOWN * pMcfg;\r
EFI_STATUS Status;\r
\r
DBG_ENTER ( );\r
\r
//\r
- // Send the RSDP page\r
+ // Send the MCFG page\r
//\r
for ( ; ; ) {\r
//\r
- // Locate the RSDP\r
+ // Locate the MCFG\r
//\r
- Status = EfiGetSystemConfigurationTable ( &gEfiAcpiTableGuid, (VOID **) &pRsdp30 );\r
- if ( EFI_ERROR ( Status )) {\r
+ pMcfg = (ACPI_UNKNOWN *)LocateTable ( MCFG_SIGNATURE );\r
+ if ( NULL == pMcfg ) {\r
+ Status = EFI_NOT_FOUND;\r
break;\r
}\r
\r
//\r
// Send the page and table header\r
//\r
- Status = TableHeader ( SocketFD, pPort, L"RSDP - ACPI 3.0 Root System Description Pointer", pRsdp30 );\r
+ Status = TableHeader ( SocketFD, pPort, L"MCFG Table", pMcfg );\r
if ( EFI_ERROR ( Status )) {\r
break;\r
}\r
\r
//\r
- // Display the RSDP\r
+ // Display the header\r
//\r
Status = RowAnsiArray ( SocketFD,\r
pPort,\r
"Signature",\r
- sizeof ( pRsdp30->Signature ),\r
- (CHAR8 *)&pRsdp30->Signature );\r
- if ( EFI_ERROR ( Status )) {\r
- break;\r
- }\r
- Status = RowHexValue ( SocketFD,\r
- pPort,\r
- "Checksum",\r
- pRsdp30->Checksum,\r
- NULL );\r
- if ( EFI_ERROR ( Status )) {\r
- break;\r
- }\r
- Status = RowAnsiArray ( SocketFD,\r
- pPort,\r
- "OemId",\r
- sizeof ( pRsdp30->OemId ),\r
- (CONST CHAR8 *)&pRsdp30->OemId[ 0 ]);\r
- if ( EFI_ERROR ( Status )) {\r
- break;\r
- }\r
- Status = RowHexValue ( SocketFD,\r
- pPort,\r
- "Revision",\r
- pRsdp30->Revision,\r
- NULL );\r
- if ( EFI_ERROR ( Status )) {\r
- break;\r
- }\r
- Status = RowPointer ( SocketFD,\r
- pPort,\r
- "RsdtAddress",\r
- (VOID *)pRsdp30->RsdtAddress,\r
- PAGE_ACPI_RSDT );\r
+ sizeof ( pMcfg->Signature ),\r
+ (CHAR8 *)&pMcfg->Signature );\r
if ( EFI_ERROR ( Status )) {\r
break;\r
}\r
Status = RowDecimalValue ( SocketFD,\r
pPort,\r
"Length",\r
- pRsdp30->Length );\r
+ pMcfg->Length );\r
if ( EFI_ERROR ( Status )) {\r
break;\r
}\r
- Status = RowPointer ( SocketFD,\r
- pPort,\r
- "XsdtAddress",\r
- (VOID *)(UINTN)pRsdp30->XsdtAddress,\r
- NULL );\r
+\r
+ //\r
+ // Display the data from the table\r
+ //\r
+ Status = RowDump ( SocketFD,\r
+ pPort,\r
+ "Data",\r
+ pMcfg->Length - sizeof ( *pMcfg ) + 1,\r
+ (UINT8 *)( pMcfg + 1 ));\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
+\r
+\r
+/**\r
+ Respond with the ACPI RSDP 1.0b 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
+AcpiRsdp10Page (\r
+ IN int SocketFD,\r
+ IN WSDT_PORT * pPort,\r
+ OUT BOOLEAN * pbDone\r
+ )\r
+{\r
+ CONST EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_POINTER * pRsdp10b;\r
+ EFI_STATUS Status;\r
+\r
+ DBG_ENTER ( );\r
+\r
+ //\r
+ // Send the RSDP page\r
+ //\r
+ for ( ; ; ) {\r
+ //\r
+ // Locate the RSDP\r
+ //\r
+ Status = EfiGetSystemConfigurationTable ( &gEfiAcpi10TableGuid, (VOID **) &pRsdp10b );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Send the page and table header\r
+ //\r
+ Status = TableHeader ( SocketFD, pPort, L"RSDP - ACPI 1.0b Root System Description Pointer", pRsdp10b );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Display the RSDP\r
+ //\r
+ Status = RowAnsiArray ( SocketFD,\r
+ pPort,\r
+ "Signature",\r
+ sizeof ( pRsdp10b->Signature ),\r
+ (CHAR8 *)&pRsdp10b->Signature );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowHexValue ( SocketFD,\r
+ pPort,\r
+ "Checksum",\r
+ pRsdp10b->Checksum,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowAnsiArray ( SocketFD,\r
+ pPort,\r
+ "OemId",\r
+ sizeof ( pRsdp10b->OemId ),\r
+ (CONST CHAR8 *)&pRsdp10b->OemId[ 0 ]);\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowHexValue ( SocketFD,\r
+ pPort,\r
+ "Reserved",\r
+ pRsdp10b->Reserved,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "RsdtAddress",\r
+ (VOID *)(UINTN)pRsdp10b->RsdtAddress,\r
+ PAGE_ACPI_RSDT );\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
+\r
+\r
+/**\r
+ Respond with the ACPI RSDP 3.0 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
+AcpiRsdp30Page (\r
+ IN int SocketFD,\r
+ IN WSDT_PORT * pPort,\r
+ OUT BOOLEAN * pbDone\r
+ )\r
+{\r
+ CONST EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER * pRsdp30;\r
+ EFI_STATUS Status;\r
+\r
+ DBG_ENTER ( );\r
+\r
+ //\r
+ // Send the RSDP page\r
+ //\r
+ for ( ; ; ) {\r
+ //\r
+ // Locate the RSDP\r
+ //\r
+ Status = EfiGetSystemConfigurationTable ( &gEfiAcpiTableGuid, (VOID **) &pRsdp30 );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Send the page and table header\r
+ //\r
+ Status = TableHeader ( SocketFD, pPort, L"RSDP - ACPI 3.0 Root System Description Pointer", pRsdp30 );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Display the RSDP\r
+ //\r
+ Status = RowAnsiArray ( SocketFD,\r
+ pPort,\r
+ "Signature",\r
+ sizeof ( pRsdp30->Signature ),\r
+ (CHAR8 *)&pRsdp30->Signature );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowHexValue ( SocketFD,\r
+ pPort,\r
+ "Checksum",\r
+ pRsdp30->Checksum,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowAnsiArray ( SocketFD,\r
+ pPort,\r
+ "OemId",\r
+ sizeof ( pRsdp30->OemId ),\r
+ (CONST CHAR8 *)&pRsdp30->OemId[ 0 ]);\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowHexValue ( SocketFD,\r
+ pPort,\r
+ "Revision",\r
+ pRsdp30->Revision,\r
+ NULL );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "RsdtAddress",\r
+ (VOID *)(UINTN)pRsdp30->RsdtAddress,\r
+ PAGE_ACPI_RSDT );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowDecimalValue ( SocketFD,\r
+ pPort,\r
+ "Length",\r
+ pRsdp30->Length );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowPointer ( SocketFD,\r
+ pPort,\r
+ "XsdtAddress",\r
+ (VOID *)(UINTN)pRsdp30->XsdtAddress,\r
+ NULL );\r
if ( EFI_ERROR ( Status )) {\r
break;\r
}\r
// The entry is actually a 32-bit physical table address\r
// The first entry in the table is the 32-bit table signature\r
//\r
- TableName[ 0 ] = *(UINT32 *)*pEntry;\r
+ TableName[ 0 ] = *(UINT32 *)(UINTN)*pEntry;\r
pWebPage = SignatureLookup ( &TableName[ 0 ], &pTableName );\r
\r
//\r
Status = RowPointer ( SocketFD,\r
pPort,\r
pTableName,\r
- (VOID *)*pEntry,\r
+ (VOID *)(UINTN)*pEntry,\r
pWebPage );\r
if ( EFI_ERROR ( Status )) {\r
break;\r
}\r
\r
\r
+/**\r
+ Respond with the SSDT 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
+AcpiSsdtPage (\r
+ IN int SocketFD,\r
+ IN WSDT_PORT * pPort,\r
+ OUT BOOLEAN * pbDone\r
+ )\r
+{\r
+ CONST ACPI_UNKNOWN * pSsdt;\r
+ EFI_STATUS Status;\r
+\r
+ DBG_ENTER ( );\r
+\r
+ //\r
+ // Send the SSDT page\r
+ //\r
+ for ( ; ; ) {\r
+ //\r
+ // Locate the SSDT\r
+ //\r
+ pSsdt = (ACPI_UNKNOWN *)LocateTable ( SSDT_SIGNATURE );\r
+ if ( NULL == pSsdt ) {\r
+ Status = EFI_NOT_FOUND;\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Send the page and table header\r
+ //\r
+ Status = TableHeader ( SocketFD, pPort, L"SSDT Table", pSsdt );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Display the header\r
+ //\r
+ Status = RowAnsiArray ( SocketFD,\r
+ pPort,\r
+ "Signature",\r
+ sizeof ( pSsdt->Signature ),\r
+ (CHAR8 *)&pSsdt->Signature );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowDecimalValue ( SocketFD,\r
+ pPort,\r
+ "Length",\r
+ pSsdt->Length );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Display the data from the table\r
+ //\r
+ Status = RowDump ( SocketFD,\r
+ pPort,\r
+ "Data",\r
+ pSsdt->Length - sizeof ( *pSsdt ) + 1,\r
+ (UINT8 *)( pSsdt + 1 ));\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
+\r
+\r
+/**\r
+ Respond with the TCPA 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
+AcpiTcpaPage (\r
+ IN int SocketFD,\r
+ IN WSDT_PORT * pPort,\r
+ OUT BOOLEAN * pbDone\r
+ )\r
+{\r
+ CONST ACPI_UNKNOWN * pTcpa;\r
+ EFI_STATUS Status;\r
+\r
+ DBG_ENTER ( );\r
+\r
+ //\r
+ // Send the TCPA page\r
+ //\r
+ for ( ; ; ) {\r
+ //\r
+ // Locate the TCPA\r
+ //\r
+ pTcpa = (ACPI_UNKNOWN *)LocateTable ( TCPA_SIGNATURE );\r
+ if ( NULL == pTcpa ) {\r
+ Status = EFI_NOT_FOUND;\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Send the page and table header\r
+ //\r
+ Status = TableHeader ( SocketFD, pPort, L"TCPA Table", pTcpa );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Display the header\r
+ //\r
+ Status = RowAnsiArray ( SocketFD,\r
+ pPort,\r
+ "Signature",\r
+ sizeof ( pTcpa->Signature ),\r
+ (CHAR8 *)&pTcpa->Signature );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowDecimalValue ( SocketFD,\r
+ pPort,\r
+ "Length",\r
+ pTcpa->Length );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Display the data from the table\r
+ //\r
+ Status = RowDump ( SocketFD,\r
+ pPort,\r
+ "Data",\r
+ pTcpa->Length - sizeof ( *pTcpa ) + 1,\r
+ (UINT8 *)( pTcpa + 1 ));\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
+\r
+\r
+/**\r
+ Respond with the UEFI 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
+AcpiUefiPage (\r
+ IN int SocketFD,\r
+ IN WSDT_PORT * pPort,\r
+ OUT BOOLEAN * pbDone\r
+ )\r
+{\r
+ CONST ACPI_UNKNOWN * pUefi;\r
+ EFI_STATUS Status;\r
+\r
+ DBG_ENTER ( );\r
+\r
+ //\r
+ // Send the UEFI page\r
+ //\r
+ for ( ; ; ) {\r
+ //\r
+ // Locate the UEFI\r
+ //\r
+ pUefi = (ACPI_UNKNOWN *)LocateTable ( UEFI_SIGNATURE );\r
+ if ( NULL == pUefi ) {\r
+ Status = EFI_NOT_FOUND;\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Send the page and table header\r
+ //\r
+ Status = TableHeader ( SocketFD, pPort, L"UEFI Table", pUefi );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Display the header\r
+ //\r
+ Status = RowAnsiArray ( SocketFD,\r
+ pPort,\r
+ "Signature",\r
+ sizeof ( pUefi->Signature ),\r
+ (CHAR8 *)&pUefi->Signature );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+ Status = RowDecimalValue ( SocketFD,\r
+ pPort,\r
+ "Length",\r
+ pUefi->Length );\r
+ if ( EFI_ERROR ( Status )) {\r
+ break;\r
+ }\r
+\r
+ //\r
+ // Display the data from the table\r
+ //\r
+ Status = RowDump ( SocketFD,\r
+ pPort,\r
+ "Data",\r
+ pUefi->Length - sizeof ( *pUefi ) + 1,\r
+ (UINT8 *)( pUefi + 1 ));\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