[PATCH v2] Introduce AcpiOs(Read|Write)Cmos and enable these in AcpiExCmosSpaceHandler
by Adam Goode
This introduces a generic OSL interface for reading and writing
SystemCMOS spaces. It is needed on Linux for registering a generic
handler for SystemCMOS because some firmware accesses CMOS in _INI.
(The first time I sent a somewhat corrupted patch file. This one should
be better).
---
source/components/events/evhandler.c | 1 +
source/components/executer/exregion.c | 23 +++++++++
source/include/acconfig.h | 2 +-
source/include/acpiosxf.h | 18 +++++++
source/os_specific/service_layers/osunixxf.c | 64 +++++++++++++++++++++++
source/os_specific/service_layers/oswinxf.c | 64 +++++++++++++++++++++++
tests/aapits/atosxfctrl.c | 2 +
tests/aapits/atosxfctrl.h | 3 ++
tests/aapits/atosxfwrap.c | 76 ++++++++++++++++++++++++++++
tests/aapits/atosxfwrap.h | 16 ++++++
10 files changed, 268 insertions(+), 1 deletion(-)
diff --git a/source/components/events/evhandler.c b/source/components/events/evhandler.c
index d02ea53..634c18e 100644
--- a/source/components/events/evhandler.c
+++ b/source/components/events/evhandler.c
@@ -139,6 +139,7 @@ UINT8 AcpiGbl_DefaultAddressSpaces[ACPI_NUM_DEFAULT_SPACES] =
ACPI_ADR_SPACE_SYSTEM_MEMORY,
ACPI_ADR_SPACE_SYSTEM_IO,
ACPI_ADR_SPACE_PCI_CONFIG,
+ ACPI_ADR_SPACE_CMOS,
ACPI_ADR_SPACE_DATA_TABLE
};
diff --git a/source/components/executer/exregion.c b/source/components/executer/exregion.c
index 31bbb60..bd9addd 100644
--- a/source/components/executer/exregion.c
+++ b/source/components/executer/exregion.c
@@ -551,6 +551,29 @@ AcpiExCmosSpaceHandler (
ACPI_FUNCTION_TRACE (ExCmosSpaceHandler);
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+ "System-CMOS (width %u) R/W %u Address=%8.8X%8.8X\n",
+ BitWidth, Function, ACPI_FORMAT_UINT64(Address)));
+
+ switch (Function)
+ {
+ case ACPI_READ:
+
+ *Value = 0;
+ Status = AcpiOsReadCmos(Address, Value, BitWidth);
+ break;
+
+ case ACPI_WRITE:
+
+ Status = AcpiOsWriteCmos(Address, *Value, BitWidth);
+ break;
+
+ default:
+
+ Status = AE_BAD_PARAMETER;
+ break;
+ }
+
return_ACPI_STATUS (Status);
}
diff --git a/source/include/acconfig.h b/source/include/acconfig.h
index 41fa33d..dcecfa7 100644
--- a/source/include/acconfig.h
+++ b/source/include/acconfig.h
@@ -270,7 +270,7 @@
/* Maximum SpaceIds for Operation Regions */
#define ACPI_MAX_ADDRESS_SPACE 255
-#define ACPI_NUM_DEFAULT_SPACES 4
+#define ACPI_NUM_DEFAULT_SPACES 5
/* Array sizes. Used for range checking also */
diff --git a/source/include/acpiosxf.h b/source/include/acpiosxf.h
index 68d79c7..31523ea 100644
--- a/source/include/acpiosxf.h
+++ b/source/include/acpiosxf.h
@@ -452,6 +452,24 @@ AcpiOsWritePort (
UINT32 Width);
#endif
+/*
+ * Platform and hardware-independent CMOS memory interfaces
+ */
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadCmos
+ACPI_STATUS
+AcpiOsReadCmos (
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT64 *Value,
+ UINT32 Width);
+#endif
+
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWriteCmos
+ACPI_STATUS
+AcpiOsWriteCmos (
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT64 Value,
+ UINT32 Width);
+#endif
/*
* Platform and hardware-independent physical memory interfaces
diff --git a/source/os_specific/service_layers/osunixxf.c b/source/os_specific/service_layers/osunixxf.c
index c48f581..b763ddc 100644
--- a/source/os_specific/service_layers/osunixxf.c
+++ b/source/os_specific/service_layers/osunixxf.c
@@ -1361,6 +1361,70 @@ AcpiOsWritePort (
}
+/*****************************************************************************
+ *
+ * FUNCTION: AcpiOsReadCmos
+ *
+ * PARAMETERS: Address - Address of CMOS memory to read
+ * Value - Where value is placed
+ * Width - Number of bits
+ *
+ * RETURN: Value read from CMOS memory
+ *
+ * DESCRIPTION: Read data from CMOS memory
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+AcpiOsReadCmos (
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT64 *Value,
+ UINT32 Width)
+{
+
+ switch (Width)
+ {
+ case 8:
+ case 16:
+ case 32:
+ case 64:
+
+ *Value = 0;
+ break;
+
+ default:
+
+ return (AE_BAD_PARAMETER);
+ }
+ return (AE_OK);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiOsWriteCmos
+ *
+ * PARAMETERS: Address - Address of CMOS memory to write
+ * Value - Value to write
+ * Width - Number of bits
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Write data to CMOS memory
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+AcpiOsWriteCmos (
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT64 Value,
+ UINT32 Width)
+{
+
+ return (AE_OK);
+}
+
+
/******************************************************************************
*
* FUNCTION: AcpiOsReadMemory
diff --git a/source/os_specific/service_layers/oswinxf.c b/source/os_specific/service_layers/oswinxf.c
index 66ce8c8..80086fd 100644
--- a/source/os_specific/service_layers/oswinxf.c
+++ b/source/os_specific/service_layers/oswinxf.c
@@ -1356,6 +1356,70 @@ AcpiOsWritePort (
}
+/*****************************************************************************
+ *
+ * FUNCTION: AcpiOsReadCmos
+ *
+ * PARAMETERS: Address - Address of CMOS memory to read
+ * Value - Where value is placed
+ * Width - Number of bits
+ *
+ * RETURN: Value read from CMOS memory
+ *
+ * DESCRIPTION: Read data from CMOS memory
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+AcpiOsReadCmos (
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT64 *Value,
+ UINT32 Width)
+{
+
+ switch (Width)
+ {
+ case 8:
+ case 16:
+ case 32:
+ case 64:
+
+ *Value = 0;
+ break;
+
+ default:
+
+ return (AE_BAD_PARAMETER);
+ }
+ return (AE_OK);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiOsWriteCmos
+ *
+ * PARAMETERS: Address - Address of CMOS memory to write
+ * Value - Value to write
+ * Width - Number of bits
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Write data to CMOS memory
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+AcpiOsWriteCmos (
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT64 Value,
+ UINT32 Width)
+{
+
+ return (AE_OK);
+}
+
+
/******************************************************************************
*
* FUNCTION: AcpiOsReadMemory
diff --git a/tests/aapits/atosxfctrl.c b/tests/aapits/atosxfctrl.c
index fe8b562..9a6b41c 100644
--- a/tests/aapits/atosxfctrl.c
+++ b/tests/aapits/atosxfctrl.c
@@ -160,6 +160,8 @@ const char *OsxfNames[] = {
"AcpiOsDerivePciId",
"AcpiOsReadPort",
"AcpiOsWritePort",
+ "AcpiOsReadCmos",
+ "AcpiOsWriteCmos",
"AcpiOsReadMemory",
"AcpiOsWriteMemory",
"AcpiOsSignal"};
diff --git a/tests/aapits/atosxfctrl.h b/tests/aapits/atosxfctrl.h
index 66a361d..2c8b9e5 100644
--- a/tests/aapits/atosxfctrl.h
+++ b/tests/aapits/atosxfctrl.h
@@ -162,6 +162,8 @@ typedef enum
AcpiOsDerivePciIdC,
AcpiOsReadPortC,
AcpiOsWritePortC,
+ AcpiOsReadCmosC,
+ AcpiOsWriteCmosC,
AcpiOsReadMemoryC,
AcpiOsWriteMemoryC,
AcpiOsSignalC,
@@ -229,6 +231,7 @@ typedef struct acpi_os_emul_reg
*/
#define EMUL_REG_SYS 0x01
#define EMUL_REG_IO 0x02
+#define EMUL_REG_CMOS 0x03
/*
* Fixed ACPI h/w emulated registers numbers
diff --git a/tests/aapits/atosxfwrap.c b/tests/aapits/atosxfwrap.c
index 7c5de39..0088212 100644
--- a/tests/aapits/atosxfwrap.c
+++ b/tests/aapits/atosxfwrap.c
@@ -1272,6 +1272,82 @@ AcpiOsWritePort (
}
+/*****************************************************************************
+ *
+ * FUNCTION: AcpiOsReadCmos
+ *
+ * PARAMETERS: Address - Address of CMOS memory to read
+ * Value - Where value is placed
+ * Width - Number of bits
+ *
+ * RETURN: Value read from CMOS memory
+ *
+ * DESCRIPTION: Read data from CMOS memory
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+AcpiOsReadCmos (
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT64 *Value,
+ UINT32 Width)
+{
+ AT_CTRL_DECL(AcpiOsReadCmos);
+
+ AT_CHCK_RET_STATUS(AcpiOsReadCmos);
+
+ if (!EMUL_REG_MODE) {
+ Status = AcpiOsActualReadCmos(Address, Value, Width);
+ }
+ else
+ {
+ Status = OsxfCtrlReadReg(EMUL_REG_CMOS, Address, Value, Width);
+ }
+
+ AT_CTRL_SUCCESS(AcpiOsReadCmos);
+
+ return (Status);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiOsWriteCmos
+ *
+ * PARAMETERS: Address - Address of CMOS memory to write
+ * Value - Value to write
+ * Width - Number of bits
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Write data to CMOS memory
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+AcpiOsWriteCmos (
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT64 Value,
+ UINT32 Width)
+{
+ AT_CTRL_DECL(AcpiOsWriteCmos);
+
+ AT_CHCK_RET_STATUS(AcpiOsWriteCmos);
+
+ if (!EMUL_REG_MODE) {
+ Status = AcpiOsActualWriteCmos(Address, Value, Width);
+ }
+ else
+ {
+ Status = OsxfCtrlWriteReg(EMUL_REG_CMOS, Address, Value, Width);
+ }
+
+ AT_CTRL_SUCCESS(AcpiOsWriteCmos);
+
+ return (Status);
+}
+
+
/******************************************************************************
*
* FUNCTION: AcpiOsReadMemory
diff --git a/tests/aapits/atosxfwrap.h b/tests/aapits/atosxfwrap.h
index 27224d0..48e2100 100644
--- a/tests/aapits/atosxfwrap.h
+++ b/tests/aapits/atosxfwrap.h
@@ -324,6 +324,22 @@ AcpiOsActualWritePort (
/*
+ * Platform and hardware-independent CMOS memory interfaces
+ */
+ACPI_STATUS
+AcpiOsActualReadCmos (
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT64 *Value,
+ UINT32 Width);
+
+ACPI_STATUS
+AcpiOsActualWriteCmos (
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT64 Value,
+ UINT32 Width);
+
+
+/*
* Platform and hardware-independent physical memory interfaces
*/
ACPI_STATUS
--
2.3.7
6 years, 2 months
Re: [Devel] [PATCH v2] acpi: Use kstrtoul() instead of strtoul()/simple_strtoul()
by Moore, Robert
> -----Original Message-----
> From: Guenter Roeck [mailto:linux@roeck-us.net]
> Sent: Wednesday, July 29, 2015 11:39 AM
> To: Moore, Robert; rjw(a)rjwysocki.net
> Cc: lenb(a)kernel.org; Zheng, Lv; linux-acpi(a)vger.kernel.org; linux-
> kernel(a)vger.kernel.org; devel(a)acpica.org
> Subject: Re: [PATCH v2] acpi: Use kstrtoul() instead of
> strtoul()/simple_strtoul()
>
> On 07/29/2015 10:51 AM, Moore, Robert wrote:
> >
> >
> >> -----Original Message-----
> >> From: Guenter Roeck [mailto:linux@roeck-us.net]
> >> Sent: Monday, July 27, 2015 5:32 PM
> >> To: rjw(a)rjwysocki.net
> >> Cc: lenb(a)kernel.org; Moore, Robert; Zheng, Lv;
> >> linux-acpi(a)vger.kernel.org; linux-kernel(a)vger.kernel.org;
> >> devel(a)acpica.org; Guenter Roeck
> >> Subject: [PATCH v2] acpi: Use kstrtoul() instead of
> >> strtoul()/simple_strtoul()
> >>
> >> simple_strtoul() is deprecated; replace with kstrtoul() and
> kstrtouint().
> >
> > The ACPICA code is os-independent and cannot use these functions (at
> least not directly).
> >
> >
> Odd argument, given that kstrtoul() is used already in the acpi code.
They are not in the os-independent ACPICA code. The ACPI-related drivers are another story, since they are OS-dendent.
>
> Guenter
6 years, 11 months
Re: [Devel] [PATCH v2] acpi: Use kstrtoul() instead of strtoul()/simple_strtoul()
by Moore, Robert
> -----Original Message-----
> From: Guenter Roeck [mailto:linux@roeck-us.net]
> Sent: Monday, July 27, 2015 5:32 PM
> To: rjw(a)rjwysocki.net
> Cc: lenb(a)kernel.org; Moore, Robert; Zheng, Lv; linux-acpi(a)vger.kernel.org;
> linux-kernel(a)vger.kernel.org; devel(a)acpica.org; Guenter Roeck
> Subject: [PATCH v2] acpi: Use kstrtoul() instead of
> strtoul()/simple_strtoul()
>
> simple_strtoul() is deprecated; replace with kstrtoul() and kstrtouint().
The ACPICA code is os-independent and cannot use these functions (at least not directly).
> Return an error if the value passed to the sysfs attribute is not a
> number.
>
> Drop the definition of strtoul() since it is no longer needed.
>
> Signed-off-by: Guenter Roeck <linux(a)roeck-us.net>
> ---
> v2: An additional use of strtoul() was introduced with commit 4fa4616e.
> Replace it as well.
>
> drivers/acpi/acpica/evgpeinit.c | 5 +++--
> drivers/acpi/sysfs.c | 8 ++++++--
> include/acpi/platform/aclinux.h | 1 -
> 3 files changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/acpi/acpica/evgpeinit.c
> b/drivers/acpi/acpica/evgpeinit.c index ea4c0d3fca2d..aa1e8c1f2d4a 100644
> --- a/drivers/acpi/acpica/evgpeinit.c
> +++ b/drivers/acpi/acpica/evgpeinit.c
> @@ -326,6 +326,7 @@ acpi_ev_match_gpe_method(acpi_handle obj_handle,
> u32 gpe_number;
> char name[ACPI_NAME_SIZE + 1];
> u8 type;
> + int err;
>
> ACPI_FUNCTION_TRACE(ev_match_gpe_method);
>
> @@ -377,8 +378,8 @@ acpi_ev_match_gpe_method(acpi_handle obj_handle,
>
> /* 4) The last two characters of the name are the hex GPE Number */
>
> - gpe_number = strtoul(&name[2], NULL, 16);
> - if (gpe_number == ACPI_UINT32_MAX) {
> + er = kstrtouint(&name[2], 16, &gpe_number);
> + if (err < 0 || gpe_number == ACPI_UINT32_MAX) {
>
> /* Conversion failed; invalid method, just ignore it */
>
> diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index
> 0876d77b3206..d6ea5712ec57 100644
> --- a/drivers/acpi/sysfs.c
> +++ b/drivers/acpi/sysfs.c
> @@ -616,8 +616,12 @@ static ssize_t counter_set(struct kobject *kobj,
> all_counters[index].count = tmp;
> else
> result = -EINVAL;
> - } else
> - all_counters[index].count = strtoul(buf, NULL, 0);
> + } else {
> + if (!kstrtoul(buf, 0, &tmp))
> + all_counters[index].count = tmp;
> + else
> + result = -EINVAL;
> + }
>
> if (ACPI_FAILURE(result))
> result = -EINVAL;
> diff --git a/include/acpi/platform/aclinux.h
> b/include/acpi/platform/aclinux.h index 74ba46c8157a..9925c1d5d58f 100644
> --- a/include/acpi/platform/aclinux.h
> +++ b/include/acpi/platform/aclinux.h
> @@ -119,7 +119,6 @@
>
> #define ACPI_MACHINE_WIDTH BITS_PER_LONG
> #define ACPI_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol);
> -#define strtoul simple_strtoul
>
> #define acpi_cache_t struct kmem_cache
> #define acpi_spinlock spinlock_t *
> --
> 2.1.0
6 years, 11 months
Re: [Devel] [PATCH] ACPI: Fix indent for variable declaration
by Zheng, Lv
Hi,
There is a process to release ACPICA code to the Linux kernel.
ACPICA code -> Linuxized Linux code
We call the differences between the linuxized Linux code and current Linux ACPICA code as divergences.
Such indent issues actually doesn't affect this process much and we only generate indent fixing patches that can reduce the divergences.
So we do this in another way:
1. During ACPICA release process, if conflicts are found that will cause new patches to be maintained with human intervention, a pre-requisite indent fixing patch will be included by the release.
2. After all ACPICA divergences are reduced, we will run indent to generate a big patch to reduce all indent issues.
3. We will continue to improve the release tools to generate more purified "Linuxized linux code", this is not easy as "indent" is not controlled by this project.
Otherwise the indentation issues there are not fixed in order not to generate such small fixes to mess up real stable materials.
Thanks and best regards
-Lv
> -----Original Message-----
> From: Zhouyi Zhou [mailto:yizhouzhou@ict.ac.cn]
> Sent: Thursday, July 16, 2015 2:17 PM
> To: Moore, Robert; Zheng, Lv
> Cc: devel(a)acpica.org; Wysocki, Rafael J
> Subject: Fw: [PATCH] ACPI: Fix indent for variable declaration
>
> -----Original Messages-----
> From: "Zhouyi Zhou" <yizhouzhou(a)ict.ac.cn>
> Sent Time: Wednesday, July 15, 2015
> To: lenb(a)kernel.org, linux-acpi(a)vger.kernel.org, linux-kernel(a)vger.kernel.org
> Cc:
> Subject: [PATCH] ACPI: Fix indent for variable declaration
>
> In function acpi_ns_one_complete_parse, the variable declaration
> aml_length is not correctly indented.
>
> Signed-off-by: Zhouyi Zhou <yizhouzhou(a)ict.ac.cn>
> ---
> drivers/acpi/acpica/nsparse.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/acpica/nsparse.c b/drivers/acpi/acpica/nsparse.c
> index 57a4cfe..802afdc 100644
> --- a/drivers/acpi/acpica/nsparse.c
> +++ b/drivers/acpi/acpica/nsparse.c
> @@ -70,7 +70,7 @@ acpi_ns_one_complete_parse(u32 pass_number,
> {
> union acpi_parse_object *parse_root;
> acpi_status status;
> - u32 aml_length;
> + u32 aml_length;
> u8 *aml_start;
> struct acpi_walk_state *walk_state;
> struct acpi_table_header *table;
> --
> 2.4.5
>
>
>
>
>
>
>
>
6 years, 11 months
ACPICA version 20150717 released
by Moore, Robert
17 July 2015. Summary of changes for version 20150717:
This release is available at https://acpica.org/downloads
1) ACPICA kernel-resident subsystem:
Improved the partitioning between the Debugger and Disassembler components. This allows the Debugger to be used standalone within kernel code without the Disassembler (which is used for single stepping also). This renames and moves one file, dmobject.c to dbobject.c. Lv Zheng.
Debugger: Implemented a new command to trace the execution of control methods (Trace). This is especially useful for the in-kernel version of the debugger when file I/O may not be available for method trace output. See the ACPICA reference for more information. Lv Zheng.
Moved all C library prototypes (used for the local versions of these functions when requested) to a new header, acclib.h
Cleaned up the use of non-ANSI C library functions. These functions are implemented locally in ACPICA. Moved all such functions to a common source file, utnonansi.c
Debugger: Fixed a problem with the "!!" command (get last command executed) where the debugger could enter an infinite loop and eventually crash.
Removed the use of local macros that were used for some of the standard C library functions to automatically cast input parameters. This mostly affected the is* functions where the input parameter is defined to be an int. This required a few modifications to the main ACPICA source code to provide casting for these functions and eliminate possible compiler warnings for these parameters.
Across the source code, added additional status/error checking to resolve issues discovered by static source code analysis tools such as Coverity.
Example Code and Data Size: These are the sizes for the OS-independent acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug version of the code includes the debug output trace mechanism and has a much larger code and data size.
Current Release:
Non-Debug Version: 100.9K Code, 24.5K Data, 125.4K Total
Debug Version: 197.8K Code, 81.5K Data, 279.3K Total
Previous Release:
Non-Debug Version: 100.6K Code, 27.6K Data, 128.2K Total
Debug Version: 196.2K Code, 81.0K Data, 277.2K Total
2) iASL Compiler/Disassembler and Tools:
iASL: Fixed a regression where the device map file feature no longer worked properly when used in conjunction with the disassembler. It only worked properly with the compiler itself.
iASL: Implemented a new warning for method LocalX variables that are set but never used (similar to a C compiler such as gcc). This also applies to ArgX variables that are not defined by the parent method, and are instead (legally) used as local variables.
iASL/Preprocessor: Finished the pass-through of line numbers from the preprocessor to the compiler. This ensures that compiler errors/warnings have the correct original line numbers and filenames, regardless of any #include files.
iASL/Preprocessor: Fixed a couple of issues with comment handling and the pass-through of comments to the preprocessor output file (which becomes the compiler input file). Also fixed a problem with // comments that appear after a math expression.
iASL: Added support for the TCPA server table to the table compiler and template generator. (The client table was already previously supported)
iASL/Preprocessor: Added a permanent #define of the symbol "__IASL__" to identify the iASL compiler.
Cleaned up the use of the macros NEGATIVE and POSITIVE which were defined multiple times. The new names are ACPI_SIGN_NEGATIVE and ACPI_SIGN_POSITIVE.
AcpiHelp: Update to expand help messages for the iASL preprocessor directives.
6 years, 11 months
Can't build IASL on today's ACPICA tip
by Colin Ian King
Hi there,
Building of IASL on Ubuntu 15.10 Wily fails on today's ACPICA tip
(commit b9677e910888b35f27746f97567950f9157f63a6)
make[1]: Entering directory '/home/king/repos/acpica/generate/unix/iasl'
make[1]: *** No rule to make target 'obj/dmobject.o', needed by
'obj/iasl'. Stop.
make[1]: Leaving directory '/home/king/repos/acpica/generate/unix/iasl'
generate/unix/Makefile.common:21: recipe for target 'iasl' failed
make: *** [iasl] Error 2
I think the root cause is the following commit:
commit 7dca7e02d1f10f096233358096a4578225f207a7
Merge: 1389ac5 2164923
Author: Robert Moore <Robert.Moore(a)intel.com>
Date: Fri Jul 10 12:56:35 2015 -0700
Merge pull request #78 from zetalog/acpica-debug
Acpica debugger
Colin.
6 years, 11 months
How do I get an efi version of acpidump ?
by Shubha Ramani
Supposedly efi support is added to the Linux tools but I don't know how to compile an efi version.
Thanks,
shubha Shubha D. Ramanishubharamani(a)gmail.com
shubharamani(a)yahoo.com
6 years, 11 months
Comment //* generates error
by Alexei Fedorov
Hi all,
User Guide states that "comments can be either traditional /*..*/ style or // style" but having star * symbol just after // comment, like //*<any_text_here> will generate an error. This is broken in #20150619 build but used to work in #20150515.
Alexei.
-----Original Message-----
From: Devel [mailto:devel-bounces@acpica.org] On Behalf Of devel-request(a)acpica.org
Sent: 02 July 2015 04:36
To: devel(a)acpica.org
Subject: Devel Digest, Vol 56, Issue 1
Send Devel mailing list submissions to
devel(a)acpica.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.acpica.org/mailman/listinfo/devel
or, via email, send a message with subject or body 'help' to
devel-request(a)acpica.org
You can reach the person managing the list at
devel-owner(a)acpica.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Devel digest..."
Today's Topics:
1. ACPICA version 20150616 released (Moore, Robert)
2. ACPICA version 20150619 released (Moore, Robert)
3. Re: ACPICA version 20150619 released (Dean Nelson)
4. Re: ACPICA version 20150619 released (Moore, Robert)
5. Re: [PATCH] ACPICA: Delete an unnecessary check before the
function call "acpi_ds_delete_walk_state" (Moore, Robert)
6. [PATCH] AcpiXtract: fix warning on int printed with %u
specifier (Colin King)
7. Re: [PATCH] ACPI, Repair of outdated variable (Moore, Robert)
----------------------------------------------------------------------
Message: 1
Date: Tue, 16 Jun 2015 19:11:22 +0000
From: "Moore, Robert" <robert.moore(a)intel.com>
To: "devel(a)acpica.org" <devel(a)acpica.org>
Subject: [Devel] ACPICA version 20150616 released
Message-ID:
<94F2FBAB4432B54E8AACC7DFDE6C92E37D300481(a)ORSMSX112.amr.corp.intel.com>
Content-Type: text/plain; charset="us-ascii"
16 June 2015. Summary of changes for version 20150616:
This release is available at https://acpica.org/downloads
1) ACPICA kernel-resident subsystem:
Across the entire ACPICA source code base, the various macros for the C library functions (such as ACPI_STRLEN, etc.) have been removed and replaced by the standard C library names (strlen, etc.) The original purpose for these macros is no longer applicable. This simplification reduces the number of macros used in the ACPICA source code significantly, improving readability and maintainability.
Implemented support for a new ACPI table, the OSDT. This table, the "override" SDT, can be loaded directly by the host OS at boot time. It enables the replacement of existing namespace objects that were installed via the DSDT and/or SSDTs. The primary purpose for this is to replace buggy or incorrect ASL/AML code obtained via the BIOS. The OSDT is slated for inclusion in a future version of the ACPI Specification. Lv Zheng/Bob Moore.
Added support for systems with (improperly) two FACS tables -- a "32-bit" table (via FADT 32-bit legacy field) and a "64-bit" table (via the 64-bit X field). This change will support both automatically. There continues to be systems found with this issue. This support requires a change to the AcpiSetFirmwareWakingVector interface. Also, a public global variable has been added to allow the host to select which FACS is desired (AcpiGbl_Use32BitFacsAddresses). See the ACPICA reference for more details Lv Zheng.
Added a new feature to allow for systems that do not contain an FACS. Although this is already supported on hardware-reduced platforms, the feature has been extended for all platforms. The reasoning is that we do not want to abort the entire ACPICA initialization just because the system is seriously buggy and has no FACS.
Fixed a problem where the GUID strings for NFIT tables (in acuuid.h) were not correctly transcribed from the ACPI specification in ACPICA version 20150515.
Implemented support for the _CLS object in the AcpiGetObjectInfo external interface.
Updated the definitions of the TCPA and TPM2 ACPI tables to the more recent TCG ACPI Specification, December 14, 2014. Table disassembler and compiler also updated. Note: The TCPA "server" table is not supported by the disassembler/table-compiler at this time.
ACPI 6.0: Added definitions for the new GIC version field in the MADT.
Example Code and Data Size: These are the sizes for the OS-independent acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug version of the code includes the debug output trace mechanism and has a much larger code and data size.
Current Release:
Non-Debug Version: 100.6K Code, 27.6K Data, 128.2K Total
Debug Version: 196.2K Code, 81.0K Data, 277.2K Total
Previous Release:
Non-Debug Version: 99.9K Code, 27.5K Data, 127.4K Total
Debug Version: 195.2K Code, 80.8K Data, 276.0K Total
2) iASL Compiler/Disassembler and Tools:
Disassembler: Fixed a problem with the new symbolic operator disassembler where incorrect ASL code could be emitted in some cases for the "non-commutative" operators -- Subtract, Divide, Modulo, ShiftLeft, and ShiftRight. The actual problem cases seem to be rather unusual in common ASL code, however. David Box.
Modified the linux version of acpidump to obtain ACPI tables from not just /dev/mem (which may not exist) and /sys/firmware/acpi/tables. Lv Zheng.
iASL: Fixed a problem where the user preprocessor output file (.i) contained extra data that was not expected. The compiler was using this file as a temporary file and passed through #line directives in order to keep compiler error messages in sync with the input file and line number across multiple include files. The (.i) is no longer a temporary file as the compiler uses a new, different file for the original purpose.
iASL: Fixed a problem where comments within the original ASL source code file were not passed through to the preprocessor output file, nor any listing files.
iASL: Fixed some issues for the handling of the "#include" preprocessor directive and the similar (but not the same) "Include" ASL operator.
iASL: Add support for the new OSDT in both the disassembler and compiler.
iASL: Fixed a problem with the constant folding support where a Buffer object could be incorrectly generated (incorrectly formed) during a conversion to a Store() operator.
AcpiHelp: Updated for new NFIT GUIDs, "External" AML opcode, and new description text for the _REV predefined name. _REV now permanently returns 2, as per the ACPI 6.0 specification.
Debugger: Enhanced the output of the Debug ASL object for references produced by the Index operator. For Buffers and strings, only output the actual byte pointed to by the index. For packages, only print the single package element decoded by the index. Previously, the entire buffer/string/package was emitted.
iASL/Table-compiler: Fixed a regression where the "generic" data types were no longer recognized, causing errors.
------------------------------
Message: 2
Date: Fri, 19 Jun 2015 14:15:23 +0000
From: "Moore, Robert" <robert.moore(a)intel.com>
To: acpica.org list <devel(a)acpica.org>
Subject: [Devel] ACPICA version 20150619 released
Message-ID:
<94F2FBAB4432B54E8AACC7DFDE6C92E37D3037D9(a)ORSMSX112.amr.corp.intel.com>
Content-Type: text/plain; charset="us-ascii"
19 June 2015. Summary of changes for version 20150619:
This release is available at https://acpica.org/downloads
Two regressions in version 20150616 have been addressed:
Fixes some problems/issues with the C library macro removal (ACPI_STRLEN, etc.) This update changes ACPICA to only use the standard headers for functions, or (optionally) the local prototypes for the local versions of the C library functions. Across the source code, this required some additional casts for some Clib invocations for portability. Moved all local prototypes to a new file, acclib.h
Fixes several problems with recent changes to the handling of the FACS table that could cause some systems not to boot.
------------------------------
Message: 3
Date: Fri, 19 Jun 2015 09:30:18 -0500
From: Dean Nelson <dnelson(a)redhat.com>
To: "Moore, Robert" <robert.moore(a)intel.com>
Cc: "acpica.org list" <devel(a)acpica.org>
Subject: Re: [Devel] ACPICA version 20150619 released
Message-ID: <5584277A.7030509(a)redhat.com>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"
On 06/19/2015 09:15 AM, Moore, Robert wrote:
> 19 June 2015. Summary of changes for version 20150619:
>
> This release is available at https://acpica.org/downloads
Please excuse my ignorance, but why are the download files named
*.tar_0.gz ? Why the '_0' ?
Also I noticed that the git-repo with the latest commit being...
commit d7a940bb308d001b5d2b196174fee36c7daa61d6
Author: Robert Moore <Robert.Moore(a)intel.com>
AuthorDate: Thu Jun 18 08:13:39 2015 -0700
Commit: Robert Moore <Robert.Moore(a)intel.com>
CommitDate: Thu Jun 18 08:13:39 2015 -0700
Update version to 20150619.
differs from the two source code tarballs with regard to
source/compiler/asllookup.c by the git-diff file that I've
attached. But I don't see that patch mentioned in the git-repo.
So where did those changes come from? And do they really belong
in the tarballs? And if yes, why aren't they in the git-repo?
Thanks,
Dean
>
> Two regressions in version 20150616 have been addressed:
>
> Fixes some problems/issues with the C library macro removal (ACPI_STRLEN, etc.)
> This update changes ACPICA to only use the standard headers for functions, or
> (optionally) the local prototypes for the local versions of the C library functions.
> Across the source code, this required some additional casts for some Clib invocations
> for portability. Moved all local prototypes to a new file, acclib.h
>
> Fixes several problems with recent changes to the handling of the FACS table that
> could cause some systems not to boot.
>
>
> _______________________________________________
> Devel mailing list
> Devel(a)acpica.org
> https://lists.acpica.org/mailman/listinfo/devel
>
6 years, 11 months
[PATCH] AcpiXtract: fix warning on int printed with %u specifier
by Colin King
From: Colin Ian King <colin.king(a)canonical.com>
A signed integer is being printed using %u. Since the
integer is never going to be negative, make it unsigned
and this also cleans up the warning found by static analysis:
[source/tools/acpixtract/acpixtract.c:819]: (warning) %u in
format string (no. 1) requires 'unsigned int' but the argument
type is 'int'.
Signed-off-by: Colin Ian King <colin.king(a)canonical.com>
---
source/tools/acpixtract/acpixtract.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/tools/acpixtract/acpixtract.c b/source/tools/acpixtract/acpixtract.c
index fa2cb5a..7e961ff 100644
--- a/source/tools/acpixtract/acpixtract.c
+++ b/source/tools/acpixtract/acpixtract.c
@@ -738,7 +738,7 @@ AxListTables (
FILE *InputFile;
size_t HeaderSize;
unsigned char Header[48];
- int TableCount = 0;
+ unsigned int TableCount = 0;
ACPI_TABLE_HEADER *TableHeader = (ACPI_TABLE_HEADER *) (void *) Header;
--
2.1.4
6 years, 11 months
Re: [Devel] [PATCH] ACPI, Repair of outdated variable
by Moore, Robert
This module is in the process of being deprecated; it is not in the linux kernel:
/* TBD: This entire module is apparently obsolete and should be removed */
> -----Original Message-----
> From: xiaofeng_yan2006(a)126.com [mailto:xiaofeng_yan2006@126.com] On Behalf
> Of xiaofeng.yan
> Sent: Wednesday, July 01, 2015 8:06 PM
> To: Moore, Robert; Zheng, Lv; Wysocki, Rafael J; lenb(a)kernel.org
> Cc: linux-acpi(a)vger.kernel.org; devel(a)acpica.org; linux-
> kernel(a)vger.kernel.org; xiaofeng.yan
> Subject: [PATCH] ACPI, Repair of outdated variable
>
> variable "value" in struct acpi_pnp_device_id has been changed to
> "string".
>
> Signed-off-by: xiaofeng.yan <yanxiaofeng(a)inspur.com>
> ---
> drivers/acpi/acpica/nsdumpdv.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/acpica/nsdumpdv.c
> b/drivers/acpi/acpica/nsdumpdv.c index 7dc367e..1af1af7 100644
> --- a/drivers/acpi/acpica/nsdumpdv.c
> +++ b/drivers/acpi/acpica/nsdumpdv.c
> @@ -89,7 +89,7 @@ acpi_ns_dump_one_device(acpi_handle obj_handle,
>
> ACPI_DEBUG_PRINT_RAW((ACPI_DB_TABLES,
> " HID: %s, ADR: %8.8X%8.8X, Status:
> %X\n",
> - info->hardware_id.value,
> + info->hardware_id.string,
> ACPI_FORMAT_UINT64(info->address),
> info->current_status));
> ACPI_FREE(info);
> --
> 1.9.1
>
6 years, 12 months