From owner-freebsd-mips@FreeBSD.ORG Sun Sep 29 15:54:38 2013 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3AC685D3 for ; Sun, 29 Sep 2013 15:54:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B94292C5C for ; Sun, 29 Sep 2013 15:54:37 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id c11so4503553wgh.6 for ; Sun, 29 Sep 2013 08:54:36 -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=UTqGrigzTDCK8c4Wya4Pg5w3bFCH/UF7VSB8+0aDTDY=; b=SI3SkF2nHaDw+ovpvszFcn5U7BglaZxfw7wQ6zgmYk+pQCvcElndklJHO9azmtfU6U dOYHYbaM+8E8TfoJNPATiYmOOooYAwyDfZMItp29brIubSYpJgZpM9LaeHQwQu7OuLOr i19Hi2XJOyIenD5NHp3WZKZ9HalgwjbgcZ/3LMl4t/KZz5OafCBWImIdS73OZIt94vca kM+9u0rhb1sP79rzgBMy0D5nkf7H8ziAWSWDgyLHy/5GzlCO3KWe1CB7Q9VV2bgTMHQy 7Tmm92+iSeLZAza1yzPlmKA5Ywsb/liDXGv/UPEBO2tLKrae7Q5Hh01duuHa9oCDi5nt JtIA== MIME-Version: 1.0 X-Received: by 10.180.109.132 with SMTP id hs4mr10267936wib.46.1380470076023; Sun, 29 Sep 2013 08:54:36 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.73.133 with HTTP; Sun, 29 Sep 2013 08:54:35 -0700 (PDT) In-Reply-To: References: <945A50E4-685D-4CC7-88B5-89278744E389@bsdimp.com> Date: Sun, 29 Sep 2013 08:54:35 -0700 X-Google-Sender-Auth: BbENG0yzOoenmpp_mMcCRTE9_R8 Message-ID: Subject: Re: [rfc] mips74k/ar9344 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: Sun, 29 Sep 2013 15:54:38 -0000 Hi, http://people.freebsd.org/~adrian/mips/20130929-mips74k-4.diff It turns out that with the XSTRING() stuff going on with COP0_SYNC, we can't just put "sll zero,zero,3" in. It complains. So, use .word 0xc0 for now. Next, it exposed elf_trampoline.c - opt_global.h should be included before the cpu register stuff. -adrian On 29 September 2013 07:57, Warner Losh wrote: > More comments: > > For COP0_HAZARD, I'd add a pointer to See Mips Run, 2nd Ed in a comment on > explaining why. > > You're also still using .word 0xc0 in cpuregs.h. > > Warner > > On Sep 29, 2013, at 4:50 PM, Adrian Chadd wrote: > > > Hi, > > > > Right: > > > > http://people.freebsd.org/~adrian/mips/20130929-mips74k-3.diff > > > > > > > > -adrian > > > > > > > > On 29 September 2013 07:43, Warner Losh wrote: > > I'd be tempted to use 'sll zero, 3' instead of '.word 0xc0' and define a > macro for it. Why 'sll zero,3' instead of ehb? It allows us to use it on > older MIPS platforms as well... (because it will assemble in other modes, > not for binutils issues)... > > > > Speaking of which, I'd also change the last 'nop' on the HAZARD_DELAY > and ITLBNOPFIX to be 'sll zero, 3' as well. This will be an appropriate nop > on older kit, as well as 'fail safe' when someone starts to cope with newer > compilers. Ditto COP0_SYNC. > > > > On Sep 29, 2013, at 4:37 PM, Adrian Chadd wrote: > > > > > grr, wrong list. > > > > > > also, try this: > > > > > > http://people.freebsd.org/~adrian/mips/20130929-mips74k-2.diff< > http://people.freebsd.org/~adrian/mips/20130929-mips74k-1.diff> > > > > > > > > > > > > -adrian > > > > > > ---------- Forwarded message ---------- > > > From: Adrian Chadd > > > Date: 29 September 2013 04:38 > > > Subject: [rfc] mips74k/ar9344 support > > > To: "freebsd-wireless@freebsd.org" > > > > > > > > > Hi! > > > > > > Here's an initial hacked up patch to get the AR9344 to mountroot> . > > > > > > (Which isn't true - it panics due to missing PHY setup on if_arge; > I'll fix > > > that up soon.) > > > > > > http://people.freebsd.org/~adrian/mips/20130929-mips74k-1.diff > > > > > > The specific changes: > > > > > > * add CPU_MIPS24KC and CPU_MIPS74KC > > > * mips32r2 CPUs require an EHB as a hazard for things, rather than NOPs > > > * mips74k cores have a different CCA (cache coherency attributes) than > the > > > default - I lifted this from the netbsd mips support. > > > > > > now, the ar71xx CPUs are all currently marked as CPU_MIPS4KC. I'll > follow > > > this up with a commit to change that. There may be things we can > optimise > > > in the CPU_MIPS24KC case. > > > > > > Warner and I have started talking about how to properly fix all of the > > > hazard handling. We'll discuss that later. > > > > > > I'd like to commit this to -HEAD so people wishing to hack on mips74k > > > platforms can do stuff. Does anyone have any issues with the above? > > > > > > Thanks, > > > > > > > > > > > > -adrian > > > _______________________________________________ > > > freebsd-mips@freebsd.org mailing list > > > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > > > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org > " > > > > > >