j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: blueswirl Date: Tue Aug 10 20:16:46 2010 New Revision: 849 URL: http://tracker.coreboot.org/trac/openbios/changeset/849
Log: sparc32: move last fw_cfg user to openbios.c
Signed-off-by: Blue Swirl blauwirbel@gmail.com
Modified: trunk/openbios-devel/arch/sparc32/openbios.c trunk/openbios-devel/drivers/obio.c trunk/openbios-devel/include/drivers/drivers.h
Modified: trunk/openbios-devel/arch/sparc32/openbios.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/openbios.c Tue Aug 10 19:51:53 2010 (r848) +++ trunk/openbios-devel/arch/sparc32/openbios.c Tue Aug 10 20:16:46 2010 (r849) @@ -828,6 +828,7 @@ uint32_t temp; uint16_t machine_id; char buf[256]; + unsigned long mem_size;
fw_cfg_init();
@@ -853,9 +854,11 @@ ob_init_mmu(); ob_init_iommu(hwdef->iommu_base); #ifdef CONFIG_DRIVER_OBIO + mem_size = fw_cfg_read_i32(FW_CFG_RAM_SIZE); ob_obio_init(hwdef->slavio_base, hwdef->fd_offset, hwdef->counter_offset, hwdef->intr_offset, - hwdef->aux1_offset, hwdef->aux2_offset); + hwdef->aux1_offset, hwdef->aux2_offset, + mem_size);
setup_machine(hwdef->slavio_base);
Modified: trunk/openbios-devel/drivers/obio.c ============================================================================== --- trunk/openbios-devel/drivers/obio.c Tue Aug 10 19:51:53 2010 (r848) +++ trunk/openbios-devel/drivers/obio.c Tue Aug 10 20:16:46 2010 (r849) @@ -20,8 +20,6 @@ #include "arch/common/nvram.h" #include "libopenbios/ofmem.h" #include "obio.h" -#define NO_QEMU_PROTOS -#include "arch/common/fw_cfg.h" #include "escc.h"
#define PROMDEV_KBD 0 /* input from keyboard */ @@ -402,12 +400,9 @@ }
static void -ob_smp_init(void) +ob_smp_init(unsigned long mem_size) { - unsigned long mem_size; - // See arch/sparc32/entry.S for memory layout - mem_size = fw_cfg_read_i32(FW_CFG_RAM_SIZE); smp_header = (struct smp_cfg *)map_io((uint64_t)(mem_size - 0x100), sizeof(struct smp_cfg)); } @@ -499,7 +494,8 @@ int ob_obio_init(uint64_t slavio_base, unsigned long fd_offset, unsigned long counter_offset, unsigned long intr_offset, - unsigned long aux1_offset, unsigned long aux2_offset) + unsigned long aux1_offset, unsigned long aux2_offset, + unsigned long mem_size) {
// All devices were integrated to NCR89C105, see @@ -534,7 +530,7 @@
ob_interrupt_init(slavio_base, intr_offset);
- ob_smp_init(); + ob_smp_init(mem_size);
return 0; }
Modified: trunk/openbios-devel/include/drivers/drivers.h ============================================================================== --- trunk/openbios-devel/include/drivers/drivers.h Tue Aug 10 19:51:53 2010 (r848) +++ trunk/openbios-devel/include/drivers/drivers.h Tue Aug 10 20:16:46 2010 (r849) @@ -64,7 +64,8 @@ /* drivers/obio.c */ int ob_obio_init(uint64_t slavio_base, unsigned long fd_offset, unsigned long counter_offset, unsigned long intr_offset, - unsigned long aux1_offset, unsigned long aux2_offset); + unsigned long aux1_offset, unsigned long aux2_offset, + unsigned long mem_size); int start_cpu(unsigned int pc, unsigned int context_ptr, unsigned int context, int cpu); void ob_eccmemctl_init(uint64_t base);