Skip to content
Snippets Groups Projects
  1. Oct 14, 2015
  2. Aug 25, 2015
    • Lv Zheng's avatar
      ACPICA: Tables: Fix global table list issues by removing fixed table indexes · 8ec3f459
      Lv Zheng authored
      ACPICA commit c0b38b4c3982c2336ee92a2a14716107248bd941
      
      The fixed table indexes leave holes in the global table list:
       1. One hole can be seen when there is only 1 FACS provided by the BIOS.
       2. Tow holes can be seen when it is a reduced hardware platform.
      The holes do not break OSPMs but have broken ACPI debugger "tables"
      command.
      
      Also the "fixed table indexes" mechanism may make the descriptors of the
      standard tables installed earlier than DSDT to be overwritten by the
      descriptors of the fixed tables. For example, FACP disappears from the
      global table list after DSDT is installed.
      
      This patch fixes all above issues by removing the "fixed table indexes"
      mechanism which is too complicated to be maintained in a regression safe
      manner. After removal, the table loader will determine the indexes of the
      fixed tables. Lv Zheng.
      
      Link: https://github.com/acpica/acpica/commit/c0b38b4c
      
      
      Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
      Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8ec3f459
  3. Jul 01, 2015
    • Bob Moore's avatar
      ACPICA: De-macroize calls to standard C library functions · 4fa4616e
      Bob Moore authored
      ACPICA commit 3b1026e0bdd3c32eb6d5d313f3ba0b1fee7597b4
      ACPICA commit 00f0dc83f5cfca53b27a3213ae0d7719b88c2d6b
      ACPICA commit 47d22a738d0e19fd241ffe4e3e9d4e198e4afc69
      
      Across all of ACPICA. Replace C library macros such as ACPI_STRLEN with the
      standard names such as strlen. The original purpose for these macros is
      long since obsolete.
      Also cast various invocations as necessary. Bob Moore, Jung-uk Kim, Lv Zheng.
      
      Link: https://github.com/acpica/acpica/commit/3b1026e0
      Link: https://github.com/acpica/acpica/commit/00f0dc83
      Link: https://github.com/acpica/acpica/commit/47d22a73
      
      
      Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
      Signed-off-by: default avatarJung-uk Kim <jkim@FreeBSD.org>
      Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4fa4616e
    • Lv Zheng's avatar
      ACPICA: Tables: Enable both 32-bit and 64-bit FACS · c04e1fb4
      Lv Zheng authored
      ACPICA commit f7b86f35416e3d1f71c3d816ff5075ddd33ed486
      
      The following commit is reported to have broken s2ram on some platforms:
       Commit: 0249ed24
       ACPICA: Add option to favor 32-bit FADT addresses.
      The platform reports 2 FACS tables (which is not allowed by ACPI
      specification) and the new 32-bit address favor rule forces OSPMs to use
      the FACS table reported via FADT's X_FIRMWARE_CTRL field.
      
      The root cause of the reported bug might be one of the followings:
      1. BIOS may favor the 64-bit firmware waking vector address when the
         version of the FACS is greater than 0 and Linux currently only supports
         resuming from the real mode, so the 64-bit firmware waking vector has
         never been set and might be invalid to BIOS while the commit enables
         higher version FACS.
      2. BIOS may favor the FACS reported via the "FIRMWARE_CTRL" field in the
         FADT while the commit doesn't set the firmware waking vector address of
         the FACS reported by "FIRMWARE_CTRL", it only sets the firware waking
         vector address of the FACS reported by "X_FIRMWARE_CTRL".
      
      This patch excludes the cases that can trigger the bugs caused by the root
      cause 2.
      
      There is no handshaking mechanism can be used by OSPM to tell BIOS which
      FACS is currently used. Thus the FACS reported by "FIRMWARE_CTRL" may still
      be used by BIOS and the 0 value of the 32-bit firmware waking vector might
      trigger such failure.
      
      This patch tries to favor 32bit FACS address in another way where both the
      FACS reported by "FIRMWARE_CTRL" and the FACS reported by "X_FIRMWARE_CTRL"
      are loaded so that further commit can set firmware waking vector in the
      both tables to ensure we can exclude the cases that trigger the bugs caused
      by the root cause 2. The exclusion is split into 2 commits as this commit
      is also useful for dumping more ACPI tables, it won't get reverted when
      such exclusion is no longer necessary. Lv Zheng.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=74021
      Link: https://github.com/acpica/acpica/commit/f7b86f35
      
      
      Cc: 3.14.1+ <stable@vger.kernel.org> # 3.14.1+
      Reported-and-tested-by: default avatarOswald Buddenhagen <ossi@kde.org>
      Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
      Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      c04e1fb4
  4. Feb 05, 2015
  5. May 06, 2014
  6. Apr 20, 2014
    • Lv Zheng's avatar
      ACPICA: Tables: Fix table checksums verification before installation. · 86dfc6f3
      Lv Zheng authored
      
      The original table handling code does not always verify checksums before
      installing a table, this is because code to achieve this must be
      implemented here and there in the redundant code blocks.
      
      There are two stages during table initialization:
      1. "INSTALLED" after acpi_tb_install_table() and acpi_tb_override_table(),
         struct acpi_table_desc.Pointer is ensured to be NULL.  This can be safely used
         during OSPM's early boot stage.
      2. "VALIDATED" after acpi_tb_validate_table(), struct acpi_table_desc.Pointer is
         ensured to be not NULL.  This must not be used during OSPM's early boot
         stage.
      
      This patch changes acpi_tb_add_table() into an early boot safe API to reduce
      code redundancies by changing the table state that is returned by this
      function from "VALIDATED" to "INSTALLED".  Then the table verification
      code can be done in a single place.  Originally, the acpi_tb_add_table() can
      only be used by dynamic table loadings that are executed after early boot
      stage, it cannot be used by static table loadings that are executed in
      early boot stage as:
      1.  The address of the table is a virtual address either maintained by
          OSPMs who call acpi_load_table() or by ACPICA whenever "Load" or
          "LoadTable" opcodes are executed, while during early boot stage,
          physical address of the table should be used for table loading.
      2.  The API will ensure the state of the loaded table to be "VALIDATED"
          while during early boot stage, tables maintained by root table list
          should be kept as "INSTALLED".
      
      To achieve this:
      1. Rename acpi_tb_install_table() to acpi_tb_install_fixed_table() as it only
         applies to DSDT/FACS installation.  Rename acpi_tb_add_table() to
         acpi_tb_install_non_fixed_table() as it will be applied to the installation
         of the rest kinds of tables.
      2. Introduce acpi_tb_install_table(), acpi_tb_install_and_override_table to collect
         redudant code where their invocations actually have slight differences.
         1. acpi_tb_install_table() is used to fill an struct acpi_table_desc where the
            table length is known to the caller.
         2. acpi_tb_install_and_override_table() is used to perform necessary
            overriding before installation.
      3. Change a parameter of acpi_tb_install_non_fixed_table() from struct acpi_table_desc
         to acpi_physical_address to allow it to be invoked by static table
         loadings.  Also cleanup acpi_ex_load_op() and acpi_load_table() to accomodate
         to the parameter change.
      4. Invoke acpi_tb_install_non_fixed_table() for all table loadings other than
         DSDT/FACS in acpi_tb_parse_root_table() to improve code maintainability
         (logics are collected in the single function).  Also delete useless code
         from acpi_tb_parse_root_table().
      5. Remove all acpi_tb_validate_table() from acpi_tb_install_non_fixed_table() and
         acpi_tb_install_fixed_table() so that the table descriptor is kept in the
         state of "INSTALLED" but not "VALIDATED" after returning from these
         functions.
      6. Introduce temporary struct acpi_table_desc (new_table_desc/old_table_desc) into
         the functions to indicate a table descriptor that is not maintained by
         acpi_gbl_root_table_list. Introduce acpi_tb_acquire_temporal_table() and
         acpi_tb_release_temporal_table() to handle the use cases of such temporal
         tables.  They are only used for verified installation.
      7. Introduce acpi_tb_verify_table() to validate table and verify table
         checksum, also remove table checksum verification from
         acpi_tb_validate_table(). Invoke acpi_tb_validate_table() in the functions
         that will convert a table into "LOADED" state or invoke it from
         acpi_get_table_XXX() APIs. Invoke acpi_tb_verify_table() on temporary
         struct acpi_table_desc(s) that are going to be "INSTALLED".
      8. Change acpi_tb_override_table() logic so that a temporary struct acpi_table_desc
         will be overridden before installtion, this makes code simpler.
      
      After applying the patch, tables are always installed after being
      overridden and the table checksums are always verified before installation.
      
      Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
      Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
      [rjw: Subject]
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      86dfc6f3
  7. Feb 10, 2014
  8. Jan 08, 2014
  9. Aug 13, 2013
  10. Apr 12, 2013
  11. Jan 25, 2013
  12. Jan 10, 2013
    • Lv Zheng's avatar
      ACPICA: Cleanup updated comments. · 75c8044f
      Lv Zheng authored
      
      This is a cosmetic patch only. Comparison of the resulting binary showed
      only line number differences.
      
      This patch does not affect the generation of the Linux binary.
      This patch decreases 558 lines of 20121018 divergence.diff.
      
      This patch reduces the source code diff between Linux and ACPICA by
      cleaning the comments that already have been updated in ACPICA.
      
      There is no extra indentation done in this patch. Even the empty line
      deletions and insertions are also splitted into another cleanup patch so
      that this patch can be easily reviewed, and the binary differences can be
      held to a lowest level.
      
      Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      75c8044f
  13. Jul 17, 2012
  14. Jun 01, 2012
  15. Mar 21, 2012
  16. Jan 17, 2012
  17. Mar 03, 2011
  18. Jan 19, 2011
  19. Oct 01, 2010
  20. Apr 20, 2010
  21. Jan 22, 2010
  22. Sep 20, 2009
    • Felipe Contreras's avatar
      x86: Trivial whitespace cleanups · 878f4f53
      Felipe Contreras authored
      
      Signed-off-by: default avatarFelipe Contreras <felipe.contreras@gmail.com>
      Cc: Vegard Nossum <vegardno@ifi.uio.no>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Alok N Kataria <akataria@vmware.com>
      Cc: "Tan Wei Chong" <wei.chong.tan@intel.com>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Lin Ming <ming.m.lin@intel.com>
      Cc: Bob Moore <robert.moore@intel.com>
      LKML-Reference: <1253137123-18047-2-git-send-email-felipe.contreras@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      878f4f53
  23. May 27, 2009
  24. Mar 27, 2009
  25. Mar 26, 2009
  26. Jan 09, 2009
  27. Dec 31, 2008
Loading