Mike Banon has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38214 )
Change subject: asus/am1i-a: fix the VGA-related PCI resource allocation problems ......................................................................
Patch Set 6:
Patch Set 4:
- You should check MTRR allocations before/after the change. If it runs out of registers, that can be bad for performance (depending on whether the CPU supports PAT).
I see these messages at Linux kernel log:
mtrr: your CPUs had inconsistent variable MTRR settings mtrr: probably your BIOS does not setup all CPUs. mtrr: corrected configuration.
However, these messages were present even without this fix, as I could see from the earlier board_status reports, so it's not a fault of this fix.
- A modern platform should support memory remapping (i.e. can address the DRAM behind the hole above 4GiB). In that case, you can add a safety margin at no cost, e.g. 0xc0000000, or even 0x80000000.
You are right, at another board A88XM-E I've discovered that 0x28 and above is working perfectly, while 0x24 and below gives the not-bootable builds. Decided to pick 0x40 for safety and it works well on G505S / AM1I-A / A88XM-E. Hopefully the people with the other boards will also boot test the similar changes. Thank you very much for inspiring this research.
- Why is this handled at the mainboard level?
Thought that a tiny 2-line change for each individual board, would be easier to get merged than a single massive one which touches many boards. But, seeing the success of an older https://gitlab.miaounyan.eu/piernov/coreboot/commit/27c3dcb522722026479462dd... which landed only to AMD PI boards, maybe I should try a similar approach for AGESA fam14/15/16.
- Please also mention in the commit message that this is about large MMIO resources. Not really VGA specific.
Maybe I should start it from scratch with a single change touching many boards. Will try to take in attention your this note and the other too, thank you very much for your feedback.