Shop OBEX P1 Docs P2 Docs Learn Events
ROM — Parallax Forums

ROM

I see that the ROM is hidden after boot. I recommend that the ROM be relocated instead of hidden, the ROM code will contain routines that should be reused by user code to prevent bugs in re-implementation (cryptographic hashing functions).

The AES128 decryption routine can be implemented in a second stage bootloader, so encryption routines don't need to be in ROM.

Comments

  • pedward wrote: »
    I see that the ROM is hidden after boot. I recommend that the ROM be relocated instead of hidden, the ROM code will contain routines that should be reused by user code to prevent bugs in re-implementation (cryptographic hashing functions).

    The AES128 decryption routine can be implemented in a second stage bootloader, so encryption routines don't need to be in ROM.

    My recollection is that the ROM isn't actually "visible" in the first place, but instead streamed in at startup time (via a combination of COGID and in internal counter). Chip mentioned that it would be difficult (but not impossible) to access the ROM (again, using COGID) in user code. It seems to me that a second stage bootloader could relocate that code if you wanted to re-use some of that functionality.
  • kwinnkwinn Posts: 8,697
    Seairth wrote: »
    pedward wrote: »
    I see that the ROM is hidden after boot. I recommend that the ROM be relocated instead of hidden, the ROM code will contain routines that should be reused by user code to prevent bugs in re-implementation (cryptographic hashing functions).

    The AES128 decryption routine can be implemented in a second stage bootloader, so encryption routines don't need to be in ROM.

    My recollection is that the ROM isn't actually "visible" in the first place, but instead streamed in at startup time (via a combination of COGID and in internal counter). Chip mentioned that it would be difficult (but not impossible) to access the ROM (again, using COGID) in user code. It seems to me that a second stage bootloader could relocate that code if you wanted to re-use some of that functionality.
    Would there be enough useful code in the bootloader to make that worthwhile?
  • Depends. The crypt routine may well be useful, as might be routines from the monitor, which being in RAM now, is likely to be extended by user code. If the on chip PASM tools make it, there may be uses there too.

Sign In or Register to comment.