Skip to contentSkip to conversation

kernel executing from flash

DISCUSSION christof 4 participants 6 messages Mar 23, 2000 – Mar 28, 2000

lore
Share & tools
lore

christof

author
#0 lore raw

Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Content-MD5: e709e4c63f7346156ea8e3dfbf17f7a9
X-Mailer: freenet-Web2Mail-Interface. See http://www.freenet.de/ for more.

Hello,

all Linux I know will be copied during startup from Harddisk, NFS or Flash to RAM and will be executed there. Is there a possibility for smaller systems to run the
kernel directly from flash memory as other embedded os's do? Did somebody try this or is it totaly impossible?

Thanks in advance
Christof
--
free eMail at http://www.freenet.de/

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

#1 lore raw
Quoted 6 lines · christof

Hello,

all Linux I know will be copied during startup from Harddisk, NFS or Flash to RAM and will be executed there. Is there a possibility for smaller systems to run the kernel directly from flash memory as other embedded os's do? Did somebody try this or is it totaly impossible?

Well, I see no reason why it shouldn't be possible, but not without modifying things.

You'd need to link the .data, .data.cacheline_aligned, .data.init and .bss sections so they are located in RAM, and the former three plus the exception vectors would have to be copied from flash to their linked location.

The question is why?
RAM is usually cheaper than flash, and if you run the kernel in RAM as usual you can have it compressed in flash, whereas if you intend to run it directly from flash it must be uncompressed.

//Marcus
--
Signature under construction, please come back later.

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

#2 lore raw
In reply to christof
Quoted 4 lines · In message <[email protected]> you wrote:

all Linux I know will be copied during startup from Harddisk, NFS or Flash to RAM and will be executed there. Is there a possibility for smaller systems to run the
kernel directly from flash memory as other embedded os's do? Did somebody try this or is it totaly impossible?

It may be possible, but usually it does not make much sense - to run the kernel directly from FLASH you must store an uncompressed kernel image there, so you need more FLASH. Given the price difference between FLASH and DRAM memory is often cheaper to uncompress into RAM, and run from RAM.

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] The only person who always got his work done by Friday
was Robinson Crusoe.

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

#3 lore raw
Quoted 8 lines

In message

Quoted 2 lines · <[email protected]> you wrote:

all Linux I know will be copied during startup from Harddisk,

NFS or Flash to RAM and will be executed there.

Quoted 2 lines

Is there a possibility for smaller systems to run the kernel directly from flash memory as other embedded os's do?

Quoted 8 lines

Did somebody try this or is it totaly impossible?

It may be possible, but usually it does not make much sense - to run the kernel directly from FLASH you must store an uncompressed kernel image there, so you need more FLASH. Given the price difference between FLASH and DRAM memory is often cheaper to uncompress into RAM, and run from RAM.

not to mention that DRAM is usually faster than FLASH...

Rob

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

author
#4 lore raw
In reply to christof

My primary aim is not to gain speed or to save money, although this is important for my application too.
By fetching opcodes from flash I expect more stability in temperature- and emc-critical environement, for data in "ROM" is saver than in RAM. Of corse, there is always run-time critical data in RAM (processor stack), but the probability of "irrepairable" errors should decrease by runnig from flash.

Thanks for Your quick answers
Christof

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

#5 lore raw
Quoted 7 lines · In message <[email protected]> you wrote:

My primary aim is not to gain speed or to save money, although this is important for my application too.
By fetching opcodes from flash I expect more stability in temperature- and emc-critical environement, for data in "ROM" is saver than in RAM. Of corse, there is always run-time critical data in RAM (processor stack), but the probability of "irrepairable" errors should decrease by runnig from flash.

A crash is a crash is a crash...

If you have memory errors, your system is bound to crash sooner or later, no matter if it hits the program code, or the stack, or data.

What's the difference between a crash because of a bad opcode or one because of a division by zero because of faulty data?

Black magic...

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] Work 8 hours, sleep 8 hours; but not the same 8 hours.

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