History log of /linux-master/drivers/acpi/acpica/tbfadt.c
Revision Date Author Comments
# 612c2932 05-Apr-2023 Bob Moore <robert.moore@intel.com>

ACPICA: Update all copyrights/signons to 2023

ACPICA commit 25bddd1824b1e450829468a64bbdcb38074ba3d2

Copyright updates to 2023.

Link: https://github.com/acpica/acpica/commit/25bddd18
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 51aad1a6 27-Oct-2022 Bob Moore <robert.moore@intel.com>

ACPICA: Finish support for the CDAT table

ACPICA commit 8ac4e5116f59d6f9ba2fbeb9ce22ab58237a278f

Finish support for the CDAT table, in both the data table compiler and
the disassembler.

Link: https://github.com/acpica/acpica/commit/8ac4e511
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 487ea80a 11-Apr-2022 Bob Moore <robert.moore@intel.com>

ACPICA: Update copyright notices to the year 2022

ACPICA commit 738d7b0726e6c0458ef93c0a01c0377490888d1e

Affects all source modules and utility signons.

Link: https://github.com/acpica/acpica/commit/738d7b07
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 5d6e5966 22-Dec-2021 Jessica Clarke <jrtc27@jrtc27.com>

ACPICA: Use original pointer for virtual origin tables

ACPICA commit dfa3feffa8f760b686207d09dc880cd2f26c72af

Currently the pointer to the table is cast to acpi_physical_address and
later cast back to a pointer to be dereferenced. Whether or not this is
supported is implementation-defined.

On CHERI, and thus Arm's experimental Morello prototype architecture,
pointers are represented as capabilities, which are unforgeable bounded
pointers, providing always-on fine-grained spatial memory safety. This
means that any pointer cast to a plain integer will lose all its
associated metadata, and when cast back to a pointer it will give a
null-derived pointer (one that has the same metadata as null but an
address equal to the integer) that will trap on any dereference. As a
result, this is an implementation where acpi_physical_address cannot be
used as a hack to store real pointers.

Thus, alter the lifecycle of table descriptors. Internal physical tables
keep the current behaviour where only the address is set on install, and
the pointer is set on acquire. Virtual tables (internal and external)
now store the pointer on initialisation and use that on acquire (which
will redundantly set *table_ptr to itself, but changing that is both
unnecessary and overly complicated as acpi_tb_acquire_table is called with
both a pointer to a variable and a pointer to Table->Pointer itself).

This requires propagating the (possible) table pointer everywhere in
order to make sure pointers make it through to acpi_tb_acquire_temp_table,
which requires a change to the acpi_install_table interface. Instead of
taking an ACPI_PHYSADDR_TYPE and a boolean indicating whether it's
physical or virtual, it is now split into acpi_install_table (that takes
an external virtual table pointer) and acpi_install_physical_table (that
takes an ACPI_PHYSADDR_TYPE for an internal physical table address).
This also has the benefit of providing a cleaner API.

Link: https://github.com/acpica/acpica/commit/dfa3feff
Signed-off-by: Bob Moore <robert.moore@intel.com>
[ rjw: Adjust the code in tables.c to match interface changes ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 4441e55d 15-Jan-2021 Bob Moore <robert.moore@intel.com>

ACPICA: Updated all copyrights to 2021

This affects all ACPICA source code modules.

ACPICA commit c570953c914437e621dd5f160f26ddf352e0d2f4

Link: https://github.com/acpica/acpica/commit/c570953c
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 800ba7c5 10-Jan-2020 Bob Moore <robert.moore@intel.com>

ACPICA: All acpica: Update copyrights to 2020 Including tool signons.

ACPICA commit 8b9c69d0984067051ffbe8526f871448ead6a26b

Link: https://github.com/acpica/acpica/commit/8b9c69d0
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# c163f90c 15-Feb-2019 Erik Kaneda <erik.kaneda@intel.com>

ACPI/ACPICA: Trivial: fix spelling mistakes and fix whitespace formatting

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 840c02ca 14-Jan-2019 Bob Moore <robert.moore@intel.com>

ACPICA: All acpica: Update copyrights to 2019

ACPICA commit 62f4f98e941d86e41969bf2ab5a93b8dc94dc49e

The update includes userspace tool signons.

Link: https://github.com/acpica/acpica/commit/62f4f98e
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 95857638 14-Mar-2018 Erik Kaneda <erik.kaneda@intel.com>

ACPICA: adding SPDX headers

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# da6f8320 04-Jan-2018 Bob Moore <robert.moore@intel.com>

ACPICA: All acpica: Update copyrights to 2018

including tool signons.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 32d8004f 05-Jun-2017 Cao Jin <caoj.fnst@cn.fujitsu.com>

ACPICA: Update comments, no functional change

ACPICA commit 45eb6384fb47f4fdc5759f63c47a9b6799924972

Link: https://github.com/acpica/acpica/commit/45eb6384
Signed-off-by: Cao Jin <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 7735ca0e 07-Feb-2017 Bob Moore <robert.moore@intel.com>

ACPICA: Source tree: Update copyright notices to 2017

ACPICA commit 16577e5265923f4999b4d2c0addb2343b18135e1

Affects all files.

Link: https://github.com/acpica/acpica/commit/16577e52
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 66360faa 14-Dec-2016 Lv Zheng <lv.zheng@intel.com>

ACPICA: Tables: Allow FADT to be customized with virtual address

ACPICA commit d98de9ca14891130efc5dcdc871b97eb27b4b0f5

FADT parsing code requires FADT to be installed as
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, using new
acpi_tb_get_table()/acpi_tb_put_table(), other address types can also be allowed,
thus facilitates FADT customization with virtual address. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/d98de9ca
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# e2174b0c 14-Nov-2016 Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Revert "ACPICA: FADT support cleanup"

Pavel Machek reports that commit 6ea8c546f365 (ACPICA: FADT support
cleanup) breaks thermal management on his Thinkpad X60 and T40p, so
revert it.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=187311
Fixes: 6ea8c546f365 (ACPICA: FADT support cleanup)
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 4e0b26d3 07-Sep-2016 Lv Zheng <lv.zheng@intel.com>

ACPICA: Tables: Override all 64-bit GAS fields when acpi_gbl_use32_bit_fadt_addresses is TRUE

ACPICA commit aaace77db4c3b267a65b75c33f84ace6f65bbcf7

Originally, when acpi_gbl_use32_bit_fadt_addresses is TRUE, GAS override can
only happen when the Address field mismatches.

According to the investigation result, Windows may favor 32-bit FADT
addresses in some cases. So we need this quirk working after enabling full
GAS support. This requires us to override GAS access_size/bit_width/bit_offset
fields as long as acpi_gbl_use32_bit_fadt_addresses is TRUE.
This patch enhances this quirk mechanism to make it working with full GAS
support. Lv Zheng.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=151501
Link: https://github.com/acpica/acpica/commit/aaace77d
Reported-and-tested-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 752db101 07-Sep-2016 Lv Zheng <lv.zheng@intel.com>

ACPICA: Tables: Remove acpi_tb_install_fixed_table()

ACPICA commit 42c7b848d2faa02c7691ef2c53ea741c23cd4665

acpi_tb_install_fixed_table() is now redundant as we've removed the fixed
table indexing mechanism:
Commit: 8ec3f459073e67e5c6d78507dec693064b3040a2
Subject: ACPICA: Tables: Fix global table list issues by removing
fixed table indexes
This patch cleans up the code accordingly.

No functional change. Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1320
Link: https://github.com/acpica/acpica/commit/42c7b848
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 6ea8c546 04-Aug-2016 Bob Moore <robert.moore@intel.com>

ACPICA: FADT support cleanup

ACPICA commit 34ccd43af3fd1870fddfac0617dd0ba706963558

Remove all vestiges of the version 2 FADT which never was included
in the ACPI specification.

This enabled significant cleanup of both the data table compiler
and the disassembler.

Added many clarification comments to associate each FADT version
with the version of the ACPI spec where it was originally
defined.

Link: https://github.com/acpica/acpica/commit/34ccd43a
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# f5c1e1c5 04-May-2016 Lv Zheng <lv.zheng@intel.com>

ACPICA: Divergence: remove unwanted spaces for typedef

ACPICA commit b2294cae776f5a66a7697414b21949d307e6856f

This patch removes unwanted spaces for typedef. This solution doesn't cover
function types.

Note that the linuxize result of this commit is very giant and should have
many conflicts against the current Linux upstream. Thus it is required to
modify the linuxize result of this commit and the commits around it
manually in order to have them merged to the Linux upstream. Since this is
very costy, we should do this only once, and if we can't ensure to do this
only once, we need to revert the Linux code to the wrong indentation result
before merging the linuxize result of this commit. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/b2294cae
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 0dfaaa3d 23-Mar-2016 Bob Moore <robert.moore@intel.com>

ACPICA: All: const keyword changes across the ACPICA source

ACPICA commit a240cbb93647bddf525b3daf6e9d31b8b9bca34e

Integrated most changes proposed by net_BSD.
>From joerg@net_BSD.org (Joerg Sonnenberger)
ACPICA BZ 732.

Link: https://github.com/acpica/acpica/commit/a240cbb9
Link: https://bugs.acpica.org/show_bug.cgi?id=732
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# b94cd811 23-Mar-2016 Bob Moore <robert.moore@intel.com>

ACPICA: Tables: Update FADT handling

ACPICA commit bca0c4cb063ee488c543e6f160fe89679a2338d6

Update a warning message
simplify versioning for "table too big" case.

Link: https://github.com/acpica/acpica/commit/bca0c4cb
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# c8100dc4 14-Jan-2016 Bob Moore <robert.moore@intel.com>

ACPICA: Additional 2016 copyright changes

All tool/utility signons.
Dual-license module header.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 62fcce91 13-Oct-2015 Lv Zheng <lv.zheng@intel.com>

ACPICA: Tables: Fix FADT dependency regression

Some logics actually relying on the existence of FADT, currently relies on
the number of loaded tables. This false dependency can easily trigger
regressions. One of them has been introduced by commit 8ec3f459073e
(ACPICA: Tables: Fix global table list issues by removing fixed table).

The commit changing the fixed table indexes results in the change of FADT
table index, originally, it was 3 (thus the installed table count should be
greater than 4), while currently it is 0 (and the installed table count may
be 3).

This patch fixes this regression by cleaning up the code. Lv Zheng.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=105351
Fixes: 8ec3f459073e (ACPICA: Tables: Fix global table list issues by removing fixed table)
Reported-and-tested-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 8ec3f459 24-Aug-2015 Lv Zheng <lv.zheng@intel.com>

ACPICA: Tables: Fix global table list issues by removing fixed table indexes

ACPICA commit c0b38b4c3982c2336ee92a2a14716107248bd941

The fixed table indexes leave holes in the global table list:
1. One hole can be seen when there is only 1 FACS provided by the BIOS.
2. Tow holes can be seen when it is a reduced hardware platform.
The holes do not break OSPMs but have broken ACPI debugger "tables"
command.

Also the "fixed table indexes" mechanism may make the descriptors of the
standard tables installed earlier than DSDT to be overwritten by the
descriptors of the fixed tables. For example, FACP disappears from the
global table list after DSDT is installed.

This patch fixes all above issues by removing the "fixed table indexes"
mechanism which is too complicated to be maintained in a regression safe
manner. After removal, the table loader will determine the indexes of the
fixed tables. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/c0b38b4c
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 4fa4616e 01-Jul-2015 Bob Moore <robert.moore@intel.com>

ACPICA: De-macroize calls to standard C library functions

ACPICA commit 3b1026e0bdd3c32eb6d5d313f3ba0b1fee7597b4
ACPICA commit 00f0dc83f5cfca53b27a3213ae0d7719b88c2d6b
ACPICA commit 47d22a738d0e19fd241ffe4e3e9d4e198e4afc69

Across all of ACPICA. Replace C library macros such as ACPI_STRLEN with the
standard names such as strlen. The original purpose for these macros is
long since obsolete.
Also cast various invocations as necessary. Bob Moore, Jung-uk Kim, Lv Zheng.

Link: https://github.com/acpica/acpica/commit/3b1026e0
Link: https://github.com/acpica/acpica/commit/00f0dc83
Link: https://github.com/acpica/acpica/commit/47d22a73
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# c04e1fb4 01-Jul-2015 Lv Zheng <lv.zheng@intel.com>

ACPICA: Tables: Enable both 32-bit and 64-bit FACS

ACPICA commit f7b86f35416e3d1f71c3d816ff5075ddd33ed486

The following commit is reported to have broken s2ram on some platforms:
Commit: 0249ed2444d65d65fc3f3f64f398f1ad0b7e54cd
ACPICA: Add option to favor 32-bit FADT addresses.
The platform reports 2 FACS tables (which is not allowed by ACPI
specification) and the new 32-bit address favor rule forces OSPMs to use
the FACS table reported via FADT's X_FIRMWARE_CTRL field.

The root cause of the reported bug might be one of the followings:
1. BIOS may favor the 64-bit firmware waking vector address when the
version of the FACS is greater than 0 and Linux currently only supports
resuming from the real mode, so the 64-bit firmware waking vector has
never been set and might be invalid to BIOS while the commit enables
higher version FACS.
2. BIOS may favor the FACS reported via the "FIRMWARE_CTRL" field in the
FADT while the commit doesn't set the firmware waking vector address of
the FACS reported by "FIRMWARE_CTRL", it only sets the firware waking
vector address of the FACS reported by "X_FIRMWARE_CTRL".

This patch excludes the cases that can trigger the bugs caused by the root
cause 2.

There is no handshaking mechanism can be used by OSPM to tell BIOS which
FACS is currently used. Thus the FACS reported by "FIRMWARE_CTRL" may still
be used by BIOS and the 0 value of the 32-bit firmware waking vector might
trigger such failure.

This patch tries to favor 32bit FACS address in another way where both the
FACS reported by "FIRMWARE_CTRL" and the FACS reported by "X_FIRMWARE_CTRL"
are loaded so that further commit can set firmware waking vector in the
both tables to ensure we can exclude the cases that trigger the bugs caused
by the root cause 2. The exclusion is split into 2 commits as this commit
is also useful for dumping more ACPI tables, it won't get reverted when
such exclusion is no longer necessary. Lv Zheng.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=74021
Link: https://github.com/acpica/acpica/commit/f7b86f35
Cc: 3.14.1+ <stable@vger.kernel.org> # 3.14.1+
Reported-and-tested-by: Oswald Buddenhagen <ossi@kde.org>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 82a80941 05-Feb-2015 David E. Box <david.e.box@linux.intel.com>

ACPICA: Update Copyright headers to 2015

ACPICA commit 8990e73ab2aa15d6a0068b860ab54feff25bee36

Link: https://github.com/acpica/acpica/commit/8990e73a
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 21126b29 29-Apr-2014 Bob Moore <robert.moore@intel.com>

ACPICA: Remove extraneous error message for large number of GPEs.

Fixes a problem where an extraneous error message was emitted during
initialization if there is a GPE block larger than 255 bits. Any
GPE block larger than 120 GPEs could generate the error.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 86dfc6f3 03-Apr-2014 Lv Zheng <lv.zheng@intel.com>

ACPICA: Tables: Fix table checksums verification before installation.

The original table handling code does not always verify checksums before
installing a table, this is because code to achieve this must be
implemented here and there in the redundant code blocks.

There are two stages during table initialization:
1. "INSTALLED" after acpi_tb_install_table() and acpi_tb_override_table(),
struct acpi_table_desc.Pointer is ensured to be NULL. This can be safely used
during OSPM's early boot stage.
2. "VALIDATED" after acpi_tb_validate_table(), struct acpi_table_desc.Pointer is
ensured to be not NULL. This must not be used during OSPM's early boot
stage.

This patch changes acpi_tb_add_table() into an early boot safe API to reduce
code redundancies by changing the table state that is returned by this
function from "VALIDATED" to "INSTALLED". Then the table verification
code can be done in a single place. Originally, the acpi_tb_add_table() can
only be used by dynamic table loadings that are executed after early boot
stage, it cannot be used by static table loadings that are executed in
early boot stage as:
1. The address of the table is a virtual address either maintained by
OSPMs who call acpi_load_table() or by ACPICA whenever "Load" or
"LoadTable" opcodes are executed, while during early boot stage,
physical address of the table should be used for table loading.
2. The API will ensure the state of the loaded table to be "VALIDATED"
while during early boot stage, tables maintained by root table list
should be kept as "INSTALLED".

To achieve this:
1. Rename acpi_tb_install_table() to acpi_tb_install_fixed_table() as it only
applies to DSDT/FACS installation. Rename acpi_tb_add_table() to
acpi_tb_install_non_fixed_table() as it will be applied to the installation
of the rest kinds of tables.
2. Introduce acpi_tb_install_table(), acpi_tb_install_and_override_table to collect
redudant code where their invocations actually have slight differences.
1. acpi_tb_install_table() is used to fill an struct acpi_table_desc where the
table length is known to the caller.
2. acpi_tb_install_and_override_table() is used to perform necessary
overriding before installation.
3. Change a parameter of acpi_tb_install_non_fixed_table() from struct acpi_table_desc
to acpi_physical_address to allow it to be invoked by static table
loadings. Also cleanup acpi_ex_load_op() and acpi_load_table() to accomodate
to the parameter change.
4. Invoke acpi_tb_install_non_fixed_table() for all table loadings other than
DSDT/FACS in acpi_tb_parse_root_table() to improve code maintainability
(logics are collected in the single function). Also delete useless code
from acpi_tb_parse_root_table().
5. Remove all acpi_tb_validate_table() from acpi_tb_install_non_fixed_table() and
acpi_tb_install_fixed_table() so that the table descriptor is kept in the
state of "INSTALLED" but not "VALIDATED" after returning from these
functions.
6. Introduce temporary struct acpi_table_desc (new_table_desc/old_table_desc) into
the functions to indicate a table descriptor that is not maintained by
acpi_gbl_root_table_list. Introduce acpi_tb_acquire_temporal_table() and
acpi_tb_release_temporal_table() to handle the use cases of such temporal
tables. They are only used for verified installation.
7. Introduce acpi_tb_verify_table() to validate table and verify table
checksum, also remove table checksum verification from
acpi_tb_validate_table(). Invoke acpi_tb_validate_table() in the functions
that will convert a table into "LOADED" state or invoke it from
acpi_get_table_XXX() APIs. Invoke acpi_tb_verify_table() on temporary
struct acpi_table_desc(s) that are going to be "INSTALLED".
8. Change acpi_tb_override_table() logic so that a temporary struct acpi_table_desc
will be overridden before installtion, this makes code simpler.

After applying the patch, tables are always installed after being
overridden and the table checksums are always verified before installation.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
[rjw: Subject]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# fbb7a2dc 07-Feb-2014 Bob Moore <robert.moore@intel.com>

ACPICA: Update ACPICA copyrights to 2014.

Update ACPICA copyrights to 2014. Includes all source headers and
signons for the various tools.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 0249ed24 07-Jan-2014 Bob Moore <robert.moore@intel.com>

ACPICA: Add option to favor 32-bit FADT addresses.

This change adds an option to favor 32-bit FADT addresses when there
is a conflict between the 32-bit and 64-bit versions of the same
address. The default behavior is to use the 64-bit version in accordance
with the ACPI specification. This can now be overridden via the
AcpiGbl_Use32BitFadtAddresses flag. Lv Zheng.

Also, the "Convert FADT" and "Verify FADT" functions have been merged to
simplify the code, make it easier to understand, and make it easier to
maintain. Bob Moore.

References: https://bugs.acpica.org/show_bug.cgi?id=885
References: https://bugs.acpica.org/show_bug.cgi?id=993
Original-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 1d82980c9 08-Aug-2013 Bob Moore <robert.moore@intel.com>

ACPICA: Make ACPI Power Management Timer (PM Timer) optional.

PM Timer is now optional.
This support is already in Windows8 and "SHOULD" come out in ACPI 5.0A
(if all goes well).

The change doesn't affect Linux directly, because it does not rely
on the presence of the PM timer.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 6d1490e2 11-Apr-2013 Linn Crosetto <linn@hp.com>

ACPICA: FADT: Remove extraneous warning for very large GPE registers

This change removes a size mismatch warning if the legacy
length field for a GPE register set is larger than the 64-bit
GAS structure can accomodate. GPE register sets can be larger
than the 255 bit limitation of the GAS structure. Linn Crosetto
(linn@hp.com).

Signed-off-by: Linn Crosetto <linn@hp.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 25f044e6 24-Jan-2013 Bob Moore <robert.moore@intel.com>

ACPICA: Update ACPICA copyrights to 2013

Includes all source headers and signons for the various tools.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# 75c8044f 18-Dec-2012 Lv Zheng <lv.zheng@intel.com>

ACPICA: Cleanup updated comments.

This is a cosmetic patch only. Comparison of the resulting binary showed
only line number differences.

This patch does not affect the generation of the Linux binary.
This patch decreases 558 lines of 20121018 divergence.diff.

This patch reduces the source code diff between Linux and ACPICA by
cleaning the comments that already have been updated in ACPICA.

There is no extra indentation done in this patch. Even the empty line
deletions and insertions are also splitted into another cleanup patch so
that this patch can be easily reviewed, and the binary differences can be
held to a lowest level.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>


# ba494bee 11-Jul-2012 Bob Moore <robert.moore@intel.com>

ACPICA: AcpiSrc: Fix some translation issues for Linux conversion

Fixes issues like this:

i_aSL -> iASL
00-7_f -> 00-7F
local_fADT -> local_FADT
execute_oSI -> execute_OSI

Also, in function headers, the parameters are now translated to
lower case (with underscores if necessary.)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# 3b3ea775 15-Jul-2012 Bob Moore <robert.moore@intel.com>

ACPICA: Table manager: deploy new firmware error/warning interfaces

Emit firmware error/warning messages where appropriate for table
and FADT errors.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# 66be71ff 22-May-2012 Bob Moore <robert.moore@intel.com>

ACPICA: Add FADT error message for GAS BitWidth overflow

Error for possible overflow during conversion from 32-bit legacy
register addresses to GAS format. The GAS struct contains a
one-byte BitWidth field, meaning that the maximum length of a
register is 255 bits. ACPICA BZ 953.

https://www.acpica.org/bugzilla/show_bug.cgi?id=953

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# 3e80acd1 23-Feb-2012 Julian Anastasov <ja@ssi.bg>

ACPICA: Fix regression in FADT revision checks

commit 64b3db22c04586997ab4be46dd5a5b99f8a2d390 (2.6.39),
"Remove use of unreliable FADT revision field" causes regression
for old P4 systems because now cst_control and other fields are
not reset to 0.

The effect is that acpi_processor_power_init will notice
cst_control != 0 and a write to CST_CNT register is performed
that should not happen. As result, the system oopses after the
"No _CST, giving up" message, sometimes in acpi_ns_internalize_name,
sometimes in acpi_ns_get_type, usually at random places. May be
during migration to CPU 1 in acpi_processor_get_throttling.

Every one of these settings help to avoid this problem:
- acpi=off
- processor.nocst=1
- maxcpus=1

The fix is to update acpi_gbl_FADT.header.length after
the original value is used to check for old revisions.

https://bugzilla.kernel.org/show_bug.cgi?id=42700
https://bugzilla.redhat.com/show_bug.cgi?id=727865

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# 77848130 11-Jan-2012 Bob Moore <robert.moore@intel.com>

ACPICA: Update all copyrights to 2012

Update all copyrights to 2012.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# ecafe6fa 11-Jan-2012 Bob Moore <robert.moore@intel.com>

ACPICA: Update for larger ACPI 5 FADT size

FADT is now larger than 256 bytes, so all FADT offsets must be
changed from 8 bits to 16 bits.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# 22e5b40a 15-Nov-2011 Bob Moore <robert.moore@intel.com>

ACPI 5.0: Implement hardware-reduced option

If HW-reduced flag is set in the FADT, do not attempt to access
or initialize any ACPI hardware, including SCI and global lock.
No FACS will be present.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# 2355e10f 15-Nov-2011 Bob Moore <robert.moore@intel.com>

ACPI 5.0: Basic support for FADT version 5

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# 64b3db22 14-Feb-2011 Bob Moore <robert.moore@intel.com>

ACPICA: Remove use of unreliable FADT revision field

The revision number in the FADT has been found to be completely
unreliable and cannot be trusted. Only the table length can be
used to infer the actual version.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# b4e104ea 16-Jan-2011 Bob Moore <robert.moore@intel.com>

ACPICA: Update all ACPICA copyrights and signons to 2011

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# 8f40f171 14-Sep-2010 Lin Ming <ming.m.lin@intel.com>

ACPICA: Add ACPI_INLINE configuration parameter

The C inline keyword is not standardized, ACPI_INLINE allows this
to be configured on a per-compiler basis.

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# f6a22b0b 05-Mar-2010 Bob Moore <robert.moore@intel.com>

ACPICA: Standardize integer output for ACPICA warnings/errors

Always use 0x prefix for hex output, use %u for integer output
(all integers are unsigned.)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# a8357b0c 22-Jan-2010 Bob Moore <robert.moore@intel.com>

ACPICA: Update all ACPICA copyrights and signons to 2010

Add 2010 copyright to all module headers and signons, including
the Linux header. This affects virtually every file in the ACPICA
core subsystem, iASL compiler, and all utilities.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# 878f4f53 16-Sep-2009 Felipe Contreras <felipe.contreras@gmail.com>

x86: Trivial whitespace cleanups

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Cc: Vegard Nossum <vegardno@ifi.uio.no>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alok N Kataria <akataria@vmware.com>
Cc: "Tan Wei Chong" <wei.chong.tan@intel.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Lin Ming <ming.m.lin@intel.com>
Cc: Bob Moore <robert.moore@intel.com>
LKML-Reference: <1253137123-18047-2-git-send-email-felipe.contreras@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


# e4c1ebfc 21-Apr-2009 Bob Moore <robert.moore@intel.com>

ACPICA: Miscellaneous lint changes

Unused variables/headers, casting, etc.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# b21245a8 21-Apr-2009 Bob Moore <robert.moore@intel.com>

ACPICA: Fix printf format warnings for 64-bit build

Fix warnings caused by size_t and ACPI_SIZE changing to 64 bits.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# f6556306 18-Mar-2009 Bob Moore <robert.moore@intel.com>

ACPICA: FADT: Favor 32-bit FACS and DSDT addresses

If both the 32-bit and 64-bit addresses are non-null, use the
32-bit address. Provides Windows compatibility.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# 31fbc073 18-Mar-2009 Bob Moore <robert.moore@intel.com>

ACPICA: FADT: Favor 32-bit register addresses for compatibility

Use the 32-bit register addresses whenever they are non-zero. This
means that the 32-bit addresses are favored over the 64-bit
(GAS) addresses. The 64-bit addresses are only used if the 32-bit
addresses are zero. This change provides compatibility with all
versions of Windows. The worst case that this solves is when both
the 32-bit and 64-bit addresses are non-zero, but only the 32-bit
addresses are actually valid. This appears to happen in some
BIOSes because in this case, Windows uses the 32-bit addresses.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# aab61b67 05-Mar-2009 Bob Moore <robert.moore@intel.com>

ACPICA: FADT: Fix extraneous length mismatch warning

Incorrect register length mismatch between the 32 and 64 bit
registers in some cases. Code was was checking the wrong pointer
for non-zero, should be looking at the address within the GAS
structure.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# ec41f193 18-Feb-2009 Bob Moore <robert.moore@intel.com>

ACPICA: Formatting update - no functional changes

Split some long lines.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# 5e053e77 03-Mar-2009 Lin Ming <ming.m.lin@intel.com>

ACPICA: Check for non-zero address before being converted to GAS

Reported-by: FreeBSD community
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# 531c633d 17-Feb-2009 Bob Moore <robert.moore@intel.com>

ACPICA: Split out PM1 status registers from the FADT

Add new globals for the PM1 status registers (A/B), similar to the
way the PM1 enable registers are handled. Instead of overloading
the FADT Event Register blocks. This makes the code clearer and
less prone to error.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# 97cbb7d1 02-Feb-2009 Bob Moore <robert.moore@intel.com>

ACPICA: Remove extraneous parameter in table manager

Removed the Flags parameter from several internal functions since
it was not being used.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>


# e2f7a777 08-Jan-2009 Len Brown <len.brown@intel.com>

ACPICA: hide private headers

Signed-off-by: Len Brown <len.brown@intel.com>


# 95b482a8 08-Jan-2009 Len Brown <len.brown@intel.com>

ACPICA: create acpica/ directory

also, delete sleep/ and delete ACPI_CFLAGS from Makefile

Signed-off-by: Len Brown <len.brown@intel.com>