Closed NewDwarf closed 2 years ago
What we called CPU Registers
are the ones defined by the Cortex-m3 architecture (there are public). HW registers
are custom ones and correspond, as you mentioned to timers, watchdog, etc.
You will find some symbols in the Ghidra loader (symbols.xml). We don't plan to release more details for now.
Looks promising. Thanks!
SYMBOL ADDRESS="40224060" NAME="HW_KEY"
Is it the SoC OTP storage of the 768 bit public key? For RSA it looks very small but for ECC very big.
Just learned that it is RSA-3072 and the HW_KEY register (0x40224060) and next 96 DWORD-length registers are used to tmp keep the public RSA key stored directly in the BootRom. So, these registers are RW.
The code section of the BootRom is pretty small. The functions are short and very simple for reviewing. The main challenge in disassembling is a large number of specific HW and CPU registers but the symbols.xml
gives a great insight of the purpose of the specific register/s.
Additionally, I created the SRAM
segment and load the dumped SRAM area from the real device. It helps to achieve better browsing in the disassembling listing and keeping the execution context in mind.
Did you/your team try to run the BootRom in the ARM emulator (Qemu)? I think it would be nice environment for fuzz testing. Probably, implementing of HW and CPU registers in Qemu is not a big challenge for your team.
Yes we played a bit with emulation, but we did not emulated these specific hw devices. It could definitely be interesting to do so.
I began reversing of the dumped BootROM. If I correctly defined, the entry point of the BootROM is:
The BootROM actively uses the high addresses 0xe0000000 ... These addresses are defined as
CPU registers
. What are actually these registers?And another one high address range is in 0x40000000 ... defined as
HW registers
. Whether I correctly understand that it is timers, watchdog, global control registers to configure, say, access to the memory regions, RSA HW accelerator registers, etc...?If you have already defined purpose of some HW and CPU registers, could you share it, please?