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/Makefile.inc b/common/Makefile.inc
index 47ef35b..175c152 100644
--- a/common/Makefile.inc
+++ b/common/Makefile.inc
@@ -52,6 +52,8 @@
 
 CONFIG_GFX_GMA_PCH		?= No_PCH
 CONFIG_GFX_GMA_PANEL_2_PORT	?= Disabled
+CONFIG_GFX_GMA_PCI_DEV		?= (0, 2, 0)
+CONFIG_GFX_GMA_OVERRIDE_MMCONF	?= 0
 
 CONFIG_GFX_GMA_GENERATION	:= $(call strip_quotes,$(CONFIG_GFX_GMA_GENERATION))
 CONFIG_GFX_GMA_CPU		:= $(call strip_quotes,$(CONFIG_GFX_GMA_CPU))
@@ -87,6 +89,8 @@
 	    -e's/<<PANEL_1_PORT>>/$(CONFIG_GFX_GMA_PANEL_1_PORT)/' \
 	    -e's/<<PANEL_2_PORT>>/$(CONFIG_GFX_GMA_PANEL_2_PORT)/' \
 	    -e's/<<ANALOG_I2C_PORT>>/$(CONFIG_GFX_GMA_ANALOG_I2C_PORT)/' \
+	    -e's/<<PCI_DEV_ADDRESS>>/$(CONFIG_GFX_GMA_PCI_DEV)/' \
+	    -e's/<<OVERRIDE_MMCONF_BASE>>/$(CONFIG_GFX_GMA_OVERRIDE_MMCONF)/' \
 	    -e's/<<DEFAULT_MMIO_BASE>>/$(CONFIG_GFX_GMA_DEFAULT_MMIO)/' \
 	    -e's/<<IGNORE_STRAPS>>/$(CONFIG_GFX_GMA_IGNORE_PRESENCE_STRAPS)/' \