On Tue, 2005-08-16 at 10:38 +0800, Steven_cheng wrote: > Dear Grary, > > Sorry, I have two questions about the ROMRAM. > Because I have tested the image of Cogent csb281(PowerPC 8245) with ROMRAM, > It starts at 0xfff00100 but then it jumps to 0x00003400, then it fails. > Because it imgae is burned into rom (0xffff0000-0xfff80000). > When the device powers up, the CPU starts at 0xfff00100, it refers the op > code and runs at 0xfff00100 > 0xfff00100 : 3c60000 > 0xfff00104 : 6063400 > 0xfff00108 : 7c6803a6 > 0xfff0010c : 4e800020 > Then, it jumps to 0x3400. > Question 1 : Why ?? I thinks it should rums initial procedure between > 0xfff00000 and 0xfff80000 . > Does the Cogent cbs281 image takes mistake with > ROMRAM mode ?? > Question 2 : I only can find the code to copy the rom code to ram, But > I can not find the jump from ROM to RAM. > Is it in vector.S or csb281.S ?? Or other files ?? > > In my current platform, it can work with ROM and RAM type, but it fails with > ROMRAM. > So I have confuse the cbs281 image with ROMRAM. The attached files are the > Cogent csb281 > image and elf files with ROMRAM mode.
You need to set CYGSEM_HAL_POWERPC_RESET_USES_JUMP for this to work. > > Thank you a lot. > > Steven Cheng > > > > > > > > StarupMode | Vector Address | Reset Vector Address > > > --------------------------------------------------------------- > > > ROM | 0xFFF00000 | 0xFFF00100 > > > ROMRAM | 0x0 | 0x100 > > > RAM | 0x0 | 0x100 > > > > > Do you understand how the "start from RESET" works on this > platform? > > Try reading the documentation (hardware manuals) and you'll see that > > after RESET, *ALL* addresses map only onto the FLASH, so it doesn't > > really matter what address the ROMRAM version is linked at. It starts > > executing, just like the ROM version, at 0x100 into the code. The > > next thing that gets done is to set up the hardware to actually be > > able to access the RAM, etc. Once this is done, the code is copied > > from the FLASH (aka ROM) to RAM and then execution continues from > > > that RAM location. Thus the code needs to be linked at RAM addresses > > even though it starts out life in ROM (hence the ROMRAM moniker) > > > > In the case of the ROM version, it actually executes from the ROM > > (FLASH), so it must be linked to those addresses. > > > -- > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
