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=0.5 required=5.0 tests=DATE_IN_PAST_24_48 autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 17972 invoked from network); 25 Jan 2021 00:51:59 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 25 Jan 2021 00:51:59 -0000 Received: from duke.felloff.net ([216.126.196.34]) by 1ess; Sat Jan 23 18:42:55 -0500 2021 Message-ID: Date: Sun, 24 Jan 2021 00:42:44 +0100 From: cinap_lenrek@felloff.net To: 9front@9front.org In-Reply-To: <010001773118295c-3721f6c3-e1a4-403a-bbcf-dd0197450fd6-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: flexible browser self-signing markup reduce/map browser Subject: Re: [9front] 9front on Raspberry Pi 400 Reply-To: 9front@9front.org Precedence: bulk > Cinap, > Thank you for the response. > As for me building the kernel - I did not build the user space previously. > I was thinking that I just wanted a kernel. Why build the whole user space? > But I was wrong. I understand. So by building the user space, I got a stripped > kernel that was much more akin to what was in the last 9front image, > with the new kernel weighing in at 4.8MB. Unfortunately, the new kernel exhibits > the same problems as before. of course, we havnt changed anything. > Some minor changes in the bootup screen, but I don’t think anything that is newly notable. the kernel makes it to bootargs prompt. if you had a serial console, you might even be able to type commands. > I will include a transcription of it again below. > I have tried to use different USB mice and external keyboard > None of these are responsive during the 9front boot. > They do work in raspian or labs 9 on the pi400. > The xhcireset(BUSBNO(p->tbdf)<<20 | BUSDNO(p->tbdf)<<15 | BUSFNO(p->tbdf)<<12); > was mentioned when addressing this in the labs version - so maybe the sdhc errors > is preventing usb detection? Looking for the labs boot, none of the usb devices > start to work until after I see "usb/hub... usb/kb... usb/kb... usb/kb... usb/kb... time…” > come up in the startup, just after the detection of the additional cores. > Is there any similar message I should be seeing in 9front? no. there are no such messages expected. this is all done in the following shell script, which gets built into the kernel: /sys/src/9/boot/nusbrc if you want, you could modify that script and add a -d flag to nusb/usbd invocation. > I’m providing the raspian dmesg. I don’t know if it is of any use, but maybe you > can glean what is hooked to which USB hub. When I booted this I had the lenovo > mouse in the USB 2.0 port and the keyboard and Raspberry Pi (Pixart) mouse in USB 3.0 ports. thanks! that was helpfull... ok, none of the devices seem to appear on the dwc controller, which is good. > Certainly if there’s any other information I need or can provide - just ask. is it possible to connect to the uart? i do not know how accessible it is, but it makes troubleshooting much easier. if you have a plan9 machine that can act as a fileserver, we can even netboot new kernels from the bootargs line without having to swap sdcards. i made you a kernel image that you can try that checks if any of the gic interrupts have been locked down by firmware: http://felloff.net/usr/cinap_lenrek/9pi4 (kernel to copy on sdcard) http://felloff.net/usr/cinap_lenrek/s9pi4 (kernel with debug symbols, for acid) http://felloff.net/usr/cinap_lenrek/gic.c (the changed file) diff -r ab3f119403ba sys/src/9/bcm64/gic.c --- a/sys/src/9/bcm64/gic.c Sat Jan 23 18:42:46 2021 +0100 +++ b/sys/src/9/bcm64/gic.c Sun Jan 24 00:36:33 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 This is how a normal boot on the pi4 8GB model with the change looks like (yes, usb works, i have usb keyboard attached): 127 holes free 0x008a0000 0x3e600000 1037434880 1037434880 bytes free can't initialise 0x0x16 framebuffer Plan 9 intrsoff: GIC intids [0-31]: 01ff0000 are locked in disable state intrsoff: GIC intids [0-31]: 0000ffff are locked in enable state cpu0: 1500MHz ARM Cortex-A72 r0p3 8102M memory: 998M kernel data, 7104M user, 31384M swap pcienable PCI.0.0.0: pcr 0->7 pcienable PCI.1.0.0: pcr 0->2 bus dev type vid did intl memory 0 0/0 06 04 00 14e4 2711 0 ioa:00000000-00001000 4096 mema:600000000-600100000 1048576 ->1 1 0/0 0c 03 30 1106 3483 0 0:600000004 4096 #l0: genet: 1000Mbps port 0xFFFFFFFFBD580000 irq 189 ea dca632b1adfe usbxhci: cpu2: 1500MHz ARM Cortex-A72 r0p3 cpu3: 1500MHz ARM Cortex-A72 r0p3 cpu1: 1500MHz ARM Cortex-A72 r0p3 0x1106 0x3483: port 600000000 size 4096 irq 0 #l0: phy1 id 600d84a2 oui 80361 /dev/sdM0: BCM SD Host Controller 02 Version 10 /dev/sdM0/data /dev/sdM0/dos dos /dev/sdM0/fs hjfs /dev/sdM0/nvram /dev/sdM0/plan9 bootargs is (tcp, tls, il, local!device)[tls] > Thanks again, > Mack -- cinap