Emulating an embedded firmware
As we attempt to emulate real-time firmware, such as a baseband kernel running on an ARM Cortex-R7 processor, we will encounter the challenges of creating an emulator that faithfully replicates the original execution as closely as possible.
If we download an example firmware image from https://github.com/grant-h/ShannonFirmware/raw/master/modem_files/CP_G973FXXU3ASG8_CP13372649_CL16487963_QB24948473_REV01_user_low_ship.tar.md5.lz4 and extract it, we can use xxd -g 4
on modem.bin
to understand the basic structure of the firmware of the baseband modem of the G973 Phone (Galaxy S10). The text in bold shows the meaning of the various blocks. The TOC
section (starting with the 544f43
ASCII) uses the first 96 bits (12 bytes) for the entry name, and the next 4 bytes are used for the file offset within modem.bin
. Following that, we have the 0x800040
value, which is the load address in memory; since we have it in little endian, the load address will eventually...