Reading TRNG_RAW

Discussion created by mccarl on Oct 1, 2019

I am interested in obtaining raw output for NIST's SP800-90B entropy analysis. As i understand, TRNG_RAW can be accessed via MMIO (i.e. reading /dev/mem) on a linux platform. I found a short script that someone used to read TRNG_RAW (below), but it does not work for me. I believe i may have the base address incorrect, but i cannot determine if that is the case or, if not, what the address should be. Unfortunately, debugger is not available.


python3 -c 'import os; f ="/dev/mem", os.O_RDONLY); o = open("AMD_TRNG_RAW_8bit.bin", "wb"); o.write(b"".join([os.pread(f, 4, 0xefc0002c)[:2] for x in range(1000000//2)])); o.close()'


is there documentation available that would help?