From owner-freebsd-sparc Thu Dec 27 14:17:37 2001 Delivered-To: freebsd-sparc@freebsd.org Received: from lukla.Sun.COM (lukla.Sun.COM [192.18.98.31]) by hub.freebsd.org (Postfix) with ESMTP id 9111A37B405 for ; Thu, 27 Dec 2001 14:17:15 -0800 (PST) Received: from esunmail ([129.147.58.121]) by lukla.Sun.COM (8.9.3+Sun/8.9.3) with ESMTP id PAA19639 for ; Thu, 27 Dec 2001 15:18:10 -0700 (MST) Received: from smi.sun.com ([127.0.0.1]) by esunmail.central.sun.com (iPlanet Messaging Server 5.1 (built Sep 5 2001)) with ESMTP id <0GP000GN1WGKCY@esunmail.central.sun.com> for freebsd-sparc@freebsd.org; Thu, 27 Dec 2001 15:14:44 -0700 (MST) Received: from [192.18.102.130] by esunmail.central.sun.com (mshttpd); Thu, 27 Dec 2001 14:14:44 -0800 Date: Thu, 27 Dec 2001 14:14:44 -0800 From: Jamey Wood Subject: Re: compiling a sparc64 kernel? To: freebsd-sparc@freebsd.org Message-id: <1874114671.1467118741@smi.sun.com> MIME-version: 1.0 X-Mailer: iPlanet Webmail Content-type: text/plain; charset=us-ascii Content-language: en Content-transfer-encoding: 7BIT Content-disposition: inline X-Accept-Language: en Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > Hmm. I was hoping you'd get to a mount root prompt. My first > guess at > what's happening is that the timer chip in the ultra 1 is generating > interrupts which are not being handled properly by the kernel. So you > get an interrupt storm. You could try setting the pil to > something high > (say 14), on entry to the kernel in locore.s, which may get a > little further. Setting pil to 14 does get me all the way to a mountroot prompt: sparc64_init: mdp=0xc01ba000 kmdp=0xc01ba000 boothowto=0 envp=0xc01b8000 end=0x0 Copyright (c) 1992-2001 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.0-CURRENT #36: Thu Dec 27 14:51:00 GMT 2001 woodjr@buddy:/usr/src/sys/sparc64/compile/sparc64 Preloaded elf kernel "/kernel" at 0xc01ba000. Timecounter "tick" frequency 166986609 Hz CPU: unknown; please e-mail the following value together with the exact name of your processor to . version register: <0x22001040000507> nexus0: nexus0: , type (unknown) (no driver attached) nexus0: , type sbus (no driver attached) rn_init: radix functions require max_keylen be set Mounting root from ufs:/dev/md0c Root mount failed: 22 Manual root filesystem specification: : Mount using filesystem eg. ufs:da0a ? List valid disk boot devices Abort manual input Mountroot> > Really we need a driver for the timer chip, which should be easy > to nab from netbsd. The netbsd driver appears to be in their arch/sparc64/sparc64/clock.c. I'm having a little trouble understanding the FreeBSD device probing semantics to take a stab at porting it... It looks like the probe should work by looking for "counter-timer" in the OFW? What I don't understand is where that probing should occur and where the device attach should occur? From what I can see, the counter-timer device_t currently gets passed to nexus_probe_nomatch where the "no driver attached" messages get printed to the console. I've experimented with trying to create a skeleton driver and registering it with: DRIVER_MODULE(timer, nexus, timer_driver, timer_devclass, 0, 0); This does get my skeleton's probe method get called, but it just gets passed the nexus0 device_t, and I'm not clear on how to get at the children (e.g. the "counter-timer"). I even tried to hack it by including bus_private.h and then walking its children with: TAILQ_FOREACH(child, &dev->children, link) { printf("CHILD: %s\n", DEVICENAME(child)); } But appatantly there are no children, as no iterations occur. Can you point me in the right direction for how and where the probe should really be happening? Perhaps an example of how you guys attach the pci bus would explain it? Thanks, Jamey To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message