linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: boot methods
@ 2001-10-15 21:32 Michael Sokolov
  2001-10-19 12:05 ` Paul Mackerras
  0 siblings, 1 reply; 32+ messages in thread
From: Michael Sokolov @ 2001-10-15 21:32 UTC (permalink / raw)
  To: linuxppc-dev


Paul Mackerras <paulus@samba.org> wrote:

> There is improvement because you can have a separate wrapper for each
> firmware, if necessary.  At present if we want to change the way
> information is passed into the kernel, we have to synchronously change
> several different firmware/booter implementations, which are
> maintained in separate places by separate people.  The list includes
> (at least) BootX, miboot, yaboot, PPCBoot, and Michael Sokolov's VAX
> console.  This is a logistical nightmare.  Just getting the updates
> into the firmware/booters is bad enough, but then you create problems
> for users who then can't boot old kernels with the new firmware or new
> kernels with the old firmware.

Just for the record, in my case there is no problem with either getting the
changes into the Linux booter or new and old kernels coexisting. My firmware,
which is indeed a VAX console clone for PPC, knows absolutely nothing about how
to boot Linux or any other OS, just like the real VAX console. Just like the
real VAX console, it hands the problem of booting the user's OS of choice to
the OS vendor. To boot Linux I have an entity called ppc-linux-boot, which is
completely free, maintained in public CVS, and not tied to or controlled by SBS
or any other hardware/firmware vendor.

As ppc-linux-boot is free, public, and independent of the SBS firmware, there
can no problem with people changing it any way they want. It is not part of the
system ROM, it is a user-installed utility stored in the user console store, so
any user can easily and legitimately change it whenever s/he likes without
needing any blessing from the hardware manufacturer, and can use experimental
versions hacked by anyone in the world if s/he likes.

When the vmlinux boot interface changes for a platform supported by ppc-linux-
boot, I'll change runlnx (the part of ppc-linux-boot that actually transfers
control to vmlinux) accordingly. I can make the new version support both old
and new kernels by having a boot flag (the user always has to set the correct
boot flags anyway) select the kernel boot interface.

> The reason that nothing has been done is precisely because it is so
> hard at present to change the way that information is passed into the
> kernel, because we still boot the vmlinux directly in some situations.

But currently the vmlinux boot interface is defined per platform: the generic
code passes the initial R3-R7 to platform_init(). It should be possible for a
board port maintainer to change this interface in his/her port without
affecting anyone else.

> If we absolutely *have* to boot a vmlinux directly without a wrapper,
> then probably the best thing is to use bi_recs and pass in a pointer
> to them, since that is reasonably flexible and can be made to be
> forwards and backwards compatible without too much pain.

Yes, and I'm looking forward to usable bi_recs.

> Changing to
> this scheme is going to cause considerable pain in the short term,
> though.

Not at all. Here's how you can make it painless. In arch/ppc/kernel/setup.c
change the division of labor between machine_init and parse_bootinfo. Move the
current logic for locating bi_recs in memory from parse_bootinfo to
machine_init, passing the pointer to bi_recs to parse_bootinfo() as an
argument. Then new board ports can be designed with a bi_recs interface instead
of the current traditional one by doing something like parse_bootinfo(r3) in
platform_init. Existing ports can be converted gradually as their users work
out the transition. I would gladly change the SBS board ports. In fact, one
should first check if the current memory-based bi_recs are being used by anyone
at all. If they aren't, change parse_bootinfo() to take a pointer, remove its
invokation from machine_init altogether, and leave it up to subarch maintainers
to call it from their platform_init's when they are ready to change. Or if the
current memory-based bi_recs are only used on CONFIG_ALL_PPC, do the same but
put the code for locating them and calling parse_bootinfo() in pmac_init,
prep_init, and chrp_init for now. This would have zero impact on CONFIG_ALL_PPC
users while clearing the way for board port maintainers to convert to bi_recs
individually when they are ready.

--
Michael Sokolov				5791 VAN ALLEN WAY
Software Engineer			CARLSBAD CA 92008-7321 USA
SBS Technologies, Inc.			Phone: +1-760-438-6900 x2347
Communications Products			    or  1-888-SBS-COMM x2347
					Fax:   +1-760-438-6985
					E-mail: msokolov@sbs.com
					     or msokolov@ivan.Harhan.ORG

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: boot methods
@ 2001-11-05  6:26 Albert D. Cahalan
  2001-11-05 15:10 ` Tom Rini
  0 siblings, 1 reply; 32+ messages in thread
From: Albert D. Cahalan @ 2001-11-05  6:26 UTC (permalink / raw)
  To: linuxppc-dev


I think it is important to allow for fast booting.
That means both full boot and unsuspend. There should
be a minimum of overhead on an embedded system.

As far as I'm concerned:

The kernel just appears in memory, MMU off, at address zero.
The hardware can handle this. (example: the motherboard chips
know to pull the kernel out of a serial EEPROM)

The kernel might be expected to start from address 0x100 after
a hard reset. There shouldn't be any need to create all sorts
of data structures in memory just to boot the kernel. When the
motherboard says "go", you're at 0x100 without a stack pointer.
You start with "nop ; nop ; isync ; nop" and load the MSR.

Memory might be cleared already, including BSS. It would be
bad to waste time clearing memory that is already cleared,
so memory clearing should be optional.

Uncompressing is bad. Even if I wish to use compression, I may
prefer to have a ROM or service processor handle the job.
Copying is bad too. It would be nice to get boot times down
to well under a second.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 32+ messages in thread
[parent not found: <20011015213734.24146@smtp.adsl.oleane.com>]
* Re: boot methods
@ 2001-10-12 18:21 Michael Sokolov
  0 siblings, 0 replies; 32+ messages in thread
From: Michael Sokolov @ 2001-10-12 18:21 UTC (permalink / raw)
  To: paulus, trini; +Cc: linuxppc-dev


Tom Rini <trini@kernel.crashing.org> wrote:

> All of the 7xx/74xx/8240 boards in _devel boot via zImage.<board> from
> network/disk/flash, depending.

Except those that boot via ppc-linux-boot. Adirondack can boot only via ppc-
linux-boot and has no zImage in any shape or form, K2 can boot either via
StarMON/ppc-linux-boot or via PMON/zImage.

MS

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: boot methods
@ 2001-10-12 18:13 Tom Rini
  2001-11-03  1:13 ` Paul Mackerras
  0 siblings, 1 reply; 32+ messages in thread
From: Tom Rini @ 2001-10-12 18:13 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev


On Fri, Oct 12, 2001 at 05:32:34PM +1000, Paul Mackerras wrote:

> I would like to make a complete list of the methods people use to boot
> the PPC/Linux kernel on different platforms.  As a start, here is what
> I can think of off the top of my head:

All of the 7xx/74xx/8240 boards in _devel boot via zImage.<board> from
network/disk/flash, depending.

[snip]
> Along those lines, I have been thinking that it would be good if the
> wrapper built a data structure describing the hardware in the system,
> particularly things like:
>
> - the amount of RAM and any holes
> - type and register addresses for PCI host bus adaptors
> - ditto for interrupt controllers
> - interrupt mapping

One thing we have to keep in mind is what's required and what's
optional.  On some machines like pmac, we have a nice firmware that sets
everything up for us and is rather 'nice' to talk with.  On other boards
things are setup just enough by the firmware that we can load some bits
and with luck fix firmware 'issues' (see simple/head.S).  If we have to
find out things like RAM size from the piggyback loader, it's going to
bloat it a good deal.  We'd need, roughly to throw in mpc10x_common.c
into both the piggyback and the kernel.

If we want to keep all of this information around after init, it
wouldn't be hard to fill out the struct I suppose..

--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: boot methods
@ 2001-10-12 16:56 Michael Sokolov
  0 siblings, 0 replies; 32+ messages in thread
From: Michael Sokolov @ 2001-10-12 16:56 UTC (permalink / raw)
  To: linuxppc-dev


Paul Mackerras <paulus@samba.org> wrote:

> I would like to make a complete list of the methods people use to boot
> the PPC/Linux kernel on different platforms.  As a start, here is what
> I can think of off the top of my head:

Here's my addition:

PPCStar (PPC hardware + VAX soul):
	vmlinux.bin loaded by the console at 0 and started by runlnx.
	vmlinux.bin.gz loaded by the console, decompressed and started by
		runlnx.
	vmlinux (ELF, .bin, or .bin.gz) booted from disk (ext2fs) by linboo.

MS

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 32+ messages in thread
* boot methods
@ 2001-10-12  7:32 Paul Mackerras
  2001-10-12  8:40 ` Geert Uytterhoeven
                   ` (8 more replies)
  0 siblings, 9 replies; 32+ messages in thread
From: Paul Mackerras @ 2001-10-12  7:32 UTC (permalink / raw)
  To: linuxppc-dev


I would like to make a complete list of the methods people use to boot
the PPC/Linux kernel on different platforms.  As a start, here is what
I can think of off the top of my head:

Powermac:
	vmlinux loaded with BootX
	vmlinux loaded with quik
	vmlinux loaded with yaboot
	vmlinux.coff loaded via OF netboot
	vmlinux.elf-pmac loaded via OF (disk or net boot)

RS/6000 CHRP:
	vmlinux loaded with yaboot
	zImage.chrp-rs6k loaded via OF netboot

RS/6000 43p-140:
	zImage.prep loaded via OF (floppy or hard disk)

Can others contribute entries to this list please?

I am particularly interested in the cases where the kernel vmlinux
binary is loaded directly from some external software, because those
are the cases that constrain our freedom to choose how information
gets passed in to the kernel.  From a long-term maintainability
viewpoint, it would be better if we could say that we always have a
zImage-style wrapper, because then we could change the interface
between the wrapper and the kernel at will without breaking anything.
It would then be up to the wrapper to do any translation needed
between what the external software passed in to it and what the kernel
is expecting.

Along those lines, I have been thinking that it would be good if the
wrapper built a data structure describing the hardware in the system,
particularly things like:

- the amount of RAM and any holes
- type and register addresses for PCI host bus adaptors
- ditto for interrupt controllers
- interrupt mapping

The open firmware device tree does a good job of describing things
like this, so I would suggest it as the structure.  Whatever structure
we use needs to be flexible and open-ended rather than only describing
a fixed set of things, as well as being easy to traverse and
interpret (so I don't think prep-style residual data is an option).

Thoughts?

Paul.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2001-11-06 21:21 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-15 21:32 boot methods Michael Sokolov
2001-10-19 12:05 ` Paul Mackerras
2001-10-19 13:28   ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2001-11-05  6:26 Albert D. Cahalan
2001-11-05 15:10 ` Tom Rini
     [not found] <20011015213734.24146@smtp.adsl.oleane.com>
2001-10-15 22:04 ` Wolfgang Denk
2001-10-12 18:21 Michael Sokolov
2001-10-12 18:13 Tom Rini
2001-11-03  1:13 ` Paul Mackerras
2001-11-03  1:55   ` Tom Rini
2001-11-02 23:57     ` Matt Porter
2001-11-03  9:45     ` Wolfgang Denk
2001-11-03 15:15       ` Tom Rini
2001-11-03 18:36         ` Wolfgang Denk
2001-11-06 16:59     ` Mark A. Greer
2001-11-06 18:55       ` Tom Rini
2001-11-06 21:21         ` Mark A. Greer
2001-10-12 16:56 Michael Sokolov
2001-10-12  7:32 Paul Mackerras
2001-10-12  8:40 ` Geert Uytterhoeven
2001-10-12  9:16 ` Wolfgang Denk
2001-10-13 11:20   ` Paul Mackerras
2001-10-14 15:44     ` Wolfgang Denk
2001-10-15 12:42       ` Benjamin Herrenschmidt
2001-10-15 13:32         ` Wolfgang Denk
2001-10-12 10:19 ` Michael Schmitz
2001-10-12 10:55 ` Juergen E. Fischer
2001-10-12 13:37 ` Nils Krueger
2001-10-12 21:53 ` Michel Lanners
2001-10-13 11:01 ` Michel Dänzer
2001-10-15 13:50 ` Peter Bergner
2001-10-16 23:49 ` Val Henson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).