summaryrefslogtreecommitdiff
path: root/hardware/hwvalid.c
diff options
context:
space:
mode:
Diffstat (limited to 'hardware/hwvalid.c')
-rw-r--r--hardware/hwvalid.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/hardware/hwvalid.c b/hardware/hwvalid.c
index 23b508b0a21f..7f2271bad03b 100644
--- a/hardware/hwvalid.c
+++ b/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);