From owner-freebsd-mips@freebsd.org Fri Mar 4 11:19:45 2016 Return-Path: Delivered-To: freebsd-mips@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 E398E9DA408 for ; Fri, 4 Mar 2016 11:19:45 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com [IPv6:2a00:1450:4010:c04::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 67CD0261 for ; Fri, 4 Mar 2016 11:19:45 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: by mail-lb0-x229.google.com with SMTP id cf7so40992174lbb.1 for ; Fri, 04 Mar 2016 03:19:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=iI44RCoPqsjjp27vBa7EU4ERfF6H+04QATvL+PSwkiU=; b=n7TKRyzYq0zHdao2j6qZCWW2ld9L/QtNLQaG2M9e6PcdT0KHcuVNOKQx3TVkrj7qkf u7pMWXxw6OvlCDDHMRp31An7cr/Vv7InykY9t/mDNGSQb2S7R6IMEEP2Dkn+IM81IZVZ RDmjMU3JOGtp5bUF+ct/TVu1E8tnhEPnGdY0LChlX9MWHc1v4dFqVS0sBk09z3wI9c5m cR1OnCBJQHwjNj8GPdneGNGRuJDk6ZSAuL/kc7ds/4X788NPQzfNMT3eyqxpvuFtxBt3 rux0cGdRiFwOzW9biUr7IfE8Zhno3N3WKenOPIFu5Bpp2KtxNPLWhO8CoIL1BYuiSO92 BG2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=iI44RCoPqsjjp27vBa7EU4ERfF6H+04QATvL+PSwkiU=; b=b5/0YECnX2SMz1dGoJGhJeu+KcIiZiyL6C9ATMxVZgwIjrz/+rHPD6ur2y2ZSBO16q ndJeSkjIIAh54bnjX0lNrLv9ReDg8CL5tmCTfaJ/fBFQV5ofZPNeb5ay0J+yFXuzsz5G YPQOzDNXl+Fzr8c6EwSAYOl9y3u+ydm1nAeLHkhksqrXTRtpCFxakV3QngV9/aSD21to XlQcRtHZTMdbEoVGgTf1n/GTRKouuOcuriIZnRqLGnRhIJvLAh9CePbj/XY8OcTIJ/S3 c3IC75h5M6vw5RazBfAABrw93a8mgVBqQkV4oxpGGpmoIDxzs61yVzlkmm2R5/PZj9KR cdWA== X-Gm-Message-State: AD7BkJJuIu/fyqmmjVHEQvFUa0p8AgRq0Ix8U1dnfdPqMYSGlsmyR8V0CVs/gnDbgoVcgqVXLwZLOU2iX3z9wg== MIME-Version: 1.0 X-Received: by 10.25.141.65 with SMTP id p62mr2283697lfd.10.1457090383264; Fri, 04 Mar 2016 03:19:43 -0800 (PST) Received: by 10.112.180.138 with HTTP; Fri, 4 Mar 2016 03:19:43 -0800 (PST) In-Reply-To: References: Date: Fri, 4 Mar 2016 14:19:43 +0300 Message-ID: Subject: Re: [BCM4718] Broken interrupts From: Michael Zhilin To: Adrian Chadd Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Mar 2016 11:19:46 -0000 Hi Adrian! Yes, KDB works. And yes, (today's finding) something is silly that force make IRQ5 endless. After processing of previous request, next request is starting. According to mips docs found in google, IRQ5 must be triggered only if count == compare. In my case, count increments on 0x20000 roughly, compare is constant. There is another finding: cause register is always 0x8000, even after call mips_wr_compare(). I suppose that this is possible reason of infinite IRQ5 requests, but still don't know how to fix it... Thx, Michael On Fri, Mar 4, 2016 at 11:56 AM, Adrian Chadd wrote: > hm, does kdb work (ie ,break to debugger at that point), or is the system > hosed? > > is it something silly like it getting stuck servicing interrupts > because they're not being correctly ACKed? > > > > -a > > > On 3 March 2016 at 12:22, Michael Zhilin wrote: > > Hi, > > > > I'm trying to load FreeBSD kernel on Broadcom MIPS router (ASUS RT-N16). > > Here is actual dmesg: http://pastebin.com/AtEz6kc9 . But my actual > problem > > is broken interrupts. After enabling of interrupts in > > autoconf.c:configure_final the MipsException code is called, it works > fine > > (including INTRNG), but cpu doesn't return to main thread (suprise!). > > > > I can see printf from clockintr, i.e. there are regular timer requests. > But > > there is no printf from main thread (autoconf.c) after enabling of > > interrupts. > > > > Also I've tried to simplify MipsException to avoid any issue with > > saving/restoring registers: > > mfc0 k0, MIPS_COP_0_EXC_PC > > rfe > > jr k0 > > > > but still there is no return to main thread. > > > > I'm not familiar with JTAG and have no JTAG adapter for debugging. :( To > be > > honest, I've lost hope. > > > > What could possibly be wrong? Here is github branch for reference: > > https://github.com/Cka3o4Huk/freebsd/tree/user/mizhka/bcm471x > > > > Thank you in advance, > > Michael > > _______________________________________________ > > freebsd-mips@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" >