Port-powerpc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
some issue of sandpoint and powerpc
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@ha
addi 8,8,edata@l
lis 9,end@ha
addi 9,9,end@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);
(2).consinit(); should move to after:
openpic_init(eumb_base + 0x40000);
and if use internal UART,
consinit should modify to :
tag = &sandpoint_mem_bs_tag;
if(comcnattach(tag, 0xFC004500, <baudrate>,
<clock=100000000), COM_TYPE_NORMAL,
(3).sandpoint_bus_space_init:
ex_storage use are oversize, total ex_storage are [2],
should modify to :
error = bus_space_init(&sandpoint_isa_io_bs_tag, "isa-iomem",
ex_storage[0], sizeof(ex_storage[0]));
error = bus_space_init(&sandpoint_mem_bs_tag,
"iomem",
ex_storage[1], sizeof(ex_storage[1]));
error = bus_space_init(&sandpoint_isa_mem_bs_tag,
"isa-iomem",
ex_storage[1], sizeof(ex_storage[1]));
2. and for sandpoint default build,
the SYMTAB_SPACE in conf/GENERIC is too small,
I change it to :
options SYMTAB_SPACE=262144
3. I use u-boot to boot it, so no any other monitor program reside in
board, I set TEXTADDR to 0x2000, and can boot.
can I set it to 0x2000?
thanks.
Home |
Main Index |
Thread Index |
Old Index