gma: Add a HW.PCI.Dev for dynamic MMIO setup
Remove `MMIO_Base` option from Initialize() and try to derive it
using libhwbase' PCI mechanism instead.
Change-Id: Iacd4d098954bb96c1c6b40fdfb2636191d9517c7
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20600
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/hw-gfx-gma-registers.adb b/common/hw-gfx-gma-registers.adb
index e240152..9e52c78 100644
--- a/common/hw-gfx-gma-registers.adb
+++ b/common/hw-gfx-gma-registers.adb
@@ -290,11 +290,15 @@
----------------------------------------------------------------------------
- procedure Set_Register_Base (Base : Word64)
+ procedure Set_Register_Base (Base : Word64; GTT_Base : Word64 := 0)
is
begin
Regs.Set_Base_Address (Base);
- GTT.Set_Base_Address (Base + Config.GTT_Offset);
+ if GTT_Base = 0 then
+ GTT.Set_Base_Address (Base + Config.GTT_Offset);
+ else
+ GTT.Set_Base_Address (GTT_Base);
+ end if;
end Set_Register_Base;
end HW.GFX.GMA.Registers;