From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Wang2 Subject: [PATCH] A workaround for AMD erratum 411 Date: Fri, 4 Jun 2010 13:33:43 +0200 Message-ID: <201006041333.43265.wei.wang2@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_XSOCMJAg6DDd7Ls" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --Boundary-00=_XSOCMJAg6DDd7Ls Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, This patch is a workaround of AMD erratum 411 for family 10h CPUs. This doe= s=20 not cause functional issues but may reduce the power saving effectiveness o= f=20 message-triggered C1e mode. This would normally occur only if OS which has= =20 used the local APIC timer masks the interrupt without clearing Timer Initia= l=20 Count Register. Thanks, Wei Signed-off-by: Wei Wang =2D-=20 AMD GmbH, Germany Operating System Research Center Legal Information: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34 85609 Dornach b. M=FCnchen Gesch=E4ftsf=FChrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis M=FCnchen Registergericht M=FCnchen, HRB Nr. 43632 --Boundary-00=_XSOCMJAg6DDd7Ls Content-Type: text/x-diff; charset="us-ascii"; name="erratum411.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="erratum411.patch" diff -r e6f751ed8e38 xen/arch/x86/apic.c --- a/xen/arch/x86/apic.c Tue Mar 09 10:00:37 2010 +0000 +++ b/xen/arch/x86/apic.c Fri May 28 12:28:22 2010 +0200 @@ -209,6 +209,11 @@ void clear_local_APIC(void) */ v = apic_read(APIC_LVTT); apic_write_around(APIC_LVTT, v | APIC_LVT_MASKED); + + /* Workaround AMD Erratum 411. Please refer to AMD + revision guide for more details. */ + apic_write_around(APIC_TMICT, 0x0); + v = apic_read(APIC_LVT0); apic_write_around(APIC_LVT0, v | APIC_LVT_MASKED); v = apic_read(APIC_LVT1); @@ -1187,6 +1192,10 @@ void disable_APIC_timer(void) v = apic_read(APIC_LVTT); apic_write_around(APIC_LVTT, v | APIC_LVT_MASKED); + + /* Workaround AMD Erratum 411. Please refer to AMD + revision guide for more details. */ + apic_write_around(APIC_TMICT, 0x0); } } --Boundary-00=_XSOCMJAg6DDd7Ls Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_XSOCMJAg6DDd7Ls--