summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2018-12-13 14:49:38 -0800
committerRobert Moore <Robert.Moore@intel.com>2018-12-13 14:49:38 -0800
commitf3198c12f2df9d170b3da891a180b774cfe01e59 (patch)
treef60c61c7de149e4f90a2f208ef0a2abb356e3f02
parentf2d091cbf569d675ece26fb83f64ad82d2b6c94d (diff)
downloadacpica-f3198c12f2df9d170b3da891a180b774cfe01e59.tar.gz
Convert more ACPI errors to firmware errors
Also adds a new firmware error function, AcpiBiosException.
-rw-r--r--source/components/dispatcher/dsopcode.c6
-rw-r--r--source/components/executer/exoparg2.c2
-rw-r--r--source/components/utilities/utxferror.c53
-rw-r--r--source/include/acoutput.h2
-rw-r--r--source/include/acpixf.h10
5 files changed, 69 insertions, 4 deletions
diff --git a/source/components/dispatcher/dsopcode.c b/source/components/dispatcher/dsopcode.c
index ca2cd4700..953bb6544 100644
--- a/source/components/dispatcher/dsopcode.c
+++ b/source/components/dispatcher/dsopcode.c
@@ -286,7 +286,7 @@ AcpiDsInitBufferField (
if (BitCount == 0)
{
- ACPI_ERROR ((AE_INFO,
+ ACPI_BIOS_ERROR ((AE_INFO,
"Attempt to CreateField of length zero"));
Status = AE_AML_OPERAND_VALUE;
goto Cleanup;
@@ -352,12 +352,12 @@ AcpiDsInitBufferField (
if ((BitOffset + BitCount) >
(8 * (UINT32) BufferDesc->Buffer.Length))
{
- ACPI_ERROR ((AE_INFO,
+ Status = AE_AML_BUFFER_LIMIT;
+ ACPI_BIOS_EXCEPTION ((AE_INFO, Status,
"Field [%4.4s] at bit offset/length %u/%u "
"exceeds size of target Buffer (%u bits)",
AcpiUtGetNodeName (ResultDesc), BitOffset, BitCount,
8 * (UINT32) BufferDesc->Buffer.Length));
- Status = AE_AML_BUFFER_LIMIT;
goto Cleanup;
}
diff --git a/source/components/executer/exoparg2.c b/source/components/executer/exoparg2.c
index 0693dcbe2..670549fbf 100644
--- a/source/components/executer/exoparg2.c
+++ b/source/components/executer/exoparg2.c
@@ -566,7 +566,7 @@ AcpiExOpcode_2A_1T_1R (
if (ACPI_FAILURE (Status))
{
- ACPI_EXCEPTION ((AE_INFO, Status,
+ ACPI_BIOS_EXCEPTION ((AE_INFO, Status,
"Index (0x%X%8.8X) is beyond end of object (length 0x%X)",
ACPI_FORMAT_UINT64 (Index), (UINT32) Length));
goto Cleanup;
diff --git a/source/components/utilities/utxferror.c b/source/components/utilities/utxferror.c
index 0ca022b81..4bbd1c9ec 100644
--- a/source/components/utilities/utxferror.c
+++ b/source/components/utilities/utxferror.c
@@ -370,6 +370,59 @@ ACPI_EXPORT_SYMBOL (AcpiBiosError)
/*******************************************************************************
*
+ * FUNCTION: AcpiBiosException
+ *
+ * PARAMETERS: ModuleName - Caller's module name (for error output)
+ * LineNumber - Caller's line number (for error output)
+ * Status - Status value to be decoded/formatted
+ * Format - Printf format string + additional args
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Print an "ACPI Firmware Error" message with module/line/version
+ * info as well as decoded ACPI_STATUS.
+ *
+ ******************************************************************************/
+
+void ACPI_INTERNAL_VAR_XFACE
+AcpiBiosException (
+ const char *ModuleName,
+ UINT32 LineNumber,
+ ACPI_STATUS Status,
+ const char *Format,
+ ...)
+{
+ va_list ArgList;
+
+
+ ACPI_MSG_REDIRECT_BEGIN;
+
+ /* For AE_OK, just print the message */
+
+ if (ACPI_SUCCESS (Status))
+ {
+ AcpiOsPrintf (ACPI_MSG_BIOS_ERROR);
+
+ }
+ else
+ {
+ AcpiOsPrintf (ACPI_MSG_BIOS_ERROR "%s, ",
+ AcpiFormatException (Status));
+ }
+
+ va_start (ArgList, Format);
+ AcpiOsVprintf (Format, ArgList);
+ ACPI_MSG_SUFFIX;
+ va_end (ArgList);
+
+ ACPI_MSG_REDIRECT_END;
+}
+
+ACPI_EXPORT_SYMBOL (AcpiBiosException)
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiBiosWarning
*
* PARAMETERS: ModuleName - Caller's module name (for warning output)
diff --git a/source/include/acoutput.h b/source/include/acoutput.h
index 2a4d31574..cb5c01b38 100644
--- a/source/include/acoutput.h
+++ b/source/include/acoutput.h
@@ -347,6 +347,7 @@
#define ACPI_EXCEPTION(plist) AcpiException plist
#define ACPI_ERROR(plist) AcpiError plist
#define ACPI_BIOS_WARNING(plist) AcpiBiosWarning plist
+#define ACPI_BIOS_EXCEPTION(plist) AcpiBiosException plist
#define ACPI_BIOS_ERROR(plist) AcpiBiosError plist
#define ACPI_DEBUG_OBJECT(obj,l,i) AcpiExDoDebugObject(obj,l,i)
@@ -359,6 +360,7 @@
#define ACPI_EXCEPTION(plist)
#define ACPI_ERROR(plist)
#define ACPI_BIOS_WARNING(plist)
+#define ACPI_BIOS_EXCEPTION(plist)
#define ACPI_BIOS_ERROR(plist)
#define ACPI_DEBUG_OBJECT(obj,l,i)
diff --git a/source/include/acpixf.h b/source/include/acpixf.h
index 24deae678..fa8030093 100644
--- a/source/include/acpixf.h
+++ b/source/include/acpixf.h
@@ -1338,6 +1338,16 @@ AcpiBiosError (
...))
ACPI_MSG_DEPENDENT_RETURN_VOID (
+ACPI_PRINTF_LIKE(4)
+void ACPI_INTERNAL_VAR_XFACE
+AcpiBiosException (
+ const char *ModuleName,
+ UINT32 LineNumber,
+ ACPI_STATUS Status,
+ const char *Format,
+ ...))
+
+ACPI_MSG_DEPENDENT_RETURN_VOID (
ACPI_PRINTF_LIKE(3)
void ACPI_INTERNAL_VAR_XFACE
AcpiBiosWarning (