2001-02-19 02:38:10

by Jaswinder Singh

[permalink] [raw]
Subject: Kernel executation from ROM

Dear Kernel mailing list ,

what changes i have to made in kernel so that i can
run kernel from ROM, means i keep my kernel in ROM
and i execute my kernel from ROM .

Thanks ,

Happy Hacking,

Jaswinder.
--
These are my opinions not 3Di.




2001-02-19 04:12:20

by Jaswinder Singh

[permalink] [raw]
Subject: Re: Kernel executation from ROM

Dear Sirs,

Thanks for your help,

I see . The biggest negative point of running kernel from ROM is that ROM
speed is slow :(

Any how , thanks for your help,

Best Regards,

Jaswinder.
--
These are my opinions not 3Di.


----- Original Message -----
From: "Peter Waltenberg" <[email protected]>
To: "Jaswinder Singh" <[email protected]>
Sent: Sunday, February 18, 2001 6:49 PM
Subject: RE: Kernel executation from ROM


>
> You can laod the kernel from ROM, but it'll need RAM to execute. If you
get to
> be very good with the linker and loader, you can probably make a large
part of
> the kernel ROM resident, but it will still need significant amounts of RAM
to
> be usable.
> It's probably easier not to bother and do what everyone else does and copy
from
> ROM->RAM at startup.
>
> Peter
>
> On 19-Feb-2001 Jaswinder Singh wrote:
> > Dear Kernel mailing list ,
> >
> > what changes i have to made in kernel so that i can
> > run kernel from ROM, means i keep my kernel in ROM
> > and i execute my kernel from ROM .
> >
> > Thanks ,
> >
> > Happy Hacking,
> >
> > Jaswinder.
> > --
> > These are my opinions not 3Di.
>
---------------------

----- Original Message -----
From: "Albert D. Cahalan" <[email protected]>
To: "Jaswinder Singh" <[email protected]>
Sent: Sunday, February 18, 2001 6:57 PM
Subject: Re: Kernel executation from ROM


> > what changes i have to made in kernel so that i can
> > run kernel from ROM, means i keep my kernel in ROM
> > and i execute my kernel from ROM .
>
> 1. write boot code to copy initialized variables into RAM
> 2. adjust the linker script to know about the above
> 3. adjust the linker script for other sections too
>
> For better performance, assuming ROM is slow and costly:
>
> 1. compress the "__init" code and data; use it in RAM
> 2. profile your kernel; put the critical parts in RAM
>
> If you want the details, take Red Hat's embedded systems
> development class. If you have a dozen people, get the class
> done at your location and have it modified to fit your needs.
> I just took the class; it was pretty good. It is "RHD248".
>

2001-02-19 09:28:55

by Bernd Eckenfels

[permalink] [raw]
Subject: Re: Kernel executation from ROM

In article <01e701c09a2a$21e789a0$bba6b3d0@Toshiba> you wrote:
> I see . The biggest negative point of running kernel from ROM is that ROM
> speed is slow :(

Well, normally you use the ROM only as a "boot device". You copy the Kernel
into RAM and run it. Ram is not more expensive than ROM :)

What is your Reason for keeping the Kernel in ROM? Security? Do you have a
special limited Device? In that case you might want to look at the embedded
Linux Versions which run without MMU. Those might even have a decent ROM
Performance (compared to RAM).

Greetings
Bernd

2001-02-19 16:52:35

by Jeremy Jackson

[permalink] [raw]
Subject: Re: Kernel executation from ROM

Jaswinder Singh wrote:

> Dear Sirs,
>
> Thanks for your help,
>
> I see . The biggest negative point of running kernel from ROM is that ROM
> speed is slow :(

Also, the PCI specification forbids executing code from ROMs over the PCI bus.
The system BIOS in a PC is not on the PCI bus, bus, but everything else is.

2001-02-19 22:08:31

by Eric W. Biederman

[permalink] [raw]
Subject: Re: Kernel executation from ROM

Jeremy Jackson <[email protected]> writes:

> Jaswinder Singh wrote:
>
> > Dear Sirs,
> >
> > Thanks for your help,
> >
> > I see . The biggest negative point of running kernel from ROM is that ROM
> > speed is slow :(
>
> Also, the PCI specification forbids executing code from ROMs over the PCI bus.
> The system BIOS in a PC is not on the PCI bus, bus, but everything else is.

No it forbids executing boot roms that way, by a standard pc bios.
The system BIOS in a PC is normally on the ISA bus which is reached
across via the PCI bus with a PCI->ISA bridge.

The thing is slow it really doesn't matter, all you need to do is
enable caching on that area of the physical address space. You can't
do this on the alpha currently but only because the alpha sucks that
way. You can on practically everything else.

As for ROM being slow on x86 you can enable the MTRR to speed things
up. Usually though ROMs are at least as expensive as RAM, so it is
pointless.

Eric

2001-02-19 22:30:22

by Jeremy Jackson

[permalink] [raw]
Subject: Re: Kernel executation from ROM

"Eric W. Biederman" wrote:

> No it forbids executing boot roms that way, by a standard pc bios.
> The system BIOS in a PC is normally on the ISA bus which is reached
> across via the PCI bus with a PCI->ISA bridge.

Son of a gun, I missed that... sure enough my PIIX4 docs beside me here
show a #BIOSCS pin on the southbridge... Can anybody clarify what
this restriction does and doesn't apply to ? The MindShare PCI Arch.
book where I got that info from doesn't elaborate that much.

> The thing is slow it really doesn't matter, all you need to do is
> enable caching on that area of the physical address space. You can't
> do this on the alpha currently but only because the alpha sucks that
> way. You can on practically everything else.
>
> As for ROM being slow on x86 you can enable the MTRR to speed things

Don't MTRR's just do write combining?

>
> up. Usually though ROMs are at least as expensive as RAM, so it is
> pointless.

2001-02-20 07:07:07

by Eric W. Biederman

[permalink] [raw]
Subject: Re: Kernel executation from ROM

Peter Waltenberg <[email protected]> writes:

> Having a PC that booted Linux directly from the (ex-BIOS) ROM , now that
> would be "interesting".

Been there doing that.
http://www.linuxbios.org


Eric