2 Jan 2006 07:38
some issue of sandpoint and powerpc
<swcdyys <at> mail.sc.cninfo.net>
2006-01-02 06:38:14 GMT
2006-01-02 06:38:14 GMT
Hi,
I am porting sandpoint to my MPC8245 board.
I found some issue in the sandpoint port:
1. sandpoint\machdep.c
(1) initppc function:
memset(&edata, 0, (u_int) &end - (u_int) &edata);
this call cause the cpu_info clear to zero,
but it init in locore.S:_start
INIT_CPUINFO(4,1,9,0)
so the bss section clear should do in locore.S
before INIT_CPUINFO(4,1,9,0) as follow :
/* Make sure that .bss is zeroed. */
li 0,0
lis 8,edata <at> ha
addi 8,8,edata <at> l
lis 9,end <at> ha
addi 9,9,end <at> l
5: cmpw 0,8,9 /* edata & end are >= word aligned */
bge 6f
stw 0,0(8)
addi 8,8,4
b 5b
6:
or in initppc as follow:
memset(&edata, 0, (u_int) &cpu_info[0] - (u_int) &edata);
cpu_info_end = &cpu_info[0]+1;
memset(cpu_info_end, 0, (u_int) end - (u_int)cpu_info_end);
(Continue reading)
RSS Feed