From owner-freebsd-hackers@freebsd.org Mon Aug 27 13:17:00 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4972A108947F; Mon, 27 Aug 2018 13:17:00 +0000 (UTC) (envelope-from karu.pruun@gmail.com) Received: from mail-oi0-x22c.google.com (mail-oi0-x22c.google.com [IPv6:2607:f8b0:4003:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1AB88FB4A; Mon, 27 Aug 2018 13:16:59 +0000 (UTC) (envelope-from karu.pruun@gmail.com) Received: by mail-oi0-x22c.google.com with SMTP id b15-v6so27128750oib.10; Mon, 27 Aug 2018 06:16:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kCE+z+wA0AQ6kkp7Mvfiz76YsFwiWyfUDPHk8NVPNq8=; b=KI8RCpruxuvoezNKLI20dcmqvNc2dFKuXB9SxEo8/Zx1ToL3+FuQbd1H3y6VxvzMeQ F80uEqO7z4b6SV4KaNEjJlF/TIqgaf9q4SzxS7ZuXJn4nybfRNGvssK61gAN6XWN4vnp 4ackoWQpEHfE1hISa5+pvGYxHjGVrjT0vIre3D3hsbEXyR0nr08HWYT/OSzwaGJEe4E/ MXEdnULQvHShalHN/bbZQfKR/UnG9AM8G3/svJuOvHpx/JpsI1BDH4+BxZpdUiZYDJYC sHvZCASTlUQVouKONZPf2v7nKuO6bPGR/RwBnQ0f9dzpNE2Xo/HZ0Is10FsHd00LjMca QNOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kCE+z+wA0AQ6kkp7Mvfiz76YsFwiWyfUDPHk8NVPNq8=; b=Iff+3uflCqORgDJb3eLQgYoQgRT2GQtnOH82DkmhR6CImohpCcBU6dtvvKyuFkk/ZE 50y/acAPzJglkIWok6ZqLObA4Lrzr9K1Ki5jmROpK52OB3/WctG3LpBVKJbUZ0/YX+jH wFPmDAOY53FFjvFPecxi3wH6Cj8a4skhZWROhh8y/I9fELfCafWieSp+p/XUYIHkHu2/ L3ReYvzU6Wo7tuSmfzZpiNDyPXNyfabu2yrQIESxgvyMvd3dbaivk34XOlM7+I+AuBam H7dZFhWbS8POI6o1K7atoIXZbs74ygGbz/ruVzE5Bg1B/dOuohN3o7s7TQwxzxC5hKQ3 un3g== X-Gm-Message-State: APzg51Dqr9EP5VTYer5kTx0Ni5FbLaA1K6MxFFBg/tkaZOKH7dxePssm oFQpz+gBkumbsKbQN0nPIW+GE2cK4hCNHv+0LRSA0Sfi X-Google-Smtp-Source: ANB0VdZgpkiC8Wg3qiobUuI/cJ+V23h3arfrBA60BAx+zlDoMSF8zQ+nheeSGBa/jaXGrWqbpiOzwk/kCjd0tf9KxgA= X-Received: by 2002:aca:d098:: with SMTP id j24-v6mr12814944oiy.72.1535375819193; Mon, 27 Aug 2018 06:16:59 -0700 (PDT) MIME-Version: 1.0 References: <20180827132905.191dbd8c@ernst.home> In-Reply-To: From: "karu.pruun" Date: Mon, 27 Aug 2018 16:16:47 +0300 Message-ID: Subject: Re: Help diagnose my Ryzen build problem To: meowthink@gmail.com Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2018 13:17:00 -0000 On Mon, Aug 27, 2018 at 3:21 PM Meowthink wrote: > That's kib, who has committed things in that script to both 12 [1] and > stable/11 [2]. > > Unfortunately, that's for Ryzens family 17h model 00h-0fh, whereas my > Ryzen 5 2400G's model is 11h. > > On the microcode. It shall be updated through UEFI/BIOS updates. I > think mine is now PinnaclePI-AM4_1.0.0.4 with microcode patchlevel > 0x810100b. > > Seems like ... the only thing I can do is sit down and wait? The revision https://svnweb.freebsd.org/base/head/sys/x86/x86/cpu_machdep.c?r1=336763&r2=336762&pathrev=336763 works around the mwait issue, i.e. it sets sysctl machdep.idle_mwait=0 sysctl machdep.idle=hlt Now it may or may not relate to your problem, but it appears that Ryzen 2400G also has another issue with HLT, see the DragonFly bug report https://bugs.dragonflybsd.org/issues/3131 which AMD is aware of and is possibly working on, but it may not have appeared in the errata yet. The bug report says that until this is fixed, the workaround is to also disable HLT in cpu_idle. I am not sure what is the correct value for the sysctl on FreeBSD, perhaps sysctl machdep.idle=0 or some other value? Cheers Peeter --