Mike Banon has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38224 )
Change subject: [TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems ......................................................................
[TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems
This workaround helps to avoid the PCI resource allocation problems which happen if a discrete VGA adapter has been plugged into APU1 board with PCIe-to-MiniPCIe converter. It does not bring any downsides if there is no discrete VGA adapter.
Signed-off-by: Mike Banon mikebdp2@gmail.com Change-Id: Ie12611928169c68c7d44f0f55dd03756d663933a --- M src/mainboard/pcengines/apu1/OemCustomize.c 1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/38224/1
diff --git a/src/mainboard/pcengines/apu1/OemCustomize.c b/src/mainboard/pcengines/apu1/OemCustomize.c index 9febec7..987b4e1 100644 --- a/src/mainboard/pcengines/apu1/OemCustomize.c +++ b/src/mainboard/pcengines/apu1/OemCustomize.c @@ -115,5 +115,7 @@
void board_BeforeInitPost(struct sysinfo *cb, AMD_POST_PARAMS *InitPost) { + /* Set to 0xD0 instead of 0xE0 to avoid the PCI resource allocation problems. */ + InitPost->MemConfig.BottomIo = 0xD0; InitPost->MemConfig.PlatformMemoryConfiguration = (PSO_ENTRY *)PlatformMemoryTable; }
Mike Banon has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38224 )
Change subject: [TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems ......................................................................
Patch Set 1:
Wonder if you have both PCIe-to-MiniPCIe adapter and a spare discrete GPU to test this change.
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38224 )
Change subject: [TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems ......................................................................
Patch Set 1: Code-Review+1
Hmm. Since this is a router board nobody cared about graphics... Without the GPU and the converter, there is not much I can do. At least I can say that the BottomIO can be moved if there is not enough space for devices, so it should be ok. From Kconfig help of the BOTTOMIO_POSITION from binaryPI:
If PCI peripherals with big BARs are connected to the system the bottom of the IO must be decreased to allocate such devices.
Mike Banon has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38224 )
Change subject: [TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems ......................................................................
Patch Set 1:
Patch Set 1: Code-Review+1
Hmm. Since this is a router board nobody cared about graphics... Without the GPU and the converter, there is not much I can do. At least I can say that the BottomIO can be moved if there is not enough space for devices, so it should be ok. From Kconfig help of the BOTTOMIO_POSITION from binaryPI:
If PCI peripherals with big BARs are connected to the system the bottom of the IO must be decreased to allocate such devices.
Please test to confirm there are no downsides of this change for a bare APU1 (without a discrete GPU). The same change has been successfully tested on fam15h and fam16h boards that I have (A88XM-E and AM1I-A), would be nice to know that it doesn't break the things for fam14h as well.
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38224 )
Change subject: [TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems ......................................................................
Patch Set 1: Code-Review+2
Tested with Debian and kernel 4.14.50, no downsides spotted.
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38224 )
Change subject: [TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/38224/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/38224/1//COMMIT_MSG@11 PS1, Line 11: converter. It does not bring any downsides if there is no discrete VGA adapter. What is the error messages?
Tested how?
Please describe the fix in more detail?
Hello Denis 'GNUtoo' Carikli, Piotr Król, build bot (Jenkins), Michał Żygowski, Arkadiusz Cichocki,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38224
to look at the new patch set (#2).
Change subject: [TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems ......................................................................
[TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems
This workaround helps to avoid the PCI resource allocation problems which happen if a discrete VGA adapter has been plugged into APU1 board with PCIe-to-MiniPCIe converter. It does not bring any downsides if there is no discrete VGA adapter.
If PCI peripherals with big BARs are connected to the system the bottom of the IO must be decreased to allocate such devices. Otherwise there could be i.e. a "Fatal error during GPU init".
Signed-off-by: Mike Banon mikebdp2@gmail.com Change-Id: Ie12611928169c68c7d44f0f55dd03756d663933a --- M src/mainboard/pcengines/apu1/OemCustomize.c 1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/38224/2
Mike Banon has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38224 )
Change subject: [TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/38224/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/38224/1//COMMIT_MSG@11 PS1, Line 11: converter. It does not bring any downsides if there is no discrete VGA adapter.
What is the error messages? […]
Error messages example:
radeon 0000:00:01.0: Fatal error during GPU init [TTM] Trying to take down uninitialized memory manager type 1 [drm:radeon_get_bios [radeon]] *ERROR* ACPI VFCT image header truncated
Test example:
Successfully boot a coreboot --> SeaBIOS --> Linux without a discrete VGA adapter installed, then plug in a discrete VGA and repeat the experiment: Linux will freeze shortly after displaying these messages. However, with this fix, everything is booting and working OK.
Although I didn't test on pcengines/apu1 (hence a [TESTME] label), I've discovered this problem and solution on 3 other different AGESA boards (AM1I-A, A88XM-E and G505S - although for G505S this change alone isn't enough), so I believe the same solution should apply for the other AGESA boards as well - and committed a lot of these "[TESTME] ... fix the VGA-related PCI resource allocation problems" changes.
Hello Denis 'GNUtoo' Carikli, Piotr Król, build bot (Jenkins), Michał Żygowski, Arkadiusz Cichocki,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/38224
to look at the new patch set (#3).
Change subject: [TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems ......................................................................
[TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems
This workaround helps to avoid the PCI resource allocation problems which happen if a discrete VGA adapter has been plugged into APU1 board with PCIe-to-MiniPCIe converter. It does not bring any downsides if there is no discrete VGA adapter.
If PCI peripherals with big BARs are connected to the system the bottom of the IO must be decreased to allocate such devices. Otherwise there could be i.e. a "Fatal error during GPU init".
Signed-off-by: Mike Banon mikebdp2@gmail.com Change-Id: Ie12611928169c68c7d44f0f55dd03756d663933a --- M src/mainboard/pcengines/apu1/OemCustomize.c 1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/38224/3
Mike Banon has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38224 )
Change subject: [TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems ......................................................................
Patch Set 3:
(1 comment)
It'd be nice if you could boot test the latest revision of this patch set (BottomIo changed from 0xD0 to 0x40). Hopefully it still works without any downsides! On A88XM-E board 0xD0-0x28 are working perfectly, while 0x24 and below can't boot to SeaBIOS.
https://review.coreboot.org/c/coreboot/+/38224/3/src/mainboard/pcengines/apu... File src/mainboard/pcengines/apu1/OemCustomize.c:
https://review.coreboot.org/c/coreboot/+/38224/3/src/mainboard/pcengines/apu... PS3, Line 118: /* Set to 0x40 instead of 0xE0 to avoid the PCI resource allocation problems. */ : InitPost->MemConfig.BottomIo = 0x40; See CB:30987 comment here for more info about this change from 0xD0 to 0x40 - https://review.coreboot.org/c/coreboot/+/30987/45/src/mainboard/asus/a88xm-e...
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38224 )
Change subject: [TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems ......................................................................
Patch Set 3: Code-Review-1
Patch Set 3:
(1 comment)
It'd be nice if you could boot test the latest revision of this patch set (BottomIo changed from 0xD0 to 0x40). Hopefully it still works without any downsides! On A88XM-E board 0xD0-0x28 are working perfectly, while 0x24 and below can't boot to SeaBIOS.
You cannot lower it however you like it, because it changes the memory map. This setting should be used carefully with good understanding of what it does.
Mike Banon has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38224 )
Change subject: [TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems ......................................................................
Patch Set 3:
You cannot lower it however you like it, because it changes the memory map. This setting should be used carefully with good understanding of what it does.
Theoretically this setting could badly affect MTRR and system performance, so I'm going to check if there's any difference at Linux Kernel messages between 0xD0, 0x80 and 0x40 settings. However, I can do that only for fam15h and fam16h boards, don't have any fam14h. As APU1 is fam14h, it would be nice if you could do this at least for 0x40. I hope for a common default setting for fam14/15/16 boards, and this change above is going to be superseded by CB:38472
Mike Banon has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/38224 )
Change subject: [TESTME]pcengines/apu1: fix the VGA-related PCI resource allocation problems ......................................................................
Abandoned
Superseded by CB:38472 (amd/agesa: Make BottomIo position configurable)