Author: rminnich Date: 2007-06-29 17:21:38 +0200 (Fri, 29 Jun 2007) New Revision: 414
Added: LinuxBIOSv3/mainboard/amd/norwich/stage1.c LinuxBIOSv3/mainboard/artecgroup/dbe61/stage1.c LinuxBIOSv3/mainboard/emulation/qemu-x86/stage1.c Modified: LinuxBIOSv3/mainboard/amd/norwich/Makefile LinuxBIOSv3/mainboard/amd/norwich/initram.c LinuxBIOSv3/mainboard/artecgroup/dbe61/Makefile LinuxBIOSv3/mainboard/artecgroup/dbe61/initram.c LinuxBIOSv3/mainboard/emulation/qemu-x86/Makefile Log: This completes the creation of a stage1 for each mainboard, and renames all the early_* stuff to stage1. All targets build and qemu boots. Signed-off-by: Ronald G. Minnich rminnich@gmail.com Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: LinuxBIOSv3/mainboard/amd/norwich/Makefile =================================================================== --- LinuxBIOSv3/mainboard/amd/norwich/Makefile 2007-06-29 14:36:03 UTC (rev 413) +++ LinuxBIOSv3/mainboard/amd/norwich/Makefile 2007-06-29 15:21:38 UTC (rev 414) @@ -18,6 +18,10 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## +STAGE0_MAINBOARD_OBJ :=\ + $(obj)/southbridge/amd/cs5536/stage1.o\ + $(obj)/arch/x86/geodelx/stage1.o \ + $(obj)/mainboard/$(MAINBOARDDIR)/stage1.o
$(obj)/linuxbios.vpd: $(Q)printf " BUILD DUMMY VPD\n" @@ -26,8 +30,6 @@ INITRAM_OBJ = $(obj)/mainboard/$(MAINBOARDDIR)/initram.o \ $(obj)/northbridge/amd/geodelx/raminit.o \ $(obj)/southbridge/amd/cs5536/smbus_initram.o \ - $(obj)/southbridge/amd/cs5536/cs5536_early_setup.o\ - $(obj)/device/pnp_raw.o \ $(obj)/arch/x86/geodelx/geodelx.o
$(obj)/linuxbios.initram: $(obj)/stage0.init $(obj)/stage0.o $(INITRAM_OBJ)
Modified: LinuxBIOSv3/mainboard/amd/norwich/initram.c =================================================================== --- LinuxBIOSv3/mainboard/amd/norwich/initram.c 2007-06-29 14:36:03 UTC (rev 413) +++ LinuxBIOSv3/mainboard/amd/norwich/initram.c 2007-06-29 15:21:38 UTC (rev 414) @@ -28,7 +28,6 @@ #include <msr.h> #include <io.h> #include <amd_geodelx.h> -#include <southbridge/amd/cs5536/cs5536.h> #include <northbridge/amd/geodelx/raminit.h>
#define MANUALCONF 0 /* Do automatic strapped PLL config */ @@ -64,18 +63,7 @@ post_code(POST_START_OF_MAIN);
system_preinit(); - geodelx_msr_init();
- cs5536_early_setup(); - - /* NOTE: must do this AFTER the early_setup! - * it is counting on some early MSR setup - * for cs5536. - */ - /* We do this early for debug. - * real setup should done in chipset init via config.lb - */ - cs5536_setup_onchipuart(); mb_gpio_init();
pll_reset(MANUALCONF, PLLMSRHI, PLLMSRLO);
Added: LinuxBIOSv3/mainboard/amd/norwich/stage1.c =================================================================== --- LinuxBIOSv3/mainboard/amd/norwich/stage1.c (rev 0) +++ LinuxBIOSv3/mainboard/amd/norwich/stage1.c 2007-06-29 15:21:38 UTC (rev 414) @@ -0,0 +1,48 @@ +/* + * This file is part of the LinuxBIOS project. + * + * Copyright (C) 2007 Advanced Micro Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include <types.h> +#include <lib.h> +#include <console.h> +#include <post_code.h> +#include <device/device.h> +#include <device/pci.h> +#include <string.h> +#include <msr.h> +#include <io.h> +#include <amd_geodelx.h> +#include <southbridge/amd/cs5536/cs5536.h> + +int hardware_stage1(void) +{ + post_code(POST_START_OF_MAIN); + geodelx_msr_init(); + + cs5536_stage1(); + + /* NOTE: must do this AFTER the early_setup! + * it is counting on some early MSR setup + * for cs5536. + */ + /* We do this early for debug. + * real setup should done in chipset init via config.lb + */ + cs5536_setup_onchipuart(); +}
Modified: LinuxBIOSv3/mainboard/artecgroup/dbe61/Makefile =================================================================== --- LinuxBIOSv3/mainboard/artecgroup/dbe61/Makefile 2007-06-29 14:36:03 UTC (rev 413) +++ LinuxBIOSv3/mainboard/artecgroup/dbe61/Makefile 2007-06-29 15:21:38 UTC (rev 414) @@ -18,13 +18,16 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## +STAGE0_MAINBOARD_OBJ := \ + $(obj)/southbridge/amd/cs5536/stage1.o\ + $(obj)/arch/x86/geodelx/stage1.o \ + $(obj)/mainboard/$(MAINBOARDDIR)/stage1.o
$(obj)/linuxbios.vpd: $(Q)printf " BUILD DUMMY VPD\n" $(Q)dd if=/dev/zero of=$(obj)/linuxbios.vpd bs=256 count=1 $(SILENT)
INITRAM_OBJ = $(obj)/mainboard/$(MAINBOARDDIR)/initram.o \ - $(obj)/southbridge/amd/cs5536/cs5536_early_setup.o\ $(obj)/arch/x86/geodelx/geodelx.o
$(obj)/linuxbios.initram: $(obj)/stage0.init $(obj)/stage0.o $(INITRAM_OBJ)
Modified: LinuxBIOSv3/mainboard/artecgroup/dbe61/initram.c =================================================================== --- LinuxBIOSv3/mainboard/artecgroup/dbe61/initram.c 2007-06-29 14:36:03 UTC (rev 413) +++ LinuxBIOSv3/mainboard/artecgroup/dbe61/initram.c 2007-06-29 15:21:38 UTC (rev 414) @@ -129,16 +129,7 @@ post_code(POST_START_OF_MAIN);
system_preinit(); - dbe61_msr_init();
- cs5536_early_setup(); - - /* NOTE: must do this AFTER the early_setup! - * it is counting on some early MSR setup - * for cs5536. - */ - cs5536_setup_onchipuart(); - pll_reset(MANUALCONF, PLLMSRHI, PLLMSRLO);
cpu_reg_init(0, DIMM0, DIMM1);
Added: LinuxBIOSv3/mainboard/artecgroup/dbe61/stage1.c =================================================================== --- LinuxBIOSv3/mainboard/artecgroup/dbe61/stage1.c (rev 0) +++ LinuxBIOSv3/mainboard/artecgroup/dbe61/stage1.c 2007-06-29 15:21:38 UTC (rev 414) @@ -0,0 +1,64 @@ +/* + * This file is part of the LinuxBIOS project. + * + * Copyright (C) 2007 Advanced Micro Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include <types.h> +#include <lib.h> +#include <console.h> +#include <post_code.h> +#include <device/device.h> +#include <device/pci.h> +#include <string.h> +#include <msr.h> +#include <io.h> +#include <amd_geodelx.h> +#include <southbridge/amd/cs5536/cs5536.h> +#include <northbridge/amd/geodelx/raminit.h> + +struct wmsr { + u32 reg; + struct msr msr; +} dbe61_msr[] = { + {.reg = 0x10000020, {.lo = 0xfff80, .hi = 0x20000000}}, + {.reg = 0x10000021, {.lo = 0x80fffe0, .hi = 0x20000000}}, + {.reg = 0x40000020, {.lo = 0xfff80, .hi = 0x20000000}}, + {.reg = 0x40000021, {.lo = 0x80fffe0, .hi = 0x20000000}}, +}; + +static void dbe61_msr_init(void) +{ + int i; + for(i = 0; i < sizeof(dbe61_msr)/sizeof(dbe61_msr[0]); i++) + wrmsr(dbe61_msr[i].reg, dbe61_msr[i].msr); +} + +int hardware_stage1(void) +{ + post_code(POST_START_OF_MAIN); + + dbe61_msr_init(); + + cs5536_stage1(); + + /* NOTE: must do this AFTER the early_setup! + * it is counting on some early MSR setup + * for cs5536. + */ + cs5536_setup_onchipuart(); +}
Modified: LinuxBIOSv3/mainboard/emulation/qemu-x86/Makefile =================================================================== --- LinuxBIOSv3/mainboard/emulation/qemu-x86/Makefile 2007-06-29 14:36:03 UTC (rev 413) +++ LinuxBIOSv3/mainboard/emulation/qemu-x86/Makefile 2007-06-29 15:21:38 UTC (rev 414) @@ -19,6 +19,9 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ##
+ +STAGE0_MAINBOARD_OBJ :=\ + $(obj)/mainboard/$(MAINBOARDDIR)/stage1.o # # VPD or SIP ROM or ... how does NVIDIA call it? # Some space to cope with dirty southbridge tricks. @@ -35,12 +38,12 @@ # The initram file is always uncompressed. It belongs into the mainboard # directory and is built from what was auto.c in v2. # +INITRAM_OBJ = $(obj)/mainboard/$(MAINBOARDDIR)/initram.o
-$(obj)/linuxbios.initram: $(obj)/stage0.init $(obj)/stage0.o $(obj)/mainboard/$(MAINBOARDDIR)/initram.o +$(obj)/linuxbios.initram: $(obj)/stage0.init $(obj)/stage0.o $(INITRAM_OBJ) $(Q)# initram links against stage0 $(Q)printf " LD $(subst $(shell pwd)/,,$(@))\n" - $(Q)$(LD) -R $(obj)/stage0.o -Ttext 0x80000 \ - $(obj)/mainboard/$(MAINBOARDDIR)/initram.o \ + $(Q)$(LD) -R $(obj)/stage0.o -Ttext 0x80000 $(INITRAM_OBJ) \ --entry=main -o $(obj)/linuxbios.initram.o $(Q)printf " OBJCOPY $(subst $(shell pwd)/,,$(@))\n" $(Q)$(OBJCOPY) -O binary $(obj)/linuxbios.initram.o \
Added: LinuxBIOSv3/mainboard/emulation/qemu-x86/stage1.c =================================================================== --- LinuxBIOSv3/mainboard/emulation/qemu-x86/stage1.c (rev 0) +++ LinuxBIOSv3/mainboard/emulation/qemu-x86/stage1.c 2007-06-29 15:21:38 UTC (rev 414) @@ -0,0 +1,26 @@ +/* + * This file is part of the LinuxBIOS project. + * + * Copyright (C) 2007 Ronald G. Minnich rminnich@gmail.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* no printk allowed until hardware is ready; hardware is ready */ +/** + * start up hardware needed for stage1 + */ +void hardware_stage1(void) +{ +}