
I have an embedded planet EP8555 board where in board/ep85xxm there is a config.mk and a u-boot.lds. I have made the following changes to move the u-boot image from its default to slightly lower in flash to have a second copy to work with. For some reason, the first malloc call panics, says "bad trap" and the original image then boots, not my test image. Here are the changes I made:
Config.mk TEXT_BASE was 0xFFF80000, change to 0xFFE00500 u-boot.lds .resetvec was 0xFFFFFFFC, change to 0xFFE00000 .bootpg was 0xFFFFF000, change to 0xFFE00100
Using a BDI-2000, I can flash this new image and run it by going "go 0xffe00000". It runs for a while, but has trouble with malloc as I said.
It appears that the malloc area was originally set to 0x03F9E000, but the first bin_at shows the av_ array at 0x03FEEC8C.
So, I think there is another constant I need to change related to CFG_MONITOR_BASE, TEXT_BASE or something similar.
Here is an edited serial print of the current state.
U-Boot 1.1.4 (Oct 25 2006 - 08:33:28) CPU: 8555, Version: 1.1, (0x80790011) Core: E500, Version: 2.0, (0x80200020) Clock Configuration: CPU: 833 MHz, CCB: 333 MHz, DDR: 166 MHz, LBC: 83 MHz L1: D-cache 32 kB enabled I-cache 32 kB enabled Board: EP8555M PCI: 64 bit, 66 MHz, monarch, local arbiter enabled I2C: ready DRAM: Initializing DDR: 64 MB Top of RAM usable for U-Boot at: 04000000 Reserving 215k for U-Boot at: 03fc0000 Reserving 136k for malloc() at: 03f9e000 Reserving 84 Bytes for Board Info at: 03f9dfac Reserving 72 Bytes for Global Data at: 03f9df64 Stack Pointer at: 03f9df48 New Stack Pointer is: 03f9df48 Now running in RAM - U-Boot at: 03fc0000 FLASH: flash detect cfi CFK about to calloc in NewHandle CFK mALLOc;is_small_request bytes:28 nb=32 idx=4 CFK bin_at(0):03FEEC8C bin_at(1):03FEEC94 bin_at(125):03FEF074 bin_at(126):03FEF07C CFK q=03FEECAC victim=081AE7AC victim_size=819C000C Bad trap at PC: 3fc4a64, SR: 21200, vector=d00
Charles