Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31567 )
Change subject: soc/cavium/cn81xx: Enable RNG for DRAM init ......................................................................
Patch Set 2:
(6 comments)
Patch Set 1:
(2 comments)
So DRAM init didn’t work before?
It worked fine. There are some extended DRAM tests that rely on the RNG. Those are disabled by default.
https://review.coreboot.org/#/c/31567/1/src/soc/cavium/cn81xx/sdram.c File src/soc/cavium/cn81xx/sdram.c:
https://review.coreboot.org/#/c/31567/1/src/soc/cavium/cn81xx/sdram.c@47 PS1, Line 47: #define BDK_RNM_RANDOM 0x100000
I'd remove indentation and move them outside function body. […]
Done
https://review.coreboot.org/#/c/31567/1/src/soc/cavium/cn81xx/sdram.c@50 PS1, Line 50: #ifdef __SIMPLE_DEVICE__
You should not need this, unless you really need to build this file for ramstage.
It's compiled in ramstage, but not used.
https://review.coreboot.org/#/c/31567/1/src/soc/cavium/cn81xx/sdram.c@51 PS1, Line 51: pci_devfn_t dev = pci_locate_device_on_bus(0xa018177d, 2);
See comments above pci_locate_device() implementation. We tend to use PCI_DEV() here usually. […]
Done
https://review.coreboot.org/#/c/31567/1/src/soc/cavium/cn81xx/sdram.c@67 PS1, Line 67: /**
Just one asterisk?
Done
https://review.coreboot.org/#/c/31567/1/src/soc/cavium/cn81xx/sdram.c@76 PS1, Line 76: /* Errata (RNM-22528) First consecutive reads to RNM_RANDOM return same
Please use the allowed comment style for concise comments.
Done
https://review.coreboot.org/#/c/31567/1/src/soc/cavium/cn81xx/sdram.c@82 PS1, Line 82: printk(BIOS_DEBUG, "RNG: RANDOM %llx\n", reg);
BIOS_SPEW?
Done