I couldn't agree with you more.. The start up makes no sense..
Yes, I'm starting in Arm mode, as I haven't
emulated Thumb mode yet and am hoping this project doesn't use it.
FYI - the mov instructions aren't the reset code.. The very first code block found at address 0 is an LDR R15 command which as would be expected jumps the PC into code addressed past the exception vector table. It is at this first code block that the MOV commands are found. Normally I would have suspected that the emulated cpu might be miscalculating the jump, but using IDAPRO along with MAME's (limited but functional for this purpose ARM2/3 emulation) confirms that the jump is correct.
Just for kicks, I indeed had tried to reverse the endianess and the reset vector code @ address 0 made no sense at all.
The rest of the executing code in most places seems to make some sense as I can see the cpu copying expection vectors from the boot up rom into the cpu's ram before the code tells the AT91 cpu to shift ram into page 0.
Just thought the whole thing was kind of weird, but I assume that the code is otherwise operating properly, at least as far as I have traced it.
> That startup doesn't make any sense. If the entry point is correct, it seems
> like you are disassembling wrong data.
> Are you starting in ARM or in Thumb mode? the processor always start in ARM
> Also you must be careful with the endianness of the read values.