Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41375 )
Change subject: nb/intel/sandybridge: Do not hardcode resource indices ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/41375/1/src/northbridge/intel/sandy... File src/northbridge/intel/sandybridge/northbridge.c:
https://review.coreboot.org/c/coreboot/+/41375/1/src/northbridge/intel/sandy... PS1, Line 138: 3
Because I want to preserve the original behavior, and that's what the code starts off with. […]
I know you just preserve the behavior. I'm asking questions anyway :-P probably should have done that on the previous commit which introduced the oddity instead of giving it a premature +2. But it became more visible here... and I didn't expect things to be merged out of order (started a discussion which devices should reserve these resources on the first commit).
I guess it has to do with the resources added in pci_*_read_resources() that is called first. None of them seem to add exactly the resources 0..2, though. Maybe we should have a look at some very old log, it might give us a clue what the first 3 resources were.