Date: Fri, 4 Mar 2016 15:31:17 +0300 From: Michael Zhilin <mizhka@gmail.com> To: Stanislav Galabov <sgalabov@gmail.com> Cc: Adrian Chadd <adrian.chadd@gmail.com>, "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: [BCM4718] Broken interrupts Message-ID: <CAF19XB%2BWQ_XAOOusCU89w3WfsARYNC6Gon%2BdbiHLaf-TLm5faA@mail.gmail.com> In-Reply-To: <CANiSyhSyzGVaHjoiptpTcgrditLa3Cyeo_HhBAzx6w_iRP=rYg@mail.gmail.com> References: <CAF19XBKR2qz-oWKzNmOx-RjiOJxoz%2B=heUm8bg9ijzY6Oz-SLw@mail.gmail.com> <CAJ-Vmo=ObijfE5pf0gojvi01qCpRH4N8Y1F2VCjECmp6JNDLkg@mail.gmail.com> <CAF19XBLS467HY9nzDT54Kxa=ZxvEvLY%2BTpDYL-RQzVEM1JxfcQ@mail.gmail.com> <CANiSyhSyzGVaHjoiptpTcgrditLa3Cyeo_HhBAzx6w_iRP=rYg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Stanislav, The option is here: https://github.com/Cka3o4Huk/freebsd/blob/user/mizhka/bcm471x/sys/mips/conf/BCM471x#L39. To verify that build handled it I've check it using objdump -S exception.o. INTRNG works fine: MipsKernIntr calls intr_handler from subr_intr and routes to clock. I suppose this behaviou's specific to particular MIPS processor (BCM4718). Thx, Michael On Fri, Mar 4, 2016 at 3:17 PM, Stanislav Galabov <sgalabov@gmail.com> wrote: > 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 <mizhka@gmail.com> 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 <adrian.chadd@gmail.com> >> 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 <mizhka@gmail.com> 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" >> > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF19XB%2BWQ_XAOOusCU89w3WfsARYNC6Gon%2BdbiHLaf-TLm5faA>