I am trying to boot my MPC8309 custom board with NOR Flash with same memory map as referenced in MPC8309twr.
The above memory map is given in the TWR-MPC8309_Linux_BSP_User_Manual.pdf.
so i have programmed u-boot.bin to its location 0xFE00_0000(NOR Flash base address) and later programmed the QE-ucode to its location 0xFE7E_0000.
what i was expected is u-boot has to be executed from its location 0xFE000000, but it doesn't boot.
so after again i studied the MPC8309RM.pdf(Refernce Manual) here i got doubt in BMS bit in RCWHR.
BMS defines the initial value of the e300 core MSR[IP] bit, which specifies the location of the interrupt
vectors (including the hard reset exception vector). The device defines the default boot ROM memory
space to be 8 Mbytes at addresses 0x0000_0000 to 0x007F_FFFF or 0xFF80_0000 to 0xFFFF_FFFF.
When the core comes out of reset, if it is enabled to boot, it fetches boot code from one of two addresses,
0x0000_0100 or 0xFFF0_0100, and exceptions are vectored to the physical addresses, 0x000n_nnnn or
0xFFFn_nnnn appropriately. This bit specifies whether an interrupt vector offset is prepended with 0xFFF
or 0x000. In the description below, n_nnnn is the offset of the exception vector.
According to my preset values of CFG_RESET_SOURCE[0:3]=1000
RCWLR [0:31] = 0x42040003 & RCWHR [0:31] = 0xA460000
so i decoded this and i got '1' in BMS bit, according to BMS bit1 the boot code will be fetched from 0xFFF0_0100.
I again programmed the u-boot.bin at 0xFFF0_0000 location without erasing the previous programmed u-boot sectors(0xFE00_0000 - 0xFE09_FFFF) and my board gets up and i am able to load the kernel and mount my file system and it works fine(now uboot is at two locations in flash).
later i erased the previously programmed uboot sectors to confirm that the boot code is executed from 0xFFF0_0000 ad restarted the board, again the board stops booting. so i have loaded the u-boot.bin again to 0xFE00_0000 location then the board gets up. I dont understand that when boot code(u-boot) is present at two location then only board gets up otherwise it is not getting up and i have checked with md command in MPC8309twr reference board( here i have boot code in only at flash base address) but in my custom board the boot code is present at two locations(at flash base address & 0xFFF0_0000).
** i am justifying the board gets up by checking the uboot console prints.
If any one know the boot procedure that where the core fetches the boot code & where exactly the boot code has to be placed in Flash, please share me some information.
regards,
Satish Kumar
解決済! 解決策の投稿を見る。
The "low boot" means that U-Boot is configured/compiled to be programmed to the lowest flash addresses.
You wrote:
> i have programmed my boot code(uboot) at starting flash address(0xfe000000)
> with the u-boot.bin binary from TWRMPC8309_Linux_BSP.zip.
In this case you have to use CFG_RESET_SOURCE[0:3]=0000.
Described issue corresponds to the case when U-Boot was compiled for "low boot" - i.e. has to be programmed to the lowest flash addresses. Of course, correct RCWs with BMS=0 also have to be programmed starting from the flash address 0 and CFG_RESET_SOURCE[0:3]=0000 has to be used.
You could refer to the "u-boot.bin" provided in the binaries package of the "TWRMPC8309_Linux_BSP.zip".
hi ufedor,
Thanks for giving prompt response. can you please explain me that "low boot" means, and according to my custom board i am using 32MB flash with base address fe00_0000. i have programmed my boot code(uboot) at starting flash address(0xfe000000) with the u-boot.bin binary from TWRMPC8309_Linux_BSP.zip.
The "low boot" means that U-Boot is configured/compiled to be programmed to the lowest flash addresses.
You wrote:
> i have programmed my boot code(uboot) at starting flash address(0xfe000000)
> with the u-boot.bin binary from TWRMPC8309_Linux_BSP.zip.
In this case you have to use CFG_RESET_SOURCE[0:3]=0000.
ufedor But I am using cfg_reset_source[0:3]=1000 as per the reference board(MPC830twr Rev.D) preset values.
So According to my preset values of CFG_RESET_SOURCE[0:3]=1000
RCWLR [0:31] = 0x42040003 & RCWHR [0:31] = 0xA460000
If I want to use CFG_RESET_SOURCE[0:3]=1000 value then where the boot code has to be programmed on flash. Otherwise can you please tell me what are the modifications I need to done in u-boot.