gma: Allow to configure PCI device, override MMConf
In virtualized environments (e.g. PCI pass-through), it's possible
that the guest-visible PCI address differs from the actual hardware
address. Similarly, the MMConf/ECAM space might not be fully mapped
into the guest, so allow to override that as well.
Change-Id: Icc286b5db8c2d9098fa99307d449b46fccdec4dc
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.sourcearcade.org/c/libgfxinit/+/536
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Thomas Heijligen <src@posteo.de>
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb
index 3ad37e6..fc8005f 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -78,7 +78,9 @@
USBC3 => "USBC3 ",
USBC4 => "USBC4 ");
- package Dev is new HW.PCI.Dev (PCI.Address'(0, 2, 0));
+ package Dev is new HW.PCI.Dev
+ (Dev => Config.PCI_Dev,
+ MMConf_Base => Config.Override_MMConf_Base);
package Display_Controller renames Pipe_Setup;