ACPI and power management updates for 3.15-rc1
- Device PM QoS support for latency tolerance constraints on systems with hardware interfaces allowing such constraints to be specified. That is necessary to prevent hardware-driven power management from becoming overly aggressive on some systems and to prevent power management features leading to excessive latencies from being used in some cases. - Consolidation of the handling of ACPI hotplug notifications for device objects. This causes all device hotplug notifications to go through the root notify handler (that was executed for all of them anyway before) that propagates them to individual subsystems, if necessary, by executing callbacks provided by those subsystems (those callbacks are associated with struct acpi_device objects during device enumeration). As a result, the code in question becomes both smaller in size and more straightforward and all of those changes should not affect users. - ACPICA update, including fixes related to the handling of _PRT in cases when it is broken and the addition of "Windows 2013" to the list of supported "features" for _OSI (which is necessary to support systems that work incorrectly or don't even boot without it). Changes from Bob Moore and Lv Zheng. - Consolidation of ACPI _OST handling from Jiang Liu. - ACPI battery and AC fixes allowing unusual system configurations to be handled by that code from Alexander Mezin. - New device IDs for the ACPI LPSS driver from Chiau Ee Chew. - ACPI fan and thermal optimizations related to system suspend and resume from Aaron Lu. - Cleanups related to ACPI video from Jean Delvare. - Assorted ACPI fixes and cleanups from Al Stone, Hanjun Guo, Lan Tianyu, Paul Bolle, Tomasz Nowicki. - Intel RAPL (Running Average Power Limits) driver cleanups from Jacob Pan. - intel_pstate fixes and cleanups from Dirk Brandewie. - cpufreq fixes related to system suspend/resume handling from Viresh Kumar. - cpufreq core fixes and cleanups from Viresh Kumar, Stratos Karafotis, Saravana Kannan, Rashika Kheria, Joe Perches. - cpufreq drivers updates from Viresh Kumar, Zhuoyu Zhang, Rob Herring. - cpuidle fixes related to the menu governor from Tuukka Tikkanen. - cpuidle fix related to coupled CPUs handling from Paul Burton. - Asynchronous execution of all device suspend and resume callbacks, except for ->prepare and ->complete, during system suspend and resume from Chuansheng Liu. - Delayed resuming of runtime-suspended devices during system suspend for the PCI bus type and ACPI PM domain. - New set of PM helper routines to allow device runtime PM callbacks to be used during system suspend and resume more easily from Ulf Hansson. - Assorted fixes and cleanups in the PM core from Geert Uytterhoeven, Prabhakar Lad, Philipp Zabel, Rashika Kheria, Sebastian Capella. - devfreq fix from Saravana Kannan. / -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABCAAGBQJTLgB1AAoJEILEb/54YlRxfs4P/35fIu9h8ClNWUPXqi3nlGIt yMyumKvF1VdsOKLbjTtFq6B3UOlhqDijYTCQd7Xt7X8ONTk/ND9ec2t/5xGkSdUI q46fa0qZXeqUn0Kt2t+kl6tgVQOkDj94aNlEh+7Ya3Uu6WYDDfmZtOBOFAMk6D8l ND4rHJpX+eUsRLBrcxaUxxdD8AW5guGcPKyeyzsXv1bY1BZnpLFrZ3PhuI5dn2CL L/zmk3A+wG6+ZlQxnwDdrKa3E6uhRSIDeF0vI4Byspa1wi5zXknJG2J7MoQ9JEE9 VQpBXlqach5wgXqJ8PAqAeaB6Ie26/F7PYG8r446zKw/5UUtdNUx+0dkjQ7Mz8Tu ajuVxfwrrPhZeQqmVBxlH5Gg7Ez2KBKEfDxTdRnzI7FoA7PE5XDcg3kO64bhj8LJ yugnV/ToU9wMztZnPC7CoGPwUgxMJvr9LwmxS4aeKcVUBES05eg0vS3lwdZMgqkV iO0QkWTmhZ952qZCqZxbh0JqaaX8Wgx2kpX2tf1G2GJqLMZco289bLh6njNT+8CH EzdQKYYyn6G6+Qg2M0f/6So3qU17x9XtE4ZBWQdGDpqYOGZhjZAOs/VnB1Ysw/K3 cDBzswlJd0CyyUps9B+qbf49OpbWVwl5kKeuHUuPxugEVryhpSp9AuG+tNil74Sj JuGTGR4fyFjDBX5cvAPm =ywR6 -----END PGP SIGNATURE----- Merge tag 'pm+acpi-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI and power management updates from Rafael Wysocki: "The majority of this material spent some time in linux-next, some of it even several weeks. There are a few relatively fresh commits in it, but they are mostly fixes and simple cleanups. ACPI took the lead this time, both in terms of the number of commits and the number of modified lines of code, cpufreq follows and there are a few changes in the PM core and in cpuidle too. A new feature that already got some LWN.net's attention is the device PM QoS extension allowing latency tolerance requirements to be propagated from leaf devices to their ancestors with hardware interfaces for specifying latency tolerance. That should help systems with hardware-driven power management to avoid going too far with it in cases when there are latency tolerance constraints. There also are some significant changes in the ACPI core related to the way in which hotplug notifications are handled. They affect PCI hotplug (ACPIPHP) and the ACPI dock station code too. The bottom line is that all those notification now go through the root notify handler and are propagated to the interested subsystems by means of callbacks instead of having to install a notify handler for each device object that we can potentially get hotplug notifications for. In addition to that ACPICA will now advertise "Windows 2013" compatibility for _OSI, because some systems out there don't work correctly if that is not done (some of them don't even boot). On the system suspend side of things, all of the device suspend and resume callbacks, except for ->prepare() and ->complete(), are now going to be executed asynchronously as that turns out to speed up system suspend and resume on some platforms quite significantly and we have a few more optimizations in that area. Apart from that, there are some new device IDs and fixes and cleanups all over. In particular, the system suspend and resume handling by cpufreq should be improved and the cpuidle menu governor should be a bit more robust now. Specifics: - Device PM QoS support for latency tolerance constraints on systems with hardware interfaces allowing such constraints to be specified. That is necessary to prevent hardware-driven power management from becoming overly aggressive on some systems and to prevent power management features leading to excessive latencies from being used in some cases. - Consolidation of the handling of ACPI hotplug notifications for device objects. This causes all device hotplug notifications to go through the root notify handler (that was executed for all of them anyway before) that propagates them to individual subsystems, if necessary, by executing callbacks provided by those subsystems (those callbacks are associated with struct acpi_device objects during device enumeration). As a result, the code in question becomes both smaller in size and more straightforward and all of those changes should not affect users. - ACPICA update, including fixes related to the handling of _PRT in cases when it is broken and the addition of "Windows 2013" to the list of supported "features" for _OSI (which is necessary to support systems that work incorrectly or don't even boot without it). Changes from Bob Moore and Lv Zheng. - Consolidation of ACPI _OST handling from Jiang Liu. - ACPI battery and AC fixes allowing unusual system configurations to be handled by that code from Alexander Mezin. - New device IDs for the ACPI LPSS driver from Chiau Ee Chew. - ACPI fan and thermal optimizations related to system suspend and resume from Aaron Lu. - Cleanups related to ACPI video from Jean Delvare. - Assorted ACPI fixes and cleanups from Al Stone, Hanjun Guo, Lan Tianyu, Paul Bolle, Tomasz Nowicki. - Intel RAPL (Running Average Power Limits) driver cleanups from Jacob Pan. - intel_pstate fixes and cleanups from Dirk Brandewie. - cpufreq fixes related to system suspend/resume handling from Viresh Kumar. - cpufreq core fixes and cleanups from Viresh Kumar, Stratos Karafotis, Saravana Kannan, Rashika Kheria, Joe Perches. - cpufreq drivers updates from Viresh Kumar, Zhuoyu Zhang, Rob Herring. - cpuidle fixes related to the menu governor from Tuukka Tikkanen. - cpuidle fix related to coupled CPUs handling from Paul Burton. - Asynchronous execution of all device suspend and resume callbacks, except for ->prepare and ->complete, during system suspend and resume from Chuansheng Liu. - Delayed resuming of runtime-suspended devices during system suspend for the PCI bus type and ACPI PM domain. - New set of PM helper routines to allow device runtime PM callbacks to be used during system suspend and resume more easily from Ulf Hansson. - Assorted fixes and cleanups in the PM core from Geert Uytterhoeven, Prabhakar Lad, Philipp Zabel, Rashika Kheria, Sebastian Capella. - devfreq fix from Saravana Kannan" * tag 'pm+acpi-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (162 commits) PM / devfreq: Rewrite devfreq_update_status() to fix multiple bugs PM / sleep: Correct whitespace errors in <linux/pm.h> intel_pstate: Set core to min P state during core offline cpufreq: Add stop CPU callback to cpufreq_driver interface cpufreq: Remove unnecessary braces cpufreq: Fix checkpatch errors and warnings cpufreq: powerpc: add cpufreq transition latency for FSL e500mc SoCs MAINTAINERS: Reorder maintainer addresses for PM and ACPI PM / Runtime: Update runtime_idle() documentation for return value meaning video / output: Drop display output class support fujitsu-laptop: Drop unneeded include acer-wmi: Stop selecting VIDEO_OUTPUT_CONTROL ACPI / gpu / drm: Stop selecting VIDEO_OUTPUT_CONTROL ACPI / video: fix ACPI_VIDEO dependencies cpufreq: remove unused notifier: CPUFREQ_{SUSPENDCHANGE|RESUMECHANGE} cpufreq: Do not allow ->setpolicy drivers to provide ->target cpufreq: arm_big_little: set 'physical_cluster' for each CPU cpufreq: arm_big_little: make vexpress driver depend on bL core driver ACPI / button: Add ACPI Button event via netlink routine ACPI: Remove duplicate definitions of PREFIX ...
This commit is contained in:
commit
4dedde7c7a
@ -187,7 +187,7 @@ Description:
|
||||
Not all drivers support this attribute. If it isn't supported,
|
||||
attempts to read or write it will yield I/O errors.
|
||||
|
||||
What: /sys/devices/.../power/pm_qos_latency_us
|
||||
What: /sys/devices/.../power/pm_qos_resume_latency_us
|
||||
Date: March 2012
|
||||
Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
|
||||
Description:
|
||||
@ -205,6 +205,31 @@ Description:
|
||||
This attribute has no effect on system-wide suspend/resume and
|
||||
hibernation.
|
||||
|
||||
What: /sys/devices/.../power/pm_qos_latency_tolerance_us
|
||||
Date: January 2014
|
||||
Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
|
||||
Description:
|
||||
The /sys/devices/.../power/pm_qos_latency_tolerance_us attribute
|
||||
contains the PM QoS active state latency tolerance limit for the
|
||||
given device in microseconds. That is the maximum memory access
|
||||
latency the device can suffer without any visible adverse
|
||||
effects on user space functionality. If that value is the
|
||||
string "any", the latency does not matter to user space at all,
|
||||
but hardware should not be allowed to set the latency tolerance
|
||||
for the device automatically.
|
||||
|
||||
Reading "auto" from this file means that the maximum memory
|
||||
access latency for the device may be determined automatically
|
||||
by the hardware as needed. Writing "auto" to it allows the
|
||||
hardware to be switched to this mode if there are no other
|
||||
latency tolerance requirements from the kernel side.
|
||||
|
||||
This attribute is only present if the feature controlled by it
|
||||
is supported by the hardware.
|
||||
|
||||
This attribute has no effect on runtime suspend and resume of
|
||||
devices and on system-wide suspend/resume and hibernation.
|
||||
|
||||
What: /sys/devices/.../power/pm_qos_no_power_off
|
||||
Date: September 2012
|
||||
Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
|
||||
|
@ -12,8 +12,9 @@ Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
|
||||
Description:
|
||||
The /sys/power/state file controls the system power state.
|
||||
Reading from this file returns what states are supported,
|
||||
which is hard-coded to 'standby' (Power-On Suspend), 'mem'
|
||||
(Suspend-to-RAM), and 'disk' (Suspend-to-Disk).
|
||||
which is hard-coded to 'freeze' (Low-Power Idle), 'standby'
|
||||
(Power-On Suspend), 'mem' (Suspend-to-RAM), and 'disk'
|
||||
(Suspend-to-Disk).
|
||||
|
||||
Writing to this file one of these strings causes the system to
|
||||
transition into that state. Please see the file
|
||||
|
@ -92,7 +92,3 @@ values:
|
||||
cpu - number of the affected CPU
|
||||
old - old frequency
|
||||
new - new frequency
|
||||
|
||||
If the cpufreq core detects the frequency has changed while the system
|
||||
was suspended, these notifiers are called with CPUFREQ_RESUMECHANGE as
|
||||
second argument.
|
||||
|
@ -61,7 +61,13 @@ target_index - See below on the differences.
|
||||
|
||||
And optionally
|
||||
|
||||
cpufreq_driver.exit - A pointer to a per-CPU cleanup function.
|
||||
cpufreq_driver.exit - A pointer to a per-CPU cleanup
|
||||
function called during CPU_POST_DEAD
|
||||
phase of cpu hotplug process.
|
||||
|
||||
cpufreq_driver.stop_cpu - A pointer to a per-CPU stop function
|
||||
called during CPU_DOWN_PREPARE phase of
|
||||
cpu hotplug process.
|
||||
|
||||
cpufreq_driver.resume - A pointer to a per-CPU resume function
|
||||
which is called with interrupts disabled
|
||||
|
@ -231,6 +231,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
|
||||
|
||||
acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT
|
||||
|
||||
acpica_no_return_repair [HW, ACPI]
|
||||
Disable AML predefined validation mechanism
|
||||
This mechanism can repair the evaluation result to make
|
||||
the return objects more ACPI specification compliant.
|
||||
This option is useful for developers to identify the
|
||||
root cause of an AML interpreter issue when the issue
|
||||
has something to do with the repair mechanism.
|
||||
|
||||
acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS
|
||||
Format: To spoof as Windows 98: ="Microsoft Windows"
|
||||
|
||||
|
@ -88,17 +88,19 @@ node.
|
||||
|
||||
2. PM QoS per-device latency and flags framework
|
||||
|
||||
For each device, there are two lists of PM QoS requests. One is maintained
|
||||
along with the aggregated target of latency value and the other is for PM QoS
|
||||
flags. Values are updated in response to changes of the request list.
|
||||
For each device, there are three lists of PM QoS requests. Two of them are
|
||||
maintained along with the aggregated targets of resume latency and active
|
||||
state latency tolerance (in microseconds) and the third one is for PM QoS flags.
|
||||
Values are updated in response to changes of the request list.
|
||||
|
||||
Target latency value is simply the minimum of the request values held in the
|
||||
parameter list elements. The PM QoS flags aggregate value is a gather (bitwise
|
||||
OR) of all list elements' values. Two device PM QoS flags are defined currently:
|
||||
PM_QOS_FLAG_NO_POWER_OFF and PM_QOS_FLAG_REMOTE_WAKEUP.
|
||||
The target values of resume latency and active state latency tolerance are
|
||||
simply the minimum of the request values held in the parameter list elements.
|
||||
The PM QoS flags aggregate value is a gather (bitwise OR) of all list elements'
|
||||
values. Two device PM QoS flags are defined currently: PM_QOS_FLAG_NO_POWER_OFF
|
||||
and PM_QOS_FLAG_REMOTE_WAKEUP.
|
||||
|
||||
Note: the aggregated target value is implemented as an atomic variable so that
|
||||
reading the aggregated value does not require any locking mechanism.
|
||||
Note: The aggregated target values are implemented in such a way that reading
|
||||
the aggregated value does not require any locking mechanism.
|
||||
|
||||
|
||||
From kernel mode the use of this interface is the following:
|
||||
@ -132,19 +134,21 @@ The meaning of the return values is as follows:
|
||||
PM_QOS_FLAGS_UNDEFINED: The device's PM QoS structure has not been
|
||||
initialized or the list of requests is empty.
|
||||
|
||||
int dev_pm_qos_add_ancestor_request(dev, handle, value)
|
||||
int dev_pm_qos_add_ancestor_request(dev, handle, type, value)
|
||||
Add a PM QoS request for the first direct ancestor of the given device whose
|
||||
power.ignore_children flag is unset.
|
||||
power.ignore_children flag is unset (for DEV_PM_QOS_RESUME_LATENCY requests)
|
||||
or whose power.set_latency_tolerance callback pointer is not NULL (for
|
||||
DEV_PM_QOS_LATENCY_TOLERANCE requests).
|
||||
|
||||
int dev_pm_qos_expose_latency_limit(device, value)
|
||||
Add a request to the device's PM QoS list of latency constraints and create
|
||||
a sysfs attribute pm_qos_resume_latency_us under the device's power directory
|
||||
allowing user space to manipulate that request.
|
||||
Add a request to the device's PM QoS list of resume latency constraints and
|
||||
create a sysfs attribute pm_qos_resume_latency_us under the device's power
|
||||
directory allowing user space to manipulate that request.
|
||||
|
||||
void dev_pm_qos_hide_latency_limit(device)
|
||||
Drop the request added by dev_pm_qos_expose_latency_limit() from the device's
|
||||
PM QoS list of latency constraints and remove sysfs attribute pm_qos_resume_latency_us
|
||||
from the device's power directory.
|
||||
PM QoS list of resume latency constraints and remove sysfs attribute
|
||||
pm_qos_resume_latency_us from the device's power directory.
|
||||
|
||||
int dev_pm_qos_expose_flags(device, value)
|
||||
Add a request to the device's PM QoS list of flags and create sysfs attributes
|
||||
@ -163,7 +167,7 @@ a per-device notification tree and a global notification tree.
|
||||
int dev_pm_qos_add_notifier(device, notifier):
|
||||
Adds a notification callback function for the device.
|
||||
The callback is called when the aggregated value of the device constraints list
|
||||
is changed.
|
||||
is changed (for resume latency device PM QoS only).
|
||||
|
||||
int dev_pm_qos_remove_notifier(device, notifier):
|
||||
Removes the notification callback function for the device.
|
||||
@ -171,14 +175,48 @@ Removes the notification callback function for the device.
|
||||
int dev_pm_qos_add_global_notifier(notifier):
|
||||
Adds a notification callback function in the global notification tree of the
|
||||
framework.
|
||||
The callback is called when the aggregated value for any device is changed.
|
||||
The callback is called when the aggregated value for any device is changed
|
||||
(for resume latency device PM QoS only).
|
||||
|
||||
int dev_pm_qos_remove_global_notifier(notifier):
|
||||
Removes the notification callback function from the global notification tree
|
||||
of the framework.
|
||||
|
||||
|
||||
From user mode:
|
||||
No API for user space access to the per-device latency constraints is provided
|
||||
yet - still under discussion.
|
||||
Active state latency tolerance
|
||||
|
||||
This device PM QoS type is used to support systems in which hardware may switch
|
||||
to energy-saving operation modes on the fly. In those systems, if the operation
|
||||
mode chosen by the hardware attempts to save energy in an overly aggressive way,
|
||||
it may cause excess latencies to be visible to software, causing it to miss
|
||||
certain protocol requirements or target frame or sample rates etc.
|
||||
|
||||
If there is a latency tolerance control mechanism for a given device available
|
||||
to software, the .set_latency_tolerance callback in that device's dev_pm_info
|
||||
structure should be populated. The routine pointed to by it is should implement
|
||||
whatever is necessary to transfer the effective requirement value to the
|
||||
hardware.
|
||||
|
||||
Whenever the effective latency tolerance changes for the device, its
|
||||
.set_latency_tolerance() callback will be executed and the effective value will
|
||||
be passed to it. If that value is negative, which means that the list of
|
||||
latency tolerance requirements for the device is empty, the callback is expected
|
||||
to switch the underlying hardware latency tolerance control mechanism to an
|
||||
autonomous mode if available. If that value is PM_QOS_LATENCY_ANY, in turn, and
|
||||
the hardware supports a special "no requirement" setting, the callback is
|
||||
expected to use it. That allows software to prevent the hardware from
|
||||
automatically updating the device's latency tolerance in response to its power
|
||||
state changes (e.g. during transitions from D3cold to D0), which generally may
|
||||
be done in the autonomous latency tolerance control mode.
|
||||
|
||||
If .set_latency_tolerance() is present for the device, sysfs attribute
|
||||
pm_qos_latency_tolerance_us will be present in the devivce's power directory.
|
||||
Then, user space can use that attribute to specify its latency tolerance
|
||||
requirement for the device, if any. Writing "any" to it means "no requirement,
|
||||
but do not let the hardware control latency tolerance" and writing "auto" to it
|
||||
allows the hardware to be switched to the autonomous mode if there are no other
|
||||
requirements from the kernel side in the device's list.
|
||||
|
||||
Kernel code can use the functions described above along with the
|
||||
DEV_PM_QOS_LATENCY_TOLERANCE device PM QoS type to add, remove and update
|
||||
latency tolerance requirements for devices.
|
||||
|
@ -92,5 +92,5 @@ dev_pm_qos_remove_request "device=%s type=%s new_value=%d"
|
||||
|
||||
The first parameter gives the device name which tries to add/update/remove
|
||||
QoS requests.
|
||||
The second parameter gives the request type (e.g. "DEV_PM_QOS_LATENCY").
|
||||
The second parameter gives the request type (e.g. "DEV_PM_QOS_RESUME_LATENCY").
|
||||
The third parameter is value to be added/updated/removed.
|
||||
|
@ -242,8 +242,8 @@ S: Maintained
|
||||
F: drivers/platform/x86/acer-wmi.c
|
||||
|
||||
ACPI
|
||||
M: Len Brown <lenb@kernel.org>
|
||||
M: Rafael J. Wysocki <rjw@rjwysocki.net>
|
||||
M: Len Brown <lenb@kernel.org>
|
||||
L: linux-acpi@vger.kernel.org
|
||||
W: https://01.org/linux-acpi
|
||||
Q: https://patchwork.kernel.org/project/linux-acpi/list/
|
||||
@ -3658,8 +3658,8 @@ S: Maintained
|
||||
F: fs/freevxfs/
|
||||
|
||||
FREEZER
|
||||
M: Pavel Machek <pavel@ucw.cz>
|
||||
M: "Rafael J. Wysocki" <rjw@rjwysocki.net>
|
||||
M: Pavel Machek <pavel@ucw.cz>
|
||||
L: linux-pm@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/power/freezing-of-tasks.txt
|
||||
@ -4023,8 +4023,8 @@ S: Maintained
|
||||
F: drivers/video/hgafb.c
|
||||
|
||||
HIBERNATION (aka Software Suspend, aka swsusp)
|
||||
M: Pavel Machek <pavel@ucw.cz>
|
||||
M: "Rafael J. Wysocki" <rjw@rjwysocki.net>
|
||||
M: Pavel Machek <pavel@ucw.cz>
|
||||
L: linux-pm@vger.kernel.org
|
||||
S: Supported
|
||||
F: arch/x86/power/
|
||||
@ -8453,9 +8453,9 @@ F: arch/sh/
|
||||
F: drivers/sh/
|
||||
|
||||
SUSPEND TO RAM
|
||||
M: "Rafael J. Wysocki" <rjw@rjwysocki.net>
|
||||
M: Len Brown <len.brown@intel.com>
|
||||
M: Pavel Machek <pavel@ucw.cz>
|
||||
M: "Rafael J. Wysocki" <rjw@rjwysocki.net>
|
||||
L: linux-pm@vger.kernel.org
|
||||
S: Supported
|
||||
F: Documentation/power/
|
||||
|
@ -674,8 +674,7 @@ static int cpufreq_callback(struct notifier_block *nb,
|
||||
}
|
||||
|
||||
if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) ||
|
||||
(val == CPUFREQ_POSTCHANGE && freq->old > freq->new) ||
|
||||
(val == CPUFREQ_RESUMECHANGE || val == CPUFREQ_SUSPENDCHANGE)) {
|
||||
(val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
|
||||
loops_per_jiffy = cpufreq_scale(global_l_p_j_ref,
|
||||
global_l_p_j_ref_freq,
|
||||
freq->new);
|
||||
|
@ -166,7 +166,7 @@ static int twd_cpufreq_transition(struct notifier_block *nb,
|
||||
* frequency. The timer is local to a cpu, so cross-call to the
|
||||
* changing cpu.
|
||||
*/
|
||||
if (state == CPUFREQ_POSTCHANGE || state == CPUFREQ_RESUMECHANGE)
|
||||
if (state == CPUFREQ_POSTCHANGE)
|
||||
smp_call_function_single(freqs->cpu, twd_update_frequency,
|
||||
NULL, 1);
|
||||
|
||||
|
@ -885,9 +885,6 @@ static int viper_cpufreq_notifier(struct notifier_block *nb,
|
||||
viper_set_core_cpu_voltage(freq->new, 0);
|
||||
}
|
||||
break;
|
||||
case CPUFREQ_RESUMECHANGE:
|
||||
viper_set_core_cpu_voltage(freq->new, 0);
|
||||
break;
|
||||
default:
|
||||
/* ignore */
|
||||
break;
|
||||
|
@ -28,6 +28,7 @@
|
||||
static void __init spear1310_dt_init(void)
|
||||
{
|
||||
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
|
||||
platform_device_register_simple("spear-cpufreq", -1, NULL, 0);
|
||||
}
|
||||
|
||||
static const char * const spear1310_dt_board_compat[] = {
|
||||
|
@ -143,6 +143,7 @@ static void __init spear1340_dt_init(void)
|
||||
{
|
||||
of_platform_populate(NULL, of_default_bus_match_table,
|
||||
spear1340_auxdata_lookup, NULL);
|
||||
platform_device_register_simple("spear-cpufreq", -1, NULL, 0);
|
||||
}
|
||||
|
||||
static const char * const spear1340_dt_board_compat[] = {
|
||||
|
@ -325,6 +325,14 @@ source "drivers/cpufreq/Kconfig"
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Power management options"
|
||||
|
||||
source "kernel/power/Kconfig"
|
||||
|
||||
source "drivers/cpufreq/Kconfig"
|
||||
|
||||
endmenu
|
||||
|
||||
source "net/Kconfig"
|
||||
|
||||
source "drivers/Kconfig"
|
||||
|
@ -25,7 +25,6 @@ CONFIG_KEXEC=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_EFI_VARS=y
|
||||
CONFIG_BINFMT_MISC=m
|
||||
CONFIG_ACPI_PROCFS=y
|
||||
CONFIG_ACPI_BUTTON=m
|
||||
CONFIG_ACPI_FAN=m
|
||||
CONFIG_ACPI_DOCK=y
|
||||
|
@ -26,7 +26,6 @@ CONFIG_IA64_PALINFO=y
|
||||
CONFIG_KEXEC=y
|
||||
CONFIG_EFI_VARS=y
|
||||
CONFIG_BINFMT_MISC=m
|
||||
CONFIG_ACPI_PROCFS=y
|
||||
CONFIG_ACPI_BUTTON=m
|
||||
CONFIG_ACPI_FAN=m
|
||||
CONFIG_ACPI_PROCESSOR=m
|
||||
|
@ -16,7 +16,6 @@ CONFIG_IA64_PALINFO=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_EFI_VARS=y
|
||||
CONFIG_BINFMT_MISC=y
|
||||
CONFIG_ACPI_PROCFS=y
|
||||
CONFIG_HOTPLUG_PCI=y
|
||||
CONFIG_HOTPLUG_PCI_ACPI=y
|
||||
CONFIG_PACKET=y
|
||||
|
@ -54,10 +54,6 @@
|
||||
#include <asm/sal.h>
|
||||
#include <asm/cyclone.h>
|
||||
|
||||
#define BAD_MADT_ENTRY(entry, end) ( \
|
||||
(!entry) || (unsigned long)entry + sizeof(*entry) > end || \
|
||||
((struct acpi_subtable_header *)entry)->length < sizeof(*entry))
|
||||
|
||||
#define PREFIX "ACPI: "
|
||||
|
||||
unsigned int acpi_cpei_override;
|
||||
|
@ -1121,8 +1121,7 @@ oprof_cpufreq_notify(struct notifier_block *nb, unsigned long val, void *data)
|
||||
int ret = 0;
|
||||
struct cpufreq_freqs *frq = data;
|
||||
if ((val == CPUFREQ_PRECHANGE && frq->old < frq->new) ||
|
||||
(val == CPUFREQ_POSTCHANGE && frq->old > frq->new) ||
|
||||
(val == CPUFREQ_RESUMECHANGE || val == CPUFREQ_SUSPENDCHANGE))
|
||||
(val == CPUFREQ_POSTCHANGE && frq->old > frq->new))
|
||||
set_spu_profiling_frequency(frq->new, spu_cycle_reset);
|
||||
return ret;
|
||||
}
|
||||
|
@ -659,8 +659,7 @@ static int sparc64_cpufreq_notifier(struct notifier_block *nb, unsigned long val
|
||||
ft->clock_tick_ref = cpu_data(cpu).clock_tick;
|
||||
}
|
||||
if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) ||
|
||||
(val == CPUFREQ_POSTCHANGE && freq->old > freq->new) ||
|
||||
(val == CPUFREQ_RESUMECHANGE)) {
|
||||
(val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
|
||||
cpu_data(cpu).clock_tick =
|
||||
cpufreq_scale(ft->clock_tick_ref,
|
||||
ft->ref_freq,
|
||||
|
@ -60,7 +60,6 @@ CONFIG_CRASH_DUMP=y
|
||||
CONFIG_HIBERNATION=y
|
||||
CONFIG_PM_DEBUG=y
|
||||
CONFIG_PM_TRACE_RTC=y
|
||||
CONFIG_ACPI_PROCFS=y
|
||||
CONFIG_ACPI_DOCK=y
|
||||
CONFIG_CPU_FREQ=y
|
||||
# CONFIG_CPU_FREQ_STAT is not set
|
||||
|
@ -58,7 +58,6 @@ CONFIG_CRASH_DUMP=y
|
||||
CONFIG_HIBERNATION=y
|
||||
CONFIG_PM_DEBUG=y
|
||||
CONFIG_PM_TRACE_RTC=y
|
||||
CONFIG_ACPI_PROCFS=y
|
||||
CONFIG_ACPI_DOCK=y
|
||||
CONFIG_CPU_FREQ=y
|
||||
# CONFIG_CPU_FREQ_STAT is not set
|
||||
|
@ -53,10 +53,6 @@ EXPORT_SYMBOL(acpi_disabled);
|
||||
# include <asm/proto.h>
|
||||
#endif /* X86 */
|
||||
|
||||
#define BAD_MADT_ENTRY(entry, end) ( \
|
||||
(!entry) || (unsigned long)entry + sizeof(*entry) > end || \
|
||||
((struct acpi_subtable_header *)entry)->length < sizeof(*entry))
|
||||
|
||||
#define PREFIX "ACPI: "
|
||||
|
||||
int acpi_noirq; /* skip ACPI IRQ initialization */
|
||||
|
@ -914,8 +914,7 @@ static int time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
|
||||
tsc_khz_ref = tsc_khz;
|
||||
}
|
||||
if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) ||
|
||||
(val == CPUFREQ_POSTCHANGE && freq->old > freq->new) ||
|
||||
(val == CPUFREQ_RESUMECHANGE)) {
|
||||
(val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
|
||||
*lpj = cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new);
|
||||
|
||||
tsc_khz = cpufreq_scale(tsc_khz_ref, ref_freq, freq->new);
|
||||
|
@ -43,19 +43,6 @@ config ACPI_SLEEP
|
||||
depends on SUSPEND || HIBERNATION
|
||||
default y
|
||||
|
||||
config ACPI_PROCFS
|
||||
bool "Deprecated /proc/acpi files"
|
||||
depends on PROC_FS
|
||||
help
|
||||
For backwards compatibility, this option allows
|
||||
deprecated /proc/acpi/ files to exist, even when
|
||||
they have been replaced by functions in /sys.
|
||||
|
||||
This option has no effect on /proc/acpi/ files
|
||||
and functions which do not yet exist in /sys.
|
||||
|
||||
Say N to delete /proc/acpi/ files that have moved to /sys/
|
||||
|
||||
config ACPI_EC_DEBUGFS
|
||||
tristate "EC read/write access through /sys/kernel/debug/ec"
|
||||
default n
|
||||
@ -115,7 +102,7 @@ config ACPI_BUTTON
|
||||
|
||||
config ACPI_VIDEO
|
||||
tristate "Video"
|
||||
depends on X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL
|
||||
depends on X86 && BACKLIGHT_CLASS_DEVICE
|
||||
depends on INPUT
|
||||
select THERMAL
|
||||
help
|
||||
@ -343,6 +330,19 @@ config ACPI_BGRT
|
||||
data from the firmware boot splash. It will appear under
|
||||
/sys/firmware/acpi/bgrt/ .
|
||||
|
||||
config ACPI_REDUCED_HARDWARE_ONLY
|
||||
bool "Hardware-reduced ACPI support only" if EXPERT
|
||||
def_bool n
|
||||
depends on ACPI
|
||||
help
|
||||
This config item changes the way the ACPI code is built. When this
|
||||
option is selected, the kernel will use a specialized version of
|
||||
ACPICA that ONLY supports the ACPI "reduced hardware" mode. The
|
||||
resulting kernel will be smaller but it will also be restricted to
|
||||
running in ACPI reduced hardware mode ONLY.
|
||||
|
||||
If you are unsure what to do, do not enable this option.
|
||||
|
||||
source "drivers/acpi/apei/Kconfig"
|
||||
|
||||
config ACPI_EXTLOG
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/power_supply.h>
|
||||
#include <linux/acpi.h>
|
||||
#include "battery.h"
|
||||
|
||||
#define PREFIX "ACPI: "
|
||||
|
||||
@ -57,6 +58,7 @@ struct acpi_ac {
|
||||
struct power_supply charger;
|
||||
struct platform_device *pdev;
|
||||
unsigned long long state;
|
||||
struct notifier_block battery_nb;
|
||||
};
|
||||
|
||||
#define to_acpi_ac(x) container_of(x, struct acpi_ac, charger)
|
||||
@ -152,6 +154,26 @@ static void acpi_ac_notify_handler(acpi_handle handle, u32 event, void *data)
|
||||
return;
|
||||
}
|
||||
|
||||
static int acpi_ac_battery_notify(struct notifier_block *nb,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
struct acpi_ac *ac = container_of(nb, struct acpi_ac, battery_nb);
|
||||
struct acpi_bus_event *event = (struct acpi_bus_event *)data;
|
||||
|
||||
/*
|
||||
* On HP Pavilion dv6-6179er AC status notifications aren't triggered
|
||||
* when adapter is plugged/unplugged. However, battery status
|
||||
* notifcations are triggered when battery starts charging or
|
||||
* discharging. Re-reading AC status triggers lost AC notifications,
|
||||
* if AC status has changed.
|
||||
*/
|
||||
if (strcmp(event->device_class, ACPI_BATTERY_CLASS) == 0 &&
|
||||
event->type == ACPI_BATTERY_NOTIFY_STATUS)
|
||||
acpi_ac_get_state(ac);
|
||||
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
static int thinkpad_e530_quirk(const struct dmi_system_id *d)
|
||||
{
|
||||
ac_sleep_before_get_state_ms = 1000;
|
||||
@ -215,6 +237,8 @@ static int acpi_ac_probe(struct platform_device *pdev)
|
||||
acpi_device_name(adev), acpi_device_bid(adev),
|
||||
ac->state ? "on-line" : "off-line");
|
||||
|
||||
ac->battery_nb.notifier_call = acpi_ac_battery_notify;
|
||||
register_acpi_notifier(&ac->battery_nb);
|
||||
end:
|
||||
if (result)
|
||||
kfree(ac);
|
||||
@ -261,6 +285,7 @@ static int acpi_ac_remove(struct platform_device *pdev)
|
||||
ac = platform_get_drvdata(pdev);
|
||||
if (ac->charger.dev)
|
||||
power_supply_unregister(&ac->charger);
|
||||
unregister_acpi_notifier(&ac->battery_nb);
|
||||
|
||||
kfree(ac);
|
||||
|
||||
|
@ -18,8 +18,6 @@
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
#define PREFIX "ACPI: "
|
||||
|
||||
ACPI_MODULE_NAME("cmos rtc");
|
||||
|
||||
static const struct acpi_device_id acpi_cmos_rtc_ids[] = {
|
||||
|
@ -33,6 +33,13 @@ ACPI_MODULE_NAME("acpi_lpss");
|
||||
#define LPSS_GENERAL_UART_RTS_OVRD BIT(3)
|
||||
#define LPSS_SW_LTR 0x10
|
||||
#define LPSS_AUTO_LTR 0x14
|
||||
#define LPSS_LTR_SNOOP_REQ BIT(15)
|
||||
#define LPSS_LTR_SNOOP_MASK 0x0000FFFF
|
||||
#define LPSS_LTR_SNOOP_LAT_1US 0x800
|
||||
#define LPSS_LTR_SNOOP_LAT_32US 0xC00
|
||||
#define LPSS_LTR_SNOOP_LAT_SHIFT 5
|
||||
#define LPSS_LTR_SNOOP_LAT_CUTOFF 3000
|
||||
#define LPSS_LTR_MAX_VAL 0x3FF
|
||||
#define LPSS_TX_INT 0x20
|
||||
#define LPSS_TX_INT_MASK BIT(1)
|
||||
|
||||
@ -102,6 +109,16 @@ static struct lpss_device_desc lpt_sdio_dev_desc = {
|
||||
.ltr_required = true,
|
||||
};
|
||||
|
||||
static struct lpss_shared_clock pwm_clock = {
|
||||
.name = "pwm_clk",
|
||||
.rate = 25000000,
|
||||
};
|
||||
|
||||
static struct lpss_device_desc byt_pwm_dev_desc = {
|
||||
.clk_required = true,
|
||||
.shared_clock = &pwm_clock,
|
||||
};
|
||||
|
||||
static struct lpss_shared_clock uart_clock = {
|
||||
.name = "uart_clk",
|
||||
.rate = 44236800,
|
||||
@ -157,6 +174,7 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
|
||||
{ "INT33C7", },
|
||||
|
||||
/* BayTrail LPSS devices */
|
||||
{ "80860F09", (unsigned long)&byt_pwm_dev_desc },
|
||||
{ "80860F0A", (unsigned long)&byt_uart_dev_desc },
|
||||
{ "80860F0E", (unsigned long)&byt_spi_dev_desc },
|
||||
{ "80860F14", (unsigned long)&byt_sdio_dev_desc },
|
||||
@ -315,6 +333,17 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static u32 __lpss_reg_read(struct lpss_private_data *pdata, unsigned int reg)
|
||||
{
|
||||
return readl(pdata->mmio_base + pdata->dev_desc->prv_offset + reg);
|
||||
}
|
||||
|
||||
static void __lpss_reg_write(u32 val, struct lpss_private_data *pdata,
|
||||
unsigned int reg)
|
||||
{
|
||||
writel(val, pdata->mmio_base + pdata->dev_desc->prv_offset + reg);
|
||||
}
|
||||
|
||||
static int lpss_reg_read(struct device *dev, unsigned int reg, u32 *val)
|
||||
{
|
||||
struct acpi_device *adev;
|
||||
@ -336,7 +365,7 @@ static int lpss_reg_read(struct device *dev, unsigned int reg, u32 *val)
|
||||
ret = -ENODEV;
|
||||
goto out;
|
||||
}
|
||||
*val = readl(pdata->mmio_base + pdata->dev_desc->prv_offset + reg);
|
||||
*val = __lpss_reg_read(pdata, reg);
|
||||
|
||||
out:
|
||||
spin_unlock_irqrestore(&dev->power.lock, flags);
|
||||
@ -389,6 +418,37 @@ static struct attribute_group lpss_attr_group = {
|
||||
.name = "lpss_ltr",
|
||||
};
|
||||
|
||||
static void acpi_lpss_set_ltr(struct device *dev, s32 val)
|
||||
{
|
||||
struct lpss_private_data *pdata = acpi_driver_data(ACPI_COMPANION(dev));
|
||||
u32 ltr_mode, ltr_val;
|
||||
|
||||
ltr_mode = __lpss_reg_read(pdata, LPSS_GENERAL);
|
||||
if (val < 0) {
|
||||
if (ltr_mode & LPSS_GENERAL_LTR_MODE_SW) {
|
||||
ltr_mode &= ~LPSS_GENERAL_LTR_MODE_SW;
|
||||
__lpss_reg_write(ltr_mode, pdata, LPSS_GENERAL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
ltr_val = __lpss_reg_read(pdata, LPSS_SW_LTR) & ~LPSS_LTR_SNOOP_MASK;
|
||||
if (val >= LPSS_LTR_SNOOP_LAT_CUTOFF) {
|
||||
ltr_val |= LPSS_LTR_SNOOP_LAT_32US;
|
||||
val = LPSS_LTR_MAX_VAL;
|
||||
} else if (val > LPSS_LTR_MAX_VAL) {
|
||||
ltr_val |= LPSS_LTR_SNOOP_LAT_32US | LPSS_LTR_SNOOP_REQ;
|
||||
val >>= LPSS_LTR_SNOOP_LAT_SHIFT;
|
||||
} else {
|
||||
ltr_val |= LPSS_LTR_SNOOP_LAT_1US | LPSS_LTR_SNOOP_REQ;
|
||||
}
|
||||
ltr_val |= val;
|
||||
__lpss_reg_write(ltr_val, pdata, LPSS_SW_LTR);
|
||||
if (!(ltr_mode & LPSS_GENERAL_LTR_MODE_SW)) {
|
||||
ltr_mode |= LPSS_GENERAL_LTR_MODE_SW;
|
||||
__lpss_reg_write(ltr_mode, pdata, LPSS_GENERAL);
|
||||
}
|
||||
}
|
||||
|
||||
static int acpi_lpss_platform_notify(struct notifier_block *nb,
|
||||
unsigned long action, void *data)
|
||||
{
|
||||
@ -426,9 +486,29 @@ static struct notifier_block acpi_lpss_nb = {
|
||||
.notifier_call = acpi_lpss_platform_notify,
|
||||
};
|
||||
|
||||
static void acpi_lpss_bind(struct device *dev)
|
||||
{
|
||||
struct lpss_private_data *pdata = acpi_driver_data(ACPI_COMPANION(dev));
|
||||
|
||||
if (!pdata || !pdata->mmio_base || !pdata->dev_desc->ltr_required)
|
||||
return;
|
||||
|
||||
if (pdata->mmio_size >= pdata->dev_desc->prv_offset + LPSS_LTR_SIZE)
|
||||
dev->power.set_latency_tolerance = acpi_lpss_set_ltr;
|
||||
else
|
||||
dev_err(dev, "MMIO size insufficient to access LTR\n");
|
||||
}
|
||||
|
||||
static void acpi_lpss_unbind(struct device *dev)
|
||||
{
|
||||
dev->power.set_latency_tolerance = NULL;
|
||||
}
|
||||
|
||||
static struct acpi_scan_handler lpss_handler = {
|
||||
.ids = acpi_lpss_device_ids,
|
||||
.attach = acpi_lpss_create_device,
|
||||
.bind = acpi_lpss_bind,
|
||||
.unbind = acpi_lpss_unbind,
|
||||
};
|
||||
|
||||
void __init acpi_lpss_init(void)
|
||||
|
@ -408,28 +408,14 @@ static int acpi_pad_pur(acpi_handle handle)
|
||||
return num;
|
||||
}
|
||||
|
||||
/* Notify firmware how many CPUs are idle */
|
||||
static void acpi_pad_ost(acpi_handle handle, int stat,
|
||||
uint32_t idle_cpus)
|
||||
{
|
||||
union acpi_object params[3] = {
|
||||
{.type = ACPI_TYPE_INTEGER,},
|
||||
{.type = ACPI_TYPE_INTEGER,},
|
||||
{.type = ACPI_TYPE_BUFFER,},
|
||||
};
|
||||
struct acpi_object_list arg_list = {3, params};
|
||||
|
||||
params[0].integer.value = ACPI_PROCESSOR_AGGREGATOR_NOTIFY;
|
||||
params[1].integer.value = stat;
|
||||
params[2].buffer.length = 4;
|
||||
params[2].buffer.pointer = (void *)&idle_cpus;
|
||||
acpi_evaluate_object(handle, "_OST", &arg_list, NULL);
|
||||
}
|
||||
|
||||
static void acpi_pad_handle_notify(acpi_handle handle)
|
||||
{
|
||||
int num_cpus;
|
||||
uint32_t idle_cpus;
|
||||
struct acpi_buffer param = {
|
||||
.length = 4,
|
||||
.pointer = (void *)&idle_cpus,
|
||||
};
|
||||
|
||||
mutex_lock(&isolated_cpus_lock);
|
||||
num_cpus = acpi_pad_pur(handle);
|
||||
@ -439,7 +425,7 @@ static void acpi_pad_handle_notify(acpi_handle handle)
|
||||
}
|
||||
acpi_pad_idle_cpus(num_cpus);
|
||||
idle_cpus = acpi_pad_idle_cpus_num();
|
||||
acpi_pad_ost(handle, 0, idle_cpus);
|
||||
acpi_evaluate_ost(handle, ACPI_PROCESSOR_AGGREGATOR_NOTIFY, 0, ¶m);
|
||||
mutex_unlock(&isolated_cpus_lock);
|
||||
}
|
||||
|
||||
|
@ -122,6 +122,8 @@ acpi-y += \
|
||||
rsaddr.o \
|
||||
rscalc.o \
|
||||
rscreate.o \
|
||||
rsdump.o \
|
||||
rsdumpinfo.o \
|
||||
rsinfo.o \
|
||||
rsio.o \
|
||||
rsirq.o \
|
||||
@ -132,8 +134,6 @@ acpi-y += \
|
||||
rsutils.o \
|
||||
rsxface.o
|
||||
|
||||
acpi-$(ACPI_FUTURE_USAGE) += rsdump.o rsdumpinfo.o
|
||||
|
||||
acpi-y += \
|
||||
tbfadt.o \
|
||||
tbfind.o \
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -115,6 +115,8 @@ ACPI_HW_DEPENDENT_RETURN_VOID(void
|
||||
char *block_arg))
|
||||
ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_db_generate_sci(void))
|
||||
|
||||
void acpi_db_execute_test(char *type_arg);
|
||||
|
||||
/*
|
||||
* dbconvert - miscellaneous conversion routines
|
||||
*/
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -51,11 +51,19 @@
|
||||
* to simplify maintenance of the code.
|
||||
*/
|
||||
#ifdef DEFINE_ACPI_GLOBALS
|
||||
#define ACPI_EXTERN
|
||||
#define ACPI_INIT_GLOBAL(a,b) a=b
|
||||
#define ACPI_GLOBAL(type,name) \
|
||||
extern type name; \
|
||||
type name
|
||||
|
||||
#define ACPI_INIT_GLOBAL(type,name,value) \
|
||||
type name=value
|
||||
|
||||
#else
|
||||
#define ACPI_EXTERN extern
|
||||
#define ACPI_INIT_GLOBAL(a,b) a
|
||||
#define ACPI_GLOBAL(type,name) \
|
||||
extern type name
|
||||
|
||||
#define ACPI_INIT_GLOBAL(type,name,value) \
|
||||
extern type name
|
||||
#endif
|
||||
|
||||
#ifdef DEFINE_ACPI_GLOBALS
|
||||
@ -82,7 +90,7 @@
|
||||
* 5) Allow unresolved references (invalid target name) in package objects
|
||||
* 6) Enable warning messages for behavior that is not ACPI spec compliant
|
||||
*/
|
||||
u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_interpreter_slack, FALSE);
|
||||
|
||||
/*
|
||||
* Automatically serialize ALL control methods? Default is FALSE, meaning
|
||||
@ -90,25 +98,25 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE);
|
||||
* Only change this if the ASL code is poorly written and cannot handle
|
||||
* reentrancy even though methods are marked "NotSerialized".
|
||||
*/
|
||||
u8 ACPI_INIT_GLOBAL(acpi_gbl_all_methods_serialized, FALSE);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_all_methods_serialized, FALSE);
|
||||
|
||||
/*
|
||||
* Create the predefined _OSI method in the namespace? Default is TRUE
|
||||
* because ACPI CA is fully compatible with other ACPI implementations.
|
||||
* Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior.
|
||||
*/
|
||||
u8 ACPI_INIT_GLOBAL(acpi_gbl_create_osi_method, TRUE);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_create_osi_method, TRUE);
|
||||
|
||||
/*
|
||||
* Optionally use default values for the ACPI register widths. Set this to
|
||||
* TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
|
||||
*/
|
||||
u8 ACPI_INIT_GLOBAL(acpi_gbl_use_default_register_widths, TRUE);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_use_default_register_widths, TRUE);
|
||||
|
||||
/*
|
||||
* Optionally enable output from the AML Debug Object.
|
||||
*/
|
||||
u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_aml_debug_object, FALSE);
|
||||
|
||||
/*
|
||||
* Optionally copy the entire DSDT to local memory (instead of simply
|
||||
@ -116,7 +124,7 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_aml_debug_object, FALSE);
|
||||
* DSDT, creating the need for this option. Default is FALSE, do not copy
|
||||
* the DSDT.
|
||||
*/
|
||||
u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_copy_dsdt_locally, FALSE);
|
||||
|
||||
/*
|
||||
* Optionally ignore an XSDT if present and use the RSDT instead.
|
||||
@ -124,7 +132,7 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_copy_dsdt_locally, FALSE);
|
||||
* of the RSDT, the XSDT has been found to be corrupt or ill-formed on
|
||||
* some machines. Default behavior is to use the XSDT if present.
|
||||
*/
|
||||
u8 ACPI_INIT_GLOBAL(acpi_gbl_do_not_use_xsdt, FALSE);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE);
|
||||
|
||||
/*
|
||||
* Optionally use 32-bit FADT addresses if and when there is a conflict
|
||||
@ -134,7 +142,7 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_do_not_use_xsdt, FALSE);
|
||||
* some machines have been found to have a corrupted non-zero 64-bit
|
||||
* address. Default is FALSE, do not favor the 32-bit addresses.
|
||||
*/
|
||||
u8 ACPI_INIT_GLOBAL(acpi_gbl_use32_bit_fadt_addresses, FALSE);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_use32_bit_fadt_addresses, FALSE);
|
||||
|
||||
/*
|
||||
* Optionally truncate I/O addresses to 16 bits. Provides compatibility
|
||||
@ -142,47 +150,28 @@ u8 ACPI_INIT_GLOBAL(acpi_gbl_use32_bit_fadt_addresses, FALSE);
|
||||
* this value is set to TRUE if any Windows OSI strings have been
|
||||
* requested by the BIOS.
|
||||
*/
|
||||
u8 ACPI_INIT_GLOBAL(acpi_gbl_truncate_io_addresses, FALSE);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_truncate_io_addresses, FALSE);
|
||||
|
||||
/*
|
||||
* Disable runtime checking and repair of values returned by control methods.
|
||||
* Use only if the repair is causing a problem on a particular machine.
|
||||
*/
|
||||
u8 ACPI_INIT_GLOBAL(acpi_gbl_disable_auto_repair, FALSE);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE);
|
||||
|
||||
/*
|
||||
* Optionally do not load any SSDTs from the RSDT/XSDT during initialization.
|
||||
* This can be useful for debugging ACPI problems on some machines.
|
||||
*/
|
||||
u8 ACPI_INIT_GLOBAL(acpi_gbl_disable_ssdt_table_load, FALSE);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_load, FALSE);
|
||||
|
||||
/*
|
||||
* We keep track of the latest version of Windows that has been requested by
|
||||
* the BIOS.
|
||||
*/
|
||||
u8 ACPI_INIT_GLOBAL(acpi_gbl_osi_data, 0);
|
||||
|
||||
/* acpi_gbl_FADT is a local copy of the FADT, converted to a common format. */
|
||||
|
||||
struct acpi_table_fadt acpi_gbl_FADT;
|
||||
u32 acpi_current_gpe_count;
|
||||
u32 acpi_gbl_trace_flags;
|
||||
acpi_name acpi_gbl_trace_method_name;
|
||||
u8 acpi_gbl_system_awake_and_running;
|
||||
|
||||
/*
|
||||
* ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
|
||||
* that the ACPI hardware is no longer required. A flag in the FADT indicates
|
||||
* a reduced HW machine, and that flag is duplicated here for convenience.
|
||||
*/
|
||||
u8 acpi_gbl_reduced_hardware;
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
|
||||
|
||||
#endif /* DEFINE_ACPI_GLOBALS */
|
||||
|
||||
/* Do not disassemble buffers to resource descriptors */
|
||||
|
||||
ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_no_resource_disassembly, FALSE);
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* ACPI Table globals
|
||||
@ -190,37 +179,36 @@ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_no_resource_disassembly, FALSE);
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* acpi_gbl_root_table_list is the master list of ACPI tables that were
|
||||
* found in the RSDT/XSDT.
|
||||
* Master list of all ACPI tables that were found in the RSDT/XSDT.
|
||||
*/
|
||||
ACPI_EXTERN struct acpi_table_list acpi_gbl_root_table_list;
|
||||
ACPI_GLOBAL(struct acpi_table_list, acpi_gbl_root_table_list);
|
||||
|
||||
/* DSDT information. Used to check for DSDT corruption */
|
||||
|
||||
ACPI_GLOBAL(struct acpi_table_header *, acpi_gbl_DSDT);
|
||||
ACPI_GLOBAL(struct acpi_table_header, acpi_gbl_original_dsdt_header);
|
||||
|
||||
#if (!ACPI_REDUCED_HARDWARE)
|
||||
ACPI_EXTERN struct acpi_table_facs *acpi_gbl_FACS;
|
||||
ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS);
|
||||
|
||||
#endif /* !ACPI_REDUCED_HARDWARE */
|
||||
|
||||
/* These addresses are calculated from the FADT Event Block addresses */
|
||||
|
||||
ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_status;
|
||||
ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_enable;
|
||||
ACPI_GLOBAL(struct acpi_generic_address, acpi_gbl_xpm1a_status);
|
||||
ACPI_GLOBAL(struct acpi_generic_address, acpi_gbl_xpm1a_enable);
|
||||
|
||||
ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_status;
|
||||
ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_enable;
|
||||
|
||||
/* DSDT information. Used to check for DSDT corruption */
|
||||
|
||||
ACPI_EXTERN struct acpi_table_header *acpi_gbl_DSDT;
|
||||
ACPI_EXTERN struct acpi_table_header acpi_gbl_original_dsdt_header;
|
||||
ACPI_GLOBAL(struct acpi_generic_address, acpi_gbl_xpm1b_status);
|
||||
ACPI_GLOBAL(struct acpi_generic_address, acpi_gbl_xpm1b_enable);
|
||||
|
||||
/*
|
||||
* Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is
|
||||
* Handle both ACPI 1.0 and ACPI 2.0+ Integer widths. The integer width is
|
||||
* determined by the revision of the DSDT: If the DSDT revision is less than
|
||||
* 2, use only the lower 32 bits of the internal 64-bit Integer.
|
||||
*/
|
||||
ACPI_EXTERN u8 acpi_gbl_integer_bit_width;
|
||||
ACPI_EXTERN u8 acpi_gbl_integer_byte_width;
|
||||
ACPI_EXTERN u8 acpi_gbl_integer_nybble_width;
|
||||
ACPI_GLOBAL(u8, acpi_gbl_integer_bit_width);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_integer_byte_width);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_integer_nybble_width);
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@ -233,36 +221,36 @@ ACPI_EXTERN u8 acpi_gbl_integer_nybble_width;
|
||||
* actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
|
||||
* (The table maps local handles to the real OS handles)
|
||||
*/
|
||||
ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[ACPI_NUM_MUTEX];
|
||||
ACPI_GLOBAL(struct acpi_mutex_info, acpi_gbl_mutex_info[ACPI_NUM_MUTEX]);
|
||||
|
||||
/*
|
||||
* Global lock mutex is an actual AML mutex object
|
||||
* Global lock semaphore works in conjunction with the actual global lock
|
||||
* Global lock spinlock is used for "pending" handshake
|
||||
*/
|
||||
ACPI_EXTERN union acpi_operand_object *acpi_gbl_global_lock_mutex;
|
||||
ACPI_EXTERN acpi_semaphore acpi_gbl_global_lock_semaphore;
|
||||
ACPI_EXTERN acpi_spinlock acpi_gbl_global_lock_pending_lock;
|
||||
ACPI_EXTERN u16 acpi_gbl_global_lock_handle;
|
||||
ACPI_EXTERN u8 acpi_gbl_global_lock_acquired;
|
||||
ACPI_EXTERN u8 acpi_gbl_global_lock_present;
|
||||
ACPI_EXTERN u8 acpi_gbl_global_lock_pending;
|
||||
ACPI_GLOBAL(union acpi_operand_object *, acpi_gbl_global_lock_mutex);
|
||||
ACPI_GLOBAL(acpi_semaphore, acpi_gbl_global_lock_semaphore);
|
||||
ACPI_GLOBAL(acpi_spinlock, acpi_gbl_global_lock_pending_lock);
|
||||
ACPI_GLOBAL(u16, acpi_gbl_global_lock_handle);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_global_lock_acquired);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_global_lock_present);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_global_lock_pending);
|
||||
|
||||
/*
|
||||
* Spinlocks are used for interfaces that can be possibly called at
|
||||
* interrupt level
|
||||
*/
|
||||
ACPI_EXTERN acpi_spinlock acpi_gbl_gpe_lock; /* For GPE data structs and registers */
|
||||
ACPI_EXTERN acpi_spinlock acpi_gbl_hardware_lock; /* For ACPI H/W except GPE registers */
|
||||
ACPI_EXTERN acpi_spinlock acpi_gbl_reference_count_lock;
|
||||
ACPI_GLOBAL(acpi_spinlock, acpi_gbl_gpe_lock); /* For GPE data structs and registers */
|
||||
ACPI_GLOBAL(acpi_spinlock, acpi_gbl_hardware_lock); /* For ACPI H/W except GPE registers */
|
||||
ACPI_GLOBAL(acpi_spinlock, acpi_gbl_reference_count_lock);
|
||||
|
||||
/* Mutex for _OSI support */
|
||||
|
||||
ACPI_EXTERN acpi_mutex acpi_gbl_osi_mutex;
|
||||
ACPI_GLOBAL(acpi_mutex, acpi_gbl_osi_mutex);
|
||||
|
||||
/* Reader/Writer lock is used for namespace walk and dynamic table unload */
|
||||
|
||||
ACPI_EXTERN struct acpi_rw_lock acpi_gbl_namespace_rw_lock;
|
||||
ACPI_GLOBAL(struct acpi_rw_lock, acpi_gbl_namespace_rw_lock);
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@ -272,70 +260,69 @@ ACPI_EXTERN struct acpi_rw_lock acpi_gbl_namespace_rw_lock;
|
||||
|
||||
/* Object caches */
|
||||
|
||||
ACPI_EXTERN acpi_cache_t *acpi_gbl_namespace_cache;
|
||||
ACPI_EXTERN acpi_cache_t *acpi_gbl_state_cache;
|
||||
ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_cache;
|
||||
ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_ext_cache;
|
||||
ACPI_EXTERN acpi_cache_t *acpi_gbl_operand_cache;
|
||||
ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_namespace_cache);
|
||||
ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_state_cache);
|
||||
ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_ps_node_cache);
|
||||
ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_ps_node_ext_cache);
|
||||
ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_operand_cache);
|
||||
|
||||
/* System */
|
||||
|
||||
ACPI_INIT_GLOBAL(u32, acpi_gbl_startup_flags, 0);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_shutdown, TRUE);
|
||||
|
||||
/* Global handlers */
|
||||
|
||||
ACPI_EXTERN struct acpi_global_notify_handler acpi_gbl_global_notify[2];
|
||||
ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler;
|
||||
ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler;
|
||||
ACPI_EXTERN acpi_table_handler acpi_gbl_table_handler;
|
||||
ACPI_EXTERN void *acpi_gbl_table_handler_context;
|
||||
ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk;
|
||||
ACPI_EXTERN acpi_interface_handler acpi_gbl_interface_handler;
|
||||
ACPI_EXTERN struct acpi_sci_handler_info *acpi_gbl_sci_handler_list;
|
||||
ACPI_GLOBAL(struct acpi_global_notify_handler, acpi_gbl_global_notify[2]);
|
||||
ACPI_GLOBAL(acpi_exception_handler, acpi_gbl_exception_handler);
|
||||
ACPI_GLOBAL(acpi_init_handler, acpi_gbl_init_handler);
|
||||
ACPI_GLOBAL(acpi_table_handler, acpi_gbl_table_handler);
|
||||
ACPI_GLOBAL(void *, acpi_gbl_table_handler_context);
|
||||
ACPI_GLOBAL(struct acpi_walk_state *, acpi_gbl_breakpoint_walk);
|
||||
ACPI_GLOBAL(acpi_interface_handler, acpi_gbl_interface_handler);
|
||||
ACPI_GLOBAL(struct acpi_sci_handler_info *, acpi_gbl_sci_handler_list);
|
||||
|
||||
/* Owner ID support */
|
||||
|
||||
ACPI_EXTERN u32 acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS];
|
||||
ACPI_EXTERN u8 acpi_gbl_last_owner_id_index;
|
||||
ACPI_EXTERN u8 acpi_gbl_next_owner_id_offset;
|
||||
ACPI_GLOBAL(u32, acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS]);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_last_owner_id_index);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_next_owner_id_offset);
|
||||
|
||||
/* Initialization sequencing */
|
||||
|
||||
ACPI_EXTERN u8 acpi_gbl_reg_methods_executed;
|
||||
ACPI_GLOBAL(u8, acpi_gbl_reg_methods_executed);
|
||||
|
||||
/* Misc */
|
||||
|
||||
ACPI_EXTERN u32 acpi_gbl_original_mode;
|
||||
ACPI_EXTERN u32 acpi_gbl_rsdp_original_location;
|
||||
ACPI_EXTERN u32 acpi_gbl_ns_lookup_count;
|
||||
ACPI_EXTERN u32 acpi_gbl_ps_find_count;
|
||||
ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save;
|
||||
ACPI_EXTERN u8 acpi_gbl_debugger_configuration;
|
||||
ACPI_EXTERN u8 acpi_gbl_step_to_next_call;
|
||||
ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present;
|
||||
ACPI_EXTERN u8 acpi_gbl_events_initialized;
|
||||
ACPI_EXTERN struct acpi_interface_info *acpi_gbl_supported_interfaces;
|
||||
ACPI_EXTERN struct acpi_address_range
|
||||
*acpi_gbl_address_range_list[ACPI_ADDRESS_RANGE_MAX];
|
||||
ACPI_GLOBAL(u32, acpi_gbl_original_mode);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_rsdp_original_location);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_ns_lookup_count);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_ps_find_count);
|
||||
ACPI_GLOBAL(u16, acpi_gbl_pm1_enable_register_save);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_debugger_configuration);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_step_to_next_call);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_acpi_hardware_present);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_events_initialized);
|
||||
ACPI_GLOBAL(struct acpi_interface_info *, acpi_gbl_supported_interfaces);
|
||||
ACPI_GLOBAL(struct acpi_address_range *,
|
||||
acpi_gbl_address_range_list[ACPI_ADDRESS_RANGE_MAX]);
|
||||
|
||||
#ifndef DEFINE_ACPI_GLOBALS
|
||||
/* Other miscellaneous, declared and initialized in utglobal */
|
||||
|
||||
/* Other miscellaneous */
|
||||
|
||||
extern u8 acpi_gbl_shutdown;
|
||||
extern u32 acpi_gbl_startup_flags;
|
||||
extern const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT];
|
||||
extern const char *acpi_gbl_lowest_dstate_names[ACPI_NUM_sx_w_METHODS];
|
||||
extern const char *acpi_gbl_highest_dstate_names[ACPI_NUM_sx_d_METHODS];
|
||||
extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
|
||||
extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
|
||||
|
||||
#endif
|
||||
extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
|
||||
|
||||
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||
|
||||
/* Lists for tracking memory allocations */
|
||||
/* Lists for tracking memory allocations (debug only) */
|
||||
|
||||
ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list;
|
||||
ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list;
|
||||
ACPI_EXTERN u8 acpi_gbl_display_final_mem_stats;
|
||||
ACPI_EXTERN u8 acpi_gbl_disable_mem_tracking;
|
||||
ACPI_GLOBAL(struct acpi_memory_list *, acpi_gbl_global_list);
|
||||
ACPI_GLOBAL(struct acpi_memory_list *, acpi_gbl_ns_node_list);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_display_final_mem_stats);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_disable_mem_tracking);
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
@ -350,22 +337,23 @@ ACPI_EXTERN u8 acpi_gbl_disable_mem_tracking;
|
||||
#define NUM_PREDEFINED_NAMES 9
|
||||
#endif
|
||||
|
||||
ACPI_EXTERN struct acpi_namespace_node acpi_gbl_root_node_struct;
|
||||
ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_root_node;
|
||||
ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_fadt_gpe_device;
|
||||
ACPI_EXTERN union acpi_operand_object *acpi_gbl_module_code_list;
|
||||
ACPI_GLOBAL(struct acpi_namespace_node, acpi_gbl_root_node_struct);
|
||||
ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_root_node);
|
||||
ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_fadt_gpe_device);
|
||||
ACPI_GLOBAL(union acpi_operand_object *, acpi_gbl_module_code_list);
|
||||
|
||||
extern const u8 acpi_gbl_ns_properties[ACPI_NUM_NS_TYPES];
|
||||
extern const struct acpi_predefined_names
|
||||
acpi_gbl_pre_defined_names[NUM_PREDEFINED_NAMES];
|
||||
|
||||
#ifdef ACPI_DEBUG_OUTPUT
|
||||
ACPI_EXTERN u32 acpi_gbl_current_node_count;
|
||||
ACPI_EXTERN u32 acpi_gbl_current_node_size;
|
||||
ACPI_EXTERN u32 acpi_gbl_max_concurrent_node_count;
|
||||
ACPI_EXTERN acpi_size *acpi_gbl_entry_stack_pointer;
|
||||
ACPI_EXTERN acpi_size *acpi_gbl_lowest_stack_pointer;
|
||||
ACPI_EXTERN u32 acpi_gbl_deepest_nesting;
|
||||
ACPI_GLOBAL(u32, acpi_gbl_current_node_count);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_current_node_size);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_max_concurrent_node_count);
|
||||
ACPI_GLOBAL(acpi_size *, acpi_gbl_entry_stack_pointer);
|
||||
ACPI_GLOBAL(acpi_size *, acpi_gbl_lowest_stack_pointer);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_deepest_nesting);
|
||||
ACPI_INIT_GLOBAL(u32, acpi_gbl_nesting_level, 0);
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
@ -374,11 +362,11 @@ ACPI_EXTERN u32 acpi_gbl_deepest_nesting;
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_EXTERN struct acpi_thread_state *acpi_gbl_current_walk_list;
|
||||
ACPI_GLOBAL(struct acpi_thread_state *, acpi_gbl_current_walk_list);
|
||||
|
||||
/* Control method single step flag */
|
||||
|
||||
ACPI_EXTERN u8 acpi_gbl_cm_single_step;
|
||||
ACPI_GLOBAL(u8, acpi_gbl_cm_single_step);
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@ -388,8 +376,9 @@ ACPI_EXTERN u8 acpi_gbl_cm_single_step;
|
||||
|
||||
extern struct acpi_bit_register_info
|
||||
acpi_gbl_bit_register_info[ACPI_NUM_BITREG];
|
||||
ACPI_EXTERN u8 acpi_gbl_sleep_type_a;
|
||||
ACPI_EXTERN u8 acpi_gbl_sleep_type_b;
|
||||
|
||||
ACPI_GLOBAL(u8, acpi_gbl_sleep_type_a);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_sleep_type_b);
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@ -399,14 +388,15 @@ ACPI_EXTERN u8 acpi_gbl_sleep_type_b;
|
||||
|
||||
#if (!ACPI_REDUCED_HARDWARE)
|
||||
|
||||
ACPI_EXTERN u8 acpi_gbl_all_gpes_initialized;
|
||||
ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head;
|
||||
ACPI_EXTERN struct acpi_gpe_block_info
|
||||
*acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS];
|
||||
ACPI_EXTERN acpi_gbl_event_handler acpi_gbl_global_event_handler;
|
||||
ACPI_EXTERN void *acpi_gbl_global_event_handler_context;
|
||||
ACPI_EXTERN struct acpi_fixed_event_handler
|
||||
acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];
|
||||
ACPI_GLOBAL(u8, acpi_gbl_all_gpes_initialized);
|
||||
ACPI_GLOBAL(struct acpi_gpe_xrupt_info *, acpi_gbl_gpe_xrupt_list_head);
|
||||
ACPI_GLOBAL(struct acpi_gpe_block_info *,
|
||||
acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]);
|
||||
ACPI_GLOBAL(acpi_gbl_event_handler, acpi_gbl_global_event_handler);
|
||||
ACPI_GLOBAL(void *, acpi_gbl_global_event_handler_context);
|
||||
ACPI_GLOBAL(struct acpi_fixed_event_handler,
|
||||
acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS]);
|
||||
|
||||
extern struct acpi_fixed_event_info
|
||||
acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
|
||||
|
||||
@ -418,23 +408,19 @@ extern struct acpi_fixed_event_info
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Procedure nesting level for debug output */
|
||||
|
||||
extern u32 acpi_gbl_nesting_level;
|
||||
|
||||
/* Event counters */
|
||||
|
||||
ACPI_EXTERN u32 acpi_method_count;
|
||||
ACPI_EXTERN u32 acpi_gpe_count;
|
||||
ACPI_EXTERN u32 acpi_sci_count;
|
||||
ACPI_EXTERN u32 acpi_fixed_event_count[ACPI_NUM_FIXED_EVENTS];
|
||||
ACPI_GLOBAL(u32, acpi_method_count);
|
||||
ACPI_GLOBAL(u32, acpi_gpe_count);
|
||||
ACPI_GLOBAL(u32, acpi_sci_count);
|
||||
ACPI_GLOBAL(u32, acpi_fixed_event_count[ACPI_NUM_FIXED_EVENTS]);
|
||||
|
||||
/* Support for dynamic control method tracing mechanism */
|
||||
|
||||
ACPI_EXTERN u32 acpi_gbl_original_dbg_level;
|
||||
ACPI_EXTERN u32 acpi_gbl_original_dbg_layer;
|
||||
ACPI_EXTERN u32 acpi_gbl_trace_dbg_level;
|
||||
ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer;
|
||||
ACPI_GLOBAL(u32, acpi_gbl_original_dbg_level);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_original_dbg_layer);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_trace_dbg_level);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_trace_dbg_layer);
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@ -442,61 +428,64 @@ ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer;
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_EXTERN u8 acpi_gbl_db_output_flags;
|
||||
ACPI_GLOBAL(u8, acpi_gbl_db_output_flags);
|
||||
|
||||
#ifdef ACPI_DISASSEMBLER
|
||||
|
||||
ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_ignore_noop_operator, FALSE);
|
||||
/* Do not disassemble buffers to resource descriptors */
|
||||
|
||||
ACPI_EXTERN u8 acpi_gbl_db_opt_disasm;
|
||||
ACPI_EXTERN u8 acpi_gbl_db_opt_verbose;
|
||||
ACPI_EXTERN u8 acpi_gbl_num_external_methods;
|
||||
ACPI_EXTERN u32 acpi_gbl_resolved_external_methods;
|
||||
ACPI_EXTERN struct acpi_external_list *acpi_gbl_external_list;
|
||||
ACPI_EXTERN struct acpi_external_file *acpi_gbl_external_file_list;
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_no_resource_disassembly, FALSE);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_ignore_noop_operator, FALSE);
|
||||
|
||||
ACPI_GLOBAL(u8, acpi_gbl_db_opt_disasm);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_db_opt_verbose);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_num_external_methods);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_resolved_external_methods);
|
||||
ACPI_GLOBAL(struct acpi_external_list *, acpi_gbl_external_list);
|
||||
ACPI_GLOBAL(struct acpi_external_file *, acpi_gbl_external_file_list);
|
||||
#endif
|
||||
|
||||
#ifdef ACPI_DEBUGGER
|
||||
|
||||
extern u8 acpi_gbl_method_executing;
|
||||
extern u8 acpi_gbl_abort_method;
|
||||
extern u8 acpi_gbl_db_terminate_threads;
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_db_terminate_threads, FALSE);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_abort_method, FALSE);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_method_executing, FALSE);
|
||||
|
||||
ACPI_EXTERN u8 acpi_gbl_db_opt_tables;
|
||||
ACPI_EXTERN u8 acpi_gbl_db_opt_stats;
|
||||
ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods;
|
||||
ACPI_EXTERN u8 acpi_gbl_db_opt_no_region_support;
|
||||
ACPI_EXTERN u8 acpi_gbl_db_output_to_file;
|
||||
ACPI_EXTERN char *acpi_gbl_db_buffer;
|
||||
ACPI_EXTERN char *acpi_gbl_db_filename;
|
||||
ACPI_EXTERN u32 acpi_gbl_db_debug_level;
|
||||
ACPI_EXTERN u32 acpi_gbl_db_console_debug_level;
|
||||
ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_db_scope_node;
|
||||
ACPI_GLOBAL(u8, acpi_gbl_db_opt_tables);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_db_opt_stats);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_db_opt_ini_methods);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_db_opt_no_region_support);
|
||||
ACPI_GLOBAL(u8, acpi_gbl_db_output_to_file);
|
||||
ACPI_GLOBAL(char *, acpi_gbl_db_buffer);
|
||||
ACPI_GLOBAL(char *, acpi_gbl_db_filename);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_db_debug_level);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_db_console_debug_level);
|
||||
ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_db_scope_node);
|
||||
|
||||
ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
|
||||
ACPI_EXTERN acpi_object_type acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS];
|
||||
ACPI_GLOBAL(char *, acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS]);
|
||||
ACPI_GLOBAL(acpi_object_type, acpi_gbl_db_arg_types[ACPI_DEBUGGER_MAX_ARGS]);
|
||||
|
||||
/* These buffers should all be the same size */
|
||||
|
||||
ACPI_EXTERN char acpi_gbl_db_line_buf[ACPI_DB_LINE_BUFFER_SIZE];
|
||||
ACPI_EXTERN char acpi_gbl_db_parsed_buf[ACPI_DB_LINE_BUFFER_SIZE];
|
||||
ACPI_EXTERN char acpi_gbl_db_scope_buf[ACPI_DB_LINE_BUFFER_SIZE];
|
||||
ACPI_EXTERN char acpi_gbl_db_debug_filename[ACPI_DB_LINE_BUFFER_SIZE];
|
||||
ACPI_GLOBAL(char, acpi_gbl_db_line_buf[ACPI_DB_LINE_BUFFER_SIZE]);
|
||||
ACPI_GLOBAL(char, acpi_gbl_db_parsed_buf[ACPI_DB_LINE_BUFFER_SIZE]);
|
||||
ACPI_GLOBAL(char, acpi_gbl_db_scope_buf[ACPI_DB_LINE_BUFFER_SIZE]);
|
||||
ACPI_GLOBAL(char, acpi_gbl_db_debug_filename[ACPI_DB_LINE_BUFFER_SIZE]);
|
||||
|
||||
/*
|
||||
* Statistic globals
|
||||
*/
|
||||
ACPI_EXTERN u16 acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX + 1];
|
||||
ACPI_EXTERN u16 acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX + 1];
|
||||
ACPI_EXTERN u16 acpi_gbl_obj_type_count_misc;
|
||||
ACPI_EXTERN u16 acpi_gbl_node_type_count_misc;
|
||||
ACPI_EXTERN u32 acpi_gbl_num_nodes;
|
||||
ACPI_EXTERN u32 acpi_gbl_num_objects;
|
||||
ACPI_GLOBAL(u16, acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX + 1]);
|
||||
ACPI_GLOBAL(u16, acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX + 1]);
|
||||
ACPI_GLOBAL(u16, acpi_gbl_obj_type_count_misc);
|
||||
ACPI_GLOBAL(u16, acpi_gbl_node_type_count_misc);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_num_nodes);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_num_objects);
|
||||
|
||||
ACPI_EXTERN u32 acpi_gbl_size_of_parse_tree;
|
||||
ACPI_EXTERN u32 acpi_gbl_size_of_method_trees;
|
||||
ACPI_EXTERN u32 acpi_gbl_size_of_node_entries;
|
||||
ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;
|
||||
ACPI_GLOBAL(u32, acpi_gbl_size_of_parse_tree);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_size_of_method_trees);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_size_of_node_entries);
|
||||
ACPI_GLOBAL(u32, acpi_gbl_size_of_acpi_objects);
|
||||
|
||||
#endif /* ACPI_DEBUGGER */
|
||||
|
||||
@ -508,7 +497,7 @@ ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;
|
||||
|
||||
#ifdef ACPI_APPLICATION
|
||||
|
||||
ACPI_FILE ACPI_INIT_GLOBAL(acpi_gbl_debug_file, NULL);
|
||||
ACPI_INIT_GLOBAL(ACPI_FILE, acpi_gbl_debug_file, NULL);
|
||||
|
||||
#endif /* ACPI_APPLICATION */
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -87,6 +87,10 @@ typedef const struct acpi_exdump_info {
|
||||
#define ACPI_EXD_PACKAGE 11
|
||||
#define ACPI_EXD_FIELD 12
|
||||
#define ACPI_EXD_REFERENCE 13
|
||||
#define ACPI_EXD_LIST 14 /* Operand object list */
|
||||
#define ACPI_EXD_HDLR_LIST 15 /* Address Handler list */
|
||||
#define ACPI_EXD_RGN_LIST 16 /* Region list */
|
||||
#define ACPI_EXD_NODE 17 /* Namespace Node */
|
||||
|
||||
/* restore default alignment */
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -63,17 +63,21 @@
|
||||
#define ACPI_SET64(ptr, val) (*ACPI_CAST64 (ptr) = (u64) (val))
|
||||
|
||||
/*
|
||||
* printf() format helpers
|
||||
* printf() format helpers. These macros are workarounds for the difficulties
|
||||
* with emitting 64-bit integers and 64-bit pointers with the same code
|
||||
* for both 32-bit and 64-bit hosts.
|
||||
*/
|
||||
|
||||
/* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */
|
||||
|
||||
#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i)
|
||||
|
||||
#if ACPI_MACHINE_WIDTH == 64
|
||||
#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i)
|
||||
#define ACPI_FORMAT_TO_UINT(i) ACPI_FORMAT_UINT64(i)
|
||||
#define ACPI_PRINTF_UINT "0x%8.8X%8.8X"
|
||||
|
||||
#else
|
||||
#define ACPI_FORMAT_NATIVE_UINT(i) 0, (i)
|
||||
#define ACPI_FORMAT_NATIVE_UINT(i) 0, (u32) (i)
|
||||
#define ACPI_FORMAT_TO_UINT(i) (u32) (i)
|
||||
#define ACPI_PRINTF_UINT "0x%8.8X"
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -48,7 +48,7 @@
|
||||
*
|
||||
* Return Package types
|
||||
*
|
||||
* 1) PTYPE1 packages do not contain sub-packages.
|
||||
* 1) PTYPE1 packages do not contain subpackages.
|
||||
*
|
||||
* ACPI_PTYPE1_FIXED: Fixed-length length, 1 or 2 object types:
|
||||
* object type
|
||||
@ -63,8 +63,8 @@
|
||||
* (Used for _PRW)
|
||||
*
|
||||
*
|
||||
* 2) PTYPE2 packages contain a Variable-length number of sub-packages. Each
|
||||
* of the different types describe the contents of each of the sub-packages.
|
||||
* 2) PTYPE2 packages contain a Variable-length number of subpackages. Each
|
||||
* of the different types describe the contents of each of the subpackages.
|
||||
*
|
||||
* ACPI_PTYPE2: Each subpackage contains 1 or 2 object types. Zero-length
|
||||
* parent package is allowed:
|
||||
@ -560,7 +560,7 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
|
||||
|
||||
/*
|
||||
* For _HPX, a single package is returned, containing a variable-length number
|
||||
* of sub-packages. Each sub-package contains a PCI record setting.
|
||||
* of subpackages. Each subpackage contains a PCI record setting.
|
||||
* There are several different type of record settings, of different
|
||||
* lengths, but all elements of all settings are Integers.
|
||||
*/
|
||||
@ -698,6 +698,12 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
|
||||
METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */
|
||||
PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
|
||||
|
||||
{{"_PRP", METHOD_0ARGS,
|
||||
METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each: 1 Str, 1 Int/Str/Pkg */
|
||||
PACKAGE_INFO(ACPI_PTYPE2, ACPI_RTYPE_STRING, 1,
|
||||
ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING |
|
||||
ACPI_RTYPE_PACKAGE | ACPI_RTYPE_REFERENCE, 1, 0),
|
||||
|
||||
{{"_PRS", METHOD_0ARGS,
|
||||
METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -49,7 +49,7 @@ extern const u8 acpi_gbl_resource_aml_serial_bus_sizes[];
|
||||
|
||||
/* Strings used by the disassembler and debugger resource dump routines */
|
||||
|
||||
#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
|
||||
#if defined(ACPI_DEBUG_OUTPUT) || defined (ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
|
||||
|
||||
extern const char *acpi_gbl_bm_decode[];
|
||||
extern const char *acpi_gbl_config_decode[];
|
||||
|
@ -7,7 +7,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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -314,6 +314,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
|
||||
{
|
||||
union acpi_operand_object *handler_obj;
|
||||
union acpi_operand_object *obj_desc;
|
||||
union acpi_operand_object *start_desc;
|
||||
union acpi_operand_object **last_obj_ptr;
|
||||
acpi_adr_space_setup region_setup;
|
||||
void **region_context;
|
||||
@ -341,6 +342,7 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
|
||||
/* Find this region in the handler's list */
|
||||
|
||||
obj_desc = handler_obj->address_space.region_list;
|
||||
start_desc = obj_desc;
|
||||
last_obj_ptr = &handler_obj->address_space.region_list;
|
||||
|
||||
while (obj_desc) {
|
||||
@ -438,6 +440,15 @@ acpi_ev_detach_region(union acpi_operand_object *region_obj,
|
||||
|
||||
last_obj_ptr = &obj_desc->region.next;
|
||||
obj_desc = obj_desc->region.next;
|
||||
|
||||
/* Prevent infinite loop if list is corrupted */
|
||||
|
||||
if (obj_desc == start_desc) {
|
||||
ACPI_ERROR((AE_INFO,
|
||||
"Circular handler list in region object %p",
|
||||
region_obj));
|
||||
return_VOID;
|
||||
}
|
||||
}
|
||||
|
||||
/* If we get here, the region was not in the handler's region list */
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -583,6 +583,18 @@ acpi_install_gpe_block(acpi_handle gpe_device,
|
||||
goto unlock_and_exit;
|
||||
}
|
||||
|
||||
/* Validate the parent device */
|
||||
|
||||
if (node->type != ACPI_TYPE_DEVICE) {
|
||||
status = AE_TYPE;
|
||||
goto unlock_and_exit;
|
||||
}
|
||||
|
||||
if (node->object) {
|
||||
status = AE_ALREADY_EXISTS;
|
||||
goto unlock_and_exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* For user-installed GPE Block Devices, the gpe_block_base_number
|
||||
* is always zero
|
||||
@ -666,6 +678,13 @@ acpi_status acpi_remove_gpe_block(acpi_handle gpe_device)
|
||||
goto unlock_and_exit;
|
||||
}
|
||||
|
||||
/* Validate the parent device */
|
||||
|
||||
if (node->type != ACPI_TYPE_DEVICE) {
|
||||
status = AE_TYPE;
|
||||
goto unlock_and_exit;
|
||||
}
|
||||
|
||||
/* Get the device_object attached to the node */
|
||||
|
||||
obj_desc = acpi_ns_get_attached_object(node);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
@ -94,12 +94,13 @@ static struct acpi_exdump_info acpi_ex_dump_buffer[5] = {
|
||||
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_buffer), NULL},
|
||||
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(buffer.length), "Length"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer.pointer), "Pointer"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(buffer.node), "Parent Node"},
|
||||
{ACPI_EXD_NODE, ACPI_EXD_OFFSET(buffer.node), "Parent Node"},
|
||||
{ACPI_EXD_BUFFER, 0, NULL}
|
||||
};
|
||||
|
||||
static struct acpi_exdump_info acpi_ex_dump_package[5] = {
|
||||
static struct acpi_exdump_info acpi_ex_dump_package[6] = {
|
||||
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_package), NULL},
|
||||
{ACPI_EXD_NODE, ACPI_EXD_OFFSET(package.node), "Parent Node"},
|
||||
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(package.flags), "Flags"},
|
||||
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(package.count), "Elements"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(package.elements), "Element List"},
|
||||
@ -108,11 +109,11 @@ static struct acpi_exdump_info acpi_ex_dump_package[5] = {
|
||||
|
||||
static struct acpi_exdump_info acpi_ex_dump_device[4] = {
|
||||
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_device), NULL},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.handler), "Handler"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.notify_list[0]),
|
||||
"System Notify"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(device.notify_list[1]),
|
||||
"Device Notify"}
|
||||
"Device Notify"},
|
||||
{ACPI_EXD_HDLR_LIST, ACPI_EXD_OFFSET(device.handler), "Handler"}
|
||||
};
|
||||
|
||||
static struct acpi_exdump_info acpi_ex_dump_event[2] = {
|
||||
@ -142,17 +143,18 @@ static struct acpi_exdump_info acpi_ex_dump_mutex[5] = {
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.os_mutex), "OsMutex"}
|
||||
};
|
||||
|
||||
static struct acpi_exdump_info acpi_ex_dump_region[7] = {
|
||||
static struct acpi_exdump_info acpi_ex_dump_region[8] = {
|
||||
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_region), NULL},
|
||||
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.space_id), "Space Id"},
|
||||
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(region.flags), "Flags"},
|
||||
{ACPI_EXD_NODE, ACPI_EXD_OFFSET(region.node), "Parent Node"},
|
||||
{ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET(region.address), "Address"},
|
||||
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(region.length), "Length"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.handler), "Handler"},
|
||||
{ACPI_EXD_HDLR_LIST, ACPI_EXD_OFFSET(region.handler), "Handler"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(region.next), "Next"}
|
||||
};
|
||||
|
||||
static struct acpi_exdump_info acpi_ex_dump_power[5] = {
|
||||
static struct acpi_exdump_info acpi_ex_dump_power[6] = {
|
||||
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_power), NULL},
|
||||
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(power_resource.system_level),
|
||||
"System Level"},
|
||||
@ -161,7 +163,8 @@ static struct acpi_exdump_info acpi_ex_dump_power[5] = {
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.notify_list[0]),
|
||||
"System Notify"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.notify_list[1]),
|
||||
"Device Notify"}
|
||||
"Device Notify"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(power_resource.handler), "Handler"}
|
||||
};
|
||||
|
||||
static struct acpi_exdump_info acpi_ex_dump_processor[7] = {
|
||||
@ -225,7 +228,7 @@ static struct acpi_exdump_info acpi_ex_dump_reference[8] = {
|
||||
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(reference.target_type), "Target Type"},
|
||||
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(reference.value), "Value"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.object), "Object Desc"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.node), "Node"},
|
||||
{ACPI_EXD_NODE, ACPI_EXD_OFFSET(reference.node), "Node"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(reference.where), "Where"},
|
||||
{ACPI_EXD_REFERENCE, 0, NULL}
|
||||
};
|
||||
@ -234,16 +237,16 @@ static struct acpi_exdump_info acpi_ex_dump_address_handler[6] = {
|
||||
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_address_handler),
|
||||
NULL},
|
||||
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(address_space.space_id), "Space Id"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.next), "Next"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.region_list),
|
||||
{ACPI_EXD_HDLR_LIST, ACPI_EXD_OFFSET(address_space.next), "Next"},
|
||||
{ACPI_EXD_RGN_LIST, ACPI_EXD_OFFSET(address_space.region_list),
|
||||
"Region List"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.node), "Node"},
|
||||
{ACPI_EXD_NODE, ACPI_EXD_OFFSET(address_space.node), "Node"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(address_space.context), "Context"}
|
||||
};
|
||||
|
||||
static struct acpi_exdump_info acpi_ex_dump_notify[7] = {
|
||||
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_notify), NULL},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.node), "Node"},
|
||||
{ACPI_EXD_NODE, ACPI_EXD_OFFSET(notify.node), "Node"},
|
||||
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(notify.handler_type), "Handler Type"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.handler), "Handler"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.context), "Context"},
|
||||
@ -252,14 +255,31 @@ static struct acpi_exdump_info acpi_ex_dump_notify[7] = {
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(notify.next[1]), "Next Device Notify"}
|
||||
};
|
||||
|
||||
static struct acpi_exdump_info acpi_ex_dump_extra[6] = {
|
||||
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_extra), NULL},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(extra.method_REG), "_REG Method"},
|
||||
{ACPI_EXD_NODE, ACPI_EXD_OFFSET(extra.scope_node), "Scope Node"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(extra.region_context),
|
||||
"Region Context"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(extra.aml_start), "Aml Start"},
|
||||
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(extra.aml_length), "Aml Length"}
|
||||
};
|
||||
|
||||
static struct acpi_exdump_info acpi_ex_dump_data[3] = {
|
||||
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_data), NULL},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(data.handler), "Handler"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(data.pointer), "Raw Data"}
|
||||
};
|
||||
|
||||
/* Miscellaneous tables */
|
||||
|
||||
static struct acpi_exdump_info acpi_ex_dump_common[4] = {
|
||||
static struct acpi_exdump_info acpi_ex_dump_common[5] = {
|
||||
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_common), NULL},
|
||||
{ACPI_EXD_TYPE, 0, NULL},
|
||||
{ACPI_EXD_UINT16, ACPI_EXD_OFFSET(common.reference_count),
|
||||
"Reference Count"},
|
||||
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common.flags), "Flags"}
|
||||
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET(common.flags), "Flags"},
|
||||
{ACPI_EXD_LIST, ACPI_EXD_OFFSET(common.next_object), "Object List"}
|
||||
};
|
||||
|
||||
static struct acpi_exdump_info acpi_ex_dump_field_common[7] = {
|
||||
@ -274,15 +294,17 @@ static struct acpi_exdump_info acpi_ex_dump_field_common[7] = {
|
||||
"Field Bit Offset"},
|
||||
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET(common_field.base_byte_offset),
|
||||
"Base Byte Offset"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET(common_field.node), "Parent Node"}
|
||||
{ACPI_EXD_NODE, ACPI_EXD_OFFSET(common_field.node), "Parent Node"}
|
||||
};
|
||||
|
||||
static struct acpi_exdump_info acpi_ex_dump_node[5] = {
|
||||
static struct acpi_exdump_info acpi_ex_dump_node[7] = {
|
||||
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_node), NULL},
|
||||
{ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(flags), "Flags"},
|
||||
{ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET(owner_id), "Owner Id"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(child), "Child List"},
|
||||
{ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET(peer), "Next Peer"}
|
||||
{ACPI_EXD_LIST, ACPI_EXD_NSOFFSET(object), "Object List"},
|
||||
{ACPI_EXD_NODE, ACPI_EXD_NSOFFSET(parent), "Parent"},
|
||||
{ACPI_EXD_NODE, ACPI_EXD_NSOFFSET(child), "Child"},
|
||||
{ACPI_EXD_NODE, ACPI_EXD_NSOFFSET(peer), "Peer"}
|
||||
};
|
||||
|
||||
/* Dispatch table, indexed by object type */
|
||||
@ -315,7 +337,9 @@ static struct acpi_exdump_info *acpi_ex_dump_info[] = {
|
||||
acpi_ex_dump_address_handler,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
NULL,
|
||||
acpi_ex_dump_extra,
|
||||
acpi_ex_dump_data
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
@ -340,6 +364,10 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc,
|
||||
char *name;
|
||||
const char *reference_name;
|
||||
u8 count;
|
||||
union acpi_operand_object *start;
|
||||
union acpi_operand_object *data = NULL;
|
||||
union acpi_operand_object *next;
|
||||
struct acpi_namespace_node *node;
|
||||
|
||||
if (!info) {
|
||||
acpi_os_printf
|
||||
@ -363,9 +391,9 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc,
|
||||
|
||||
case ACPI_EXD_TYPE:
|
||||
|
||||
acpi_ex_out_string("Type",
|
||||
acpi_ut_get_object_type_name
|
||||
(obj_desc));
|
||||
acpi_os_printf("%20s : %2.2X [%s]\n", "Type",
|
||||
obj_desc->common.type,
|
||||
acpi_ut_get_object_type_name(obj_desc));
|
||||
break;
|
||||
|
||||
case ACPI_EXD_UINT8:
|
||||
@ -433,6 +461,121 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc,
|
||||
acpi_ex_dump_reference_obj(obj_desc);
|
||||
break;
|
||||
|
||||
case ACPI_EXD_LIST:
|
||||
|
||||
start = *ACPI_CAST_PTR(void *, target);
|
||||
next = start;
|
||||
|
||||
acpi_os_printf("%20s : %p", name, next);
|
||||
if (next) {
|
||||
acpi_os_printf("(%s %2.2X)",
|
||||
acpi_ut_get_object_type_name
|
||||
(next), next->common.type);
|
||||
|
||||
while (next->common.next_object) {
|
||||
if ((next->common.type ==
|
||||
ACPI_TYPE_LOCAL_DATA) && !data) {
|
||||
data = next;
|
||||
}
|
||||
|
||||
next = next->common.next_object;
|
||||
acpi_os_printf("->%p(%s %2.2X)", next,
|
||||
acpi_ut_get_object_type_name
|
||||
(next),
|
||||
next->common.type);
|
||||
|
||||
if ((next == start) || (next == data)) {
|
||||
acpi_os_printf
|
||||
("\n**** Error: Object list appears to be circular linked");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
acpi_os_printf("\n", next);
|
||||
break;
|
||||
|
||||
case ACPI_EXD_HDLR_LIST:
|
||||
|
||||
start = *ACPI_CAST_PTR(void *, target);
|
||||
next = start;
|
||||
|
||||
acpi_os_printf("%20s : %p", name, next);
|
||||
if (next) {
|
||||
acpi_os_printf("(%s %2.2X)",
|
||||
acpi_ut_get_object_type_name
|
||||
(next), next->common.type);
|
||||
|
||||
while (next->address_space.next) {
|
||||
if ((next->common.type ==
|
||||
ACPI_TYPE_LOCAL_DATA) && !data) {
|
||||
data = next;
|
||||
}
|
||||
|
||||
next = next->address_space.next;
|
||||
acpi_os_printf("->%p(%s %2.2X)", next,
|
||||
acpi_ut_get_object_type_name
|
||||
(next),
|
||||
next->common.type);
|
||||
|
||||
if ((next == start) || (next == data)) {
|
||||
acpi_os_printf
|
||||
("\n**** Error: Handler list appears to be circular linked");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
acpi_os_printf("\n", next);
|
||||
break;
|
||||
|
||||
case ACPI_EXD_RGN_LIST:
|
||||
|
||||
start = *ACPI_CAST_PTR(void *, target);
|
||||
next = start;
|
||||
|
||||
acpi_os_printf("%20s : %p", name, next);
|
||||
if (next) {
|
||||
acpi_os_printf("(%s %2.2X)",
|
||||
acpi_ut_get_object_type_name
|
||||
(next), next->common.type);
|
||||
|
||||
while (next->region.next) {
|
||||
if ((next->common.type ==
|
||||
ACPI_TYPE_LOCAL_DATA) && !data) {
|
||||
data = next;
|
||||
}
|
||||
|
||||
next = next->region.next;
|
||||
acpi_os_printf("->%p(%s %2.2X)", next,
|
||||
acpi_ut_get_object_type_name
|
||||
(next),
|
||||
next->common.type);
|
||||
|
||||
if ((next == start) || (next == data)) {
|
||||
acpi_os_printf
|
||||
("\n**** Error: Region list appears to be circular linked");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
acpi_os_printf("\n", next);
|
||||
break;
|
||||
|
||||
case ACPI_EXD_NODE:
|
||||
|
||||
node =
|
||||
*ACPI_CAST_PTR(struct acpi_namespace_node *,
|
||||
target);
|
||||
|
||||
acpi_os_printf("%20s : %p", name, node);
|
||||
if (node) {
|
||||
acpi_os_printf(" [%4.4s]", node->name.ascii);
|
||||
}
|
||||
acpi_os_printf("\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
acpi_os_printf("**** Invalid table opcode [%X] ****\n",
|
||||
@ -821,10 +964,8 @@ void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags)
|
||||
}
|
||||
|
||||
acpi_os_printf("%20s : %4.4s\n", "Name", acpi_ut_get_node_name(node));
|
||||
acpi_ex_out_string("Type", acpi_ut_get_type_name(node->type));
|
||||
acpi_ex_out_pointer("Attached Object",
|
||||
acpi_ns_get_attached_object(node));
|
||||
acpi_ex_out_pointer("Parent", node->parent);
|
||||
acpi_os_printf("%20s : %2.2X [%s]\n", "Type",
|
||||
node->type, acpi_ut_get_type_name(node->type));
|
||||
|
||||
acpi_ex_dump_object(ACPI_CAST_PTR(union acpi_operand_object, node),
|
||||
acpi_ex_dump_node);
|
||||
@ -1017,22 +1158,26 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags)
|
||||
((struct acpi_namespace_node *)obj_desc)->
|
||||
object);
|
||||
|
||||
acpi_ex_dump_object_descriptor(((struct acpi_namespace_node *)
|
||||
obj_desc)->object, flags);
|
||||
return_VOID;
|
||||
obj_desc = ((struct acpi_namespace_node *)obj_desc)->object;
|
||||
goto dump_object;
|
||||
}
|
||||
|
||||
if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) {
|
||||
acpi_os_printf
|
||||
("ExDumpObjectDescriptor: %p is not an ACPI operand object: [%s]\n",
|
||||
acpi_os_printf("%p is not an ACPI operand object: [%s]\n",
|
||||
obj_desc, acpi_ut_get_descriptor_name(obj_desc));
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
if (obj_desc->common.type > ACPI_TYPE_NS_NODE_MAX) {
|
||||
/* Validate the object type */
|
||||
|
||||
if (obj_desc->common.type > ACPI_TYPE_LOCAL_MAX) {
|
||||
acpi_os_printf("Not a known object type: %2.2X\n",
|
||||
obj_desc->common.type);
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
dump_object:
|
||||
|
||||
/* Common Fields */
|
||||
|
||||
acpi_ex_dump_object(obj_desc, acpi_ex_dump_common);
|
||||
@ -1040,6 +1185,22 @@ acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags)
|
||||
/* Object-specific fields */
|
||||
|
||||
acpi_ex_dump_object(obj_desc, acpi_ex_dump_info[obj_desc->common.type]);
|
||||
|
||||
if (obj_desc->common.type == ACPI_TYPE_REGION) {
|
||||
obj_desc = obj_desc->common.next_object;
|
||||
if (obj_desc->common.type > ACPI_TYPE_LOCAL_MAX) {
|
||||
acpi_os_printf
|
||||
("Secondary object is not a known object type: %2.2X\n",
|
||||
obj_desc->common.type);
|
||||
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
acpi_os_printf("\nExtra attached Object (%p):\n", obj_desc);
|
||||
acpi_ex_dump_object(obj_desc,
|
||||
acpi_ex_dump_info[obj_desc->common.type]);
|
||||
}
|
||||
|
||||
return_VOID;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user