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 DMAR's ANDD (ACPI Name ...
details: https://anonhg.NetBSD.org/src/rev/e0f360cc8465
branches: trunk
changeset: 993826:e0f360cc8465
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Oct 03 09:52:59 2018 +0000
description:
- Decode DMAR's ANDD (ACPI Name Space).
- Add X2APIC_MODE flag of DMAR. Note that Intel's VT-d's document says the
flag's name is DMA_CTRL_PLATFORM_OPT_IN but actbl1.h says it's
DMAR_X2APIC_MODE.
diffstat:
usr.sbin/acpitools/acpidump/acpi.c | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diffs (63 lines):
diff -r 33ef0814abee -r e0f360cc8465 usr.sbin/acpitools/acpidump/acpi.c
--- a/usr.sbin/acpitools/acpidump/acpi.c Wed Oct 03 09:46:11 2018 +0000
+++ b/usr.sbin/acpitools/acpidump/acpi.c Wed Oct 03 09:52:59 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.30 2018/10/03 09:46:11 msaitoh Exp $ */
+/* $NetBSD: acpi.c,v 1.31 2018/10/03 09:52:59 msaitoh Exp $ */
/*-
* Copyright (c) 1998 Doug Rabson
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: acpi.c,v 1.30 2018/10/03 09:46:11 msaitoh Exp $");
+__RCSID("$NetBSD: acpi.c,v 1.31 2018/10/03 09:52:59 msaitoh Exp $");
#include <sys/param.h>
#include <sys/endian.h>
@@ -2520,6 +2520,8 @@
return ("IOAPIC");
case 4:
return ("HPET");
+ case 5:
+ return ("ACPI Name space");
default:
snprintf(typebuf, sizeof(typebuf), "%d", type);
return (typebuf);
@@ -2667,6 +2669,17 @@
printf("\tProximityDomain=0x%08x\n", rhsa->ProximityDomain);
}
+static void
+acpi_handle_dmar_andd(ACPI_DMAR_ANDD *andd)
+{
+
+ printf("\n");
+ printf("\tType=ANDD\n");
+ printf("\tLength=%d\n", andd->Header.Length);
+ printf("\tDeviceNumber=%d\n", andd->DeviceNumber);
+ printf("\tDeviceName=0x%s\n", andd->DeviceName);
+}
+
static int
acpi_handle_dmar_remapping_structure(void *addr, int remaining)
{
@@ -2691,6 +2704,9 @@
case ACPI_DMAR_TYPE_HARDWARE_AFFINITY:
acpi_handle_dmar_rhsa(addr);
break;
+ case ACPI_DMAR_TYPE_NAMESPACE:
+ acpi_handle_dmar_andd(addr);
+ break;
default:
printf("\n");
printf("\tType=%d\n", hdr->Type);
@@ -2721,6 +2737,7 @@
printf("\tFlags=");
PRINTFLAG(dmar->Flags, INTR_REMAP);
PRINTFLAG(dmar->Flags, X2APIC_OPT_OUT);
+ PRINTFLAG(dmar->Flags, X2APIC_MODE);
PRINTFLAG_END();
#undef PRINTFLAG
Home |
Main Index |
Thread Index |
Old Index