lib: Prepare for libhwbase' generated config file

Add new libhwbase options and add a class for files generated during
build. This follows the same pattern as for libgfxinit.

Change-Id: Ie5b84992fa687e4e94b6d959a64086c638f66eb8
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20626
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
Nico Huber 2017-07-17 23:42:33 +02:00
parent 6fea323ffe
commit 625160fd6a
2 changed files with 20 additions and 0 deletions

View file

@ -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

View file

@ -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