* problems to boot 2.6.23 kernel on XILINX ppc with 8Mbytes of RAM
@ 2007-10-24 20:01 manu
2007-10-25 7:00 ` Magnus Hjorth
0 siblings, 1 reply; 5+ messages in thread
From: manu @ 2007-10-24 20:01 UTC (permalink / raw)
To: Linuxppc-embedded
Hello,
I work on a custom board based on a virtex 2 pro FPGA and 8Mbytes of SDRAM.
Untill now I used a 2.4.31 linux ppc kernel with John Williams patches
and uclinux distribution and everything worked perfectly.
I've decided to move to the latest 2.6 version from kernel.org
(2.6.23.1) with an initramfs containing a busybox.
My complete zImage including the initramfs has a size of 900Kbytes.
I made some tests with a ML300 board and I managed to get a shell easily.
When I migrated to the custom board, I had the "Now booting the kernel"
message and then nothing.
When I trace the code running on the ppc with the debugger, execution
seems to be stuck in some early initialization code.
I managed to reproduce the problem on the ML300 using "mem=8m" parameter
on the bootline.
With "mem=16m" the kernel boots correctly.
I'm really surprised by the amount of RAM required to boot the kernel.
Is there a way to make it boot with only 8Mbytes of RAM ?
Thanks for your help.
Manu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: problems to boot 2.6.23 kernel on XILINX ppc with 8Mbytes of RAM
2007-10-24 20:01 problems to boot 2.6.23 kernel on XILINX ppc with 8Mbytes of RAM manu
@ 2007-10-25 7:00 ` Magnus Hjorth
2007-10-26 18:43 ` manu
2007-10-26 19:54 ` Grant Likely
0 siblings, 2 replies; 5+ messages in thread
From: Magnus Hjorth @ 2007-10-25 7:00 UTC (permalink / raw)
To: manu; +Cc: Linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]
Hello Manu,
Could you try the attached patch to arch/ppc/mm/4xx_mmu.c and see if it
solves your problem?
Best regards,
Magnus
manu wrote:
> Hello,
> I work on a custom board based on a virtex 2 pro FPGA and 8Mbytes of SDRAM.
> Untill now I used a 2.4.31 linux ppc kernel with John Williams patches
> and uclinux distribution and everything worked perfectly.
> I've decided to move to the latest 2.6 version from kernel.org
> (2.6.23.1) with an initramfs containing a busybox.
> My complete zImage including the initramfs has a size of 900Kbytes.
> I made some tests with a ML300 board and I managed to get a shell easily.
> When I migrated to the custom board, I had the "Now booting the kernel"
> message and then nothing.
> When I trace the code running on the ppc with the debugger, execution
> seems to be stuck in some early initialization code.
> I managed to reproduce the problem on the ML300 using "mem=8m" parameter
> on the bootline.
> With "mem=16m" the kernel boots correctly.
> I'm really surprised by the amount of RAM required to boot the kernel.
> Is there a way to make it boot with only 8Mbytes of RAM ?
> Thanks for your help.
>
> Manu
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
--
Magnus Hjorth, M.Sc.
Omnisys Instruments AB
Gruvgatan 8
SE-421 30 Västra Frölunda, SWEDEN
Phone: +46 31 734 34 09
Fax: +46 31 734 34 29
http://www.omnisys.se
[-- Attachment #2: 4xx_mmu.patch --]
[-- Type: text/plain, Size: 589 bytes --]
--- 4xx_mmu_old.c 2007-10-25 08:54:46.000000000 +0200
+++ 4xx_mmu.c 2007-10-25 08:55:57.000000000 +0200
@@ -105,7 +105,7 @@
return s;
}
- while (s <= (total_lowmem - LARGE_PAGE_SIZE_16M)) {
+ while (s + LARGE_PAGE_SIZE_16M <= total_lowmem) {
pmd_t *pmdp;
unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE;
@@ -120,7 +120,7 @@
s += LARGE_PAGE_SIZE_16M;
}
- while (s <= (total_lowmem - LARGE_PAGE_SIZE_4M)) {
+ while (s + LARGE_PAGE_SIZE_4M <= total_lowmem) {
pmd_t *pmdp;
unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: problems to boot 2.6.23 kernel on XILINX ppc with 8Mbytes of RAM
2007-10-25 7:00 ` Magnus Hjorth
@ 2007-10-26 18:43 ` manu
2007-10-26 19:54 ` Grant Likely
1 sibling, 0 replies; 5+ messages in thread
From: manu @ 2007-10-26 18:43 UTC (permalink / raw)
To: Linuxppc-embedded
Hello Magnus,
your patch solved the problem.
Thank you.
Manu
Magnus Hjorth a écrit :
> Hello Manu,
>
> Could you try the attached patch to arch/ppc/mm/4xx_mmu.c and see if
> it solves your problem?
>
> Best regards,
> Magnus
>
>
> manu wrote:
>> Hello,
>> I work on a custom board based on a virtex 2 pro FPGA and 8Mbytes of
>> SDRAM.
>> Untill now I used a 2.4.31 linux ppc kernel with John Williams patches
>> and uclinux distribution and everything worked perfectly.
>> I've decided to move to the latest 2.6 version from kernel.org
>> (2.6.23.1) with an initramfs containing a busybox.
>> My complete zImage including the initramfs has a size of 900Kbytes.
>> I made some tests with a ML300 board and I managed to get a shell
>> easily.
>> When I migrated to the custom board, I had the "Now booting the kernel"
>> message and then nothing.
>> When I trace the code running on the ppc with the debugger, execution
>> seems to be stuck in some early initialization code.
>> I managed to reproduce the problem on the ML300 using "mem=8m" parameter
>> on the bootline.
>> With "mem=16m" the kernel boots correctly.
>> I'm really surprised by the amount of RAM required to boot the kernel.
>> Is there a way to make it boot with only 8Mbytes of RAM ?
>> Thanks for your help.
>>
>> Manu
>> _______________________________________________
>> Linuxppc-embedded mailing list
>> Linuxppc-embedded@ozlabs.org
>> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>>
>
>
> ------------------------------------------------------------------------
>
> --- 4xx_mmu_old.c 2007-10-25 08:54:46.000000000 +0200
> +++ 4xx_mmu.c 2007-10-25 08:55:57.000000000 +0200
> @@ -105,7 +105,7 @@
> return s;
> }
>
> - while (s <= (total_lowmem - LARGE_PAGE_SIZE_16M)) {
> + while (s + LARGE_PAGE_SIZE_16M <= total_lowmem) {
> pmd_t *pmdp;
> unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE;
>
> @@ -120,7 +120,7 @@
> s += LARGE_PAGE_SIZE_16M;
> }
>
> - while (s <= (total_lowmem - LARGE_PAGE_SIZE_4M)) {
> + while (s + LARGE_PAGE_SIZE_4M <= total_lowmem) {
> pmd_t *pmdp;
> unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE;
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: problems to boot 2.6.23 kernel on XILINX ppc with 8Mbytes of RAM
2007-10-25 7:00 ` Magnus Hjorth
2007-10-26 18:43 ` manu
@ 2007-10-26 19:54 ` Grant Likely
2007-10-27 8:35 ` [PATCH] ppc4xx: mmu_mapin_ram bugfix for booting with mem<16 MB Magnus Hjorth
1 sibling, 1 reply; 5+ messages in thread
From: Grant Likely @ 2007-10-26 19:54 UTC (permalink / raw)
To: Magnus Hjorth; +Cc: Linuxppc-embedded
On 10/25/07, Magnus Hjorth <mh@omnisys.se> wrote:
> Hello Manu,
>
> Could you try the attached patch to arch/ppc/mm/4xx_mmu.c and see if it
> solves your problem?
Good catch, thanks!
Send you're signed off by line, and I'll for Josh to pick it up.
Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ppc4xx: mmu_mapin_ram bugfix for booting with mem<16 MB
2007-10-26 19:54 ` Grant Likely
@ 2007-10-27 8:35 ` Magnus Hjorth
0 siblings, 0 replies; 5+ messages in thread
From: Magnus Hjorth @ 2007-10-27 8:35 UTC (permalink / raw)
To: Grant Likely; +Cc: Linuxppc-embedded
From: Magnus Hjorth <mh@omnisys.se>
This patch (for 2.6.23.1) fixes an unsigned arithmetic bug causing the
kernel to hang when booting with less than 16 MB of memory on ppc4xx.
Signed-off-by: Magnus Hjorth <mh@omnisys.se>
---
OK, trying to do this by the book now...
--- linux-2.6.23.1/arch/ppc/mm/4xx_mmu.c.orig 2007-10-27 10:14:42.000000000 +0200
+++ linux-2.6.23.1/arch/ppc/mm/4xx_mmu.c 2007-10-27 10:15:34.000000000 +0200
@@ -105,7 +105,7 @@ unsigned long __init mmu_mapin_ram(void)
return s;
}
- while (s <= (total_lowmem - LARGE_PAGE_SIZE_16M)) {
+ while (s + LARGE_PAGE_SIZE_16M <= total_lowmem) {
pmd_t *pmdp;
unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE;
@@ -120,7 +120,7 @@ unsigned long __init mmu_mapin_ram(void)
s += LARGE_PAGE_SIZE_16M;
}
- while (s <= (total_lowmem - LARGE_PAGE_SIZE_4M)) {
+ while (s + LARGE_PAGE_SIZE_4M <= total_lowmem) {
pmd_t *pmdp;
unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE;
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-27 8:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-24 20:01 problems to boot 2.6.23 kernel on XILINX ppc with 8Mbytes of RAM manu
2007-10-25 7:00 ` Magnus Hjorth
2007-10-26 18:43 ` manu
2007-10-26 19:54 ` Grant Likely
2007-10-27 8:35 ` [PATCH] ppc4xx: mmu_mapin_ram bugfix for booting with mem<16 MB Magnus Hjorth
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).