aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/osl.c')
-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 2b6c5902825..eb8980d6736 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -1324,54 +1324,6 @@ acpi_os_validate_interface (char *interface)
1324 return AE_SUPPORT; 1324 return AE_SUPPORT;
1325} 1325}
1326 1326
1327#ifdef CONFIG_X86
1328
1329struct aml_port_desc {
1330 uint start;
1331 uint end;
1332 char* name;
1333 char warned;
1334};
1335
1336static struct aml_port_desc aml_invalid_port_list[] = {
1337 {0x20, 0x21, "PIC0", 0},
1338 {0xA0, 0xA1, "PIC1", 0},
1339 {0x4D0, 0x4D1, "ELCR", 0}
1340};
1341
1342/*
1343 * valid_aml_io_address()
1344 *
1345 * if valid, return true
1346 * else invalid, warn once, return false
1347 */
1348static bool valid_aml_io_address(uint address, uint length)
1349{
1350 int i;
1351 int entries = sizeof(aml_invalid_port_list) / sizeof(struct aml_port_desc);
1352
1353 for (i = 0; i < entries; ++i) {
1354 if ((address >= aml_invalid_port_list[i].start &&
1355 address <= aml_invalid_port_list[i].end) ||
1356 (address + length >= aml_invalid_port_list[i].start &&
1357 address + length <= aml_invalid_port_list[i].end))
1358 {
1359 if (!aml_invalid_port_list[i].warned)
1360 {
1361 printk(KERN_ERR "ACPI: Denied BIOS AML access"
1362 " to invalid port 0x%x+0x%x (%s)\n",
1363 address, length,
1364 aml_invalid_port_list[i].name);
1365 aml_invalid_port_list[i].warned = 1;
1366 }
1367 return false; /* invalid */
1368 }
1369 }
1370 return true; /* valid */
1371}
1372#else
1373static inline bool valid_aml_io_address(uint address, uint length) { return true; }
1374#endif
1375/****************************************************************************** 1327/******************************************************************************
1376 * 1328 *
1377 * FUNCTION: acpi_os_validate_address 1329 * FUNCTION: acpi_os_validate_address
@@ -1401,8 +1353,6 @@ acpi_os_validate_address (
1401 1353
1402 switch (space_id) { 1354 switch (space_id) {
1403 case ACPI_ADR_SPACE_SYSTEM_IO: 1355 case ACPI_ADR_SPACE_SYSTEM_IO:
1404 if (!valid_aml_io_address(address, length))
1405 return AE_AML_ILLEGAL_ADDRESS;
1406 case ACPI_ADR_SPACE_SYSTEM_MEMORY: 1356 case ACPI_ADR_SPACE_SYSTEM_MEMORY:
1407 /* Only interference checks against SystemIO and SytemMemory 1357 /* Only interference checks against SystemIO and SytemMemory
1408 are needed */ 1358 are needed */