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> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@414 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
c81aa82942
commit
a51ec3985f
8 changed files with 152 additions and 27 deletions
|
|
@ -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 @@ $(obj)/linuxbios.vpd:
|
|||
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)
|
||||
|
|
|
|||
|
|
@ -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 @@ int main(void)
|
|||
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);
|
||||
|
|
|
|||
48
mainboard/amd/norwich/stage1.c
Normal file
48
mainboard/amd/norwich/stage1.c
Normal file
|
|
@ -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();
|
||||
}
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -129,15 +129,6 @@ int main(void)
|
|||
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);
|
||||
|
||||
|
|
|
|||
64
mainboard/artecgroup/dbe61/stage1.c
Normal file
64
mainboard/artecgroup/dbe61/stage1.c
Normal file
|
|
@ -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();
|
||||
}
|
||||
|
|
@ -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 @@ $(obj)/linuxbios.vpd:
|
|||
# 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 \
|
||||
|
|
|
|||
26
mainboard/emulation/qemu-x86/stage1.c
Normal file
26
mainboard/emulation/qemu-x86/stage1.c
Normal file
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue