From owner-freebsd-mips@freebsd.org Fri Mar 4 12:17:16 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 35F599DA6B9 for ; Fri, 4 Mar 2016 12:17:16 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-vk0-x232.google.com (mail-vk0-x232.google.com [IPv6:2607:f8b0:400c:c05::232]) (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 E25EFAF6 for ; Fri, 4 Mar 2016 12:17:15 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-vk0-x232.google.com with SMTP id e185so51821441vkb.1 for ; Fri, 04 Mar 2016 04:17:15 -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=CzJaGfQR2H8hW7CwE2MbT+GoFm5ULrcltMBpqhscA24=; b=QEsyi8X2vC/4Xpl5SbDTCP3Ns7i526ZReRCS5ZnPwK8b9D8psP8BkmP3j1Nr6OkkWN gt2iV+pA7zbyRoelCo9+j+lt8gDq3nQUVMcPl2reVOSliw1bd+neKJhidZxweexF+z2G dVqiMS3eM7enDLmTPENgcmtcZRCOct3dUq9dQin4MZf5Yyb+DVh37x7IHEVTHxfOMIKU kh8Lx0PE+6Js/Fbau+LkBkjuAfY2IDbwqMdOINN8rg1ktVhyIVQ5Q51ei8oCjESDH8zt rlHwgaUHZ4lsGTYDVfyTv8xVag3FeNpgRTSvnzJ8jSeaO9NVO76Fo7j0DbMsNORTYFK0 Dsuw== 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=CzJaGfQR2H8hW7CwE2MbT+GoFm5ULrcltMBpqhscA24=; b=Rh1jSlrffmFBP7/dBig2P9cyugmfP58kPRiYuZF/5oM7jJ/U4tI0kaXeIKIU/sIl4D 4NSZ1/0PPfvRSRqdd3TwmT00gaCli18i2Xc2JOSZWJzlU1DZkJFKvvI4dZ4zZl+bz6Ot +l87t0Cy2a+F5r1EPu3z2Vp5Uxgb/RoYLQrO8uknlHGf0X0eGOQUM2RbkAfN50ApQCsN h23HDhXITG5nlv27bUTxj4LwXt7HAgsWI1ak+9nYcwmZ2F0Zs8/FB8wNlv0w4Y/ee/1q /pUECoop1dy+hVydBBJIoC5a/YM7lY8I35C3c0TwoH9Z7cNGHy0bHiUMBKlqweJCe3pc fGQQ== X-Gm-Message-State: AD7BkJJ9/DvaE7M/MG+maNDzXyumuFaDzXRS5G71B5eWDlBfR/dMtDBdqO3WzJf4u7m7xXJfib5wNAsGId2+Zw== MIME-Version: 1.0 X-Received: by 10.31.45.143 with SMTP id t137mr5887308vkt.143.1457093834911; Fri, 04 Mar 2016 04:17:14 -0800 (PST) Received: by 10.31.183.147 with HTTP; Fri, 4 Mar 2016 04:17:14 -0800 (PST) In-Reply-To: References: Date: Fri, 4 Mar 2016 14:17:14 +0200 Message-ID: Subject: Re: [BCM4718] Broken interrupts From: Stanislav Galabov To: Michael Zhilin Cc: Adrian Chadd , "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 12:17:16 -0000 Hi Michael, If I understand correctly the goal is to use INTRNG for MIPS? If so, I didn't notice 'options MIPS_INTRNG' anywhere in your kernel config files... Please try to add this to your sys/mips/bcm471x/std.bcm471x for example and let us know how this goes. Best wishes, Stanislav On Fri, Mar 4, 2016 at 1:19 PM, Michael Zhilin wrote: > 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 > " > > > _______________________________________________ > 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" >