What is the memory address information I should plug into IDA for this BIN file?
To disassemble a BIN file extracted from firmware.sb
This BIN file contains the low level board initialization, SDRAM clocks, power, Interrupt Controller, LCD, duart, and more.
I need the values passed to the LCD, duart and other to know what exact hardware my board uses and to know if firmware for an earlier board will work on a later board.
I will use these values to create linux drivers at a later date. (LCD)
Ref this question.
Board initialization sequence:
Part of the this BIN file is loaded into the on chip RAM (OCRAM) for minimal board init. This code is executed and will init the rest of the board most important for this question the SDRAM. More of this BIN file will load into the SDRAM then execute and init the rest of the board. This BIN will then load and pass control to the OS.
Basically a boot loader.
Here is a simple example of this using my custom u-boot and kernel. Oversimplified and information removed for brevity. Actual BIN file info.
LOAD addr=0x00001000 len=0x00001ef4
CALL addr=0x00001000 arg=0x00000000
LOAD addr=0x40002000 len=0x000368ec
LOAD addr=0x40600000 len=0x002ed3c8
LOAD addr=0x40a00000 len=0x00002b1e
CALL addr=0x40002000 arg=0x00000000
This is part of the memory map for this μP.
OCRAM 0x00000000 - 0x00007FFF 32KB
SDRAM 0x40000000 - 0x5FFFFFFF 512MB
Peripherals 0x80000000 - 0xBFFFFFFF
Example of Peripherals:
CLKCTRL 0x80040000 - 0x80041FFF
DBGUART 0x80070000 - 0x80071FFF
The μP is a Freescale mx23 or imx233.
This board has 16MB SDRAM 0x40000000 - 0x01000000
In the “ARM architecture options” dialog I set:
Base architecture as ARMv5TEJ.
VFP instructions as NONE
Thumb instructions as Thumb
In the “Disassembly memory organization” dialog I am unsure what to set.
Is the RAM section my SDRAM, 0x40000000 - 0x01000000?
Is the ROM section my OCRAM, 0x00000000 - 0x00007FFF?
What about Input file loading address, file offset, loading size?
Would the loading size be the 16MB of my SDRAM?
Where does the peripherals addresses go?