diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2014-10-02 19:11:18 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2014-10-02 19:11:18 +0000 |
commit | 313a0c13efa638cf248e35eed49f36ec0a1a7f26 (patch) | |
tree | 49241b28d0e1f0a071c6f48d46efb05b092b011e /sys/contrib/dev/acpica/components/hardware | |
parent | 27d6eee170ad3f4c78841505514dc1a9574215c8 (diff) | |
parent | d4e301bc21b6911ed7f5d6a86659c4882fa7ab55 (diff) | |
download | src-313a0c13efa638cf248e35eed49f36ec0a1a7f26.tar.gz src-313a0c13efa638cf248e35eed49f36ec0a1a7f26.zip |
Merge ACPICA 20140926.
Notes
Notes:
svn path=/head/; revision=272444
Diffstat (limited to 'sys/contrib/dev/acpica/components/hardware')
10 files changed, 46 insertions, 31 deletions
diff --git a/sys/contrib/dev/acpica/components/hardware/hwacpi.c b/sys/contrib/dev/acpica/components/hardware/hwacpi.c index 3cd3a446b177..947679589636 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwacpi.c +++ b/sys/contrib/dev/acpica/components/hardware/hwacpi.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/contrib/dev/acpica/components/hardware/hwesleep.c b/sys/contrib/dev/acpica/components/hardware/hwesleep.c index 671780113e23..d125bccb372c 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwesleep.c +++ b/sys/contrib/dev/acpica/components/hardware/hwesleep.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/contrib/dev/acpica/components/hardware/hwgpe.c b/sys/contrib/dev/acpica/components/hardware/hwgpe.c index 99c0de6a21d0..e00aeb24d761 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwgpe.c +++ b/sys/contrib/dev/acpica/components/hardware/hwgpe.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -241,6 +241,14 @@ AcpiHwGetGpeStatus ( return (AE_BAD_PARAMETER); } + /* GPE currently handled? */ + + if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) != + ACPI_GPE_DISPATCH_NONE) + { + LocalEventStatus |= ACPI_EVENT_FLAG_HAS_HANDLER; + } + /* Get the info block for the entire GPE register */ GpeRegisterInfo = GpeEventInfo->RegisterInfo; diff --git a/sys/contrib/dev/acpica/components/hardware/hwpci.c b/sys/contrib/dev/acpica/components/hardware/hwpci.c index a89a3dd831e9..d14bf755987b 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwpci.c +++ b/sys/contrib/dev/acpica/components/hardware/hwpci.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -161,11 +161,12 @@ AcpiHwDerivePciId ( /* Walk the list, updating the PCI device/function/bus numbers */ Status = AcpiHwProcessPciList (PciId, ListHead); - } - /* Always delete the list */ + /* Delete the list */ + + AcpiHwDeletePciList (ListHead); + } - AcpiHwDeletePciList (ListHead); return_ACPI_STATUS (Status); } @@ -213,6 +214,9 @@ AcpiHwBuildPciList ( Status = AcpiGetParent (CurrentDevice, &ParentDevice); if (ACPI_FAILURE (Status)) { + /* Must delete the list before exit */ + + AcpiHwDeletePciList (*ReturnListHead); return (Status); } @@ -227,6 +231,9 @@ AcpiHwBuildPciList ( ListElement = ACPI_ALLOCATE (sizeof (ACPI_PCI_DEVICE)); if (!ListElement) { + /* Must delete the list before exit */ + + AcpiHwDeletePciList (*ReturnListHead); return (AE_NO_MEMORY); } diff --git a/sys/contrib/dev/acpica/components/hardware/hwregs.c b/sys/contrib/dev/acpica/components/hardware/hwregs.c index 9c3f2a95159b..155cb4936352 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwregs.c +++ b/sys/contrib/dev/acpica/components/hardware/hwregs.c @@ -6,7 +6,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -310,17 +310,19 @@ AcpiHwClearAcpiStatus ( Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_STATUS, ACPI_BITMASK_ALL_FIXED_STATUS); + + AcpiOsReleaseLock (AcpiGbl_HardwareLock, LockFlags); + if (ACPI_FAILURE (Status)) { - goto UnlockAndExit; + goto Exit; } /* Clear the GPE Bits in all GPE registers in all GPE blocks */ Status = AcpiEvWalkGpeList (AcpiHwClearGpeBlock, NULL); -UnlockAndExit: - AcpiOsReleaseLock (AcpiGbl_HardwareLock, LockFlags); +Exit: return_ACPI_STATUS (Status); } diff --git a/sys/contrib/dev/acpica/components/hardware/hwsleep.c b/sys/contrib/dev/acpica/components/hardware/hwsleep.c index 0e6691a31aea..d4b346b06a83 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwsleep.c +++ b/sys/contrib/dev/acpica/components/hardware/hwsleep.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -72,7 +72,6 @@ AcpiHwLegacySleep ( UINT32 Pm1aControl; UINT32 Pm1bControl; UINT32 InValue; - UINT32 Retry; ACPI_STATUS Status; @@ -192,7 +191,6 @@ AcpiHwLegacySleep ( /* Wait for transition back to Working State */ - Retry = 1000; do { Status = AcpiReadBitRegister (ACPI_BITREG_WAKE_STATUS, &InValue); @@ -201,18 +199,6 @@ AcpiHwLegacySleep ( return_ACPI_STATUS (Status); } - if (AcpiGbl_EnableInterpreterSlack) - { - /* - * Some BIOSs don't set WAK_STS at all. Give up waiting after - * 1000 retries if it still isn't set. - */ - if (Retry-- == 0) - { - break; - } - } - } while (!InValue); return_ACPI_STATUS (AE_OK); diff --git a/sys/contrib/dev/acpica/components/hardware/hwtimer.c b/sys/contrib/dev/acpica/components/hardware/hwtimer.c index e1030143020f..643cc6771b1a 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwtimer.c +++ b/sys/contrib/dev/acpica/components/hardware/hwtimer.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,6 +41,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#define EXPORT_ACPI_INTERFACES + #include <contrib/dev/acpica/include/acpi.h> #include <contrib/dev/acpica/include/accommon.h> diff --git a/sys/contrib/dev/acpica/components/hardware/hwvalid.c b/sys/contrib/dev/acpica/components/hardware/hwvalid.c index 85a87d176ca9..c8046cd0c2ac 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwvalid.c +++ b/sys/contrib/dev/acpica/components/hardware/hwvalid.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/sys/contrib/dev/acpica/components/hardware/hwxface.c b/sys/contrib/dev/acpica/components/hardware/hwxface.c index 8e0e5be0bbc3..0ec2f5c96eef 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwxface.c +++ b/sys/contrib/dev/acpica/components/hardware/hwxface.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,6 +41,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#define EXPORT_ACPI_INTERFACES + #include <contrib/dev/acpica/include/acpi.h> #include <contrib/dev/acpica/include/accommon.h> #include <contrib/dev/acpica/include/acnamesp.h> @@ -90,9 +92,15 @@ AcpiReset ( * For I/O space, write directly to the OSL. This bypasses the port * validation mechanism, which may block a valid write to the reset * register. + * + * NOTE: + * The ACPI spec requires the reset register width to be 8, so we + * hardcode it here and ignore the FADT value. This maintains + * compatibility with other ACPI implementations that have allowed + * BIOS code with bad register width values to go unnoticed. */ Status = AcpiOsWritePort ((ACPI_IO_ADDRESS) ResetReg->Address, - AcpiGbl_FADT.ResetValue, ResetReg->BitWidth); + AcpiGbl_FADT.ResetValue, ACPI_RESET_REGISTER_WIDTH); } else { diff --git a/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c b/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c index 8c3ec4111466..dfc712b34871 100644 --- a/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c +++ b/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,6 +41,8 @@ * POSSIBILITY OF SUCH DAMAGES. */ +#define EXPORT_ACPI_INTERFACES + #include <contrib/dev/acpica/include/acpi.h> #include <contrib/dev/acpica/include/accommon.h> |