Re: [U-Boot-Users] [PATCH] Make MPC83xx one step closer to full relocation.

Hi Joakim,
See for example cpu/mpc8xx/start.S - while at the moment we really start with .text, it would technically be more approrpriate to change the first 256 bytes (from monitor base to EXC_OFF_SYS_RESET) into .rodata or something like this.
Ahh, now I see what you mean and it gave me an idea ...
While you're chewing on ideas, here's a couple of points about mpc83xx/start.S
The reset configuration words that start at the beginning of Flash are *optional*, and depend on the reset configurations words source pin strapping (CFG_RS[0:2]).
If CFG_RS[0:2] = 000b, then the RCWs are read from the local bus chip-select 0. Nominally this means read from flash, but hardware can subvert the bus to the flash and supply the RCWs from an alternative source, eg. on the MPC8349EA-MDS-PB, the RCWs can be driven onto the local bus by an on-board CPLD (which in turn gets the RCWs from dip switches).
On my custom MPC8349EA board, I can deliver the RCWs from the Flash, or if flash is blank, from the FPGA, or I can change the CFG_RS[0:2] source so that the processor uses hard-coded RCWs, or an I2C boot EEPROM.
If the RCWs were placed in their own section, then that section could be made optional. In the case of it being used, and boot-low being used (RCWH[BMS] = 0), then the RCW+U-Boot magic+string section would need be 100h bytes in size, and be concatenated with the U-Boot image. Otherwise the RCW area could be left as a separate binary image, that the user has to burn to Flash. (Eg. for a user that for some bizarre reason wants to put RCWH[BMS] = 1 :) ).
How about a 100-byte section called .rcw, or .rcwdata?
I'm not sure if these comments will make life easier or worse ...
Cheers, Dave
participants (1)
-
David Hawkins