aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-07-21x86, intel_txt: Intel TXT Sx shutdown supportJoseph Cihula1-0/+3
Support for graceful handling of sleep states (S3/S4/S5) after an Intel(R) TXT launch. Without this patch, attempting to place the system in one of the ACPI sleep states (S3/S4/S5) will cause the TXT hardware to treat this as an attack and will cause a system reset, with memory locked. Not only may the subsequent memory scrub take some time, but the platform will be unable to enter the requested power state. This patch calls back into the tboot so that it may properly and securely clean up system state and clear the secrets-in-memory flag, after which it will place the system into the requested sleep state using ACPI information passed by the kernel. arch/x86/kernel/smpboot.c | 2 ++ drivers/acpi/acpica/hwsleep.c | 3 +++ kernel/cpu.c | 7 ++++++- 3 files changed, 11 insertions(+), 1 deletion(-) Signed-off-by: Joseph Cihula <joseph.cihula@intel.com> Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-05-27ACPICA: Disable preservation of SCI enable bit (SCI_EN)Bob Moore1-4/+7
Preserving this bit breaks some machines. Not preserving this bit seems to work OK in all cases, even though this goes against the ACPI spec. http://bugzilla.kernel.org/show_bug.cgi?id=13289 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Region deletion: Ensure region object is removed from handler listLin Ming1-0/+21
Prevents a possible fault when a dynamic operation region is deleted. ACPICA BZ 507. http://acpica.org/bugzilla/show_bug.cgi?id=507 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Eliminate extra call to NsGetParentNodeAlex Chiang1-3/+4
Was called twice in the same function with the same parameter. Alex Chiang. Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Simplify internal operation region interfaceBob Moore4-20/+23
Changed address parameter to a simple offset. This removes the need for the caller to access the region object to obtain the physical address. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Update Load() to use operation region interfacesBob Moore1-18/+78
Replace memory mapping with region access calls. Now, all region accesses go through the region handler as they should. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: New: AcpiInstallMethod - install a single control methodLin Ming6-4/+166
This interface enables the override or creation of a single control method. Useful to repair a bug or install a missing method. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Invalidate DdbHandle after table unloadLin Ming1-2/+19
Mark the DdbHandle as invalid after the table it refers to is unloaded. This is needed because the handle itself may not be deleted after the table unload, depending on whether it has been stored in a named object by the caller. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Fix reference count issues for DdbHandle objectLin Ming1-3/+6
Fix a problem where the DdbHandle could be prematurely deleted, possibly causing a fault. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Simplify and optimize NsGetNextNode functionBob Moore4-29/+69
Reduced parameter count and reduced code for this frequently used function. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Additional validation of _PRT packages (resource mgr)Bob Moore1-1/+1
Fixes a possible fault when parsing an ill-formed _PRT package. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Fix DebugObject output for DdbHandle objectsBob Moore1-1/+3
Was putting several extra spaces on the next line. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Fix allowable release order for ASL mutex objectsBob Moore1-4/+11
The ACPI 4.0 specification has been changed to make the SyncLevel for mutex objects more useful. When releasing a mutex, the synclevel of the mutex must now be the same as the current sync level. This makes more sense. This change updates the code to match the spec. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Mutex support: Fix release ordering issue and current sync levelBob Moore1-2/+19
Fixes a problem where if multiple mutexes of the same sync level are acquired but then not released in strict opposite order, the current sync level becomes confused and can cause errors. ACPICA BZ 471. http://acpica.org/bugzilla/show_bug.cgi?id=471 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Fix implementation of AML BreakPoint operator (break to debugger)Bob Moore1-6/+11
The AML BreakPoint opcode will now cause a break into the AML debugger if it is present/configured. This matches the expected behavior per the ACPI specification. Previously, only a message was output. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Fix miscellaneous warnings under gcc 4+Bob Moore3-6/+11
Some possible warnings with gcc 4+, especially with extended warnings enabled Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Miscellaneous lint changesBob Moore5-13/+10
Unused variables/headers, casting, etc. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Fix possible dereference of null pointerBob Moore1-5/+2
Fix dereference of possibly null pointer "Predefined" in the case where the method is not one of the predefined methods. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Fix printf format warnings for 64-bit buildBob Moore2-4/+4
Fix warnings caused by size_t and ACPI_SIZE changing to 64 bits. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Fix possible warnings for ACPI_THREAD_ID on 64-bit buildBob Moore3-21/+22
Warnings can be generated for printf-like statements that output the ACPI_THREAD_ID on 64-bit builds, since this type can expand to 64-bits depending on how it is defined. Use the %p format specifier to allow the output to automatically expand to 64 bits. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Remove unused global variablesBob Moore1-3/+0
Remove two unused/obsolete variables. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Change behavior of object copy for mutex/event objectsBob Moore1-0/+23
When copying these internal objects, cannot simply copy the underlying OS object. A new OS object must be created. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Fix a few warnings for gcc 3.4.4Bob Moore1-2/+2
Mostly for acpiexec, one in the core subsystem. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Update error/warning interfacesBob Moore1-11/+9
Moved the module name and line number to the end of the message. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-16Merge branches 'release', 'bugzilla-13032', 'bugzilla-13041+', 'bugzilla-13121', 'bugzilla-13165', 'bugzilla-13243', 'bugzilla-13259', 'resume-sci-en-regression', 'thermal-regression', 'tsc-regression' and 'asus-2.6.30' into releaseLen Brown2-13/+21
2009-05-15ACPI: resume: re-enable SCI-enable workaroundLin Ming1-1/+6
The BIOS bug workaround mistakenly got disabled when we followed the ACPI specification more closely by ignoring OS updates to that bit. (The BIOS is supposed to update SCI_EN, not the OS) http://bugzilla.kernel.org/show_bug.cgi?id=13289 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-07ACPICA: use acpi.* modparam namespaceLen Brown1-12/+15
Add acpi/acpica/*.c to the acpi.* modparam namespace so that any modparams we stick into ACPICA do not expose ACPICA filenames to users. There are currently only two modparams in ACPICA, just recently added for http://bugzilla.kernel.org/show_bug.cgi?id=13041 With this change, they become acpi.gts=1 acpi.bfs=1 rather than hwsleep.gts=1 hwsleep.bfs=1 Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-02acpica: validate package element more carefully in acpi_rs_get_pci_routing_table_lengthRobert Moore1-0/+7
acpi_rs_get_pci_routing_table_length is not performing sufficient validation on the package returned from _PRT. It assumes a package of packages and fails/faults if this is not the case. We should validate each subpackage when extracted from the parent package, and not accept objects of the wrong type, since that will just cause the scanning to fail (likely with a kernel oops). This can only happen with a serious BIOS bug, and is accompanied by a warning something like this: ACPI Warning (nspredef-0949): \_SB_.PCI0.PEG4._PRT: Return Package type mismatch at index 0 - found Integer, expected Package [20090320] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-24Merge branch 'bugzilla-13036' into releaseLen Brown1-14/+72
2009-04-24Merge branch 'bugzilla-12270' into releaseLen Brown1-25/+2
2009-04-24Revert "ACPICA: delete check for AML access to port 0x81-83"Len Brown1-0/+1
This reverts commit fdbdc7fc79c02ae4ede869d514179a2c65633d28. That temporary quick-fix is no longer necessary, as the previous patch, a65131e942e25c707a652fa4ec2cfcd8b63fec11, "I/O port protection: update for windows compatibility" should handle this issue for all ports, including this one. Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-24I/O port protection: update for windows compatibility.Lin Ming1-14/+71
For windows compatibility, 1) On a port protection violation, simply ignore the request and do not return an exception (allow the control method to continue execution.) 2) If only part of the request overlaps a protected port, read/write the individual ports that are not protected. http://bugzilla.kernel.org/show_bug.cgi?id=13036 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-17ACPI: Disable _GTS and _BFS support by defaultLen Brown1-17/+26
Executing BIOS code paths not exercised by Windows tends to get Linux into trouble. However, if a system does benefit from _GTS or _BFS, acpi.gts=1 an acpi.bfs=1 are now available to enable them. http://bugzilla.kernel.org/show_bug.cgi?id=13041 Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-11ACPI: Revert conflicting workaround for BIOS w/ mangled PRT entriesZhang Rui1-25/+2
2f894ef9c8b36a35d80709bedca276d2fc691941 in Linux-2.6.21 worked around BIOS with mangled _PRT entries: http://bugzilla.kernel.org/show_bug.cgi?id=6859 d0e184abc5983281ef189db2c759d65d56eb1b80 worked around the same issue via ACPICA, and shipped in 2.6.27. Unfortunately the two workarounds conflict: http://bugzilla.kernel.org/show_bug.cgi?id=12270 So revert the Linux specific one. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-07Merge branches 'release', 'APERF', 'ARAT', 'misc', 'kelvin', 'device-lock' and 'bjorn.notify' into releaseLen Brown1-1/+0
2009-04-07ACPICA: delete check for AML access to port 0x81-83Len Brown1-1/+0
Sony laptops apparently write 4-bytes (rather than 1 byte) to debug port 0x80, which spews error messages: Denied AML access to port 0x00000080/4 (DMA1 0x0081-0x0083) [20090320] http://bugzilla.kernel.org/show_bug.cgi?id=13036 Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-07hwmon: Add Asus ATK0110 supportLuca Tettamanti1-2/+1
Asus boards have an ACPI interface for interacting with the hwmon (fan, temperatures, voltages) subsystem; this driver exposes the relevant information via the standard sysfs interface. There are two different ACPI interfaces: - an old one (based on RVLT/RFAN/RTMP) - a new one (GGRP/GITM) Both may be present but there a few cases (my board, sigh) where the new interface is just an empty stub; the driver defaults to the old one when both are present. The old interface has received a considerable testing, but I'm still awaiting confirmation from my tester that the new one is working as expected (hence the debug code is still enabled). Currently all the attributes are read-only, though a (partial) control should be possible with a bit more work. Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-04-05Merge branch 'linus' into releaseLen Brown1-3/+14
Conflicts: arch/x86/kernel/cpu/cpufreq/longhaul.c Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-27ACPICA: Fix index value in package warning messageBob Moore1-8/+16
For predefined method validation. Index value in warning message could be off by one. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-27ACPICA: FADT: Favor 32-bit FACS and DSDT addressesBob Moore1-2/+6
If both the 32-bit and 64-bit addresses are non-null, use the 32-bit address. Provides Windows compatibility. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-27ACPICA: FADT: Favor 32-bit register addresses for compatibilityBob Moore1-35/+51
Use the 32-bit register addresses whenever they are non-zero. This means that the 32-bit addresses are favored over the 64-bit (GAS) addresses. The 64-bit addresses are only used if the 32-bit addresses are zero. This change provides compatibility with all versions of Windows. The worst case that this solves is when both the 32-bit and 64-bit addresses are non-zero, but only the 32-bit addresses are actually valid. This appears to happen in some BIOSes because in this case, Windows uses the 32-bit addresses. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-27ACPICA: Fix PCI configuration space port address rangeBob Moore1-1/+1
Microsoft website uses 0xCF8-0xD00. Should be 0xCF8-0xCFF (Two 32-bit registers.) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-27ACPICA: Condense some protected portsBob Moore1-8/+26
One entry in the protected port table eliminated. Added extra comments to describe each table entry. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-27ACPICA: Remove unused code, no functional changeBob Moore1-35/+9
Removed unused code for dump of args and locals. General cleanup and splitting of long lines. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-27ACPICA: Clear PM register write-only bits on readingLin Ming2-0/+11
Affects PM1 Control register only. When reading the register, zero the write-only bits as per the ACPI spec. ACPICA BZ 443. Lin Ming. http://www.acpica.org/bugzilla/show_bug.cgi?id=443 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-27ACPICA: Remove obsolete acpi_os_validate_address interfaceBob Moore3-31/+0
This interface is no longer necessary. Requests should be validated on a per-field basis, not on the entire operation region. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-27ACPICA: New: I/O port protectionBob Moore12-29/+319
Protect certain I/O ports from reads/writes. Provides MS compatibility. New module, hwvalid.c Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-27ACPICA: Preserve all PM control reserved and ignored bitsBob Moore2-1/+24
As per the ACPI specification, preserve (read/modify/write) all bits that are defined as either reserved or ignored (PM control control registers only.) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-27ACPICA: Change handling of PM1 Status register ignored bitBob Moore1-16/+11
Ignored bits must be preserved according to the ACPI spec. Usually this means a read/modify/write when writing to the register. However, for status registers, writing a one means clear the event. Writing a zero means preserve the event (do not clear.) This behavior is clarified in the ACPI 4.0 spec, and the ACPICA code now simply always writes a zero to the ignored bit. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-27ACPICA: Fix AcpiWalkNamespace race condition with table unloadBob Moore11-33/+303
Added a reader/writer locking mechanism to allow multiple concurrent namespace walks (readers), but a dynamic table unload will have exclusive access to the namespace. This fixes a problem where a table unload could delete the portion of the namespace that is currently being examined by a walk. Adds a new file, utlock.c that implements the reader/writer lock mechanism. ACPICA BZ 749. http://www.acpica.org/bugzilla/show_bug.cgi?id=749 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>