Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1171080 > unrolled thread
| Started by | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| First post | 2015-06-24 05:10 +0200 |
| Last post | 2015-06-24 05:10 +0200 |
| Articles | 10 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 00/28] ACPICA: 20150619 Release Lv Zheng <lv.zheng@intel.com> - 2015-06-24 05:10 +0200
[PATCH v2 21/28] ACPICA: acpidump: Convert the default behavior to dump from /sys/firmware/acpi/tables. Lv Zheng <lv.zheng@intel.com> - 2015-06-24 05:10 +0200
[PATCH v2 09/28] ACPICA: Tables: Enable default 64-bit FADT addresses favor. Lv Zheng <lv.zheng@intel.com> - 2015-06-24 05:10 +0200
[PATCH v2 25/28] ACPICA: Update definitions for the TCPA and TPM2 ACPI tables. Lv Zheng <lv.zheng@intel.com> - 2015-06-24 05:10 +0200
[PATCH v2 13/28] ACPICA: Utilities: Add _CLS processing Lv Zheng <lv.zheng@intel.com> - 2015-06-24 05:10 +0200
[PATCH v2 05/28] ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS. Lv Zheng <lv.zheng@intel.com> - 2015-06-24 05:10 +0200
Re: [PATCH v2 05/28] ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS. "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-06-25 01:40 +0200
RE: [PATCH v2 05/28] ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS. "Zheng, Lv" <lv.zheng@intel.com> - 2015-06-25 02:50 +0200
[PATCH v2 07/28] ACPICA: Tables: Fix an issue that FACS initialization is performed twice. Lv Zheng <lv.zheng@intel.com> - 2015-06-24 05:10 +0200
[PATCH v2 20/28] ACPICA: acpidump: Allow customized tables to be dumped without accessing /dev/mem. Lv Zheng <lv.zheng@intel.com> - 2015-06-24 05:10 +0200
| From | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| Date | 2015-06-24 05:10 +0200 |
| Subject | [PATCH v2 00/28] ACPICA: 20150619 Release |
| Message-ID | <pEJex-5H5-3@gated-at.bofh.it> |
The 20150619 ACPICA kernel-resident subsystem updates are linuxized based
on the linux-pm/linux-next branch.
The patchset has passed the following build/boot tests.
Build tests are performed as follows:
1. i386 + default + COFNIG_ACPI=y
2. i386 + allyes + CONFIG_ACPI=y
3. i386 + default + COFNIG_ACPI=n
4. i386 + allyes + CONFIG_ACPI=n
5. x86_64 + default + COFNIG_ACPI=y
6. x86_64 + allyes + CONFIG_ACPI=y
7. x86_64 + default + COFNIG_ACPI=n
8. x86_64 + allyes + CONFIG_ACPI=n
Boot tests are performed as follows:
1. i386 + default + COFNIG_ACPI=y
2. x86_64 + default + COFNIG_ACPI=y
Where:
1. i386: machine named as "Dell Inspiron Mini 1010"
2. x86_64: machine named as "HP Compaq 8200 Elite SFF PC"
3. default: kernel configuration with following items enabled:
All hardware drivers related to the machines of i386/x86_64
All drivers/acpi configurations
All platform drivers
The divergences checking result:
Before applying (20150515 Release):
565 lines
After applying (20150619 Release):
539 lines
Bob Moore (8):
ACPICA: Namespace: Add support of OSDT table.
ACPICA: Namespace: Change namespace override to avoid node deletion.
ACPICA: Cleanup output for the ASL Debug object.
ACPICA: De-macroize calls to standard C library functions.
ACPICA: Split C library prototypes to new header.
ACPICA: Update definitions for the TCPA and TPM2 ACPI tables.
ACPICA: Update TPM2 ACPI table.
ACPICA: Update version to 20150619.
Hanjun Guo (1):
ACPICA: ACPI 6.0: Add values for MADT GIC version field.
Lv Zheng (15):
ACPICA: Linuxize: Reduce divergences for 20150619 release.
ACPICA: Linuxize: Replace __FUNCTION__ with __func__.
ACPICA: Hardware: Enable 64-bit firmware waking vector for selected
FACS.
ACPICA: Tables: Enable both 32-bit and 64-bit FACS.
ACPICA: Hardware: Enable firmware waking vector for both 32-bit and
64-bit FACS.
ACPICA: Hardware: Cleanup the return values in
acpi_set_waking_vector().
ACPICA: Tables: Fix an issue that FACS initialization is performed
twice.
ACPICA: Tables: Fix an issue that ACPI initialization is blocked due
to no FACS.
ACPICA: Tables: Enable default 64-bit FADT addresses favor.
ACPICA: MSVC6: Fix build issue for variable argument macros.
ACPICA: EFI: Add EFI interface definitions to eliminate dependency of
GNU EFI.
ACPICA: Namespace: Add support to allow overriding objects.
ACPICA: acpidump: Allow customized tables to be dumped without
accessing /dev/mem.
ACPICA: acpidump: Convert the default behavior to dump from
/sys/firmware/acpi/tables.
ACPI / acpidump: Update acpidump manual.
Sascha Wildner (1):
ACPICA: Add dragon_fly support to unix file mapping file.
Suravee Suthikulpanit (1):
ACPICA: Utilities: Add _CLS processing
Zhang Rui (1):
ACPICA: Update for acpi_install_table memory types.
gongzg (1):
ACPICA: Comment update, no functional change.
arch/ia64/include/asm/acpi.h | 3 +-
arch/ia64/kernel/acpi.c | 2 -
arch/x86/include/asm/acpi.h | 3 +-
drivers/acpi/acpica/accommon.h | 3 +
drivers/acpi/acpica/acglobal.h | 2 +
drivers/acpi/acpica/acinterp.h | 2 +
drivers/acpi/acpica/aclocal.h | 1 +
drivers/acpi/acpica/acnamesp.h | 1 +
drivers/acpi/acpica/acobject.h | 1 +
drivers/acpi/acpica/acstruct.h | 1 +
drivers/acpi/acpica/acutils.h | 64 +------------
drivers/acpi/acpica/dsfield.c | 2 +-
drivers/acpi/acpica/dsinit.c | 2 +-
drivers/acpi/acpica/dsobject.c | 7 +-
drivers/acpi/acpica/dsutils.c | 4 +-
drivers/acpi/acpica/dswload.c | 17 +++-
drivers/acpi/acpica/evgpeinit.c | 2 +-
drivers/acpi/acpica/exconfig.c | 2 +-
drivers/acpi/acpica/exconvrt.c | 9 +-
drivers/acpi/acpica/exdebug.c | 42 +++++++-
drivers/acpi/acpica/exdump.c | 9 +-
drivers/acpi/acpica/exfield.c | 2 +-
drivers/acpi/acpica/exfldio.c | 52 +++++-----
drivers/acpi/acpica/exmisc.c | 36 +++----
drivers/acpi/acpica/exnames.c | 2 +-
drivers/acpi/acpica/exoparg2.c | 8 +-
drivers/acpi/acpica/exoparg3.c | 4 +-
drivers/acpi/acpica/exregion.c | 9 +-
drivers/acpi/acpica/exstorob.c | 18 ++--
drivers/acpi/acpica/exutils.c | 32 +++++++
drivers/acpi/acpica/hwxfsleep.c | 85 +++++++++++------
drivers/acpi/acpica/nsaccess.c | 16 +++-
drivers/acpi/acpica/nsconvert.c | 10 +-
drivers/acpi/acpica/nsdump.c | 2 +-
drivers/acpi/acpica/nseval.c | 7 +-
drivers/acpi/acpica/nsinit.c | 4 +-
drivers/acpi/acpica/nsparse.c | 7 ++
drivers/acpi/acpica/nsrepair2.c | 2 +-
drivers/acpi/acpica/nssearch.c | 37 +++++++-
drivers/acpi/acpica/nsutils.c | 3 +-
drivers/acpi/acpica/nsxfeval.c | 5 +-
drivers/acpi/acpica/nsxfname.c | 29 ++++--
drivers/acpi/acpica/psutils.c | 7 +-
drivers/acpi/acpica/rscreate.c | 6 +-
drivers/acpi/acpica/rsmisc.c | 8 +-
drivers/acpi/acpica/rsutils.c | 13 ++-
drivers/acpi/acpica/rsxface.c | 8 +-
drivers/acpi/acpica/tbdata.c | 8 +-
drivers/acpi/acpica/tbfadt.c | 27 +++---
drivers/acpi/acpica/tbfind.c | 21 ++--
drivers/acpi/acpica/tbinstal.c | 7 +-
drivers/acpi/acpica/tbprint.c | 10 +-
drivers/acpi/acpica/tbutils.c | 37 +++++---
drivers/acpi/acpica/tbxface.c | 17 ++--
drivers/acpi/acpica/tbxfload.c | 17 ++--
drivers/acpi/acpica/utalloc.c | 6 +-
drivers/acpi/acpica/utbuffer.c | 4 +-
drivers/acpi/acpica/utcache.c | 6 +-
drivers/acpi/acpica/utcopy.c | 42 ++++----
drivers/acpi/acpica/utdebug.c | 4 +-
drivers/acpi/acpica/utids.c | 100 ++++++++++++++++++--
drivers/acpi/acpica/utmisc.c | 9 +-
drivers/acpi/acpica/utosi.c | 9 +-
drivers/acpi/acpica/utpredef.c | 4 +-
drivers/acpi/acpica/utprint.c | 6 +-
drivers/acpi/acpica/utstring.c | 33 ++++---
drivers/acpi/acpica/uttrack.c | 8 +-
drivers/acpi/acpica/utxface.c | 8 +-
drivers/acpi/acpica/utxfinit.c | 10 +-
drivers/acpi/sleep.c | 8 +-
include/acpi/acnames.h | 1 +
include/acpi/acoutput.h | 13 ++-
include/acpi/acpixf.h | 31 ++++--
include/acpi/actbl.h | 1 +
include/acpi/actbl1.h | 11 +++
include/acpi/actbl2.h | 80 ++++++++++++++--
include/acpi/actbl3.h | 34 +------
include/acpi/actypes.h | 33 ++++---
include/acpi/platform/acenv.h | 39 --------
include/acpi/platform/acenvex.h | 6 ++
include/acpi/platform/acgcc.h | 4 +
tools/power/acpi/common/getopt.c | 4 +-
tools/power/acpi/man/acpidump.8 | 17 +++-
.../acpi/os_specific/service_layers/oslinuxtbl.c | 95 ++++++++++---------
.../acpi/os_specific/service_layers/osunixmap.c | 2 +-
tools/power/acpi/tools/acpidump/acpidump.h | 2 +-
tools/power/acpi/tools/acpidump/apdump.c | 8 +-
tools/power/acpi/tools/acpidump/apfiles.c | 12 +--
tools/power/acpi/tools/acpidump/apmain.c | 15 ++-
89 files changed, 851 insertions(+), 549 deletions(-)
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| Date | 2015-06-24 05:10 +0200 |
| Subject | [PATCH v2 21/28] ACPICA: acpidump: Convert the default behavior to dump from /sys/firmware/acpi/tables. |
| Message-ID | <pEJez-5H5-53@gated-at.bofh.it> |
| In reply to | #1171080 |
ACPICA commit 04c3bd7e9d6aeb2b3edebe99c90dc271ae4e6353
In order to work without any additional option to dump tables when /dev/mem
doesn't exist, this patch switches the default behavior of acpidump to dump
from /sys/firmware/acpi/tables. Reported by Al Stone, Fixed by Lv Zheng.
Link: https://github.com/acpica/acpica/commit/04c3bd7e
Reported-by: Al Stone <ahs3@redhat.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
tools/power/acpi/tools/acpidump/acpidump.h | 2 +-
tools/power/acpi/tools/acpidump/apmain.c | 15 ++++++++++++---
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/tools/power/acpi/tools/acpidump/acpidump.h b/tools/power/acpi/tools/acpidump/acpidump.h
index 84bdef0..eed5344 100644
--- a/tools/power/acpi/tools/acpidump/acpidump.h
+++ b/tools/power/acpi/tools/acpidump/acpidump.h
@@ -66,7 +66,7 @@
EXTERN u8 INIT_GLOBAL(gbl_summary_mode, FALSE);
EXTERN u8 INIT_GLOBAL(gbl_verbose_mode, FALSE);
EXTERN u8 INIT_GLOBAL(gbl_binary_mode, FALSE);
-EXTERN u8 INIT_GLOBAL(gbl_dump_customized_tables, FALSE);
+EXTERN u8 INIT_GLOBAL(gbl_dump_customized_tables, TRUE);
EXTERN u8 INIT_GLOBAL(gbl_do_not_dump_xsdt, FALSE);
EXTERN ACPI_FILE INIT_GLOBAL(gbl_output_file, NULL);
EXTERN char INIT_GLOBAL(*gbl_output_filename, NULL);
diff --git a/tools/power/acpi/tools/acpidump/apmain.c b/tools/power/acpi/tools/acpidump/apmain.c
index d0ba653..57620f6 100644
--- a/tools/power/acpi/tools/acpidump/apmain.c
+++ b/tools/power/acpi/tools/acpidump/apmain.c
@@ -80,7 +80,7 @@ struct ap_dump_action action_table[AP_MAX_ACTIONS];
u32 current_action = 0;
#define AP_UTILITY_NAME "ACPI Binary Table Dump Utility"
-#define AP_SUPPORTED_OPTIONS "?a:bcf:hn:o:r:svxz"
+#define AP_SUPPORTED_OPTIONS "?a:bc:f:hn:o:r:svxz"
/******************************************************************************
*
@@ -96,7 +96,6 @@ static void ap_display_usage(void)
ACPI_USAGE_HEADER("acpidump [options]");
ACPI_OPTION("-b", "Dump tables to binary files");
- ACPI_OPTION("-c", "Dump customized tables");
ACPI_OPTION("-h -?", "This help message");
ACPI_OPTION("-o <File>", "Redirect output to file");
ACPI_OPTION("-r <Address>", "Dump tables from specified RSDP");
@@ -107,6 +106,7 @@ static void ap_display_usage(void)
ACPI_USAGE_TEXT("\nTable Options:\n");
ACPI_OPTION("-a <Address>", "Get table via a physical address");
+ ACPI_OPTION("-c <on|off>", "Turning on/off customized table dumping");
ACPI_OPTION("-f <BinaryFile>", "Get table via a binary file");
ACPI_OPTION("-n <Signature>", "Get table via a name/signature");
ACPI_OPTION("-x", "Do not use but dump XSDT");
@@ -181,7 +181,16 @@ static int ap_do_options(int argc, char **argv)
case 'c': /* Dump customized tables */
- gbl_dump_customized_tables = TRUE;
+ if (!strcmp(acpi_gbl_optarg, "on")) {
+ gbl_dump_customized_tables = TRUE;
+ } else if (!strcmp(acpi_gbl_optarg, "off")) {
+ gbl_dump_customized_tables = FALSE;
+ } else {
+ acpi_log_error
+ ("%s: Cannot handle this switch, please use on|off\n",
+ acpi_gbl_optarg);
+ return (-1);
+ }
continue;
case 'h':
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| Date | 2015-06-24 05:10 +0200 |
| Subject | [PATCH v2 09/28] ACPICA: Tables: Enable default 64-bit FADT addresses favor. |
| Message-ID | <pEJez-5H5-55@gated-at.bofh.it> |
| In reply to | #1171080 |
ACPICA commit 4da56eeae0749dfe8491285c1e1fad48f6efafd8 The following commit temporarily disables correct 64-bit FADT addresses favor during the period the root cause of the bug is not fixed: Commit: 85dbd5801f62b66e2aa7826aaefcaebead44c8a6 ACPICA: Tables: Restore old behavor to favor 32-bit FADT addresses. With enough protections, this patch re-enables 64-bit FADT addresses by default. If regressions are reported against such change, this patch should be bisected and reverted. Note that 64-bit FACS favor and 64-bit firmware waking vector favor are excluded by this commit in order not to break OSPMs. Lv Zheng. Link: https://bugzilla.kernel.org/show_bug.cgi?id=74021 Link: https://github.com/acpica/acpica/commit/4da56eea Cc: 3.15.1+ <stable@vger.kernel.org> # 3.15.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> --- include/acpi/acpixf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index dec71ff..00daa3c 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -195,9 +195,9 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE); * address. Although ACPICA adheres to the ACPI specification which * requires the use of the corresponding 64-bit address if it is non-zero, * some machines have been found to have a corrupted non-zero 64-bit - * address. Default is TRUE, favor the 32-bit addresses. + * address. Default is FALSE, do not favor the 32-bit addresses. */ -ACPI_INIT_GLOBAL(u8, acpi_gbl_use32_bit_fadt_addresses, TRUE); +ACPI_INIT_GLOBAL(u8, acpi_gbl_use32_bit_fadt_addresses, FALSE); /* * Optionally use 32-bit FACS table addresses. -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| Date | 2015-06-24 05:10 +0200 |
| Subject | [PATCH v2 25/28] ACPICA: Update definitions for the TCPA and TPM2 ACPI tables. |
| Message-ID | <pEJez-5H5-57@gated-at.bofh.it> |
| In reply to | #1171080 |
From: Bob Moore <robert.moore@intel.com>
ACPICA commit 33140b4498666337dd33a00cf3c4797a53981a7b
Changes for a new version of the 3rd party spec for these tables,
the "TCG ACPI Specification", December 14, 2014. Also, moved the
definition of TPM2 to actbl2.h, next to TCPA, since both should
be together.
Update the table compiler/disassembler code for the tables.
However, the "Server" TCPA table is not supported at this time.
Link: https://github.com/acpica/acpica/commit/33140b44
Reported-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
include/acpi/actbl2.h | 86 +++++++++++++++++++++++++++++++++++++++++++++----
include/acpi/actbl3.h | 34 ++-----------------
2 files changed, 81 insertions(+), 39 deletions(-)
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 370d69d..2a9dcc1 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -51,8 +51,8 @@
* These tables are not consumed directly by the ACPICA subsystem, but are
* included here to support device drivers and the AML disassembler.
*
- * The tables in this file are defined by third-party specifications, and are
- * not defined directly by the ACPI specification itself.
+ * Generally, the tables in this file are defined by third-party specifications,
+ * and are not defined directly by the ACPI specification itself.
*
******************************************************************************/
@@ -80,6 +80,7 @@
#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
#define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
#define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
+#define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */
#define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
#define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */
#define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */
@@ -1179,18 +1180,89 @@ enum acpi_spmi_interface_types {
/*******************************************************************************
*
* TCPA - Trusted Computing Platform Alliance table
- * Version 1
+ * Version 2
+ *
+ * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
+ * December 19, 2014
*
- * Conforms to "TCG PC Specific Implementation Specification",
- * Version 1.1, August 18, 2003
+ * NOTE: There are two versions of the table with the same signature --
+ * the client version and the server version.
*
******************************************************************************/
-struct acpi_table_tcpa {
+struct acpi_table_tcpa_client {
+ struct acpi_table_header header; /* Common ACPI table header */
+ u16 platform_class;
+ u32 minimum_log_length; /* Minimum length for the event log area */
+ u64 log_address; /* Address of the event log area */
+};
+
+struct acpi_table_tcpa_server {
struct acpi_table_header header; /* Common ACPI table header */
+ u16 platform_class;
u16 reserved;
- u32 max_log_length; /* Maximum length for the event log area */
+ u64 minimum_log_length; /* Minimum length for the event log area */
u64 log_address; /* Address of the event log area */
+ u16 spec_revision;
+ u8 device_flags;
+ u8 interrupt_flags;
+ u8 gpe_number;
+ u8 reserved2[3];
+ u32 global_interrupt;
+ struct acpi_generic_address address;
+ u32 reserved3;
+ struct acpi_generic_address config_address;
+ u8 group;
+ u8 bus; /* PCI Bus/Segment/Function numbers */
+ u8 device;
+ u8 function;
+};
+
+/* Values for device_flags above */
+
+#define ACPI_TCPA_PCI_DEVICE (1)
+#define ACPI_TCPA_BUS_PNP (1<<1)
+#define ACPI_TCPA_ADDRESS_VALID (1<<2)
+
+/* Values for interrupt_flags above */
+
+#define ACPI_TCPA_INTERRUPT_MODE (1)
+#define ACPI_TCPA_INTERRUPT_POLARITY (1<<1)
+#define ACPI_TCPA_SCI_VIA_GPE (1<<2)
+#define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3)
+
+/*******************************************************************************
+ *
+ * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
+ * Version 4
+ *
+ * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0",
+ * December 19, 2014
+ *
+ ******************************************************************************/
+
+struct acpi_table_tpm2 {
+ struct acpi_table_header header; /* Common ACPI table header */
+ u16 platform_class;
+ u16 reserved;
+ u64 control_address;
+ u32 start_method;
+
+ /* Platform-specific data follows */
+};
+
+/* Control area structure (not part of table, pointed to by control_address) */
+
+struct acpi_tpm2_control {
+ u32 reserved;
+ u32 error;
+ u32 cancel;
+ u32 start;
+ u64 interrupt_control;
+ u32 command_size;
+ u64 command_address;
+ u32 response_size;
+ u64 response_address;
};
/*******************************************************************************
diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h
index 4018986..1df8916 100644
--- a/include/acpi/actbl3.h
+++ b/include/acpi/actbl3.h
@@ -51,7 +51,8 @@
* These tables are not consumed directly by the ACPICA subsystem, but are
* included here to support device drivers and the AML disassembler.
*
- * The tables in this file are fully defined within the ACPI specification.
+ * In general, the tables in this file are fully defined within the ACPI
+ * specification.
*
******************************************************************************/
@@ -69,7 +70,6 @@
#define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */
#define ACPI_SIG_RASF "RASF" /* RAS Feature table */
#define ACPI_SIG_STAO "STAO" /* Status Override table */
-#define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */
#define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */
#define ACPI_SIG_XENV "XENV" /* Xen Environment table */
@@ -722,36 +722,6 @@ struct acpi_table_stao {
/*******************************************************************************
*
- * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table
- * Version 3
- *
- * Conforms to "TPM 2.0 Hardware Interface Table (TPM2)" 29 November 2011
- *
- ******************************************************************************/
-
-struct acpi_table_tpm2 {
- struct acpi_table_header header; /* Common ACPI table header */
- u32 flags;
- u64 control_address;
- u32 start_method;
-};
-
-/* Control area structure (not part of table, pointed to by control_address) */
-
-struct acpi_tpm2_control {
- u32 reserved;
- u32 error;
- u32 cancel;
- u32 start;
- u64 interrupt_control;
- u32 command_size;
- u64 command_address;
- u32 response_size;
- u64 response_address;
-};
-
-/*******************************************************************************
- *
* WPBT - Windows Platform Environment Table (ACPI 6.0)
* Version 1
*
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| Date | 2015-06-24 05:10 +0200 |
| Subject | [PATCH v2 13/28] ACPICA: Utilities: Add _CLS processing |
| Message-ID | <pEJez-5H5-37@gated-at.bofh.it> |
| In reply to | #1171080 |
From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
ACPICA commit 9a2b638acb3a7215209432e070c6bd0312374229
ACPI Device object often contains a _CLS object to supply PCI-defined class
code for the device. This patch introduces logic to process the _CLS
object. Suravee Suthikulpanit, Lv Zheng.
Link: https://github.com/acpica/acpica/commit/9a2b638a
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/acinterp.h | 2 +
drivers/acpi/acpica/acutils.h | 4 ++
drivers/acpi/acpica/exutils.c | 32 ++++++++++++++
drivers/acpi/acpica/nsxfname.c | 23 ++++++++--
drivers/acpi/acpica/utids.c | 91 +++++++++++++++++++++++++++++++++++++++-
include/acpi/acnames.h | 1 +
include/acpi/actypes.h | 24 +++++++----
7 files changed, 164 insertions(+), 13 deletions(-)
diff --git a/drivers/acpi/acpica/acinterp.h b/drivers/acpi/acpica/acinterp.h
index 1886bde..7ac9800 100644
--- a/drivers/acpi/acpica/acinterp.h
+++ b/drivers/acpi/acpica/acinterp.h
@@ -468,6 +468,8 @@ void acpi_ex_eisa_id_to_string(char *dest, u64 compressed_id);
void acpi_ex_integer_to_string(char *dest, u64 value);
+void acpi_ex_pci_cls_to_string(char *dest, u8 class_code[3]);
+
u8 acpi_is_valid_space_id(u8 space_id);
/*
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index d49f5c7..6391c97 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -430,6 +430,10 @@ acpi_status
acpi_ut_execute_CID(struct acpi_namespace_node *device_node,
struct acpi_pnp_device_id_list ** return_cid_list);
+acpi_status
+acpi_ut_execute_CLS(struct acpi_namespace_node *device_node,
+ struct acpi_pnp_device_id **return_id);
+
/*
* utlock - reader/writer locks
*/
diff --git a/drivers/acpi/acpica/exutils.c b/drivers/acpi/acpica/exutils.c
index 3f4225e..30c3f46 100644
--- a/drivers/acpi/acpica/exutils.c
+++ b/drivers/acpi/acpica/exutils.c
@@ -380,6 +380,38 @@ void acpi_ex_integer_to_string(char *out_string, u64 value)
/*******************************************************************************
*
+ * FUNCTION: acpi_ex_pci_cls_to_string
+ *
+ * PARAMETERS: out_string - Where to put the converted string (7 bytes)
+ * PARAMETERS: class_code - PCI class code to be converted (3 bytes)
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Convert 3-bytes PCI class code to string representation.
+ * Return buffer must be large enough to hold the string. The
+ * string returned is always exactly of length
+ * ACPI_PCICLS_STRING_SIZE (includes null terminator).
+ *
+ ******************************************************************************/
+
+void acpi_ex_pci_cls_to_string(char *out_string, u8 class_code[3])
+{
+
+ ACPI_FUNCTION_ENTRY();
+
+ /* All 3 bytes are hexadecimal */
+
+ out_string[0] = acpi_ut_hex_to_ascii_char((u64)class_code[0], 4);
+ out_string[1] = acpi_ut_hex_to_ascii_char((u64)class_code[0], 0);
+ out_string[2] = acpi_ut_hex_to_ascii_char((u64)class_code[1], 4);
+ out_string[3] = acpi_ut_hex_to_ascii_char((u64)class_code[1], 0);
+ out_string[4] = acpi_ut_hex_to_ascii_char((u64)class_code[2], 4);
+ out_string[5] = acpi_ut_hex_to_ascii_char((u64)class_code[2], 0);
+ out_string[6] = 0;
+}
+
+/*******************************************************************************
+ *
* FUNCTION: acpi_is_valid_space_id
*
* PARAMETERS: space_id - ID to be validated
diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c
index d66c326..dc0836a 100644
--- a/drivers/acpi/acpica/nsxfname.c
+++ b/drivers/acpi/acpica/nsxfname.c
@@ -260,7 +260,7 @@ static char *acpi_ns_copy_device_id(struct acpi_pnp_device_id *dest,
* control methods (Such as in the case of a device.)
*
* For Device and Processor objects, run the Device _HID, _UID, _CID, _SUB,
- * _STA, _ADR, _sx_w, and _sx_d methods.
+ * _CLS, _STA, _ADR, _sx_w, and _sx_d methods.
*
* Note: Allocates the return buffer, must be freed by the caller.
*
@@ -276,11 +276,12 @@ acpi_get_object_info(acpi_handle handle,
struct acpi_pnp_device_id *hid = NULL;
struct acpi_pnp_device_id *uid = NULL;
struct acpi_pnp_device_id *sub = NULL;
+ struct acpi_pnp_device_id *cls = NULL;
char *next_id_string;
acpi_object_type type;
acpi_name name;
u8 param_count = 0;
- u8 valid = 0;
+ u16 valid = 0;
u32 info_size;
u32 i;
acpi_status status;
@@ -320,7 +321,7 @@ acpi_get_object_info(acpi_handle handle,
if ((type == ACPI_TYPE_DEVICE) || (type == ACPI_TYPE_PROCESSOR)) {
/*
* Get extra info for ACPI Device/Processor objects only:
- * Run the Device _HID, _UID, _SUB, and _CID methods.
+ * Run the Device _HID, _UID, _SUB, _CID, and _CLS methods.
*
* Note: none of these methods are required, so they may or may
* not be present for this device. The Info->Valid bitfield is used
@@ -363,6 +364,14 @@ acpi_get_object_info(acpi_handle handle,
sizeof(struct acpi_pnp_device_id_list));
valid |= ACPI_VALID_CID;
}
+
+ /* Execute the Device._CLS method */
+
+ status = acpi_ut_execute_CLS(node, &cls);
+ if (ACPI_SUCCESS(status)) {
+ info_size += cls->length;
+ valid |= ACPI_VALID_CLS;
+ }
}
/*
@@ -486,6 +495,11 @@ acpi_get_object_info(acpi_handle handle,
}
}
+ if (cls) {
+ next_id_string = acpi_ns_copy_device_id(&info->class_code,
+ cls, next_id_string);
+ }
+
/* Copy the fixed-length data */
info->info_size = info_size;
@@ -510,6 +524,9 @@ cleanup:
if (cid_list) {
ACPI_FREE(cid_list);
}
+ if (cls) {
+ ACPI_FREE(cls);
+ }
return (status);
}
diff --git a/drivers/acpi/acpica/utids.c b/drivers/acpi/acpica/utids.c
index 27431cf..3afe07f 100644
--- a/drivers/acpi/acpica/utids.c
+++ b/drivers/acpi/acpica/utids.c
@@ -1,6 +1,6 @@
/******************************************************************************
*
- * Module Name: utids - support for device Ids - HID, UID, CID
+ * Module Name: utids - support for device Ids - HID, UID, CID, SUB, CLS
*
*****************************************************************************/
@@ -416,3 +416,92 @@ cleanup:
acpi_ut_remove_reference(obj_desc);
return_ACPI_STATUS(status);
}
+
+/*******************************************************************************
+ *
+ * FUNCTION: acpi_ut_execute_CLS
+ *
+ * PARAMETERS: device_node - Node for the device
+ * return_id - Where the _CLS is returned
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Executes the _CLS control method that returns PCI-defined
+ * class code of the device. The _CLS value is always a package
+ * containing PCI class information as a list of integers.
+ * The returned string has format "BBSSPP", where:
+ * BB = Base-class code
+ * SS = Sub-class code
+ * PP = Programming Interface code
+ *
+ ******************************************************************************/
+
+acpi_status
+acpi_ut_execute_CLS(struct acpi_namespace_node *device_node,
+ struct acpi_pnp_device_id **return_id)
+{
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object **cls_objects;
+ u32 count;
+ struct acpi_pnp_device_id *cls;
+ u32 length;
+ acpi_status status;
+ u8 class_code[3] = { 0, 0, 0 };
+
+ ACPI_FUNCTION_TRACE(ut_execute_CLS);
+
+ status = acpi_ut_evaluate_object(device_node, METHOD_NAME__CLS,
+ ACPI_BTYPE_PACKAGE, &obj_desc);
+ if (ACPI_FAILURE(status)) {
+ return_ACPI_STATUS(status);
+ }
+
+ /* Get the size of the String to be returned, includes null terminator */
+
+ length = ACPI_PCICLS_STRING_SIZE;
+ cls_objects = obj_desc->package.elements;
+ count = obj_desc->package.count;
+
+ if (obj_desc->common.type == ACPI_TYPE_PACKAGE) {
+ if (count > 0
+ && cls_objects[0]->common.type == ACPI_TYPE_INTEGER) {
+ class_code[0] = (u8)cls_objects[0]->integer.value;
+ }
+ if (count > 1
+ && cls_objects[1]->common.type == ACPI_TYPE_INTEGER) {
+ class_code[1] = (u8)cls_objects[1]->integer.value;
+ }
+ if (count > 2
+ && cls_objects[2]->common.type == ACPI_TYPE_INTEGER) {
+ class_code[2] = (u8)cls_objects[2]->integer.value;
+ }
+ }
+
+ /* Allocate a buffer for the CLS */
+
+ cls =
+ ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_pnp_device_id) +
+ (acpi_size) length);
+ if (!cls) {
+ status = AE_NO_MEMORY;
+ goto cleanup;
+ }
+
+ /* Area for the string starts after PNP_DEVICE_ID struct */
+
+ cls->string =
+ ACPI_ADD_PTR(char, cls, sizeof(struct acpi_pnp_device_id));
+
+ /* Simply copy existing string */
+
+ acpi_ex_pci_cls_to_string(cls->string, class_code);
+ cls->length = length;
+ *return_id = cls;
+
+cleanup:
+
+ /* On exit, we must delete the return object */
+
+ acpi_ut_remove_reference(obj_desc);
+ return_ACPI_STATUS(status);
+}
diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h
index 273de70..b52c0dc 100644
--- a/include/acpi/acnames.h
+++ b/include/acpi/acnames.h
@@ -51,6 +51,7 @@
#define METHOD_NAME__BBN "_BBN"
#define METHOD_NAME__CBA "_CBA"
#define METHOD_NAME__CID "_CID"
+#define METHOD_NAME__CLS "_CLS"
#define METHOD_NAME__CRS "_CRS"
#define METHOD_NAME__DDN "_DDN"
#define METHOD_NAME__HID "_HID"
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index ff0b53e..d791b98 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -1141,6 +1141,10 @@ u32 (*acpi_interface_handler) (acpi_string interface_name, u32 supported);
#define ACPI_UUID_LENGTH 16
+/* Length of 3-byte PCI class code values when converted back to a string */
+
+#define ACPI_PCICLS_STRING_SIZE 7 /* Includes null terminator */
+
/* Structures used for device/processor HID, UID, CID, and SUB */
struct acpi_pnp_device_id {
@@ -1163,7 +1167,7 @@ struct acpi_device_info {
u32 name; /* ACPI object Name */
acpi_object_type type; /* ACPI object Type */
u8 param_count; /* If a method, required parameter count */
- u8 valid; /* Indicates which optional fields are valid */
+ u16 valid; /* Indicates which optional fields are valid */
u8 flags; /* Miscellaneous info */
u8 highest_dstates[4]; /* _sx_d values: 0xFF indicates not valid */
u8 lowest_dstates[5]; /* _sx_w values: 0xFF indicates not valid */
@@ -1172,6 +1176,7 @@ struct acpi_device_info {
struct acpi_pnp_device_id hardware_id; /* _HID value */
struct acpi_pnp_device_id unique_id; /* _UID value */
struct acpi_pnp_device_id subsystem_id; /* _SUB value */
+ struct acpi_pnp_device_id class_code; /* _CLS value */
struct acpi_pnp_device_id_list compatible_id_list; /* _CID list <must be last> */
};
@@ -1181,14 +1186,15 @@ struct acpi_device_info {
/* Flags for Valid field above (acpi_get_object_info) */
-#define ACPI_VALID_STA 0x01
-#define ACPI_VALID_ADR 0x02
-#define ACPI_VALID_HID 0x04
-#define ACPI_VALID_UID 0x08
-#define ACPI_VALID_SUB 0x10
-#define ACPI_VALID_CID 0x20
-#define ACPI_VALID_SXDS 0x40
-#define ACPI_VALID_SXWS 0x80
+#define ACPI_VALID_STA 0x0001
+#define ACPI_VALID_ADR 0x0002
+#define ACPI_VALID_HID 0x0004
+#define ACPI_VALID_UID 0x0008
+#define ACPI_VALID_SUB 0x0010
+#define ACPI_VALID_CID 0x0020
+#define ACPI_VALID_CLS 0x0040
+#define ACPI_VALID_SXDS 0x0100
+#define ACPI_VALID_SXWS 0x0200
/* Flags for _STA return value (current_status above) */
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| Date | 2015-06-24 05:10 +0200 |
| Subject | [PATCH v2 05/28] ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS. |
| Message-ID | <pEJez-5H5-41@gated-at.bofh.it> |
| In reply to | #1171080 |
ACPICA commit 368eb60778b27b6ae94d3658ddc902ca1342a963
ACPICA commit 70f62a80d65515e1285fdeeb50d94ee6f07df4bd
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 enables the firmware waking vectors for both 32bit/64bit FACS
tables in order to ensure we can exclude the cases that trigger the bugs
caused by the root cause 2. The exclusion is split into 2 commits so that
if it turns out not to be necessary, this single commit can be reverted
without affecting the useful one. Lv Zheng, Bob Moore.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=74021
Link: https://github.com/acpica/acpica/commit/368eb607
Link: https://github.com/acpica/acpica/commit/70f62a80
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>
---
drivers/acpi/acpica/acglobal.h | 2 ++
drivers/acpi/acpica/hwxfsleep.c | 74 ++++++++++++++++++++++++++++++++-------
drivers/acpi/acpica/tbutils.c | 14 ++++----
3 files changed, 71 insertions(+), 19 deletions(-)
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index a0c4787..53f96a3 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -61,6 +61,8 @@ ACPI_GLOBAL(struct acpi_table_header, acpi_gbl_original_dsdt_header);
#if (!ACPI_REDUCED_HARDWARE)
ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS);
+ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_facs32);
+ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_facs64);
#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
index c67cd32..e273b2e 100644
--- a/drivers/acpi/acpica/hwxfsleep.c
+++ b/drivers/acpi/acpica/hwxfsleep.c
@@ -50,6 +50,13 @@
ACPI_MODULE_NAME("hwxfsleep")
/* Local prototypes */
+#if (!ACPI_REDUCED_HARDWARE)
+static acpi_status
+acpi_hw_set_firmware_waking_vector(struct acpi_table_facs *facs,
+ acpi_physical_address physical_address,
+ acpi_physical_address physical_address64);
+#endif
+
static acpi_status acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id);
/*
@@ -79,9 +86,10 @@ static struct acpi_sleep_functions acpi_sleep_dispatch[] = {
#if (!ACPI_REDUCED_HARDWARE)
/*******************************************************************************
*
- * FUNCTION: acpi_set_firmware_waking_vector
+ * FUNCTION: acpi_hw_set_firmware_waking_vector
*
- * PARAMETERS: physical_address - 32-bit physical address of ACPI real mode
+ * PARAMETERS: facs - Pointer to FACS table
+ * physical_address - 32-bit physical address of ACPI real mode
* entry point
* physical_address64 - 64-bit physical address of ACPI protected
* entry point
@@ -92,11 +100,12 @@ static struct acpi_sleep_functions acpi_sleep_dispatch[] = {
*
******************************************************************************/
-acpi_status
-acpi_set_firmware_waking_vector(acpi_physical_address physical_address,
- acpi_physical_address physical_address64)
+static acpi_status
+acpi_hw_set_firmware_waking_vector(struct acpi_table_facs *facs,
+ acpi_physical_address physical_address,
+ acpi_physical_address physical_address64)
{
- ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vector);
+ ACPI_FUNCTION_TRACE(acpi_hw_set_firmware_waking_vector);
/*
@@ -109,25 +118,66 @@ acpi_set_firmware_waking_vector(acpi_physical_address physical_address,
/* Set the 32-bit vector */
- acpi_gbl_FACS->firmware_waking_vector = (u32)physical_address;
+ facs->firmware_waking_vector = (u32)physical_address;
- if (acpi_gbl_FACS->length > 32) {
- if (acpi_gbl_FACS->version >= 1) {
+ if (facs->length > 32) {
+ if (facs->version >= 1) {
/* Set the 64-bit vector */
- acpi_gbl_FACS->xfirmware_waking_vector =
- physical_address64;
+ facs->xfirmware_waking_vector = physical_address64;
} else {
/* Clear the 64-bit vector if it exists */
- acpi_gbl_FACS->xfirmware_waking_vector = 0;
+ facs->xfirmware_waking_vector = 0;
}
}
return_ACPI_STATUS(AE_OK);
}
+/*******************************************************************************
+ *
+ * FUNCTION: acpi_set_firmware_waking_vector
+ *
+ * PARAMETERS: physical_address - 32-bit physical address of ACPI real mode
+ * entry point
+ * physical_address64 - 64-bit physical address of ACPI protected
+ * entry point
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Sets the firmware_waking_vector fields of the FACS
+ *
+ ******************************************************************************/
+
+acpi_status
+acpi_set_firmware_waking_vector(acpi_physical_address physical_address,
+ acpi_physical_address physical_address64)
+{
+
+ ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vector);
+
+ /* If Hardware Reduced flag is set, there is no FACS */
+
+ if (acpi_gbl_reduced_hardware) {
+ return (AE_OK);
+ }
+
+ if (acpi_gbl_facs32) {
+ (void)acpi_hw_set_firmware_waking_vector(acpi_gbl_facs32,
+ physical_address,
+ physical_address64);
+ }
+ if (acpi_gbl_facs64) {
+ (void)acpi_hw_set_firmware_waking_vector(acpi_gbl_facs64,
+ physical_address,
+ physical_address64);
+ }
+
+ return_ACPI_STATUS(AE_OK);
+}
+
ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector)
/*******************************************************************************
diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c
index a4e6dab..6a6c5be 100644
--- a/drivers/acpi/acpica/tbutils.c
+++ b/drivers/acpi/acpica/tbutils.c
@@ -68,8 +68,6 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size);
acpi_status acpi_tb_initialize_facs(void)
{
- struct acpi_table_facs *facs32;
- struct acpi_table_facs *facs64;
/* If Hardware Reduced flag is set, there is no FACS */
@@ -81,19 +79,21 @@ acpi_status acpi_tb_initialize_facs(void)
(void)acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS,
ACPI_CAST_INDIRECT_PTR(struct
acpi_table_header,
- &facs32));
+ &acpi_gbl_facs32));
(void)acpi_get_table_by_index(ACPI_TABLE_INDEX_X_FACS,
ACPI_CAST_INDIRECT_PTR(struct
acpi_table_header,
- &facs64));
- if (!facs32 && !facs64) {
+ &acpi_gbl_facs64));
+ if (!acpi_gbl_facs32 && !acpi_gbl_facs64) {
return (AE_NO_MEMORY);
}
if (acpi_gbl_use32_bit_facs_addresses) {
- acpi_gbl_FACS = facs32 ? facs32 : facs64;
+ acpi_gbl_FACS =
+ acpi_gbl_facs32 ? acpi_gbl_facs32 : acpi_gbl_facs64;
} else {
- acpi_gbl_FACS = facs64 ? facs64 : facs32;
+ acpi_gbl_FACS =
+ acpi_gbl_facs64 ? acpi_gbl_facs64 : acpi_gbl_facs32;
}
return (AE_OK);
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2015-06-25 01:40 +0200 |
| Subject | Re: [PATCH v2 05/28] ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS. |
| Message-ID | <pF2qR-7Rj-9@gated-at.bofh.it> |
| In reply to | #1171085 |
On Wednesday, June 24, 2015 11:02:54 AM Lv Zheng wrote:
> ACPICA commit 368eb60778b27b6ae94d3658ddc902ca1342a963
> ACPICA commit 70f62a80d65515e1285fdeeb50d94ee6f07df4bd
>
> 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 enables the firmware waking vectors for both 32bit/64bit FACS
> tables in order to ensure we can exclude the cases that trigger the bugs
> caused by the root cause 2. The exclusion is split into 2 commits so that
> if it turns out not to be necessary, this single commit can be reverted
> without affecting the useful one. Lv Zheng, Bob Moore.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=74021
> Link: https://github.com/acpica/acpica/commit/368eb607
> Link: https://github.com/acpica/acpica/commit/70f62a80
> 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>
> ---
> drivers/acpi/acpica/acglobal.h | 2 ++
> drivers/acpi/acpica/hwxfsleep.c | 74 ++++++++++++++++++++++++++++++++-------
> drivers/acpi/acpica/tbutils.c | 14 ++++----
> 3 files changed, 71 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
> index a0c4787..53f96a3 100644
> --- a/drivers/acpi/acpica/acglobal.h
> +++ b/drivers/acpi/acpica/acglobal.h
> @@ -61,6 +61,8 @@ ACPI_GLOBAL(struct acpi_table_header, acpi_gbl_original_dsdt_header);
>
> #if (!ACPI_REDUCED_HARDWARE)
> ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS);
> +ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_facs32);
> +ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_facs64);
>
> #endif /* !ACPI_REDUCED_HARDWARE */
>
> diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c
> index c67cd32..e273b2e 100644
> --- a/drivers/acpi/acpica/hwxfsleep.c
> +++ b/drivers/acpi/acpica/hwxfsleep.c
> @@ -50,6 +50,13 @@
> ACPI_MODULE_NAME("hwxfsleep")
>
> /* Local prototypes */
> +#if (!ACPI_REDUCED_HARDWARE)
> +static acpi_status
> +acpi_hw_set_firmware_waking_vector(struct acpi_table_facs *facs,
> + acpi_physical_address physical_address,
> + acpi_physical_address physical_address64);
> +#endif
> +
> static acpi_status acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id);
>
> /*
> @@ -79,9 +86,10 @@ static struct acpi_sleep_functions acpi_sleep_dispatch[] = {
> #if (!ACPI_REDUCED_HARDWARE)
> /*******************************************************************************
> *
> - * FUNCTION: acpi_set_firmware_waking_vector
> + * FUNCTION: acpi_hw_set_firmware_waking_vector
> *
> - * PARAMETERS: physical_address - 32-bit physical address of ACPI real mode
> + * PARAMETERS: facs - Pointer to FACS table
> + * physical_address - 32-bit physical address of ACPI real mode
> * entry point
> * physical_address64 - 64-bit physical address of ACPI protected
> * entry point
> @@ -92,11 +100,12 @@ static struct acpi_sleep_functions acpi_sleep_dispatch[] = {
> *
> ******************************************************************************/
>
> -acpi_status
> -acpi_set_firmware_waking_vector(acpi_physical_address physical_address,
> - acpi_physical_address physical_address64)
> +static acpi_status
> +acpi_hw_set_firmware_waking_vector(struct acpi_table_facs *facs,
> + acpi_physical_address physical_address,
> + acpi_physical_address physical_address64)
> {
> - ACPI_FUNCTION_TRACE(acpi_set_firmware_waking_vector);
> + ACPI_FUNCTION_TRACE(acpi_hw_set_firmware_waking_vector);
>
>
> /*
> @@ -109,25 +118,66 @@ acpi_set_firmware_waking_vector(acpi_physical_address physical_address,
>
> /* Set the 32-bit vector */
>
> - acpi_gbl_FACS->firmware_waking_vector = (u32)physical_address;
> + facs->firmware_waking_vector = (u32)physical_address;
>
> - if (acpi_gbl_FACS->length > 32) {
> - if (acpi_gbl_FACS->version >= 1) {
> + if (facs->length > 32) {
> + if (facs->version >= 1) {
>
> /* Set the 64-bit vector */
>
> - acpi_gbl_FACS->xfirmware_waking_vector =
> - physical_address64;
> + facs->xfirmware_waking_vector = physical_address64;
> } else {
> /* Clear the 64-bit vector if it exists */
>
> - acpi_gbl_FACS->xfirmware_waking_vector = 0;
> + facs->xfirmware_waking_vector = 0;
> }
> }
>
> return_ACPI_STATUS(AE_OK);
> }
>
> +/*******************************************************************************
> + *
> + * FUNCTION: acpi_set_firmware_waking_vector
> + *
> + * PARAMETERS: physical_address - 32-bit physical address of ACPI real mode
> + * entry point
> + * physical_address64 - 64-bit physical address of ACPI protected
> + * entry point
> + *
> + * RETURN: Status
> + *
> + * DESCRIPTION: Sets the firmware_waking_vector fields of the FACS
> + *
> + ******************************************************************************/
> +
> +acpi_status
> +acpi_set_firmware_waking_vector(acpi_physical_address physical_address,
> + acpi_physical_address physical_address64)
The question here is: Why does the host OS need to care about the second
argument of this function that will always be 0? Why didn't you keep the
old header of acpi_set_firmware_waking_vector() as a one-argument function
taking a u32 and why didn't you add something like
acpi_status acpi_set_firmware_waking_vector_full(u32 real_mode_address,
acpi_physical_address high_address)
and why didn't you redefine acpi_set_firmware_waking_vector() as
acpi_status acpi_set_firmware_waking_vector(u32 real_mode_address)
{
return acpi_set_firmware_waking_vector_full(real_mode_address, 0);
}
?
If you did that, there wouldn't be any need to touch the code in
drivers/acpi/sleep.c and the arch headers, so can you please explain to me
why *exactly* you didn't do that?
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | "Zheng, Lv" <lv.zheng@intel.com> |
|---|---|
| Date | 2015-06-25 02:50 +0200 |
| Subject | RE: [PATCH v2 05/28] ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACS. |
| Message-ID | <pF3wC-W9-25@gated-at.bofh.it> |
| In reply to | #1171740 |
SGksIFJhZmFlbA0KDQo+IEZyb206IFJhZmFlbCBKLiBXeXNvY2tpIFttYWlsdG86cmp3QHJqd3lz b2NraS5uZXRdDQo+IFNlbnQ6IFRodXJzZGF5LCBKdW5lIDI1LCAyMDE1IDc6NTcgQU0NCj4gDQo+ IE9uIFdlZG5lc2RheSwgSnVuZSAyNCwgMjAxNSAxMTowMjo1NCBBTSBMdiBaaGVuZyB3cm90ZToN Cj4gPiBBQ1BJQ0EgY29tbWl0IDM2OGViNjA3NzhiMjdiNmFlOTRkMzY1OGRkYzkwMmNhMTM0MmE5 NjMNCj4gPiBBQ1BJQ0EgY29tbWl0IDcwZjYyYTgwZDY1NTE1ZTEyODVmZGVlYjUwZDk0ZWU2ZjA3 ZGY0YmQNCj4gPg0KP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50LCBpdCBjYW4gcmVz dW1lIGZyb20gdGhlcmUuDQpBbmQgaG9zdCBPU2VzIGNhbiBiZSBpbXBsZW1lbnRlZCB1c2luZyBv bmx5IDEgYmluYXJ5IHRvIHdvcmsgd2l0aCBib3RoIEJJT1Nlcy4NCg0KVGhhbmtzIGFuZCBiZXN0 IHJlZ2FyZHMNCi1Mdg0K -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| Date | 2015-06-24 05:10 +0200 |
| Subject | [PATCH v2 07/28] ACPICA: Tables: Fix an issue that FACS initialization is performed twice. |
| Message-ID | <pEJez-5H5-43@gated-at.bofh.it> |
| In reply to | #1171080 |
ACPICA commit 90f5332a15e9d9ba83831ca700b2b9f708274658
This patch adds a new FACS initialization flag for acpi_tb_initialize().
acpi_enable_subsystem() might be invoked several times in OS bootup process,
and we don't want FACS initialization to be invoked twice. Lv Zheng.
Link: https://github.com/acpica/acpica/commit/90f5332a
Cc: All applicable <stable@vger.kernel.org> # All applicable
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
drivers/acpi/acpica/utxfinit.c | 10 ++++++----
include/acpi/actypes.h | 1 +
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/acpi/acpica/utxfinit.c b/drivers/acpi/acpica/utxfinit.c
index 083a768..42a32a6 100644
--- a/drivers/acpi/acpica/utxfinit.c
+++ b/drivers/acpi/acpica/utxfinit.c
@@ -179,10 +179,12 @@ acpi_status __init acpi_enable_subsystem(u32 flags)
* Obtain a permanent mapping for the FACS. This is required for the
* Global Lock and the Firmware Waking Vector
*/
- status = acpi_tb_initialize_facs();
- if (ACPI_FAILURE(status)) {
- ACPI_WARNING((AE_INFO, "Could not map the FACS table"));
- return_ACPI_STATUS(status);
+ if (!(flags & ACPI_NO_FACS_INIT)) {
+ status = acpi_tb_initialize_facs();
+ if (ACPI_FAILURE(status)) {
+ ACPI_WARNING((AE_INFO, "Could not map the FACS table"));
+ return_ACPI_STATUS(status);
+ }
}
#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 63fd7f5..ff0b53e 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -568,6 +568,7 @@ typedef u64 acpi_integer;
#define ACPI_NO_ACPI_ENABLE 0x10
#define ACPI_NO_DEVICE_INIT 0x20
#define ACPI_NO_OBJECT_INIT 0x40
+#define ACPI_NO_FACS_INIT 0x80
/*
* Initialization state
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| Date | 2015-06-24 05:10 +0200 |
| Subject | [PATCH v2 20/28] ACPICA: acpidump: Allow customized tables to be dumped without accessing /dev/mem. |
| Message-ID | <pEJez-5H5-45@gated-at.bofh.it> |
| In reply to | #1171080 |
ACPICA commit ab29013cfa2424140446aff196a70b211ab343a9
The /dev/mem can be configured out, in which case, acpidump should still
work with "-c" option as tables can be found in /sys/firmware/acpi/tables.
This patch allows acpidump to work without /dev/mem.
This patch has been tested with "acpidump -c" and "acpidump -c -n FADT".
And it worked as expected. Lv Zheng.
Link: https://github.com/acpica/acpica/commit/ab29013c
Reported-by: Al Stone <ahs3@redhat.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
.../acpi/os_specific/service_layers/oslinuxtbl.c | 89 ++++++++++----------
1 file changed, 46 insertions(+), 43 deletions(-)
diff --git a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
index db15c9d..3aff9a2 100644
--- a/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
+++ b/tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
@@ -582,64 +582,67 @@ static acpi_status osl_table_initialize(void)
return (AE_OK);
}
- /* Get RSDP from memory */
+ if (!gbl_dump_customized_tables) {
- status = osl_load_rsdp();
- if (ACPI_FAILURE(status)) {
- return (status);
- }
+ /* Get RSDP from memory */
+
+ status = osl_load_rsdp();
+ if (ACPI_FAILURE(status)) {
+ return (status);
+ }
- /* Get XSDT from memory */
+ /* Get XSDT from memory */
- if (gbl_rsdp.revision && !gbl_do_not_dump_xsdt) {
- if (gbl_xsdt) {
- free(gbl_xsdt);
- gbl_xsdt = NULL;
+ if (gbl_rsdp.revision && !gbl_do_not_dump_xsdt) {
+ if (gbl_xsdt) {
+ free(gbl_xsdt);
+ gbl_xsdt = NULL;
+ }
+
+ gbl_revision = 2;
+ status = osl_get_bios_table(ACPI_SIG_XSDT, 0,
+ ACPI_CAST_PTR(struct
+ acpi_table_header
+ *, &gbl_xsdt),
+ &address);
+ if (ACPI_FAILURE(status)) {
+ return (status);
+ }
}
- gbl_revision = 2;
- status = osl_get_bios_table(ACPI_SIG_XSDT, 0,
- ACPI_CAST_PTR(struct
- acpi_table_header *,
- &gbl_xsdt), &address);
- if (ACPI_FAILURE(status)) {
- return (status);
+ /* Get RSDT from memory */
+
+ if (gbl_rsdp.rsdt_physical_address) {
+ if (gbl_rsdt) {
+ free(gbl_rsdt);
+ gbl_rsdt = NULL;
+ }
+
+ status = osl_get_bios_table(ACPI_SIG_RSDT, 0,
+ ACPI_CAST_PTR(struct
+ acpi_table_header
+ *, &gbl_rsdt),
+ &address);
+ if (ACPI_FAILURE(status)) {
+ return (status);
+ }
}
- }
- /* Get RSDT from memory */
+ /* Get FADT from memory */
- if (gbl_rsdp.rsdt_physical_address) {
- if (gbl_rsdt) {
- free(gbl_rsdt);
- gbl_rsdt = NULL;
+ if (gbl_fadt) {
+ free(gbl_fadt);
+ gbl_fadt = NULL;
}
- status = osl_get_bios_table(ACPI_SIG_RSDT, 0,
+ status = osl_get_bios_table(ACPI_SIG_FADT, 0,
ACPI_CAST_PTR(struct
acpi_table_header *,
- &gbl_rsdt), &address);
+ &gbl_fadt),
+ &gbl_fadt_address);
if (ACPI_FAILURE(status)) {
return (status);
}
- }
-
- /* Get FADT from memory */
-
- if (gbl_fadt) {
- free(gbl_fadt);
- gbl_fadt = NULL;
- }
-
- status = osl_get_bios_table(ACPI_SIG_FADT, 0,
- ACPI_CAST_PTR(struct acpi_table_header *,
- &gbl_fadt),
- &gbl_fadt_address);
- if (ACPI_FAILURE(status)) {
- return (status);
- }
-
- if (!gbl_dump_customized_tables) {
/* Add mandatory tables to global table list first */
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web