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 Decode Boot Graghics Resource Ta...
details: https://anonhg.NetBSD.org/src/rev/21f448461747
branches: trunk
changeset: 445598:21f448461747
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Nov 05 07:39:57 2018 +0000
description:
Decode Boot Graghics Resource Table (BGRT).
diffstat:
usr.sbin/acpitools/acpidump/acpi.c | 38 ++++++++++++++++++++++++++++++++-
usr.sbin/acpitools/acpidump/acpidump.8 | 5 ++-
2 files changed, 39 insertions(+), 4 deletions(-)
diffs (99 lines):
diff -r 714a000fc58c -r 21f448461747 usr.sbin/acpitools/acpidump/acpi.c
--- a/usr.sbin/acpitools/acpidump/acpi.c Mon Nov 05 04:08:39 2018 +0000
+++ b/usr.sbin/acpitools/acpidump/acpi.c Mon Nov 05 07:39:57 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.39 2018/11/01 03:08:46 msaitoh Exp $ */
+/* $NetBSD: acpi.c,v 1.40 2018/11/05 07:39:57 msaitoh Exp $ */
/*-
* Copyright (c) 1998 Doug Rabson
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: acpi.c,v 1.39 2018/11/01 03:08:46 msaitoh Exp $");
+__RCSID("$NetBSD: acpi.c,v 1.40 2018/11/05 07:39:57 msaitoh Exp $");
#include <sys/param.h>
#include <sys/endian.h>
@@ -86,6 +86,7 @@
static void acpi_print_local_nmi(u_int lint, uint16_t mps_flags);
static void acpi_print_madt(ACPI_SUBTABLE_HEADER *mp);
static void acpi_handle_bert(ACPI_TABLE_HEADER *sdp);
+static void acpi_handle_bgrt(ACPI_TABLE_HEADER *sdp);
static void acpi_handle_boot(ACPI_TABLE_HEADER *sdp);
static void acpi_handle_cpep(ACPI_TABLE_HEADER *sdp);
static void acpi_handle_csrt(ACPI_TABLE_HEADER *sdp);
@@ -1222,6 +1223,37 @@
}
static void
+acpi_handle_bgrt(ACPI_TABLE_HEADER *sdp)
+{
+ ACPI_TABLE_BGRT *bgrt;
+ unsigned int degree;
+
+ printf(BEGIN_COMMENT);
+ acpi_print_sdt(sdp);
+ bgrt = (ACPI_TABLE_BGRT *)sdp;
+
+ printf("\tVersion=%hu\n", bgrt->Version);
+ degree = ((unsigned int)(bgrt->Status & ACPI_BGRT_ORIENTATION_OFFSET)
+ >> 1) * 90;
+ printf("\tDegree=%u\n", degree);
+ printf("\tDisplayed=%hhu\n", bgrt->Status & ACPI_BGRT_DISPLAYED);
+ printf("\tImage Type=");
+ switch (bgrt->ImageType) {
+ case 0:
+ printf("Bitmap\n");
+ break;
+ default:
+ printf("reserved (0x%hhx)\n", bgrt->ImageType);
+ break;
+ }
+ printf("\tImage Address=0x%"PRIx64"\n", bgrt->ImageAddress);
+ printf("\tImage Offset X=0x%08x\n", bgrt->ImageOffsetX);
+ printf("\tImage Offset Y=0x%08x\n", bgrt->ImageOffsetY);
+
+ printf(END_COMMENT);
+}
+
+static void
acpi_handle_boot(ACPI_TABLE_HEADER *sdp)
{
ACPI_TABLE_BOOT *boot;
@@ -3896,6 +3928,8 @@
acpi_handle_fadt(sdp);
else if (!memcmp(sdp->Signature, ACPI_SIG_BERT, 4))
acpi_handle_bert(sdp);
+ else if (!memcmp(sdp->Signature, ACPI_SIG_BGRT, 4))
+ acpi_handle_bgrt(sdp);
else if (!memcmp(sdp->Signature, ACPI_SIG_BOOT, 4))
acpi_handle_boot(sdp);
else if (!memcmp(sdp->Signature, ACPI_SIG_CPEP, 4))
diff -r 714a000fc58c -r 21f448461747 usr.sbin/acpitools/acpidump/acpidump.8
--- a/usr.sbin/acpitools/acpidump/acpidump.8 Mon Nov 05 04:08:39 2018 +0000
+++ b/usr.sbin/acpitools/acpidump/acpidump.8 Mon Nov 05 07:39:57 2018 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: acpidump.8,v 1.13 2018/11/01 03:08:46 msaitoh Exp $
+.\" $NetBSD: acpidump.8,v 1.14 2018/11/05 07:39:57 msaitoh Exp $
.\" ACPI (ACPI Package)
.\"
.\" Copyright (c) 1999 Doug Rabson <dfr%FreeBSD.org@localhost>
@@ -30,7 +30,7 @@
.\"
.\" $FreeBSD: head/usr.sbin/acpi/acpidump/acpidump.8 267668 2014-06-20 09:57:27Z bapt $
.\"
-.Dd November 1, 2018
+.Dd November 5, 2018
.Dt ACPIDUMP 8
.Os
.Sh NAME
@@ -97,6 +97,7 @@
.Bl -tag -offset indent -width 12345 -compact
.It APIC
.It BERT
+.It BGRT
.It BOOT
.It CPEP
.It CSRT
Home |
Main Index |
Thread Index |
Old Index