Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30881 )
Change subject: nb/intel/i945: Reduce pcidev_on_root() calls ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/30881/1/src/northbridge/intel/i945/northbrid... File src/northbridge/intel/i945/northbridge.c:
https://review.coreboot.org/#/c/30881/1/src/northbridge/intel/i945/northbrid... PS1, Line 87: if (!(reg16 & 2)) {
Not sure I understand what you mean here. […]
It depends a lot on how i945 handles the stolen memory, e.g. what happens when the CPU tries to access it anyway? Also, not well documented is whether the memory is stolen even with 0:2.0 disabled in the DEVEN register (what we do too). But there is trouble beside this, see below.
We have two cases when we disable the IGD. 1. in romstage if a VGA adapter is found in the PEG slot. 2. in ramstage if a VGA adapter is found in another slot and ONBOARD_VGA_IS_PRIMARY is unset.
The 2. case seems borked. It hides IGD through DEVEN and that shifts cbmem_top(). I'd say we shouldn't hide IGD in ramstage, dis- abling VGA decoding should be enough for !ONBOARD_VGA_IS_PRIMARY. Then we could change the check here to `DEVEN & x`.
Still needs somebody to test the changes... I might still have the original hardware at work for that this was written, though little time.