1## SPDX-License-Identifier: GPL-2.0-only 2 3ramstage-$(CONFIG_INTEL_DDI) += intel_ddi.c 4ramstage-$(CONFIG_INTEL_EDID) += edid.c vbt.c 5ifeq ($(CONFIG_VGA_ROM_RUN),y) 6ramstage-$(CONFIG_INTEL_INT15) += int15.c 7endif 8ramstage-$(CONFIG_INTEL_GMA_ACPI) += acpi.c 9ramstage-$(CONFIG_INTEL_GMA_ACPI) += opregion.c 10 11ifeq ($(CONFIG_INTEL_GMA_ADD_VBT),y) 12# add_vbt_to_cbfs, first argument is the filename in cbfs, the second one 13# is the filename in the coreboot tree. 14add_vbt_to_cbfs= \ 15 $(eval cbfs-files-y += $1) \ 16 $(eval $1-file := $2) \ 17 $(eval $1-type := raw) \ 18 $(eval $1-compression := $(call strip_quotes,$(CONFIG_VBT_CBFS_COMPRESSION_ALGORITHM))) 19endif 20 21$(call add_vbt_to_cbfs, vbt.bin, $(call strip_quotes,$(CONFIG_INTEL_GMA_VBT_FILE))) 22 23ifneq (,$(filter y, $(CONFIG_GFX_GMA) $(CONFIG_EARLY_GFX_GMA))) 24 25gfx-gma-stages = \ 26 $(if $(filter y,$(CONFIG_EARLY_GFX_GMA)),romstage) \ 27 $(if $(filter y,$(CONFIG_GFX_GMA)),ramstage) \ 28 29$(call add-special-class,gfxinit) 30gfxinit-handler +=$(foreach stage, $(gfx-gma-stages), \ 31 $(eval $(stage)-srcs += $$(addprefix $(1),$(2)))) 32 33$(call add-special-class,gfxinit-gen) 34gfxinit-gen-handler += \ 35 $(eval additional-dirs += $(dir $(2))) \ 36 $(foreach stage, $(gfx-gma-stages), \ 37 $(eval $(stage)-srcs += $(2)) \ 38 $(eval $(stage)-ads-deps += $(2)) \ 39 $(eval $(stage)-adb-deps += $(2))) \ 40 $(eval $(2): $(obj)/config.h) 41 42ifeq ($(CONFIG_GFX_GMA_DEFAULT_MMIO),) 43CONFIG_GFX_GMA_DEFAULT_MMIO := 0 # dummy, will be overwritten at runtime 44else 45$(call to-ada-hex,CONFIG_GFX_GMA_DEFAULT_MMIO) 46endif 47 48subdirs-y += ../../../../3rdparty/libgfxinit 49 50$(foreach stage,$(gfx-gma-stages), \ 51 $(eval $(stage)-y += gma.ads gma.adb)) 52 53endif # CONFIG_GFX_GMA || CONFIG_EARLY_GFX_GMA 54 55ifeq ($(CONFIG_GFX_GMA),y) 56 57ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-gfx_init.ads 58ifeq ($(CONFIG_LINEAR_FRAMEBUFFER),y) 59ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += hires_fb/gma-gfx_init.adb 60else 61ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += text_fb/gma-gfx_init.adb 62endif 63 64endif # CONFIG_GFX_GMA 65 66ifeq ($(CONFIG_EARLY_GFX_GMA),y) 67 68romstage-$(CONFIG_MAINBOARD_USE_EARLY_LIBGFXINIT) += \ 69 gma-gfx_init.ads \ 70 text_fb/gma-gfx_init.adb 71 72endif # CONFIG_EARLY_GFX_GMA 73