Subject: Re: Startup code of NetBSD
To: Anand Lalgondar <>
From: Jochen Kunz <>
List: tech-kern
Date: 12/09/2003 10:22:59
On Tue, 09 Dec 2003 11:29:13 +0530
"Anand Lalgondar" <> wrote:

> Where is the starting point of the NetBSD code. Does it start from
> machine independent (i.e /sys/kern/xxx.c) or is it machine dependent
> (xxx.c - don't know [may be machdep.c] ).=20
It is in machine dependent code, typically in
src/sys/arch/<ARCH>/<ARCH>/locore.S e.g. label "start" in
src/sys/arch/ofppc/ofppc/locore.S. It seams that the MIPS architectures
use a platform independent locore.S in src/sys/arch/mips/mips/locore.S.
Usually this assembler code calles a function in
src/sys/arch/<ARCH>/<ARCH>/machdep.c to do other low level
initialisation stuff. E.g. mach_init() in
src/sys/arch/pmax/pmax/machdep.c or initppc() in
src/sys/arch/ofppc/ofppc/machdep.c. When that call returns to locore.S,
main() in src/sys/kern/init_main.c is called doing machine independent

> One more question -=20
> One of my MIPS Target Board does not boot up with the NetBSD Kernel,
> since the RTC chip onboard is burnt out. Is it compulsory to implement
> RTC driver in the NetBSD kerenel, or can it be removed.=20
You may not need a RTC, but a timer that deliveres the time base for
scheduling etc. is mandatory.