aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-02-25 18:00:18 -0500
committerLen Brown <len.brown@intel.com>2009-03-16 00:35:29 -0400
commit7b46ecd5fcebf381a7bde966db352d8fb1b8e944 (patch)
tree852d2bb05ed32e274d63a0a360f00b33c8d21a86
parenta140449584522c3eea1bb381f746d40939e6f62a (diff)
Revert "ACPI: make some IO ports off-limits to AML"
This reverts commit 5ec5d38a1c8af255ffc481c81eef13e9155524b3. because it caused spurious dmesg warmings. We'll implement the check for off-limit ports in a more clever way in the future. http://bugzilla.kernel.org/show_bug.cgi?id=12758 Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/osl.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index b3193ec0a2ef..1e35f342957c 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1317,54 +1317,6 @@ acpi_os_validate_interface (char *interface)
1317 return AE_SUPPORT; 1317 return AE_SUPPORT;
1318} 1318}
1319 1319
1320#ifdef CONFIG_X86
1321
1322struct aml_port_desc {
1323 uint start;
1324 uint end;
1325 char* name;
1326 char warned;
1327};
1328
1329static struct aml_port_desc aml_invalid_port_list[] = {
1330 {0x20, 0x21, "PIC0", 0},
1331 {0xA0, 0xA1, "PIC1", 0},
1332 {0x4D0, 0x4D1, "ELCR", 0}
1333};
1334
1335/*
1336 * valid_aml_io_address()
1337 *
1338 * if valid, return true
1339 * else invalid, warn once, return false
1340 */
1341static bool valid_aml_io_address(uint address, uint length)
1342{
1343 int i;
1344 int entries = sizeof(aml_invalid_port_list) / sizeof(struct aml_port_desc);
1345
1346 for (i = 0; i < entries; ++i) {
1347 if ((address >= aml_invalid_port_list[i].start &&
1348 address <= aml_invalid_port_list[i].end) ||
1349 (address + length >= aml_invalid_port_list[i].start &&
1350 address + length <= aml_invalid_port_list[i].end))
1351 {
1352 if (!aml_invalid_port_list[i].warned)
1353 {
1354 printk(KERN_ERR "ACPI: Denied BIOS AML access"
1355 " to invalid port 0x%x+0x%x (%s)\n",
1356 address, length,
1357 aml_invalid_port_list[i].name);
1358 aml_invalid_port_list[i].warned = 1;
1359 }
1360 return false; /* invalid */
1361 }
1362 }
1363 return true; /* valid */
1364}
1365#else
1366static inline bool valid_aml_io_address(uint address, uint length) { return true; }
1367#endif
1368/****************************************************************************** 1320/******************************************************************************
1369 * 1321 *
1370 * FUNCTION: acpi_os_validate_address 1322 * FUNCTION: acpi_os_validate_address
@@ -1394,8 +1346,6 @@ acpi_os_validate_address (
1394 1346
1395 switch (space_id) { 1347 switch (space_id) {
1396 case ACPI_ADR_SPACE_SYSTEM_IO: 1348 case ACPI_ADR_SPACE_SYSTEM_IO:
1397 if (!valid_aml_io_address(address, length))
1398 return AE_AML_ILLEGAL_ADDRESS;
1399 case ACPI_ADR_SPACE_SYSTEM_MEMORY: 1349 case ACPI_ADR_SPACE_SYSTEM_MEMORY:
1400 /* Only interference checks against SystemIO and SytemMemory 1350 /* Only interference checks against SystemIO and SytemMemory
1401 are needed */ 1351 are needed */