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.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17060 invoked from network); 9 Jan 2021 17:41:10 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 9 Jan 2021 17:41:10 -0000 Received: from duke.felloff.net ([216.126.196.34]) by 1ess; Sat Jan 9 12:12:22 -0500 2021 Message-ID: Date: Sat, 09 Jan 2021 18:12:11 +0100 From: cinap_lenrek@felloff.net To: 9front@9front.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: singleton core generator Subject: Re: [9front] BUG: thinclient not booting with usbehci,usbohci Reply-To: 9front@9front.org Precedence: bulk interesting. one thing that could cause this might be that the firmware has still control over the usb controllers for ps2 emulation. a while ago, our pci startup code now clears the busmaster enable of all pci devices on boot. i wonder if this causes the problems later on when we do the handoff. you can try commenting out the call to pcireset() in /sys/src/9/pc/pcipc.c in the pcicfginit() function? if(pciroot == nil) goto out; - pcireset(); + // pcireset(); if(nobios) { we might also try making sure we clear interrupt enables and interrupt status bits in ehci and ohci reset() functions. it is possible that firmware has some pending interrupts which are somehow left enabled and not cleared by the controller reset. for usbohci.c, that would be adding the following lines to ohcireset() function: delay(100); + ctlr->ohci->intrdisable = Mie; + ctlr->ohci->intrenable = 0; + ctlr->ohci->intrsts = ctlr->ohci->intrsts & ~Mie; ctlr->ohci->control = 0; and for usbehcipc.c, in ehcireset() function: /* reclaim from bios */ getehci(ctlr); + /* disable interrupts */ + opio->intr = 0; + opio->sts = opio->sts & Sintrs; /* * halt and route ports to companion controllers * until we are setup */ ehcirun(ctlr, 0); also it would be nice if we could narrow it down to eigther ohci or the ehci controllers. -- cinap