* Kernel located in KSEG2 or KSEG3.
@ 2004-12-13 18:12 moreau francis
2004-12-13 19:04 ` sjhill
2004-12-15 13:38 ` Ralf Baechle
0 siblings, 2 replies; 5+ messages in thread
From: moreau francis @ 2004-12-13 18:12 UTC (permalink / raw)
To: linux-mips
Hi,
Sorry if you find this post stupid, but I'm quite new
in Linux.
To learn on Linux kernel, I've decided to port it on
particular board with (very) limited resources and
based with a 4KC processor core. As far I see, I need
at least a couple of mega bytes of memory to achieve
my goal.
Unfortunately the only way to get this amount of mem
is
to execute linux in memory that can only be accessed
through KSEG2 and KSEG3 !
Here is my board's mapping:
Physical Memory Map:
start size type
-----------------------------
0x20000000 - 8MB - SDRAM
0x30000000 - 16MB - FLASH
0x40000000 - 16MB - FLASH
0x50000000 - 2MB - SRAM
I looked into the memory init code and I don't think
that it's possible to run linux in a segment different
from KSEG0. Am I wrong ?
I've noticed a CONFIG_MAPPED_KERNEL macro but it seems
that it's only used to replicate kernel from mapped
memory to KSEG0...
Thanks for your answers.
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/
Avec Yahoo! faites un don et soutenez le Téléthon en cliquant sur http://www.telethon.fr/030-Don/10-10_Don.asp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kernel located in KSEG2 or KSEG3.
2004-12-13 18:12 Kernel located in KSEG2 or KSEG3 moreau francis
@ 2004-12-13 19:04 ` sjhill
2004-12-14 10:03 ` moreau francis
2004-12-15 13:38 ` Ralf Baechle
1 sibling, 1 reply; 5+ messages in thread
From: sjhill @ 2004-12-13 19:04 UTC (permalink / raw)
To: moreau francis; +Cc: linux-mips
> Here is my board's mapping:
>
> Physical Memory Map:
>
> start size type
> -----------------------------
> 0x20000000 - 8MB - SDRAM
> 0x30000000 - 16MB - FLASH
> 0x40000000 - 16MB - FLASH
> 0x50000000 - 2MB - SRAM
>
Your board manufacturer should be shot and then have
their hands and tongue cut off. All kidding aside,
are you sure there is no device mapped in the physical
address range of 0x1fc00000-0x1fffffff? I highly doubt
your board would boot otherwise, since a MIPS processor
coming out of reset jumps to physical address 0x1fc00000.
Can you check the board's manual? Thanks.
-Steve
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kernel located in KSEG2 or KSEG3.
2004-12-13 19:04 ` sjhill
@ 2004-12-14 10:03 ` moreau francis
0 siblings, 0 replies; 5+ messages in thread
From: moreau francis @ 2004-12-14 10:03 UTC (permalink / raw)
To: sjhill; +Cc: linux-mips
--- sjhill@realitydiluted.com a écrit :
> > Here is my board's mapping:
> >
> > Physical Memory Map:
> >
> > start size type
> > -----------------------------
> > 0x20000000 - 8MB - SDRAM
> > 0x30000000 - 16MB - FLASH
> > 0x40000000 - 16MB - FLASH
> > 0x50000000 - 2MB - SRAM
> >
> are you sure there is no device mapped in the
> physical
> address range of 0x1fc00000-0x1fffffff? I highly
> doubt
> your board would boot otherwise, since a MIPS
> processor
> coming out of reset jumps to physical address
> 0x1fc00000.
only a small piece of ROM...
here is my internal memory mapping:
start size type
-----------------------------
0x1fc00000 - 128Ko - ROM
0x01000000 - 128Ko - FLASH
At boot time ROM code do some init and then jump
into the internal flash mem.
I think there's no possibilities to run linux except
in KSEG2 and KSEG3...Do you think it's possible ?
By the way why Linux memory management need to care
about physical addresses ?
Francis.
>
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/
Avec Yahoo! faites un don et soutenez le Téléthon en cliquant sur http://www.telethon.fr/030-Don/10-10_Don.asp
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kernel located in KSEG2 or KSEG3.
2004-12-13 18:12 Kernel located in KSEG2 or KSEG3 moreau francis
2004-12-13 19:04 ` sjhill
@ 2004-12-15 13:38 ` Ralf Baechle
2004-12-16 15:05 ` moreau francis
1 sibling, 1 reply; 5+ messages in thread
From: Ralf Baechle @ 2004-12-15 13:38 UTC (permalink / raw)
To: moreau francis; +Cc: linux-mips
On Mon, Dec 13, 2004 at 07:12:52PM +0100, moreau francis wrote:
> To learn on Linux kernel, I've decided to port it on
> particular board with (very) limited resources and
> based with a 4KC processor core. As far I see, I need
> at least a couple of mega bytes of memory to achieve
> my goal.
> Unfortunately the only way to get this amount of mem
> is
> to execute linux in memory that can only be accessed
> through KSEG2 and KSEG3 !
>
> Here is my board's mapping:
>
> Physical Memory Map:
>
> start size type
> -----------------------------
> 0x20000000 - 8MB - SDRAM
> 0x30000000 - 16MB - FLASH
> 0x40000000 - 16MB - FLASH
> 0x50000000 - 2MB - SRAM
>
>
> I looked into the memory init code and I don't think
> that it's possible to run linux in a segment different
> from KSEG0. Am I wrong ?
It's not. The 4kc processor when running with the BEV bit in the status
register cleared will try to find it's exception vectors at address
KSEG0, so there would have to be *some* code mapped there. With BEV=1
exception vectors would be located in the firmware as pointed out by
Steve in his answer. Firmware means something like flashmemory and running
uncached, so will be prohibitivly slow. I just can't believe a system to
be that missdesigned!
> I've noticed a CONFIG_MAPPED_KERNEL macro but it seems
> that it's only used to replicate kernel from mapped
> memory to KSEG0...
That's correct. CONFIG_MAPPED_KERNEL was written to support large ccNUMA
systems (large meaning two or three digit numbers of processors) where
preferably each node should run it's own copy of the OS kernel. It's
a missdesigned, therefore ineffective implementation that was also only
working because of some assumption on the way gcc generates tools.
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Kernel located in KSEG2 or KSEG3.
2004-12-15 13:38 ` Ralf Baechle
@ 2004-12-16 15:05 ` moreau francis
0 siblings, 0 replies; 5+ messages in thread
From: moreau francis @ 2004-12-16 15:05 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips
> It's not. The 4kc processor when running with the
> BEV bit in the status
> register cleared will try to find it's exception
> vectors at address
> KSEG0, so there would have to be *some* code mapped
> there. With BEV=1
> exception vectors would be located in the firmware
> as pointed out by
> Steve in his answer. Firmware means something like
> flashmemory and running
> uncached, so will be prohibitivly slow. I just
> can't believe a system to
> be that missdesigned!
Well actually I have memories that can be accessed by
KSEG0, but they are very limited:
start size type
----------------------------
0x00000000 - 128Ko - RAM
0x01000000 - 128Ko - FLASH
0x1fc00000 - 128Ko - ROM
Therefore I could use this internal RAM to store
exception vectors.
My fears are on running kernel in KSEG2.
I'm thinking of trying this configuration:
I'm going to use 2 TLB entries to map definetively
kernel in KSEG1:
* 1 entry to map kernel code in FLASH (16Mo),
* 1 entry to map kernel data in SDRAM (8Mo).
space virtual-add physical-add size
----------------------------------------------
Code 0xC0000000 0x30000000 16Mo
Data 0xC1000000 0x20000000 8Mo
I will set PAGE_OFFSET to 0xA1000000, therefore all
physicall address convertion will result in SDRAM.
Hopefully, this macro is only used to make translation
between physical and virtual spaces. I grep it and it
seems to be the case.
Do you think that I can dig at this way ?
Thanks,
Francis
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-12-16 15:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-13 18:12 Kernel located in KSEG2 or KSEG3 moreau francis
2004-12-13 19:04 ` sjhill
2004-12-14 10:03 ` moreau francis
2004-12-15 13:38 ` Ralf Baechle
2004-12-16 15:05 ` moreau francis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox