From owner-freebsd-bugs@freebsd.org Fri Dec 11 16:45:35 2015 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2F149D724B for ; Fri, 11 Dec 2015 16:45:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA4A51C57 for ; Fri, 11 Dec 2015 16:45:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id tBBGjZ9M063557 for ; Fri, 11 Dec 2015 16:45:35 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 205249] MIPS_CONFIG0_VI defined wrong in sys/mips/include/cpuregs.h Date: Fri, 11 Dec 2015 16:45:35 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: sgalabov@gmail.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 16:45:36 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D205249 Bug ID: 205249 Summary: MIPS_CONFIG0_VI defined wrong in sys/mips/include/cpuregs.h Product: Base System Version: 11.0-CURRENT Hardware: mips OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: sgalabov@gmail.com According to MIPS=C2=AE Architecture For Programmers Volume III, page 149, = Figure 9-29 (Config Register Format), accessed via http://www.t-es-t.hu/download/mips/md00090c.pdf, bit 3 of config0 is suppos= ed to be VI (Virtual Instruction Cache), while the current definition of MIPS_CONFIG0_VI (0x00000004) implies that it=E2=80=99s bit 2. This leads to a lot of headaches when trying to bring up a new CPU (1004KC = in my case) and trying to use Cachable-Coherent CCA (0x5 or 0b101) for Kseg0 := -) I guess we=E2=80=99ve been able to get away with this so far due to mainly = 2 things: 1. CPUs that use CCA 0x4 - 0x7 for Kseg0 usually are cache-coherent anyway,= so their cache ops are most likely no-op. 2. CPUs that use CCA 0x0 - 0x3 for Kseg0 work just fine, as bit 2 is not set :-) This leads to improper detection of the I-Cache type (it=E2=80=99s detected= as virtual when it actually isn=E2=80=99t) on kernels that use CCA >=3D 0x4 for Kseg0,= which, in turn, leads to a lot of fun trying to figure out what=E2=80=99s wrong and w= hy things work with CCA 0x3 and not with 0x5 on a single core... After changing the definition of MIPS_CONFIG0_VI from 0x00000004 to 0x00000= 008 everything goes back to normal even with CCA 0x5. I would appreciate it if someone would commit this change (if you guys think it=E2=80=99s necessary). I would do it myself if I but I have no commit pri= vileges. --=20 You are receiving this mail because: You are the assignee for the bug.=