Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Nov 2008 12:33:21 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        stas@freebsd.org
Cc:        arm@freebsd.org
Subject:   Re: Code review request: boards on AT91
Message-ID:  <20081125.123321.-1435626397.imp@bsdimp.com>
In-Reply-To: <20081125222258.8db7b61e.stas@FreeBSD.org>
References:  <20081125220040.c8996e0b.stas@FreeBSD.org> <20081125.120523.-201316873.imp@bsdimp.com> <20081125222258.8db7b61e.stas@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20081125222258.8db7b61e.stas@FreeBSD.org>
            Stanislav Sedov <stas@FreeBSD.org> writes:
: -----BEGIN PGP SIGNED MESSAGE-----
: Hash: SHA1
: 
: On Tue, 25 Nov 2008 12:05:23 -0700 (MST)
: "M. Warner Losh" <imp@bsdimp.com> mentioned:
: 
: > In message: <20081125220040.c8996e0b.stas@FreeBSD.org>
: >             Stanislav Sedov <stas@FreeBSD.org> writes:
: > : -----BEGIN PGP SIGNED MESSAGE-----
: > : Hash: SHA1
: > : 
: > : On Tue, 25 Nov 2008 11:36:47 -0700 (MST)
: > : "M. Warner Losh" <imp@bsdimp.com> mentioned:
: > : 
: > : > : 
: > : > : I think we could pass the board type via a special kenv variable
: > : > : for now. I think it will work fine and applicable to all supported
: > : > : architectures. We could probably reuse board type constants that Linux
: > : > : kernel uses.
: > : > 
: > : > Right now that's passed in from uboot and other loaders in I think r3,
: > : > but I'd have to go look at some other code to be sure.
: > : > 
: > : 
: > : Well, I don't think we want to follow The Linux kernel argument passing
: > : paradigm... But using a simple kenv variable would be just fine.
: > : We have a patch ready for kenv/hints support in u-boot and in
: > : our arm port, and our loader could be used on arm with Rafal's
: > : u-boot API.
: > 
: > You are assuming that /boot/loader is always used.  In the cases where
: > it isn't, we need that value from r3.  when it is, a kenv could be
: > used.  This switching likely also needs to be configurable more easily
: > than it is now.
: 
: We can't support all bootloaders on the Earth, and I think it's the job
: of bootloader to support the kernel it booting. Linux also mandates it's
: own argument passing mechanism method should be used, and doesn't support
: anything else.

Actually, Linux supports a bunch of different argument passing
mechanisms.  redboot differs from uboot differs from a number of
other, platform specific boot loaders.  They have a generic way to
support boot loaders, and I think we should at least investigate it.

: As we're using kenv for this task, and no well-accepted
: generic multiplatform method yet available, I think we could stick with
: kenv for now. I don't see the reason to complicate our kernel code more
: to support several argument passing methods. 

We don't universally use it.  It is used in the mv code, but not in
the at91 code.  The at91 boot loader just passes one variable in now,
but there's a fair number of different boot loaders today for
FreeBSD/arm.  While it would be nice to mandate all the world use
uboot + /boot/loader, that's not likely going to happen.  There's too
many boards out there that have redboot or some custom boot loader
that will be hard to replace...

I guess what I'm trying to say is that the current mechanisms we're
using are all over the map, and we need to clean it up so that it is
easy to swap different types of boot loaders in.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081125.123321.-1435626397.imp>