1. 24 7月, 2015 6 次提交
    • L
      ACPICA: Executer: Add interpreter tracing mode for method tracing facility · ab6c5733
      Lv Zheng 提交于
      ACPICA commit 07fffd02607685b655ed92ee15c160e6a810b60b
      
      The acpi_debug_trace() is the mechanism known as ACPI method tracing that is
      used by Linux as ACPICA debugging message reducer. This facility can be
      controlled through Linux ACPI subsystem - /sys/module/acpi/parameters.
      This facility requires CONFIG_ACPI_DEBUG to be enabled to see ACPICA trace
      logs in the kernel dmesg output.
      
      This patch enhances acpi_debug_trace() to make it not only a message reducer,
      but a real tracer to trace AML interpreter execution. Note that in addition
      to the AML tracer enabling, this patch also updates the facility with the
      following enhancements:
      1. Allow a full path to be specified by the acpi_debug_trace() API.
      2. Allow any method rather than just the entrance of acpi_evaluate_object()
         to be traced.
      3. All interpreter ACPI_LV_TRACE_POINT messages are collected for
         ACPI_EXECUTER layer.
      
      The Makefile of drivers/acpi/acpica is also updated to include exdebug.o
      and the duplicated stubs are removed after that.
      
      Note that since this patch has enhanced the method tracing facility, Linux
      need also be updated after applying this patch. Lv Zheng.
      
      Link: https://github.com/acpica/acpica/commit/07fffd02Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      ab6c5733
    • L
      ACPICA: Dispatcher: Add trace support for interpreter · a616dc2f
      Lv Zheng 提交于
      ACPICA commit 71299ec8b49054daace0df50268e8e055654ca37
      
      This patch adds trace point at the following point:
       1. Begin/end of a control method execution;
       2. Begin/end of an opcode execution.
      
      The trace point feature can be enabled by defining ACPI_DEBUG_OUTPUT
      and specifying a debug level that includes ACPI_LV_TRACDE_POINT and the
      debug layers that include ACPI_PARSER and ACPI_DISPACTCHER.
      
      In order to make aml_op_name of union acpi_parse_object usable for tracer, it is
      enabled for ACPI_DEBUG_OUTPUT in this patch. Lv Zheng.
      
      Link: https://github.com/acpica/acpica/commit/71299ec8Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a616dc2f
    • L
      ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments · 62eb935b
      Lv Zheng 提交于
      ACPICA commit afb52611dbe7403551f93504d3798534f5c343f4
      
      This patch cleans up the code of assigning the AML address to the
      union acpi_operand_object.
      
      The idea behind this cleanup is:
      The AML address of the union acpi_operand_object should always be determined at
      the point where the object is encountered. It should be started from the
      first byte of the object. For example, the opcode of the object, the name
      string of the user_term object, or the first byte of the packaged object
      (where a pkg_length is prefixed). So it's not cleaner to have it assigned
      here and there in the entire ACPICA source tree.
      
      There are some special cases for the internal opcodes, before cleaning up
      the internal opcodes, we should also determine the rules for the AML
      addresses of the internal opcodes:
      1. INT_NAMEPATH_OP: the address of the first byte for the name_string.
      2. INT_METHODCALL_OP: the address of the first byte for the name_string.
      3. INT_BYTELIST_OP: the address of the first byte for the byte_data list.
      4. INT_EVAL_SUBTREE_OP: the address of the first byte for the
                              Region/Package/Buffer/bank_field/Field arguments.
      5. INT_NAMEDFIELD_OP: the address to the name_seg.
      6. INT_RESERVEDFIELD_OP: the address to the 0x00 prefix.
      7. INT_ACCESSFIELD_OP: the address to the 0x01 prefix.
      8. INT_CONNECTION_OP: the address to the 0x02 prefix.
      9: INT_EXTACCESSFIELD_OP: the address to the 0x03 prefix.
      10.INT_RETURN_VALUE_OP: the address of the replaced operand.
      11.computational_data: the address to the
                            Byte/Word/Dword/Qword/string_prefix.
      
      Before cleaning up the internal root scope of the aml_walk, turning it into
      the term_list, we need to remember the aml_start address as the "Aml"
      attribute for the union acpi_operand_object created by acpi_ps_create_scope_op().
      
      Finally, we can delete some redundant AML address assignment in psloop.c.
      
      Link: https://github.com/acpica/acpica/commit/afb52611Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      62eb935b
    • L
      ACPICA: Parser: Cleanup aml_offset in union acpi_operand_object · 950a429c
      Lv Zheng 提交于
      ACPICA commit 61b360074fde2bb8282722579410f5d1fb12f84d
      
      This patch converts aml_offset in union acpi_operand_object to AML address.
      
      AML offset is actually only used by the debugger, using AML address is more
      direct and efficient during the parsing stage so that we don't need to
      calculate the offset during the parsing stage and will not have
      difficulities in converting it into other offset attributes.
      
      Sometimes, aml_offset is not an indication of the offset from the table
      header but the offset from the entry of a list of terms, which requires
      additional efforts to convert it into an offset from the table header. By
      using AML address directly, there is no such difficulty.
      Thus this patch also deletes a logic in disassembler that is trying to
      convert the aml_offset from
        "offset from the start address of Method/Package/Buffer"
      into the
        "offset from the start address of the ACPI table"
      (Sample code deletion can be seen in acpi_dm_deferred_parse(), but the
      function is not in the Linux kernel). Lv Zheng.
      
      Link: https://github.com/acpica/acpica/commit/61b36007Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      950a429c
    • L
      ACPICA: Parser: Cleanup aml_offset in struct acpi_walk_state · 83482f75
      Lv Zheng 提交于
      ACPICA commit d254405814495058276c0c2f9d96794d15a6c91c
      
      This patch converts aml_offset in struct acpi_walk_state to AML address.
      
      AML offset is actually only used by the debugger, using AML address is more
      direct and efficient during the parsing stage so that we don't need to
      calculate it during the parsing stage.
      
      On the other hand, we can see several issues in the current parser logic
      around the aml_offset:
      1. union acpi_operand_object.Common.aml_offset is redundantly assigned in
         acpi_ps_parse_loop().
      2. aml_offset is not an indication of the offset from the table header but
         the offset from the entry of a list of objects. Sometimes, it indicates
         an entry for a Method/Package/Buffer, which makes it difficult to be
         reversely calculated to a table header offset.
      3. When being used with method tracers (for example, Linux function trace),
         it's better to have AML address logged instead of the AML offset because
         the address is the only attribute that can uniquely identify the opcode.
      This patch is required to solve the above issues. Lv Zheng.
      
      Link: https://github.com/acpica/acpica/commit/d2544058Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      83482f75
    • L
      ACPICA: Parser: Reduce parser/namespace divergences for tracer support · eb87a052
      Lv Zheng 提交于
      This patch reduces divergences in parser/namespace components so that the
      follow-up linuxized ACPICA upstream commits can be directly merged.
      Including the fix to an indent issue reported and fixed by Zhouyi Zhou.
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NZhouyi Zhou <yizhouzhou@ict.ac.cn>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      eb87a052
  2. 05 2月, 2015 1 次提交
  3. 26 3月, 2014 1 次提交
  4. 11 2月, 2014 1 次提交
  5. 16 6月, 2013 1 次提交
  6. 25 1月, 2013 1 次提交
  7. 11 1月, 2013 1 次提交
  8. 10 1月, 2013 1 次提交
  9. 15 11月, 2012 4 次提交
  10. 17 7月, 2012 1 次提交
  11. 17 1月, 2012 1 次提交
  12. 19 1月, 2011 2 次提交
  13. 20 4月, 2010 1 次提交
  14. 23 1月, 2010 1 次提交
  15. 25 11月, 2009 1 次提交
  16. 29 8月, 2009 1 次提交
  17. 09 1月, 2009 2 次提交
  18. 31 12月, 2008 1 次提交
  19. 23 10月, 2008 1 次提交
  20. 24 4月, 2008 1 次提交
  21. 23 4月, 2008 4 次提交
  22. 03 2月, 2007 3 次提交
  23. 14 6月, 2006 2 次提交
    • B
      ACPI: ACPICA 20060421 · b229cf92
      Bob Moore 提交于
      Removed a device initialization optimization introduced in
      20051216 where the _STA method was not run unless an _INI
      was also present for the same device. This optimization
      could cause problems because it could allow _INI methods
      to be run within a not-present device subtree (If a
      not-present device had no _INI, _STA would not be run,
      the not-present status would not be discovered, and the
      children of the device would be incorrectly traversed.)
      
      Implemented a new _STA optimization where namespace
      subtrees that do not contain _INI are identified and
      ignored during device initialization. Selectively running
      _STA can significantly improve boot time on large machines
      (with assistance from Len Brown.)
      
      Implemented support for the device initialization case
      where the returned _STA flags indicate a device not-present
      but functioning. In this case, _INI is not run, but the
      device children are examined for presence, as per the
      ACPI specification.
      
      Implemented an additional change to the IndexField support
      in order to conform to MS behavior. The value written to
      the Index Register is not simply a byte offset, it is a
      byte offset in units of the access width of the parent
      Index Field. (Fiodor Suietov)
      
      Defined and deployed a new OSL interface,
      acpi_os_validate_address().  This interface is called during
      the creation of all AML operation regions, and allows
      the host OS to exert control over what addresses it will
      allow the AML code to access. Operation Regions whose
      addresses are disallowed will cause a runtime exception
      when they are actually accessed (will not affect or abort
      table loading.)
      
      Defined and deployed a new OSL interface,
      acpi_os_validate_interface().  This interface allows the host OS
      to match the various "optional" interface/behavior strings
      for the _OSI predefined control method as appropriate
      (with assistance from Bjorn Helgaas.)
      
      Restructured and corrected various problems in the
      exception handling code paths within DsCallControlMethod
      and DsTerminateControlMethod in dsmethod (with assistance
      from Takayoshi Kochi.)
      
      Modified the Linux source converter to ignore quoted string
      literals while converting identifiers from mixed to lower
      case. This will correct problems with the disassembler
      and other areas where such strings must not be modified.
      
      The ACPI_FUNCTION_* macros no longer require quotes around
      the function name. This allows the Linux source converter
      to convert the names, now that the converter ignores
      quoted strings.
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      b229cf92
    • B
      ACPI: ACPICA 20060331 · 793c2388
      Bob Moore 提交于
      Implemented header file support for the following
      additional ACPI tables: ASF!, BOOT, CPEP, DBGP, MCFG, SPCR,
      SPMI, TCPA, and WDRT. With this support, all current and
      known ACPI tables are now defined in the ACPICA headers and
      are available for use by device drivers and other software.
      
      Implemented support to allow tables that contain ACPI
      names with invalid characters to be loaded. Previously,
      this would cause the table load to fail, but since
      there are several known cases of such tables on
      existing machines, this change was made to enable
      ACPI support for them. Also, this matches the
      behavior of the Microsoft ACPI implementation.
      https://bugzilla.novell.com/show_bug.cgi?id=147621
      
      Fixed a couple regressions introduced during the memory
      optimization in the 20060317 release. The namespace
      node definition required additional reorganization and
      an internal datatype that had been changed to 8-bit was
      restored to 32-bit. (Valery Podrezov)
      
      Fixed a problem where a null pointer passed to
      acpi_ut_delete_generic_state() could be passed through
      to acpi_os_release_object which is unexpected. Such
      null pointers are now trapped and ignored, matching
      the behavior of the previous implementation before the
      deployment of acpi_os_release_object().  (Valery Podrezov,
      Fiodor Suietov)
      
      Fixed a memory mapping leak during the deletion of
      a SystemMemory operation region where a cached memory
      mapping was not deleted. This became a noticeable problem
      for operation regions that are defined within frequently
      used control methods. (Dana Meyers)
      
      Reorganized the ACPI table header files into two main
      files: one for the ACPI tables consumed by the ACPICA core,
      and another for the miscellaneous ACPI tables that are
      consumed by the drivers and other software. The various
      FADT definitions were merged into one common section and
      three different tables (ACPI 1.0, 1.0+, and 2.0)
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      793c2388
  24. 01 4月, 2006 1 次提交
    • B
      ACPI: ACPICA 20060217 · ea936b78
      Bob Moore 提交于
      Implemented a change to the IndexField support to match
      the behavior of the Microsoft AML interpreter. The value
      written to the Index register is now a byte offset,
      no longer an index based upon the width of the Data
      register. This should fix IndexField problems seen on
      some machines where the Data register is not exactly one
      byte wide. The ACPI specification will be clarified on
      this point.
      
      Fixed a problem where several resource descriptor
      types could overrun the internal descriptor buffer due
      to size miscalculation: VendorShort, VendorLong, and
      Interrupt. This was noticed on IA64 machines, but could
      affect all platforms.
      
      Fixed a problem where individual resource descriptors were
      misaligned within the internal buffer, causing alignment
      faults on IA64 platforms.
      Signed-off-by: NBob Moore <robert.moore@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      ea936b78