Date: Thu, 27 Dec 2001 14:14:44 -0800 From: Jamey Wood <Jamey.Wood@Sun.COM> To: freebsd-sparc@freebsd.org Subject: Re: compiling a sparc64 kernel? Message-ID: <1874114671.1467118741@smi.sun.com>
next in thread | raw e-mail | index | archive | help
> 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 <freebsd-sparc@FreeBSD.org>. version register: <0x22001040000507> nexus0: <OpenFirmware Nexus device> nexus0: <counter-timer>, type (unknown) (no driver attached) nexus0: <sbus>, 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: <fstype>:<device> Mount <device> using filesystem <fstype> eg. ufs:da0a ? List valid disk boot devices <empty line> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1874114671.1467118741>