* porting linux ppc on custom board, stuck in timer loop ?
@ 2005-06-28 13:10 Xavier Grave
2005-06-28 15:01 ` Xavier Grave
0 siblings, 1 reply; 3+ messages in thread
From: Xavier Grave @ 2005-06-28 13:10 UTC (permalink / raw)
To: linuxppc-dev
Hi !
I still try to port linux ppc on our ppc405 based hardware, after a look
at xilinx_ml300.c file that gives the list of function calls I wait for
a call to start_kernel but I found that start_kernel is never reached...
In fact the code in head_4xx.S jumps to 0x00001000 which is Decrementer
exception :
bl machine_init
bl MMU_init
/* Go back to running unmapped so we can load up new values
* and change to using our exception vectors.
* On the 4xx, all we have to do is invalidate the TLB to clear
* the old 16M byte TLB mappings.
*/
lis r4,2f@h
ori r4,r4,2f@l
tophys(r4,r4) /* r4 seems to hold 0x00001000 */
lis r3,(MSR_KERNEL & ~(MSR_IR|MSR_DR))@h
ori r3,r3,(MSR_KERNEL & ~(MSR_IR|MSR_DR))@l
mtspr SPRN_SRR0,r4
mtspr SPRN_SRR1,r3
rfi
b . /* prevent prefetch past rfi */
the previous code jump to decrementer and the code after is never
reached... And so start_kernel also...
/* Load up the kernel context */
2:
sync /* Flush to memory before changing TLB */
tlbia
isync /* Flush shadow TLBs */
/* set up the PTE pointers for the Abatron bdiGDB.
*/
lis r6, swapper_pg_dir@h
ori r6, r6, swapper_pg_dir@l
lis r5, abatron_pteptrs@h
ori r5, r5, abatron_pteptrs@l
stw r5, 0xf0(r0) /* Must match your Abatron config file */
tophys(r5,r5)
stw r6, 0(r5)
/* Now turn on the MMU for real! */
lis r4,MSR_KERNEL@h
ori r4,r4,MSR_KERNEL@l
lis r3,start_kernel@h
ori r3,r3,start_kernel@l
mtspr SPRN_SRR0,r3
mtspr SPRN_SRR1,r4
rfi /* enable MMU and jump to start_kernel */
b . /* prevent prefetch past rfi */
Is this my hardware implementation that is incorrect ? Or I missed
something in my kernel configuration ?
Thanks in advance for any answer...
xavier
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: porting linux ppc on custom board, stuck in timer loop ?
2005-06-28 13:10 Xavier Grave
@ 2005-06-28 15:01 ` Xavier Grave
0 siblings, 0 replies; 3+ messages in thread
From: Xavier Grave @ 2005-06-28 15:01 UTC (permalink / raw)
To: linuxppc-dev
montavista 2.4.20 kernel code from preview kit boot without any
problems... Thanks to them ! I'll have a look at the 2.6.12 kernel later
once my application run on my embedded board :-)
So sorry for the previous mail...
Le mardi 28 juin 2005 à 15:10 +0200, Xavier Grave a écrit :
> Hi !
>
> I still try to port linux ppc on our ppc405 based hardware, after a look
> at xilinx_ml300.c file that gives the list of function calls I wait for
> a call to start_kernel but I found that start_kernel is never reached...
> In fact the code in head_4xx.S jumps to 0x00001000 which is Decrementer
> exception :
>
> bl machine_init
> bl MMU_init
> /* Go back to running unmapped so we can load up new values
> * and change to using our exception vectors.
> * On the 4xx, all we have to do is invalidate the TLB to clear
> * the old 16M byte TLB mappings.
> */
> lis r4,2f@h
> ori r4,r4,2f@l
> tophys(r4,r4) /* r4 seems to hold 0x00001000 */
> lis r3,(MSR_KERNEL & ~(MSR_IR|MSR_DR))@h
> ori r3,r3,(MSR_KERNEL & ~(MSR_IR|MSR_DR))@l
> mtspr SPRN_SRR0,r4
> mtspr SPRN_SRR1,r3
> rfi
> b . /* prevent prefetch past rfi */
>
> the previous code jump to decrementer and the code after is never
> reached... And so start_kernel also...
>
> /* Load up the kernel context */
> 2:
> sync /* Flush to memory before changing TLB */
> tlbia
> isync /* Flush shadow TLBs */
> /* set up the PTE pointers for the Abatron bdiGDB.
> */
> lis r6, swapper_pg_dir@h
> ori r6, r6, swapper_pg_dir@l
> lis r5, abatron_pteptrs@h
> ori r5, r5, abatron_pteptrs@l
> stw r5, 0xf0(r0) /* Must match your Abatron config file */
> tophys(r5,r5)
> stw r6, 0(r5)
> /* Now turn on the MMU for real! */
> lis r4,MSR_KERNEL@h
> ori r4,r4,MSR_KERNEL@l
> lis r3,start_kernel@h
> ori r3,r3,start_kernel@l
> mtspr SPRN_SRR0,r3
> mtspr SPRN_SRR1,r4
> rfi /* enable MMU and jump to start_kernel */
> b . /* prevent prefetch past rfi */
>
> Is this my hardware implementation that is incorrect ? Or I missed
> something in my kernel configuration ?
>
> Thanks in advance for any answer...
>
> xavier
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 3+ messages in thread
* porting linux ppc on custom board, stuck in timer loop ?
@ 2005-11-28 6:48 David H. Lynch Jr.
0 siblings, 0 replies; 3+ messages in thread
From: David H. Lynch Jr. @ 2005-11-28 6:48 UTC (permalink / raw)
To: grave, linuxppc-embedded
Xavier;
I am having/had the exact same problem on a Xilinx VI based system and 2.6.12-2.6.14.2
I was eventually able to resolve it by removing MSR_ME from MSR_KERNEL. After that I have been able to successfully boot through to
starting init where I am hanging now. I beleive I do not have a working timer and that may be related to the problem with Machine Check Exceptions.
Were you ever able to resolve your problem aside from switching to 2.4.20, and if so what solution did you come up with ?
>Hi !
>I still try to port linux ppc on our ppc405 based hardware, after a look
>at xilinx_ml300.c file that gives the list of function calls I wait for
>a call to start_kernel but I found that start_kernel is never reached...
>In fact the code in head_4xx.S jumps to 0x00001000 which is Decrementer
>exception :
>/* Now turn on the MMU for real! */
> lis r4,MSR_KERNEL at h <https://ozlabs.org/mailman/listinfo/linuxppc-dev>
> ori r4,r4,MSR_KERNEL at l <https://ozlabs.org/mailman/listinfo/linuxppc-dev>
> lis r3,start_kernel at h <https://ozlabs.org/mailman/listinfo/linuxppc-dev>
> ori r3,r3,start_kernel at l <https://ozlabs.org/mailman/listinfo/linuxppc-dev>
> mtspr SPRN_SRR0,r3
> mtspr SPRN_SRR1,r4
> rfi /* enable MMU and jump to start_kernel */
> b . /* prevent prefetch past rfi */
>Is this my hardware implementation that is incorrect ? Or I missed
>something in my kernel configuration ?
>Thanks in advance for any answer...
>xavier
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-28 6:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-28 6:48 porting linux ppc on custom board, stuck in timer loop ? David H. Lynch Jr.
-- strict thread matches above, loose matches on Subject: below --
2005-06-28 13:10 Xavier Grave
2005-06-28 15:01 ` Xavier Grave
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).