summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Kconfig7
-rw-r--r--src/lib/Makefile.inc13
2 files changed, 20 insertions, 0 deletions
diff --git a/src/lib/Kconfig b/src/lib/Kconfig
index a1034a9b88..bce0291b9b 100644
--- a/src/lib/Kconfig
+++ b/src/lib/Kconfig
@@ -22,4 +22,11 @@ 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 dfb23b625b..25537d20ed 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -288,8 +288,21 @@ $(obj)/%.elf.rmod: $(obj)/%.elf | $(RMODTOOL)
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