mgottschlag/vctools

Does not understand NOP op-code

Opened this issue · 2 comments

Pointed this at a recent Raspberry Pi "bootcode.bin" and it existed fast with an "illegal instruction" exception at the first instruction in the file - a NOP (0x00000000).

Note: in both the bootcode.bin currently in the RPi Firmware repo and the one in the most recent NOOBS image there are 256 NOP instructions - 512 bytes of data - before the actual instruction stream starts at 0x200 and it is used in some timing functions in the code itself. Not having this instruction implemented is... surprising.

Sorry, I do not have no intentions to maintain this tool anymore. I will merge sensible pull requests though.

Some notes:

  • If I remember correctly (it's been 6 years since the last time I touched that code), the emulator in emulator/ was an early experiment. I later used the code in tracer/ to let an emulator run on the pi for better speed.
  • The code in tracer/ expects 0x0001 as NOP, which is consistent with the reverse engineered documentation at https://github.com/hermanhermitage/videocoreiv/wiki/VideoCore-IV-Programmers-Manual. The VideoCore CPU mostly uses 16-bit opcodes - are you sure that you are not mixing the VideoCore and ARM CPUs up?

Yeah, I got confused - NOP is 1, Breakpoint is 0 - thats a mistake on my part