summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/acpiexec/aecommon.h5
-rw-r--r--tools/acpiexec/aehandlers.c5
-rw-r--r--tools/acpiexec/aemain.c9
3 files changed, 14 insertions, 5 deletions
diff --git a/tools/acpiexec/aecommon.h b/tools/acpiexec/aecommon.h
index 3ad0d0f4064a8..53f7a17bace79 100644
--- a/tools/acpiexec/aecommon.h
+++ b/tools/acpiexec/aecommon.h
@@ -135,8 +135,9 @@
#include "acinterp.h"
#include "acapps.h"
-extern FILE *AcpiGbl_DebugFile;
-extern BOOLEAN AcpiGbl_IgnoreErrors;
+extern FILE *AcpiGbl_DebugFile;
+extern BOOLEAN AcpiGbl_IgnoreErrors;
+extern UINT8 AcpiGbl_RegionFillValue;
typedef struct ae_table_desc
diff --git a/tools/acpiexec/aehandlers.c b/tools/acpiexec/aehandlers.c
index 9e00f5b30f5f0..ae57483c49f03 100644
--- a/tools/acpiexec/aehandlers.c
+++ b/tools/acpiexec/aehandlers.c
@@ -877,7 +877,10 @@ AeRegionHandler (
return AE_NO_MEMORY;
}
- ACPI_MEMSET (RegionElement->Buffer, 0, Length);
+ /* Initialize the region with the default fill value */
+
+ ACPI_MEMSET (RegionElement->Buffer, AcpiGbl_RegionFillValue, Length);
+
RegionElement->Address = BaseAddress;
RegionElement->Length = Length;
RegionElement->SpaceId = SpaceId;
diff --git a/tools/acpiexec/aemain.c b/tools/acpiexec/aemain.c
index 1a2dd7cdb3678..777c5741e739f 100644
--- a/tools/acpiexec/aemain.c
+++ b/tools/acpiexec/aemain.c
@@ -123,6 +123,7 @@
ACPI_MODULE_NAME ("aemain")
UINT8 AcpiGbl_BatchMode = 0;
+UINT8 AcpiGbl_RegionFillValue = 0;
BOOLEAN AcpiGbl_IgnoreErrors = FALSE;
BOOLEAN AcpiGbl_DbOpt_NoRegionSupport = FALSE;
BOOLEAN AcpiGbl_DebugTimeout = FALSE;
@@ -134,8 +135,7 @@ char *FileList[ASL_MAX_FILES];
int FileCount;
-
-#define AE_SUPPORTED_OPTIONS "?ab:de^ghimo:rstvx:z"
+#define AE_SUPPORTED_OPTIONS "?ab:de^f:ghimo:rstvx:z"
/******************************************************************************
@@ -160,6 +160,7 @@ usage (void)
printf (" -a Do not abort methods on error\n");
printf (" -b <CommandLine> Batch mode command execution\n");
printf (" -e [Method] Batch mode method execution\n");
+ printf (" -f <Value> Specify OpRegion initialization fill value\n");
printf (" -i Do not run STA/INI methods during init\n");
printf (" -m Display final memory use statistics\n");
printf (" -o <OutputFile> Send output to this file\n");
@@ -497,6 +498,10 @@ main (
}
break;
+ case 'f':
+ AcpiGbl_RegionFillValue = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
+ break;
+
case 'g':
AcpiGbl_DbOpt_tables = TRUE;
AcpiGbl_DbFilename = NULL;