summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/hardware/hwvalid.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/hardware/hwvalid.c')
-rw-r--r--sys/contrib/dev/acpica/hardware/hwvalid.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/contrib/dev/acpica/hardware/hwvalid.c b/sys/contrib/dev/acpica/hardware/hwvalid.c
index a715053..f23b269 100644
--- a/sys/contrib/dev/acpica/hardware/hwvalid.c
+++ b/sys/contrib/dev/acpica/hardware/hwvalid.c
@@ -316,6 +316,13 @@ AcpiHwReadPort (
UINT32 i;
+ /* Truncate address to 16 bits if requested */
+
+ if (AcpiGbl_TruncateIoAddresses)
+ {
+ Address &= ACPI_UINT16_MAX;
+ }
+
/* Validate the entire request and perform the I/O */
Status = AcpiHwValidateIoRequest (Address, Width);
@@ -383,6 +390,13 @@ AcpiHwWritePort (
UINT32 i;
+ /* Truncate address to 16 bits if requested */
+
+ if (AcpiGbl_TruncateIoAddresses)
+ {
+ Address &= ACPI_UINT16_MAX;
+ }
+
/* Validate the entire request and perform the I/O */
Status = AcpiHwValidateIoRequest (Address, Width);
OpenPOWER on IntegriCloud