[coreboot-gerrit] Change in coreboot[master]: WIP: Update libhwbase + libgfxinit

Nico Huber (Code Review) gerrit at coreboot.org
Sun Jul 16 15:45:30 CEST 2017


Nico Huber has uploaded this change for review. ( https://review.coreboot.org/20606


Change subject: WIP: Update libhwbase + libgfxinit
......................................................................

WIP: Update libhwbase + libgfxinit

Change-Id: I001ba973d864811503410579fd7ad55ab8612759
Signed-off-by: Nico Huber <nico.h at gmx.de>
---
M 3rdparty/libgfxinit
M 3rdparty/libhwbase
M src/Kconfig
M src/drivers/intel/gma/hires_fb/gma.adb
M src/drivers/intel/gma/text_fb/gma.adb
M src/lib/Kconfig
M src/lib/Makefile.inc
7 files changed, 52 insertions(+), 28 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/06/20606/1

diff --git a/3rdparty/libgfxinit b/3rdparty/libgfxinit
index fb4f8ce..1577cb8 160000
--- a/3rdparty/libgfxinit
+++ b/3rdparty/libgfxinit
@@ -1 +1 @@
-Subproject commit fb4f8ce26a05c2304367c066b806519941658373
+Subproject commit 1577cb83f9f0c494099e5dda96eb3e81438bfc07
diff --git a/3rdparty/libhwbase b/3rdparty/libhwbase
index 3bf6759..8421073 160000
--- a/3rdparty/libhwbase
+++ b/3rdparty/libhwbase
@@ -1 +1 @@
-Subproject commit 3bf6759dc09d27c06b3533fd536e667356853d3d
+Subproject commit 84210735417763ecdcf0c5e4515bc57bc9baf218
diff --git a/src/Kconfig b/src/Kconfig
index 637f575..701b2b4 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -1145,20 +1145,6 @@
 	  required and not implemented if a weak implementation is found in the
 	  resulting image.
 
-config RAMSTAGE_ADA
-	def_bool n
-	help
-	  Selected by features that use Ada code in ramstage.
-
-config RAMSTAGE_LIBHWBASE
-	def_bool n
-	select RAMSTAGE_ADA
-	help
-	  Selected by features that require `libhwbase` in ramstage.
-
-config HWBASE_DYNAMIC_MMIO
-	def_bool y
-
 config UNCOMPRESSED_RAMSTAGE
 	bool
 
diff --git a/src/drivers/intel/gma/hires_fb/gma.adb b/src/drivers/intel/gma/hires_fb/gma.adb
index 7fe4e12..34f1751 100644
--- a/src/drivers/intel/gma/hires_fb/gma.adb
+++ b/src/drivers/intel/gma/hires_fb/gma.adb
@@ -68,9 +68,7 @@
    begin
       lightup_ok := 0;
 
-      HW.GFX.GMA.Initialize
-        (MMIO_Base   => mmio_base,
-         Success     => success);
+      HW.GFX.GMA.Initialize (Success => success);
 
       if success then
          ports := Mainboard.ports;
@@ -98,15 +96,19 @@
 
             HW.GFX.GMA.Dump_Configs (configs);
 
-            HW.GFX.GMA.Setup_Default_GTT (fb, phys_fb);
-            HW.GFX.Framebuffer_Filler.Fill (linear_fb, fb);
+            HW.GFX.GMA.Setup_Default_FB
+              (FB       => fb,
+               Clear    => true,
+               Success  => success);
 
-            HW.GFX.GMA.Update_Outputs (configs);
+            if success then
+               HW.GFX.GMA.Update_Outputs (configs);
 
-            linear_fb_addr := linear_fb;
-            fb_valid := true;
+               linear_fb_addr := linear_fb;
+               fb_valid := true;
 
-            lightup_ok := 1;
+               lightup_ok := 1;
+            end if;
          end if;
       end if;
    end gfxinit;
diff --git a/src/drivers/intel/gma/text_fb/gma.adb b/src/drivers/intel/gma/text_fb/gma.adb
index 6453571..301e108 100644
--- a/src/drivers/intel/gma/text_fb/gma.adb
+++ b/src/drivers/intel/gma/text_fb/gma.adb
@@ -41,9 +41,7 @@
    begin
       lightup_ok := 0;
 
-      HW.GFX.GMA.Initialize
-        (MMIO_Base   => mmio_base,
-         Success     => success);
+      HW.GFX.GMA.Initialize (Success => success);
 
       if success then
          ports := Mainboard.ports;
diff --git a/src/lib/Kconfig b/src/lib/Kconfig
index 6d5f034..f329c87 100644
--- a/src/lib/Kconfig
+++ b/src/lib/Kconfig
@@ -5,3 +5,28 @@
 	  Don't include default fill_lb_framebuffer() implementation. Select
 	  this if your drivers uses MAINBOARD_DO_NATIVE_VGA_INIT but provides
 	  its own fill_lb_framebuffer() implementation.
+
+config RAMSTAGE_ADA
+	def_bool n
+	help
+	  Selected by features that use Ada code in ramstage.
+
+config RAMSTAGE_LIBHWBASE
+	def_bool n
+	select RAMSTAGE_ADA
+	help
+	  Selected by features that require `libhwbase` in ramstage.
+
+if RAMSTAGE_LIBHWBASE
+
+config HWBASE_DYNAMIC_MMIO
+	def_bool y
+
+config HWBASE_DEFAULT_MMCONF
+	hex
+	default MMCONF_BASE_ADDRESS
+
+config HWBASE_DIRECT_PCIDEV
+	def_bool y
+
+endif
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index e05b3fc..ce84cdd 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -287,8 +287,21 @@
 
 ifeq ($(CONFIG_RAMSTAGE_LIBHWBASE),y)
 
+to-ada-hex = $(eval $(1) := 16\\\#$(patsubst 0x%,%,$($(1)))\\\#)
+
+$(call to-ada-hex,CONFIG_HWBASE_DEFAULT_MMCONF)
+
 $(call add-special-class,hw)
 hw-handler = $(eval ramstage-srcs += $$(addprefix $(1),$(2)))
+
+$(call add-special-class,hw-gen)
+hw-gen-handler = \
+	$(eval additional-dirs += $(dir $(2))) \
+	$(eval ramstage-srcs += $(2)) \
+	$(eval ramstage-ads-deps += $(2)) \
+	$(eval ramstage-adb-deps += $(2)) \
+	$(eval $(2): $(obj)/config.h)
+
 subdirs-y += ../../3rdparty/libhwbase
 
 ramstage-$(CONFIG_HAVE_MONOTONIC_TIMER) += hw-time-timer.adb

-- 
To view, visit https://review.coreboot.org/20606
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I001ba973d864811503410579fd7ad55ab8612759
Gerrit-Change-Number: 20606
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170716/c3135a82/attachment.html>


More information about the coreboot-gerrit mailing list