OpenSBI Bug
I'm opening a bug to track progress on an issue my FPGA/ImperasDV lockstep emulator discovered.
The bug becomes visible when checking the crc32 of the device tree in the Linux kernel. The length of the crc32 is too long, 0xda5 bytes rather than the correct 0x9a5. Interesting, this passes simulation because our RAMs model un-initialized memory to read 0 and so does ImperasDV. Thus ImperasDV sees agreement between the two and the crc32 computes 0 when the input is 0 so the computation passes. However the FPGA is real hardware and reads a random value past the length of the device tree so ImperasDV mismatches.
I've repeated this on both the old and new (Kernel 6.12.8) versions of buildroot.
OpenSBI copies the length 0x9a5 twice to the same location in memory (PA 0x822004). The first time is the correct value 0x9a5, but the second time is the wrong value 0xda5.