Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jun 2018 12:06:42 +0100
From:      Johannes Lundberg <johalun0@gmail.com>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        current@freebsd.org, amd64@freebsd.org
Subject:   Re: Ryzen public erratas
Message-ID:  <86602neyil.fsf@gmail.com>
In-Reply-To: <20180613103535.GP2493@kib.kiev.ua>
References:  <20180613103535.GP2493@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

Konstantin Belousov writes:

> Today I noted that AMD published the public errata document for Ryzens,
> https://developer.amd.com/wp-content/resources/55449_1.12.pdf
>
> Some of the issues listed there looks quite relevant to the potential
> hangs that some people still experience with the machines.  I wrote
> a script which should apply the recommended workarounds to the erratas
> that I find interesting.
>
> To run it, kldload cpuctl, then apply the latest firmware update to your
> CPU, then run the following shell script.  Comments indicate the errata
> number for the workarounds.
>
> Please report the results.  If the script helps, I will code the kernel
> change to apply the workarounds.
>
> #!/bin/sh
>
> # Enable workarounds for erratas listed in
> # https://developer.amd.com/wp-content/resources/55449_1.12.pdf
>
> # 1057, 1109
> sysctl machdep.idle_mwait=0
> sysctl machdep.idle=hlt
>
> for x in /dev/cpuctl*; do
> 	# 1021
> 	cpucontrol -m '0xc0011029|=0x2000' $x
> 	# 1033
> 	cpucontrol -m '0xc0011020|=0x10' $x
> 	# 1049
> 	cpucontrol -m '0xc0011028|=0x10' $x
> 	# 1095
> 	cpucontrol -m '0xc0011020|=0x200000000000000' $x
> done
>

Hi

Thanks for the fix! I'm trying it now on my Ryzen 3 2200G which does
experience some random occasional resets.

About updating to latest firmware, is this something that's done from BIOS or
from FreeBSD? If the latter, how?

> _______________________________________________
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86602neyil.fsf>