1. 12 6月, 2012 1 次提交
  2. 30 3月, 2012 1 次提交
    • G
      ACPI, APEI: Fix incorrect APEI register bit width check and usage · 15afae60
      Gary Hade 提交于
      The current code incorrectly assumes that
      (1) the APEI register bit width is always 8, 16, 32, or 64 and
      (2) the APEI register bit width is always equal to the APEI
          register access width.
      
      ERST serialization instructions entries such as:
      
      [030h 0048   1]                       Action : 00 [Begin Write Operation]
      [031h 0049   1]                  Instruction : 03 [Write Register Value]
      [032h 0050   1]        Flags (decoded below) : 01
                            Preserve Register Bits : 1
      [033h 0051   1]                     Reserved : 00
      
      [034h 0052  12]              Register Region : [Generic Address Structure]
      [034h 0052   1]                     Space ID : 00 [SystemMemory]
      [035h 0053   1]                    Bit Width : 03
      [036h 0054   1]                   Bit Offset : 00
      [037h 0055   1]         Encoded Access Width : 03 [DWord Access:32]
      [038h 0056   8]                      Address : 000000007F2D7038
      
      [040h 0064   8]                        Value : 0000000000000001
      [048h 0072   8]                         Mask : 0000000000000007
      
      break this assumption by yielding:
        [Firmware Bug]: APEI: Invalid bit width in GAR [0x7f2d7038/3/0]
      
      I have found no ACPI specification requirements corresponding
      with the above assumptions.  There is even a good example in
      the Serialization Instruction Entries section (ACPI 4.0 section
      17.4,1.2, ACPI 4.0a section 2.5.1.2, ACPI 5.0 section 18.5.1.2)
      that mentions a serialization instruction with a bit range of
      [6:2] which is 5 bits wide, _not_ 8, 16, 32, or 64 bits wide.
      
      Compile and boot tested with 3.3.0-rc7 on a IBM HX5.
      Signed-off-by: NGary Hade <garyhade@us.ibm.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      15afae60
  3. 22 3月, 2012 1 次提交
  4. 21 1月, 2012 1 次提交
    • M
      ACPI, APEI: Add 64-bit read/write support for APEI on i386 · e615bf5b
      Myron Stowe 提交于
      Base ACPI (CA) currently does not support atomic 64-bit reads and writes
      (acpi_read() and acpi_write() split 64-bit loads/stores into two
      32-bit transfers) yet APEI expects 64-bit transfer capability, even
      when running on 32-bit systems.
      
      This patch implements 64-bit read and write routines for APEI usage.
      
      This patch re-factors similar functionality introduced in commit
      04c25997, bringing it into the ACPI subsystem in preparation for
      removing ./drivers/acpi/atomicio.[ch].  In the implementation I have
      replicated acpi_os_read_memory() and acpi_os_write_memory(), creating
      64-bit versions for APEI to utilize, as opposed to something more
      elegant.  My thinking is that we should attempt to see if we can get
      ACPI's CA/OSL changed so that the existing acpi_read() and acpi_write()
      interfaces are natively 64-bit capable and then subsequently remove the
      replication.
      Signed-off-by: NMyron Stowe <myron.stowe@redhat.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      e615bf5b
  5. 17 1月, 2012 4 次提交
    • M
      ACPI APEI: Convert atomicio routines · 700130b4
      Myron Stowe 提交于
      APEI needs memory access in interrupt context.  The obvious choice is
      acpi_read(), but originally it couldn't be used in interrupt context
      because it makes temporary mappings with ioremap().  Therefore, we added
      drivers/acpi/atomicio.c, which provides:
          acpi_pre_map_gar()     -- ioremap in process context
      	acpi_atomic_read()     -- memory access in interrupt context
      	acpi_post_unmap_gar()  -- iounmap
      
      Later we added acpi_os_map_generic_address() (29718521) and enhanced
      acpi_read() so it works in interrupt context as long as the address has
      been previously mapped (620242ae).  Now this sequence:
          acpi_os_map_generic_address()    -- ioremap in process context
          acpi_read()/apei_read()          -- now OK in interrupt context
          acpi_os_unmap_generic_address()
      is equivalent to what atomicio.c provides.
      
      This patch introduces apei_read() and apei_write(), which currently are
      functional equivalents of acpi_read() and acpi_write().  This is mainly
      proactive, to prevent APEI breakages if acpi_read() and acpi_write()
      are ever augmented to support the 'bit_offset' field of GAS, as APEI's
      __apei_exec_write_register() precludes splitting up functionality
      related to 'bit_offset' and APEI's 'mask' (see its
      APEI_EXEC_PRESERVE_REGISTER block).
      
      With apei_read() and apei_write() in place, usages of atomicio routines
      are converted to apei_read()/apei_write() and existing calls within
      osl.c and the CA, based on the re-factoring that was done in an earlier
      patch series - http://marc.info/?l=linux-acpi&m=128769263327206&w=2:
          acpi_pre_map_gar()     -->  acpi_os_map_generic_address()
          acpi_post_unmap_gar()  -->  acpi_os_unmap_generic_address()
          acpi_atomic_read()     -->  apei_read()
          acpi_atomic_write()    -->  apei_write()
      
      Note that acpi_read() and acpi_write() currently use 'bit_width'
      for accessing GARs which seems incorrect.  'bit_width' is the size of
      the register, while 'access_width' is the size of the access the
      processor must generate on the bus.  The 'access_width' may be larger,
      for example, if the hardware only supports 32-bit or 64-bit reads.  I
      wanted to minimize any possible impacts with this patch series so I
      did *not* change this behavior.
      Signed-off-by: NMyron Stowe <myron.stowe@redhat.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      700130b4
    • H
      ACPI, APEI, Resolve false conflict between ACPI NVS and APEI · 4134b8c8
      Huang Ying 提交于
      Some firmware will access memory in ACPI NVS region via APEI.  That
      is, instructions in APEI ERST/EINJ table will read/write ACPI NVS
      region.  The original resource conflict checking in APEI code will
      check memory/ioport accessed by APEI via general resource management
      mech.  But ACPI NVS region is marked as busy already, so that the
      false resource conflict will prevent APEI ERST/EINJ to work.
      
      To fix this, this patch excludes ACPI NVS regions when APEI components
      request resources.  So that they will not conflict with ACPI NVS
      regions.
      Reported-and-tested-by: NPavel Ivanov <paivanof@gmail.com>
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      4134b8c8
    • H
      ACPI, APEI, EINJ, Fix resource conflict on some machine · fdea163d
      Huang Ying 提交于
      Some APEI firmware implementation will access injected address
      specified in param1 to trigger the error when injecting memory error.
      This will cause resource conflict with RAM.
      
      On one of our testing machine, if injecting at memory address
      0x10000000, the following error will be reported in dmesg:
      
        APEI: Can not request iomem region <0000000010000000-0000000010000008> for GARs.
      
      This patch removes the injecting memory address range from trigger
      table resources to avoid conflict.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Tested-by: NTony Luck <tony.luck@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      fdea163d
    • B
      ACPI, APEI, Print resource errors in conventional format · 46b91e37
      Bjorn Helgaas 提交于
      Use the normal %pR-like format for MMIO and I/O port ranges.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      46b91e37
  6. 12 8月, 2011 1 次提交
  7. 14 7月, 2011 2 次提交
    • H
      ACPI, APEI, Add WHEA _OSC support · 9fb0bfe1
      Huang Ying 提交于
      APEI firmware first mode must be turned on explicitly on some
      machines, otherwise there may be no GHES hardware error record for
      hardware error notification.  APEI bit in generic _OSC call can be
      used to do that, but on some machine, a special WHEA _OSC call must be
      used.  This patch adds the support to that WHEA _OSC call.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Reviewed-by: NAndi Kleen <ak@linux.intel.com>
      Reviewed-by: NMatthew Garrett <mjg@redhat.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      9fb0bfe1
    • H
      ACPI, APEI, Add apei_exec_run_optional · eecf2f71
      Huang Ying 提交于
      Some actions in APEI ERST and EINJ tables are optional, for example,
      ACPI_EINJ_BEGIN_OPERATION action is used to do some preparation for
      error injection, and firmware may choose to do nothing here.  While
      some other actions are mandatory, for example, firmware must provide
      ACPI_EINJ_GET_ERROR_TYPE implementation.
      
      Original implementation treats all actions as optional (that is, can
      have no instructions), that may cause issue if firmware does not
      provide some mandatory actions.  To fix this, this patch adds
      apei_exec_run_optional, which should be used for optional actions.
      The original apei_exec_run should be used for mandatory actions.
      
      Cc: Thomas Renninger <trenn@novell.com>
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      eecf2f71
  8. 30 9月, 2010 1 次提交
  9. 09 8月, 2010 1 次提交
  10. 28 6月, 2010 1 次提交
  11. 20 5月, 2010 1 次提交
    • H
      ACPI, APEI, APEI supporting infrastructure · a643ce20
      Huang Ying 提交于
      APEI stands for ACPI Platform Error Interface, which allows to report
      errors (for example from the chipset) to the operating system. This
      improves NMI handling especially. In addition it supports error
      serialization and error injection.
      
      For more information about APEI, please refer to ACPI Specification
      version 4.0, chapter 17.
      
      This patch provides some common functions used by more than one APEI
      tables, mainly framework of interpreter for EINJ and ERST.
      
      A machine readable language is defined for EINJ and ERST for OS to
      execute, and so to drive the firmware to fulfill the corresponding
      functions. The machine language for EINJ and ERST is compatible, so a
      common framework is defined for them.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      a643ce20