From owner-freebsd-bugs Sun Oct 1 7:20: 5 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7346237B503 for ; Sun, 1 Oct 2000 07:20:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id HAA53483; Sun, 1 Oct 2000 07:20:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from nhj.nlc.net.au (nhj.nlc.net.au [203.24.133.1]) by hub.freebsd.org (Postfix) with SMTP id C7D9637B66D for ; Sun, 1 Oct 2000 07:11:52 -0700 (PDT) Received: (qmail 11667 invoked from network); 2 Oct 2000 01:11:49 +1100 Received: from monster.nlc.net.au (203.24.133.6) by nhj.nlc.net.au with SMTP; 2 Oct 2000 01:11:49 +1100 Received: (qmail 2371 invoked from network); 2 Oct 2000 01:11:48 +1100 Received: from pacer.nlc.net.au (HELO sentinel.pakprotector.com) (203.24.133.16) by monster.nlc.net.au with SMTP; 2 Oct 2000 01:11:48 +1100 Received: from pacer.pakprotector.com (root@pacer.pakprotector.com [203.41.181.2]) by sentinel.pakprotector.com (8.11.0/8.9.3) with ESMTP id e91ECTA11377 for ; Mon, 2 Oct 2000 01:12:30 +1100 (EST) (envelope-from john@pacer.pakprotector.com) Received: (from john@localhost) by pacer.pakprotector.com (8.11.0/8.11.0) id e91EBwm00582; Mon, 2 Oct 2000 01:11:58 +1100 (EST) (envelope-from john) Message-Id: <200010011411.e91EBwm00582@pacer.pakprotector.com> Date: Mon, 2 Oct 2000 01:11:58 +1100 (EST) From: john@pakprotector.com Reply-To: john@pakprotector.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: i386/21672: AMD Duron Rev. A0 reports incorrect L2 cache size Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 21672 >Category: i386 >Synopsis: AMD Duron Rev. A0 reports incorrect L2 cache size >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 01 07:20:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: John Saunders >Release: FreeBSD 4.1-STABLE i386 >Organization: NORTHLINK COMMUNICATIONS PTY LTD >Environment: AMD Duron Rev. A0 chip. >Description: There is errata with Rev. A0 AMD Duron in that it reports a L2 cache size of 1K when it really should be 64K. >How-To-Repeat: Boot with the -v option with a Rev. A0 Duron. >Fix: Apply the following patch to implement AMD's suggestion solution. --- sys/i386/i386/identcpu.c.orig Sat Sep 30 15:07:33 2000 +++ sys/i386/i386/identcpu.c Mon Oct 2 01:07:22 2000 @@ -918,9 +918,16 @@ printf(", %d bytes/line", regs[3] & 0xff); printf(", %d lines/tag", (regs[3] >> 8) & 0xff); print_AMD_assoc((regs[3] >> 16) & 0xff); - if (amd_maxregs >= 0x80000006) { /* K6-III only */ + if (amd_maxregs >= 0x80000006) { /* K6-III, K7 or later */ do_cpuid(0x80000006, regs); - printf("L2 internal cache: %d kbytes", regs[2] >> 16); + /* + * Duron Rev. A0 incorrectly reports L2 cache size as 1K when it's 64K. + */ + if ((cpu_id & 0xFF0) == 0x630) { + printf("L2 internal cache: 64 kbytes"); + } else { + printf("L2 internal cache: %d kbytes", regs[2] >> 16); + } printf(", %d bytes/line", regs[2] & 0xff); printf(", %d lines/tag", (regs[2] >> 8) & 0x0f); print_AMD_assoc((regs[2] >> 12) & 0x0f); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message