I understand from the Z7-20 reference manual (https://reference.digilentinc.com/reference/programmable-logic/zybo-z7/reference-manual#quad-spi_flash) that there's a 48bit unique identifier within the OTP region of the QSPI flash. What is the recommended way of reading this within a petalinux project for use as part of an Ethernet MAC? Modifying the bootloader? Can it be done from userspace? I've seen references to u-boot being able read this value and using it to set the MAC, but I haven't quite figured out how to enable this.
I can see that https://github.com/Digilent/Petalinux-Zybo-Z7-20 claims to do this exact thing, read the identifier and set the MAC, but I'm somewhat at a loss for how this is accomplished, and how I can add this functionality to my own 2018.2 petalinux project.
I believe I'm able to read the QSPI's main array, in u-boot using the sf utility, and in userspace using the mtd_debug utility, but I'm not sure if/how either of these tools are able to read the OTP areas. From the doc (https://www.cypress.com/file/448601/download) it looks like the OTP read command is separate from the other read commands and refers to a different address space.
I feel like I've overlooked something obvious. Any direction would be appreciated.