All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerald Champagne <gerald.champagne@esstech.com>
To: Mike McDonald <mikemac@mikemac.com>,
	"linux-mips@oss.sgi.com" <linux-mips@oss.sgi.com>
Subject: Re: Moving kernel_entry to LOADADDR
Date: Fri, 19 Oct 2001 10:18:48 -0500	[thread overview]
Message-ID: <3BD04458.8050200@esstech.com> (raw)
In-Reply-To: 200110191511.IAA27477@saturn.mikemac.com


>>How about just getting it from the ELF header?  It's trivial.
>>
> 
>   Because a bare bones bootloader may not know anything about ELF. The
> simplest solution is to just stick a "jmp start_kernel" at LOADADDR
> right before the fill. Then the load address and the entry point are
> the same. Once the exception vectors get loaded, they'll overwrite the
> jmp, so no space is wasted and none of the LOADADDRs have to be
> changed.


That was my thinking.

Except the fill has nothing to do with exception vectors any more.  It
looks like at one time LOADADDR was always 0x8000_0000.  Now that it's
set to something else, the fill just leaves a hole for no reason.  That's
why I recommend removing it regardless of whether there's a use for my
idea.

With the fill is gone, and since the kernel is not normally placed
at 0x8000_0000, I suggest just moving kernel_entry to the top of head.S
instead of putting a jump at the top of the file.

Also, compile tricks won't work (at least in my case).  Normally the bootloader
and the kernel are in two memories, often programmed in different ways.  For
example, a system normally has rom at the boot address at 0x1fc0_0000, ram at
0x8000_0000, and some other memory (flash, hard disk, whatever) storing a kernel
(or kernels) somewhere else.  Any compile time tricks require the boot rom to be
reprogrammed when the kernel changes.  That's part of what I wanted to avoid.

Gerald

 



 

  reply	other threads:[~2001-10-19 15:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-19  0:58 Moving kernel_entry to LOADADDR Gerald Champagne
2001-10-19  1:13 ` Geoffrey Espin
2001-10-19  7:31 ` Gleb O. Raiko
2001-10-19 13:20 ` Maciej W. Rozycki
2001-10-19 15:11   ` Mike McDonald
2001-10-19 15:18     ` Gerald Champagne [this message]
2001-10-19 15:21     ` Justin Carlson
2001-10-19 15:56       ` Mike McDonald
2001-10-24 11:16 ` Florian Lohoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BD04458.8050200@esstech.com \
    --to=gerald.champagne@esstech.com \
    --cc=linux-mips@oss.sgi.com \
    --cc=mikemac@mikemac.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.