From 98a84ef995abf43082f58b3c155d7755883f0e9f Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Wed, 27 Jun 2007 21:07:10 +0000 Subject: [PATCH] make cpu code future proof Signed-off-by: Stefan Reinauer Acked-by: Ronald G. Minnich git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@387 f3766cd6-281f-0410-b1cd-43a5c92072e9 --- arch/x86/Makefile | 11 ++++++++++- arch/x86/{ => geodelx}/geodelx.c | 0 arch/x86/{stage0_amd_geodelx.S => geodelx/stage0.S} | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) rename arch/x86/{ => geodelx}/geodelx.c (100%) rename arch/x86/{stage0_amd_geodelx.S => geodelx/stage0.S} (99%) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 34cf942090..a49b545584 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -83,7 +83,7 @@ ifeq ($(CONFIG_CPU_I586),y) STAGE0_CAR_OBJ = stage0_i586.o else ifeq ($(CONFIG_CPU_AMD_GEODELX),y) - STAGE0_CAR_OBJ = stage0_amd_geodelx.o + STAGE0_CAR_OBJ = geodelx/stage0.o else STAGE0_CAR_OBJ = stage0_i586.o endif @@ -181,4 +181,13 @@ $(obj)/arch/x86/stage0%.o: $(src)/arch/x86/stage0%.S $(Q)printf " AS $(subst $(shell pwd)/,,$(@))\n" $(Q)$(AS) $(obj)/arch/x86/stage0_asm.s -o $@ +$(obj)/arch/x86/geodelx/stage0.o: $(src)/arch/x86/geodelx/stage0.S + $(Q)mkdir -p $(obj)/arch/x86/geodelx + $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" + $(Q)$(CC) -E $(LINUXBIOSINCLUDE) $< \ + -o $(obj)/arch/x86/stage0_asm.s -DBOOTBLK=0x1f00 \ + -DRESRVED=0xf0 -DDATE=\"`date +%Y/%m/%d`\" + $(Q)printf " AS $(subst $(shell pwd)/,,$(@))\n" + $(Q)$(AS) $(obj)/arch/x86/stage0_asm.s -o $@ + endif diff --git a/arch/x86/geodelx.c b/arch/x86/geodelx/geodelx.c similarity index 100% rename from arch/x86/geodelx.c rename to arch/x86/geodelx/geodelx.c diff --git a/arch/x86/stage0_amd_geodelx.S b/arch/x86/geodelx/stage0.S similarity index 99% rename from arch/x86/stage0_amd_geodelx.S rename to arch/x86/geodelx/stage0.S index b4384b6e87..36daa1c045 100644 --- a/arch/x86/stage0_amd_geodelx.S +++ b/arch/x86/geodelx/stage0.S @@ -25,7 +25,7 @@ /* Init code - Switch CPU to protected mode and enable Cache-as-Ram. */ -#include "macros.h" +#include "../macros.h" #include /* This is where the DCache will be mapped and be used as stack. It would be