Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/acpitools/acpidump Put back a Trusted Computing Pla...
details: https://anonhg.NetBSD.org/src/rev/4448c9b7cb47
branches: trunk
changeset: 339987:4448c9b7cb47
user: christos <christos%NetBSD.org@localhost>
date: Wed Aug 19 07:37:17 2015 +0000
description:
Put back a Trusted Computing Platform Alliance table pretty printer.
diffstat:
usr.sbin/acpitools/acpidump/acpi.c | 37 ++++++++++++++++++++++++++++---------
1 files changed, 28 insertions(+), 9 deletions(-)
diffs (63 lines):
diff -r e4940daa69bb -r 4448c9b7cb47 usr.sbin/acpitools/acpidump/acpi.c
--- a/usr.sbin/acpitools/acpidump/acpi.c Wed Aug 19 06:23:35 2015 +0000
+++ b/usr.sbin/acpitools/acpidump/acpi.c Wed Aug 19 07:37:17 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.12 2015/08/18 17:49:49 christos Exp $ */
+/* $NetBSD: acpi.c,v 1.13 2015/08/19 07:37:17 christos Exp $ */
/*-
* Copyright (c) 1998 Doug Rabson
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: acpi.c,v 1.12 2015/08/18 17:49:49 christos Exp $");
+__RCSID("$NetBSD: acpi.c,v 1.13 2015/08/19 07:37:17 christos Exp $");
#include <sys/param.h>
#include <sys/endian.h>
@@ -1667,18 +1667,37 @@
static void
acpi_handle_tcpa(ACPI_TABLE_HEADER *sdp)
{
-#if 0
- ACPI_TABLE_TCPA *tcpa;
+ ACPI_TABLE_TCPA_HDR *tcpah;
+ ACPI_TABLE_TCPA_CLIENT *tcpac;
+ ACPI_TABLE_TCPA_SERVER *tcpas;
printf(BEGIN_COMMENT);
acpi_print_sdt(sdp);
- tcpa = (ACPI_TABLE_TCPA *)sdp;
+ tcpah = (void *)sdp;
+ switch (tcpah->PlatformClass) {
+ case ACPI_TCPA_CLIENT_TABLE:
+ tcpac = (void *)((char *)sdp + sizeof(*tcpah));
+ printf("\tMinimum Length of Event Log Area=%"PRIu32"\n",
+ tcpac->MinimumLogLength);
+ printf("\tPhysical Address of Log Area=0x%08"PRIx64"\n",
+ tcpac->LogAddress);
+ break;
- printf("\tMaximum Length of Event Log Area=%d\n", tcpa->MaxLogLength);
- printf("\tPhysical Address of Log Area=0x%08"PRIx64"\n",
- tcpa->LogAddress);
+ case ACPI_TCPA_SERVER_TABLE:
+ tcpas = (void *)((char *)sdp + sizeof(*tcpah));
+ printf("\tMinimum Length of Event Log Area=%"PRIu64"\n",
+ tcpas->MinimumLogLength);
+ printf("\tPhysical Address of Log Area=0x%08"PRIx64"\n",
+ tcpas->LogAddress);
+ break;
+
+ default:
+ printf ("\tUnknown TCPA Platform Class 0x%X\n",
+ tcpah->PlatformClass);
+ break;
+ }
+
printf(END_COMMENT);
-#endif
}
static void
Home |
Main Index |
Thread Index |
Old Index