Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44121 )
Change subject: nb/intel/sandybridge: Refactor `get_pcie_bar` ......................................................................
Patch Set 4:
(2 comments)
https://review.coreboot.org/c/coreboot/+/44121/4/src/northbridge/intel/sandy... File src/northbridge/intel/sandybridge/northbridge.c:
https://review.coreboot.org/c/coreboot/+/44121/4/src/northbridge/intel/sandy... PS4, Line 50: return 0;
It might be personal preference but I think return 1 on error is more common.
The other instances of `decode_pcie_bar` return 0 on failure. I'd rather be consistent with the rest of the northbridges. Did you notice a certain repeating pattern across all of them? 😄
https://review.coreboot.org/c/coreboot/+/44121/4/src/northbridge/intel/sandy... PS4, Line 143: decode_pcie_bar
if this return an 'error' it should probably die given the pci mmconfig accesses done pretty much ev […]
I agree. It shouldn't error out because we're programming MMCONF in the bootblock. I'd rather clean this up later, though.