summaryrefslogtreecommitdiff
path: root/source/tools/acpihelp/acpihelp.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/tools/acpihelp/acpihelp.h')
-rw-r--r--source/tools/acpihelp/acpihelp.h74
1 files changed, 62 insertions, 12 deletions
diff --git a/source/tools/acpihelp/acpihelp.h b/source/tools/acpihelp/acpihelp.h
index 939654d3a..493c2dba7 100644
--- a/source/tools/acpihelp/acpihelp.h
+++ b/source/tools/acpihelp/acpihelp.h
@@ -128,6 +128,50 @@
#endif
+/*
+ * Global variables. Defined in ahmain.c only, externed in all other files
+ */
+#undef ACPI_GLOBAL
+#undef ACPI_INIT_GLOBAL
+
+#ifdef DEFINE_AHELP_GLOBALS
+#define ACPI_GLOBAL(type,name) \
+ extern type name; \
+ type name
+
+#define ACPI_INIT_GLOBAL(type,name,value) \
+ type name=value
+
+#else
+#ifndef ACPI_GLOBAL
+#define ACPI_GLOBAL(type,name) \
+ extern type name
+#endif
+
+#ifndef ACPI_INIT_GLOBAL
+#define ACPI_INIT_GLOBAL(type,name,value) \
+ extern type name
+#endif
+#endif
+
+
+#define AH_BUFFER_LENGTH 128
+#define AH_LINE_BUFFER_LENGTH 512
+#define AH_MAX_ASL_LINE_LENGTH 70
+#define AH_MAX_AML_LINE_LENGTH 100
+
+ACPI_GLOBAL (char, Gbl_Buffer[AH_BUFFER_LENGTH]);
+ACPI_GLOBAL (char, Gbl_LineBuffer[AH_LINE_BUFFER_LENGTH]);
+
+
+#define AH_DISPLAY_EXCEPTION(Status, Name) \
+ printf ("%.4X: %s\n", Status, Name)
+
+#define AH_DISPLAY_EXCEPTION_TEXT(Status, Exception) \
+ printf ("%.4X: %-28s (%s)\n", Status,\
+ Exception->Name, Exception->Description)
+
+
typedef enum
{
AH_DECODE_DEFAULT = 0,
@@ -147,10 +191,6 @@ typedef enum
} AH_OPTION_TYPES;
-#define AH_MAX_ASL_LINE_LENGTH 70
-#define AH_MAX_AML_LINE_LENGTH 100
-
-
typedef struct ah_aml_opcode
{
UINT16 OpcodeRangeStart;
@@ -194,14 +234,17 @@ typedef struct ah_directive_info
} AH_DIRECTIVE_INFO;
-extern const AH_AML_OPCODE AmlOpcodeInfo[];
-extern const AH_AML_TYPE AmlTypesInfo[];
-extern const AH_ASL_OPERATOR AslOperatorInfo[];
-extern const AH_ASL_KEYWORD AslKeywordInfo[];
-extern const AH_UUID AcpiUuids[];
-extern const AH_DIRECTIVE_INFO PreprocessorDirectives[];
-extern const AH_TABLE AcpiSupportedTables[];
-extern BOOLEAN AhDisplayAll;
+
+/* Externals for various data tables */
+
+extern const AH_AML_OPCODE Gbl_AmlOpcodeInfo[];
+extern const AH_AML_TYPE Gbl_AmlTypesInfo[];
+extern const AH_ASL_OPERATOR Gbl_AslOperatorInfo[];
+extern const AH_ASL_KEYWORD Gbl_AslKeywordInfo[];
+extern const AH_UUID Gbl_AcpiUuids[];
+extern const AH_DIRECTIVE_INFO Gbl_PreprocessorDirectives[];
+extern const AH_TABLE Gbl_AcpiSupportedTables[];
+
void
AhFindAmlOpcode (
@@ -255,4 +298,11 @@ void
AhDisplayDirectives (
void);
+void
+AhPrintOneField (
+ UINT32 Indent,
+ UINT32 CurrentPosition,
+ UINT32 MaxPosition,
+ const char *Field);
+
#endif /* __ACPIHELP_H */