From owner-freebsd-mips@freebsd.org Thu Mar 3 20:22:24 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 0F84FA942AB for ; Thu, 3 Mar 2016 20:22:24 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: from mail-lb0-x234.google.com (mail-lb0-x234.google.com [IPv6:2a00:1450:4010:c04::234]) (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 90745EF6 for ; Thu, 3 Mar 2016 20:22:23 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: by mail-lb0-x234.google.com with SMTP id x1so37508212lbj.3 for ; Thu, 03 Mar 2016 12:22:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=AunVcWtzbVG49D3pQJk9+VMOdpVEJNWHiZWjsEiKaxc=; b=eDOSU4K1cgZCyHRCGqeans4mZ3U9prlxUAVxMXaO9cOSR8FJvLKGbutS9nVYi5ZXC9 jzOWzEE4VFTY8jvv1OEUYWxxM/dyTtKteRCk+F1T8XPxQXWQ47gFZBDp7RwwZgxGEs4B aHEFFq+08jk39GDBPZfejDC3zgYM/PC+1U1p7Z2y4ED6gnfUz7OHqhJK6YNGjFinHx92 W9lVGZI22p8sP6Hw5E9i7MYyWDpqYs8Ii1FU392sjxoAdOvqQmyS42+p3MHqMFNkImuX u4mfUjZq1UQcZEP7a+rDymo//foO8UNtNUvB+9KJhR6iOYNdxs9Tajl8yBdHqjxsMFLh ipcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=AunVcWtzbVG49D3pQJk9+VMOdpVEJNWHiZWjsEiKaxc=; b=AFFVHQgbh1iNxvqaUSrQWdCPm5AhcYcrOsAm6T+VlizICpfTzsEdmnV9puQdDfJy/q aANcv6oUje89zfDN1i+5F12UxdgkoyLPAAOLByXo+wMwWZ4KJHba000DBIke3Gb1YNHG BqZ1CgYDEnQAMlkmyNQWniF4vBhrkazO0yyEeJWmleZj32VdRdxwaP0Yzvh/wdqmDrUM Wu8RolBuIkup2oCxxlZQVjstxsItEhNiaKJiSSxucqOLcrvAg9cGXa6V5wIdE3YEhYfW dGun02hp2QhFWHeFyoSu5TZoR6Aa3xMLsbYYt1/m2rSBUIbhIUGOuqufemiMd/u0yINq q2pw== X-Gm-Message-State: AD7BkJIZk0JLGaTS22SWseeE5H4fZT+792MCalb/Bi0yTmSBA72axA2mfexpDnl/Kw5ZiSTD4T8KSBtnV/RgNg== MIME-Version: 1.0 X-Received: by 10.25.152.135 with SMTP id a129mr1844831lfe.40.1457036541456; Thu, 03 Mar 2016 12:22:21 -0800 (PST) Received: by 10.112.180.138 with HTTP; Thu, 3 Mar 2016 12:22:21 -0800 (PST) Date: Thu, 3 Mar 2016 23:22:21 +0300 Message-ID: Subject: [BCM4718] Broken interrupts From: Michael Zhilin To: 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: Thu, 03 Mar 2016 20:22:24 -0000 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