From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=DATE_IN_PAST_06_12 autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 28562 invoked from network); 28 Jan 2021 01:15:06 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 28 Jan 2021 01:15:06 -0000 Received: from duke.felloff.net ([216.126.196.34]) by 1ess; Wed Jan 27 09:30:21 -0500 2021 Message-ID: <1CAC8FBBA866E1F61E9F8D2C72CA8DCB@felloff.net> Date: Wed, 27 Jan 2021 15:30:09 +0100 From: cinap_lenrek@felloff.net To: 9front@9front.org In-Reply-To: <0100017741afd09d-da43b097-8dba-46b2-98d9-05414e118708-000000@email.amazonses.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: object-oriented ORM over AJAX realtime-java GPU callback interface Subject: Re: [9front] 9front on Raspberry Pi 400 Reply-To: 9front@9front.org Precedence: bulk > However, I am not sure what the syntax is to put the console to the serial port for a Pi in the config.txt. > If it is the same at 9 on a intel machine, or if there is a specific port number or address number that > needs to be entered. no, all you need is a line in cmdline.txt like: console=0 if you use the 9front image, it is already there. > My cursory search did not turn up anything. (And of course I’d love to have a serial console as it > would same me from having to transcribe things like that dump. the dump isnt that interesting. this is a machine check basically, which is asynchronous. its not the program on the cpu that crashes here, but hardware signaling theres a unrecoverable system error by raising a nmi interrupt. maybe caused by the xhci doing a invalid memory transaction on the pcie bus... if i had actual documentation on the pcie controller, we might be able to handle that error SError interrupt by reading some status registers on the pcie controller block. the problem is the VL805 xhci controller is a complete backbox. there isnt even a datasheet available. and nobody knows what the firmware does exactly in the xhcireset mailbox command and what the requirements are exactly when to issue it. the best cause of action now i think is to simplify the test case and remove other components from the equation like removing the sdhc driver from the kernel. and once we have that, we check the exact versions of the firmware files and config.txt settings and file a ticket for the raspberry pi firmware team. also, i asked before, what about the GIC debug prints i put? the reason i want to know is because it could indicate if the kernel is entered in that strange misconfigured state that i'v seen before. that would be a clear indication that somehting is amiss in the firmware. i'll show the patch again in case the mail got lost: diff -r 5c327eddc496 sys/src/9/bcm64/gic.c --- a/sys/src/9/bcm64/gic.c Sat Jan 23 20:36:09 2021 -0800 +++ b/sys/src/9/bcm64/gic.c Wed Jan 27 15:25:44 2021 +0100 @@ -126,6 +126,7 @@ intrsoff(void) { int i, n; + u32int mask; intrcpushutdown(); @@ -138,8 +139,17 @@ for(i = 0; i < n; i += 32){ dregs[GICD_ISENABLER0 + (i/32)] = -1; coherence(); + mask = ~dregs[GICD_ISENABLER0 + (i/32)]; + if(mask) + print("intrsoff: GIC intids [%d-%d]: %.8ux are locked in disable state\n", + i, i+31, mask); + coherence(); dregs[GICD_ICENABLER0 + (i/32)] = -1; coherence(); + mask = dregs[GICD_ISENABLER0 + (i/32)]; + if(mask) + print("intrsoff: GIC intids [%d-%d]: %.8ux are locked in enable state\n", + i, i+31, mask); } for(i = 0; i < n; i += 4){ dregs[GICD_IPRIORITYR0 + (i/4)] = 0; @@ -202,10 +212,10 @@ } void -intrenable(int irq, void (*f)(Ureg*, void*), void *a, int tbdf, char*) +intrenable(int irq, void (*f)(Ureg*, void*), void *a, int tbdf, char *name) { Vctl *v; - u32int intid; + u32int intid, mask; int cpu, prio; if(BUSTYPE(tbdf) == BusPCI){ @@ -231,7 +241,7 @@ case IRQmbox2: case IRQmbox3: case IRQlocaltmr: - print("irqenable: missing documentation for local irq %d\n", irq); + print("irqenable: missing documentation for local irq %d, %s\n", irq, name); return; default: @@ -252,7 +262,7 @@ v->f = f; v->a = a; - lock(&vctllock); + ilock(&vctllock); if(irq == IRQfiq){ vfiq = v; prio = 0; @@ -280,10 +290,14 @@ coherence(); /* turn on */ - dregs[GICD_ISENABLER0 + (intid/32)] = 1 << (intid%32); + mask = 1 << (intid%32); + dregs[GICD_ISENABLER0 + (intid/32)] = mask; coherence(); + mask &= dregs[GICD_ISENABLER0 + (intid/32)]; + iunlock(&vctllock); - unlock(&vctllock); + if(mask == 0) + print("intrenable: GIC intid %ud did not enable irq %d, %s\n", intid, irq, name); } void -- cinap