Author: jcrouse Date: 2007-11-28 19:49:11 +0100 (Wed, 28 Nov 2007) New Revision: 64
Added: buildrom-devel/packages/linuxbios/patches/simnow.patch Modified: buildrom-devel/config/platforms/Config.in buildrom-devel/packages/linuxbios/serengeti_cheetah.mk Log: [BUILDROM] Add support for the AMD SimNow (TM) simulator
Add a build option and a patch against LinuxBIOS to allow the Serengeti-Cheetah platform to come up on its emulated self in the SimNow simulator.
Signed-off-by: Jordan Crouse jordan.crouse@amd.com Acked-by: Myles Watson myles@pel.cs.byu.edu
Modified: buildrom-devel/config/platforms/Config.in =================================================================== --- buildrom-devel/config/platforms/Config.in 2007-11-28 18:41:23 UTC (rev 63) +++ buildrom-devel/config/platforms/Config.in 2007-11-28 18:49:11 UTC (rev 64) @@ -87,4 +87,13 @@ select PLATFORM_SUPPORT_64BIT
endchoice + +config SIMNOW + bool "Build for the AMD SimNow (TM) emulator" + depends PLATFORM_SERENGETI_CHEETAH || PLATFORM_SERENGETI_CHEETAH_64 + default n + help + Say 'y' here to patch the build to work on an + emulated platform in the AMD SimNow (TM) simulator + endmenu
Added: buildrom-devel/packages/linuxbios/patches/simnow.patch =================================================================== --- buildrom-devel/packages/linuxbios/patches/simnow.patch (rev 0) +++ buildrom-devel/packages/linuxbios/patches/simnow.patch 2007-11-28 18:49:11 UTC (rev 64) @@ -0,0 +1,59 @@ +Index: svn/src/northbridge/amd/amdk8/raminit_f_dqs.c +=================================================================== +--- svn.orig/src/northbridge/amd/amdk8/raminit_f_dqs.c ++++ svn/src/northbridge/amd/amdk8/raminit_f_dqs.c +@@ -1987,6 +1987,16 @@ static inline void train_ram_on_node(uns + struct sys_info *sysinfox = ((CONFIG_LB_MEM_TOPK<<10) - DCACHE_RAM_GLOBAL_VAR_SIZE); + wait_till_sysinfo_in_ram(); // use pci to get it + ++ /* In SimNow, when we get to this point, CAR is disabled, so ++ * our stack pointer points to never-never land, andjust it. ++ */ ++ ++ __asm__ volatile ( ++ "subl %0, %%ebp\n\t" ++ "subl %0, %%esp\n\t" ++ ::"a"( (DCACHE_RAM_BASE + DCACHE_RAM_SIZE)- (CONFIG_LB_MEM_TOPK<<10) ) ++ ); ++ + if(sysinfox->mem_trained[nodeid] == 0x80) { + #if 0 + sysinfo->tom_k = sysinfox->tom_k; +Index: svn/src/mainboard/amd/serengeti_cheetah/Options.lb +=================================================================== +--- svn.orig/src/mainboard/amd/serengeti_cheetah/Options.lb ++++ svn/src/mainboard/amd/serengeti_cheetah/Options.lb +@@ -218,7 +218,7 @@ default CONFIG_USE_INIT=0 + ## + ## for rev F training on AP purpose + ## +-default CONFIG_AP_CODE_IN_CAR=1 ++default CONFIG_AP_CODE_IN_CAR=0 + default MEM_TRAIN_SEQ=1 + default WAIT_BEFORE_CPUS_INIT=1 + +Index: svn/src/mainboard/amd/serengeti_cheetah/cache_as_ram_auto.c +=================================================================== +--- svn.orig/src/mainboard/amd/serengeti_cheetah/cache_as_ram_auto.c ++++ svn/src/mainboard/amd/serengeti_cheetah/cache_as_ram_auto.c +@@ -338,16 +338,18 @@ void real_main(unsigned long bist, unsig + } + #endif + +-#if 1 + needs_reset = optimize_link_coherent_ht(); ++#if 0 ++ /* On SimNow, this causes issues - remove it for now */ + needs_reset |= optimize_link_incoherent_ht(sysinfo); ++#endif + + // fidvid change will issue one LDTSTOP and the HT change will be effective too + if (needs_reset) { + print_info("ht reset -\r\n"); + soft_reset_x(sysinfo->sbbusn, sysinfo->sbdn); + } +-#endif ++ + allow_all_aps_stop(bsp_apicid); + + //It's the time to set ctrl in sysinfo now;
Modified: buildrom-devel/packages/linuxbios/serengeti_cheetah.mk =================================================================== --- buildrom-devel/packages/linuxbios/serengeti_cheetah.mk 2007-11-28 18:41:23 UTC (rev 63) +++ buildrom-devel/packages/linuxbios/serengeti_cheetah.mk 2007-11-28 18:49:11 UTC (rev 64) @@ -15,12 +15,17 @@ $(error To build LinuxBIOS, you need to install the 'iasl' tool) endif
+ ifeq ($(CONFIG_PAYLOAD_LAB),y) LINUXBIOS_PATCHES += $(PACKAGE_DIR)/linuxbios/patches/serengeti_cheetah-lab.patch else LINUXBIOS_PATCHES += $(PACKAGE_DIR)/linuxbios/patches/serengeti_cheetah-payload.patch endif
+ifeq ($(CONFIG_SIMNOW),y) +LINUXBIOS_PATCHES += $(PACKAGE_DIR)/linuxbios/patches/simnow.patch +endif + LINUXBIOS_BASE_DIR=svn LINUXBIOS_URL=svn://linuxbios.org/repos/trunk/LinuxBIOSv2 LINUXBIOS_TARBALL=linuxbios-svn-$(LINUXBIOS_TAG).tar.gz