aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/dev/acpica/components/debugger
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/components/debugger')
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbcmds.c61
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbconvert.c4
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbdisply.c2
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbexec.c2
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbfileio.c2
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbhistry.c2
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbinput.c10
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbmethod.c2
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbnames.c12
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbobject.c2
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbstats.c2
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbtest.c2
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbutils.c2
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbxface.c2
14 files changed, 91 insertions, 16 deletions
diff --git a/sys/contrib/dev/acpica/components/debugger/dbcmds.c b/sys/contrib/dev/acpica/components/debugger/dbcmds.c
index 04eecb841ae6..17ec5f342618 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbcmds.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbcmds.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -157,7 +157,6 @@
#include <contrib/dev/acpica/include/acresrc.h>
#include <contrib/dev/acpica/include/actables.h>
-
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbcmds")
@@ -1291,6 +1290,64 @@ AcpiDbDisplayResources (
}
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDbGenerateGed
+ *
+ * PARAMETERS: GedArg - Raw GED number, ascii string
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Simulate firing of a GED
+ *
+ ******************************************************************************/
+
+void
+AcpiDbGenerateInterrupt (
+ char *GsivArg)
+{
+ UINT32 GsivNumber;
+ ACPI_GED_HANDLER_INFO *GedInfo = AcpiGbl_GedHandlerList;
+
+ if (!GedInfo) {
+ AcpiOsPrintf ("No GED handling present\n");
+ }
+
+ GsivNumber = strtoul (GsivArg, NULL, 0);
+
+ while (GedInfo) {
+
+ if (GedInfo->IntId == GsivNumber) {
+ ACPI_OBJECT_LIST ArgList;
+ ACPI_OBJECT Arg0;
+ ACPI_HANDLE EvtHandle = GedInfo->EvtMethod;
+ ACPI_STATUS Status;
+
+ AcpiOsPrintf ("Evaluate GED _EVT (GSIV=%d)\n", GsivNumber);
+
+ if (!EvtHandle) {
+ AcpiOsPrintf ("Undefined _EVT method\n");
+ return;
+ }
+
+ Arg0.Integer.Type = ACPI_TYPE_INTEGER;
+ Arg0.Integer.Value = GsivNumber;
+
+ ArgList.Count = 1;
+ ArgList.Pointer = &Arg0;
+
+ Status = AcpiEvaluateObject (EvtHandle, NULL, &ArgList, NULL);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiOsPrintf ("Could not evaluate _EVT\n");
+ return;
+ }
+
+ }
+ GedInfo = GedInfo->Next;
+ }
+}
+
#if (!ACPI_REDUCED_HARDWARE)
/*******************************************************************************
*
diff --git a/sys/contrib/dev/acpica/components/debugger/dbconvert.c b/sys/contrib/dev/acpica/components/debugger/dbconvert.c
index 6ad7e5983d7e..ed464e25bdbe 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbconvert.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbconvert.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -354,6 +354,8 @@ AcpiDbConvertToPackage (
Elements = ACPI_ALLOCATE_ZEROED (
DB_DEFAULT_PKG_ELEMENTS * sizeof (ACPI_OBJECT));
+ if (!Elements)
+ return (AE_NO_MEMORY);
This = String;
for (i = 0; i < (DB_DEFAULT_PKG_ELEMENTS - 1); i++)
diff --git a/sys/contrib/dev/acpica/components/debugger/dbdisply.c b/sys/contrib/dev/acpica/components/debugger/dbdisply.c
index b0fe0cd8072b..c57a19d0dbdb 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbdisply.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbdisply.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/components/debugger/dbexec.c b/sys/contrib/dev/acpica/components/debugger/dbexec.c
index 05aecc3083d7..38c7496ebba1 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbexec.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbexec.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/components/debugger/dbfileio.c b/sys/contrib/dev/acpica/components/debugger/dbfileio.c
index 49067168fac4..b006ac9d330b 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbfileio.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbfileio.c
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/components/debugger/dbhistry.c b/sys/contrib/dev/acpica/components/debugger/dbhistry.c
index 74922c2d6d18..45d44d11f315 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbhistry.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbhistry.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/components/debugger/dbinput.c b/sys/contrib/dev/acpica/components/debugger/dbinput.c
index 03981ec5c256..e38364448885 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbinput.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbinput.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -264,6 +264,7 @@ enum AcpiExDebuggerCommands
CMD_THREADS,
CMD_TEST,
+ CMD_INTERRUPT,
#endif
};
@@ -345,6 +346,7 @@ static const ACPI_DB_COMMAND_INFO AcpiGbl_DbCommands[] =
{"THREADS", 3},
{"TEST", 1},
+ {"INTERRUPT", 1},
#endif
{NULL, 0}
};
@@ -461,6 +463,7 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] =
{1, " Gpes", "Display info on all GPE devices\n"},
{1, " Sci", "Generate an SCI\n"},
{1, " Sleep [SleepState]", "Simulate sleep/wake sequence(s) (0-5)\n"},
+ {1, " Interrupt <GSIV>", "Simulate an interrupt\n"},
#endif
{0, NULL, NULL}
};
@@ -1263,6 +1266,11 @@ AcpiDbCommandDispatch (
AcpiOsPrintf ("Event command not implemented\n");
break;
+ case CMD_INTERRUPT:
+
+ AcpiDbGenerateInterrupt (AcpiGbl_DbArgs[1]);
+ break;
+
case CMD_GPE:
AcpiDbGenerateGpe (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
diff --git a/sys/contrib/dev/acpica/components/debugger/dbmethod.c b/sys/contrib/dev/acpica/components/debugger/dbmethod.c
index e53901ef3e37..27e572d5ad17 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbmethod.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbmethod.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/components/debugger/dbnames.c b/sys/contrib/dev/acpica/components/debugger/dbnames.c
index 410eb139dd62..fc6a26fe9cdc 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbnames.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbnames.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -774,7 +774,12 @@ AcpiDbWalkForFields (
ACPI_FREE (Buffer.Pointer);
Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
- AcpiEvaluateObject (ObjHandle, NULL, NULL, &Buffer);
+ Status = AcpiEvaluateObject (ObjHandle, NULL, NULL, &Buffer);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiOsPrintf ("Could Not evaluate object %p\n", ObjHandle);
+ return (AE_OK);
+ }
/*
* Since this is a field unit, surround the output in braces
@@ -884,6 +889,9 @@ AcpiDbDisplayObjects (
{
ObjectInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_OBJECT_INFO));
+ if (!ObjectInfo)
+ return (AE_NO_MEMORY);
+
/* Walk the namespace from the root */
(void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
diff --git a/sys/contrib/dev/acpica/components/debugger/dbobject.c b/sys/contrib/dev/acpica/components/debugger/dbobject.c
index bd60776e05ea..0033b61ccab8 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbobject.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbobject.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/components/debugger/dbstats.c b/sys/contrib/dev/acpica/components/debugger/dbstats.c
index 9c32ab631bdc..76295cadd337 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbstats.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbstats.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/components/debugger/dbtest.c b/sys/contrib/dev/acpica/components/debugger/dbtest.c
index 960ad65b8c10..4e0eb486c35b 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbtest.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbtest.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/components/debugger/dbutils.c b/sys/contrib/dev/acpica/components/debugger/dbutils.c
index a98a3a61eeb9..4a39f9aca9e0 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbutils.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbutils.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/components/debugger/dbxface.c b/sys/contrib/dev/acpica/components/debugger/dbxface.c
index 4b932629db2b..2150abc16100 100644
--- a/sys/contrib/dev/acpica/components/debugger/dbxface.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbxface.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2022, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp.
* All rights reserved.
*
* 2. License