Date: Wed, 15 Oct 2003 12:23:42 +1000 From: Peter Grehan <grehan@freebsd.org> To: Jaworowski Rafal-ARJ004 <Rafal.Jaworowski@motorola.com> Cc: freebsd-ppc@freebsd.org Subject: Re: FYI: rudimentary loader for ppcbug-based systems Message-ID: <3F8CAFAE.6260CFCF@freebsd.org> References: <E087F7025D7E494B8015119695CEDB4C01972204@zpl02exm01.mpsc.mot.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Rafal, > What do you think is the right way of adding support in the kernel for another firmware > but within the same architecture (powerpc in this case)? Should we just have a number of > #ifdefs where appropriate, or maybe we should think about separating some bits and defining > clean interfaces to common parts? Eventually I intend to let my work be merged with existing > powerpc code in the tree and that's why I'd like to know what course to take. For now I'll > just be using conditional compilation flags. Clean interfaces would be the best. The ultimate is a single kernel that could run on all combinations of processor and firmware, the true GENERIC, but I'm not sure if that's possible. Here's a quick summary of the OFW dependencies in powerpc/powerpc/* - locore.S - the entry point assumes the OFW calling convention clock.c - the time-of-day and CPU's timebase frequency are obtained from OFW machdep.c - the shutdown/halt routines call into OFW. nexus.c - heavily OFW dependent. Any other platform will require their own version of this. openpic.c - The OFW code could be split out of this to allow the OpenPIC code to be used on other platforms pmap.c - Not as bad as it looks. The setting up of the BAT array is specific to the h/w layout of Macs. OFW is used to determine the memory layout, and the PTE entries for OFW are not required on non-OFW systems. later, Peter.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F8CAFAE.6260CFCF>