From 60fc92a42ed2ab72e6e7d11ce2b0f698064b0166 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sat, 24 Oct 2009 03:33:44 +0000 Subject: First attempt to integrate SMM in Kconfig. Unused code so far Signed-off-by: Stefan Reinauer Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4833 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/cpu/x86/smm/Makefile.inc | 49 ++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 25 deletions(-) (limited to 'src/cpu/x86/smm') diff --git a/src/cpu/x86/smm/Makefile.inc b/src/cpu/x86/smm/Makefile.inc index b91e96c332..433a40c0b4 100644 --- a/src/cpu/x86/smm/Makefile.inc +++ b/src/cpu/x86/smm/Makefile.inc @@ -18,28 +18,27 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -##if CONFIG_HAVE_SMI_HANDLER -## object smmrelocate.S -## -## smmobject smmhandler.S -## smmobject smihandler.o -## -## makerule smm.o -## depends "$(SMM-OBJECTS) $(TOP)/src/console/printk.o $(TOP)/src/console/vtxprintf.o $(LIBGCC_FILE_NAME)" -## action "$(CC) $(DISTRO_LFLAGS) -nostdlib -r -o $@ $^" -## end -## -## makerule smm -## depends "smm.o $(TOP)/src/cpu/x86/smm/smm.ld ldoptions" -## action "$(CC) $(DISTRO_LFLAGS) -nostdlib -nostartfiles -static -o smm.elf -T $(TOP)/src/cpu/x86/smm/smm.ld smm.o" -## action "$(CONFIG_CROSS_COMPILE)nm -n smm.elf | sort > smm.map" -## action "$(OBJCOPY) -O binary smm.elf smm" -## end -## -## makerule smm_bin.c -## depends "smm" -## action "(echo 'unsigned char smm[] = {'; od -vtx1 smm | sed -e 's,^[0-9]* *,,' -e 's:[0-9a-f][0-9a-f] :0x&,:g' -e 's:[0-9a-f][0-9a-f]$$:0x&,:'; echo '}; unsigned int smm_len = '; wc -c smm |awk '{print $$1;}' ; echo ';') > smm_bin.c" -## end -## -## object ./smm_bin.o -##end + + +obj-$(CONFIG_HAVE_SMI_HANDLER) += smmrelocate.S +obj-$(CONFIG_HAVE_SMI_HANDLER) += smm_bin.o + +smmobj-y += smmhandler.S +smmobj-y += smihandler.o +smmobj-y += smiutil.o + +ifdef POST_EVALUATION + +$(obj)/cpu/x86/smm/smm.o: $(SMM-OBJECTS) $(obj)/console/printk.o $(obj)/console/vtxprintf.o $(LIBGCC_FILE_NAME) + $(CC) $(LDFLAGS) -nostdlib -r -o $@ $^ + +$(obj)/cpu/x86/smm/smm: $(obj)/cpu/x86/smm/smm.o $(obj)/cpu/x86/smm/smm.ld ldoptions + $(CC) $(LDFLAGS) -nostdlib -nostartfiles -static -o smm.elf -T $(src)/src/cpu/x86/smm/smm.ld smm.o + $(CONFIG_CROSS_COMPILE)nm -n smm.elf | sort > smm.map + $(OBJCOPY) -O binary smm.elf smm + +$(obj)/cpu/x86/smm/smm_bin.c: $(obj)/cpu/x86/smm/smm + (echo 'unsigned char smm[] = {'; od -vtx1 smm | sed -e 's,^[0-9]* *,,' -e 's:[0-9a-f][0-9a-f] :0x&,:g' -e 's:[0-9a-f][0-9a-f]$$:0x&,:'; echo '}; unsigned int smm_len = '; wc -c smm |awk '{print $$1;}' ; echo ';') > $@ + +endif + -- cgit v1.2.3