1. 18 3月, 2009 1 次提交
  2. 17 3月, 2009 1 次提交
  3. 14 3月, 2009 2 次提交
  4. 13 3月, 2009 4 次提交
    • A
      x86: mtrr: don't modify RdDram/WrDram bits of fixed MTRRs · 3ff42da5
      Andreas Herrmann 提交于
      Impact: bug fix + BIOS workaround
      
      BIOS is expected to clear the SYSCFG[MtrrFixDramModEn] on AMD CPUs
      after fixed MTRRs are configured.
      
      Some BIOSes do not clear SYSCFG[MtrrFixDramModEn] on BP (and on APs).
      
      This can lead to obfuscation in Linux when this bit is not cleared on
      BP but cleared on APs. A consequence of this is that the saved
      fixed-MTRR state (from BP) differs from the fixed-MTRRs of APs --
      because RdDram/WrDram bits are read as zero when
      SYSCFG[MtrrFixDramModEn] is cleared -- and Linux tries to sync
      fixed-MTRR state from BP to AP. This implies that Linux sets
      SYSCFG[MtrrFixDramEn] and activates those bits.
      
      More important is that (some) systems change these bits in SMM when
      ACPI is enabled. Hence it is racy if Linux modifies RdMem/WrMem bits,
      too.
      
      (1) The patch modifies an old fix from Bernhard Kaindl to get
          suspend/resume working on some Acer Laptops. Bernhard's patch
          tried to sync RdMem/WrMem bits of fixed MTRR registers and that
          helped on those old Laptops. (Don't ask me why -- can't test it
          myself). But this old problem was not the motivation for the
          patch. (See http://lkml.org/lkml/2007/4/3/110)
      
      (2) The more important effect is to fix issues on some more current systems.
      
          On those systems Linux panics or just freezes, see
      
          http://bugzilla.kernel.org/show_bug.cgi?id=11541
          (and also duplicates of this bug:
          http://bugzilla.kernel.org/show_bug.cgi?id=11737
          http://bugzilla.kernel.org/show_bug.cgi?id=11714)
      
          The affected systems boot only using acpi=ht, acpi=off or
          when the kernel is built with CONFIG_MTRR=n.
      
          The acpi options prevent full enablement of ACPI.  Obviously when
          ACPI is enabled the BIOS/SMM modfies RdMem/WrMem bits.  When
          CONFIG_MTRR=y Linux also accesses and modifies those bits when it
          needs to sync fixed-MTRRs across cores (Bernhard's fix, see (1)).
          How do you synchronize that? You can't. As a consequence Linux
          shouldn't touch those bits at all (Rationale are AMD's BKDGs which
          recommend to clear the bit that makes RdMem/WrMem accessible).
          This is the purpose of this patch. And (so far) this suffices to
          fix (1) and (2).
      
      I suggest not to touch RdDram/WrDram bits of fixed-MTRRs and
      SYSCFG[MtrrFixDramEn] and to clear SYSCFG[MtrrFixDramModEn] as
      suggested by AMD K8, and AMD family 10h/11h BKDGs.
      BIOS is expected to do this anyway. This should avoid that
      Linux and SMM tread on each other's toes ...
      Signed-off-by: NAndreas Herrmann <andreas.herrmann3@amd.com>
      Cc: trenn@suse.de
      Cc: Yinghai Lu <yinghai@kernel.org>
      LKML-Reference: <20090312163937.GH20716@alberich.amd.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3ff42da5
    • Y
      x86: separate mtrr cleanup/mtrr_e820 trim to separate file · 0d890355
      Yinghai Lu 提交于
      Impact: cleanup
      
      mtrr main.c is too big, seperate mtrr cleanup and mtrr e820 trim
      code to another file.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      LKML-Reference: <49B87C7B.80809@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0d890355
    • Y
      x86: print out mtrr_range_state when user specify size · c1ab7e93
      Yinghai Lu 提交于
      Impact: print more debug info
      
      Keep it consistent with autodetect version.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      LKML-Reference: <49B87C0A.4010105@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c1ab7e93
    • Y
      x86: more MTRR debug printouts · 8ad97905
      Yinghai Lu 提交于
      Impact: improve MTRR debugging messages
      
      There's still inefficiencies suspected with the MTRR sanitizing
      code, so make sure we get all the info we need from a dmesg.
      
      - Remove unneeded mtrr_show
      
       (It will only printout one time by first cpu, so it is no big deal.)
      
      - Also print out directly from get_mtrr, because it doesn't update mtrr_state.
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      LKML-Reference: <49B9BA5A.40108@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8ad97905
  5. 12 3月, 2009 11 次提交
  6. 11 3月, 2009 21 次提交