* ppc rfi in head.s result in a reset?
@ 2009-10-17 1:21 wilbur.chan
2009-11-05 2:13 ` Tonyliu
0 siblings, 1 reply; 2+ messages in thread
From: wilbur.chan @ 2009-10-17 1:21 UTC (permalink / raw)
To: linuxppc-dev
ppc 6xx
In platform_init function of sandpoint.c , I delete the code of
getting command line from uboot, and set command_line to a fixed value
, which are like this:
sandpoint.c--> platform_init
#if 0
if (r3 && r6) {
/* copy board info structure */
memcpy( (void *)__res,(void *)(r3+KERNELBASE), sizeof(bd_t) );
/* copy command line */
*(char *)(r7+KERNELBASE) = 0;
strcpy(cmd_line, (char *)(r6+KERNELBASE));
}
#endif
strcpy(cmd_line, "xxx");
But I found that , when calling start_kernel in head.S (by rfi
instruction), the borad was reset into uboot, that is :
li r4,MSR_KERNEL
FIX_SRR1(r4,r5)
lis r3,start_kernel@h
ori r3,r3,start_kernel@l
mtspr SPRN_SRR0,r3
mtspr SPRN_SRR1,r4
SYNC
RFI //reset,why?
The RFI instruction here, caused the board reset to uboot. Can
someone give me some advice on how could this happened?
Thank you
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ppc rfi in head.s result in a reset?
2009-10-17 1:21 ppc rfi in head.s result in a reset? wilbur.chan
@ 2009-11-05 2:13 ` Tonyliu
0 siblings, 0 replies; 2+ messages in thread
From: Tonyliu @ 2009-11-05 2:13 UTC (permalink / raw)
To: wilbur.chan; +Cc: linuxppc-dev
wilbur.chan wrote:
> ppc 6xx
>
> In platform_init function of sandpoint.c , I delete the code of
> getting command line from uboot, and set command_line to a fixed value
> , which are like this:
>
> sandpoint.c--> platform_init
> #if 0
> if (r3 && r6) {
> /* copy board info structure */
> memcpy( (void *)__res,(void *)(r3+KERNELBASE), sizeof(bd_t) );
> /* copy command line */
> *(char *)(r7+KERNELBASE) = 0;
> strcpy(cmd_line, (char *)(r6+KERNELBASE));
> }
> #endif
> strcpy(cmd_line, "xxx");
>
>
Which version your kernel is ? I cant find sandpoint.c in powerpc git tree.
And I suspect it's conditional "if (r3 && r6)" to copy cmd_line, and
your change makes it unconditioned. Maybe it
will affect something.
Tony
> But I found that , when calling start_kernel in head.S (by rfi
> instruction), the borad was reset into uboot, that is :
>
> li r4,MSR_KERNEL
> FIX_SRR1(r4,r5)
> lis r3,start_kernel@h
> ori r3,r3,start_kernel@l
> mtspr SPRN_SRR0,r3
> mtspr SPRN_SRR1,r4
> SYNC
> RFI //reset,why?
>
>
> The RFI instruction here, caused the board reset to uboot. Can
> someone give me some advice on how could this happened?
>
> Thank you
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists•ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
>
--
Tony Liu | Liu Bo
-------------------------------------------------------------
WIND RIVER | China Development Center
Tel: 86-10-8477-8542 ext: 8542 | Fax: 86-10-64790367
(M): 86-136-7117-3612
Address: 15/F, Wangjing TowerB, Chaoyang District, Beijing, P.R.China
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-05 4:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-17 1:21 ppc rfi in head.s result in a reset? wilbur.chan
2009-11-05 2:13 ` Tonyliu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox