x86/smm: Move SMM configuration out of generic Makefile
It's x86 specific. This is inspired by the commit listed below, but rewritten to match upstream, and split in smaller pieces to keep intent clear. Change-Id: Iacb91b47c89041435dd27c2c9ad34a231adf21d2 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b Based-On-Signed-off-by: Julius Werner <jwerner@chromium.org> Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170 Reviewed-on: http://review.coreboot.org/9115 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
This commit is contained in:
parent
2459aeea0b
commit
cbe27469c1
11
Makefile.inc
11
Makefile.inc
|
@ -134,21 +134,10 @@ endif
|
||||||
|
|
||||||
bootblock-generic-ccopts += -D__BOOT_BLOCK__ -D__PRE_RAM__
|
bootblock-generic-ccopts += -D__BOOT_BLOCK__ -D__PRE_RAM__
|
||||||
|
|
||||||
smmstub-generic-ccopts += -D__SMM__
|
|
||||||
smm-generic-ccopts += -D__SMM__
|
|
||||||
|
|
||||||
# SMM TSEG base is dynamic
|
|
||||||
ifneq ($(CONFIG_SMM_MODULES),y)
|
|
||||||
ifeq ($(CONFIG_SMM_TSEG),y)
|
|
||||||
smm-c-ccopts += -fpic
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ramstage-c-deps:=$$(OPTION_TABLE_H)
|
ramstage-c-deps:=$$(OPTION_TABLE_H)
|
||||||
romstage-c-deps:=$$(OPTION_TABLE_H)
|
romstage-c-deps:=$$(OPTION_TABLE_H)
|
||||||
verstage-c-deps:=$$(OPTION_TABLE_H)
|
verstage-c-deps:=$$(OPTION_TABLE_H)
|
||||||
bootblock-c-deps:=$$(OPTION_TABLE_H)
|
bootblock-c-deps:=$$(OPTION_TABLE_H)
|
||||||
smm-c-deps:=$$(OPTION_TABLE_H)
|
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# Add handler to compile ACPI's ASL
|
# Add handler to compile ACPI's ASL
|
||||||
|
|
|
@ -27,6 +27,10 @@ $(eval $(call create_class_compiler,smm,x86_64))
|
||||||
$(eval $(call create_class_compiler,smmstub,x86_64))
|
$(eval $(call create_class_compiler,smmstub,x86_64))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
smmstub-generic-ccopts += -D__SMM__
|
||||||
|
smm-generic-ccopts += -D__SMM__
|
||||||
|
smm-c-deps:=$$(OPTION_TABLE_H)
|
||||||
|
|
||||||
$(obj)/cpu/x86/smm/smm.o: $$(smm-objs) $(COMPILER_RT_smm)
|
$(obj)/cpu/x86/smm/smm.o: $$(smm-objs) $(COMPILER_RT_smm)
|
||||||
$(LD_smm) -nostdlib -r -o $@ $(COMPILER_RT_FLAGS_smm) --start-group $(smm-objs) $(COMPILER_RT_smm) --end-group
|
$(LD_smm) -nostdlib -r -o $@ $(COMPILER_RT_FLAGS_smm) --start-group $(smm-objs) $(COMPILER_RT_smm) --end-group
|
||||||
|
|
||||||
|
@ -101,6 +105,7 @@ endif
|
||||||
# Use TSEG specific entry point and linker script
|
# Use TSEG specific entry point and linker script
|
||||||
ifeq ($(CONFIG_SMM_TSEG),y)
|
ifeq ($(CONFIG_SMM_TSEG),y)
|
||||||
smm-y += smmhandler_tseg.S
|
smm-y += smmhandler_tseg.S
|
||||||
|
smm-c-ccopts += -fpic
|
||||||
SMM_LDFLAGS := -pie
|
SMM_LDFLAGS := -pie
|
||||||
SMM_LDSCRIPT := smm_tseg.ld
|
SMM_LDSCRIPT := smm_tseg.ld
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue