From owner-freebsd-mips@FreeBSD.ORG Sat Sep 28 12:20:41 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8C5FB260 for ; Sat, 28 Sep 2013 12:20:41 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 291D42924 for ; Sat, 28 Sep 2013 12:20:41 +0000 (UTC) Received: by mail-wi0-f179.google.com with SMTP id hm2so1947882wib.6 for ; Sat, 28 Sep 2013 05:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=H5wuQViiWky4Vffh36LEWoySDQNFPJw4zGFnn3TP9dU=; b=Cj0/Gfdy4FCEAk7Fz+JyGsmuyxeE+Y0N5M02fYA87z+2vjE1649/2q9aM9rlvOgiMd 4hDfP7ETdGBEpagljoGQhgB+PvU2tEgzomX+T9rMupU/VFmVxMz8M2NT/pQhODceCvU9 rIO7HDV15KzsLhuhsjE2qEEIkDnsDrewMBqrAl0PvDku45/xYyR3yGVjhZXOAgCHoMlZ aKdUN+qC5yCA+WKnLTY3CPMyYn29/ak+PIEj5jXfIV39CBdCK5w5ndmtc+QnYm9zWVct NDlbBoEQ2yYf5fwNHxE/bxGsatvgu8HidRz0uwR0Py2lHbf/xwoosBJuLCuGt6qEACMF lxWw== MIME-Version: 1.0 X-Received: by 10.180.109.132 with SMTP id hs4mr6445599wib.46.1380370839419; Sat, 28 Sep 2013 05:20:39 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.73.133 with HTTP; Sat, 28 Sep 2013 05:20:39 -0700 (PDT) In-Reply-To: <4BA72281-B170-4880-94B3-4C57F4E10FA4@bsdimp.com> References: <4BA72281-B170-4880-94B3-4C57F4E10FA4@bsdimp.com> Date: Sat, 28 Sep 2013 05:20:39 -0700 X-Google-Sender-Auth: YD_GFvtCiBZY8b_jvQba3RjXmGs Message-ID: Subject: Re: Bringing up mips74k support From: Adrian Chadd To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-mips@freebsd.org" X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Sep 2013 12:20:41 -0000 On 28 September 2013 02:33, Warner Losh wrote: > > On Sep 28, 2013, at 11:20 AM, Adrian Chadd wrote: > > > Hi, > > > > I'll post a patch soon, but the TL;DR version: > > > > * the CCA attributes are different on mips74k. I think the cached > > attribtute is 0x0, rather than the default. Check the mips platform > support > > on netbsd - it has a special case for mips74k. > > * The hazard should be EHB, not NOP or SSNOP > > * .. should the hazard be SSNOP for mips24k, rather than "nop;nop;nop.." > ? > > * We're missing hazards around the TLB operations in various places in .c > > and .S code, sigh. > > Not all TLB operations have hazards... :) So I'd want to know if they are > all needed. > > > But with the above, it's enough to bring the AR9344 up to mountroot> . > > Woot! Let's do a code review at EuroBSDCon.... > > So the brainstorm so far: * Need to teach the cache coherency attributes about the mips74k requirements; * Need to identify exactly what COP0_SYNC and HAZARD should be for each CPU family/type; * Need to identify exactly where COP0_SYNC and HAZARD should be used for each CPU family/type; * Need to look at whether we should be using SSNOP in the delay slots after various things (eg jumps.) I'm reviewing the See Mips Run (2nd Ed) section on Hazards (Section 3.4.) Hopefully Warner and I can figure this particular hilarity out. Thanks, -adrian