2009-05-28 Joel Sherrill <joel.sherrill@OARcorp.com>

* Makefile.am, README, configure.ac, preinstall.am, start/start.S,
	startup/memmap.c: Add csb637 as alias and variant.
	* startup/linkcmds.csb637: New file.
This commit is contained in:
Joel Sherrill
2009-05-28 20:08:20 +00:00
parent b11e05fe0f
commit b767616d2d
8 changed files with 266 additions and 8 deletions

View File

@@ -1,3 +1,9 @@
2009-05-28 Joel Sherrill <joel.sherrill@OARcorp.com>
* Makefile.am, README, configure.ac, preinstall.am, start/start.S,
startup/memmap.c: Add csb637 as alias and variant.
* startup/linkcmds.csb637: New file.
2009-04-28 Chris Johns <chrisj@rtems.org>
* start/start.S: Update for boot_card command line change.

View File

@@ -25,6 +25,7 @@ libbspstart_a_SOURCES = start/start.S
project_lib_DATA = start.$(OBJEXT)
dist_project_lib_DATA += startup/linkcmds
dist_project_lib_DATA += startup/linkcmds.csb637
noinst_LIBRARIES += libbsp.a
libbsp_a_SOURCES =

View File

@@ -2,6 +2,12 @@
# $Id$
#
This is the BSP for Cogent Computer System's CSB337, a single board
computer using the Atmel AT91RM9200 CPU.
This is the BSP for Cogent Computer System's CSB337 and
CSB637, single board computers using the Atmel AT91RM9200 CPU.
The differences in the board are very slight but important:
CSB337 CSB637
======== ========
16Mb RAM 64Mb RAM
? PHY is different

View File

@@ -18,6 +18,12 @@ RTEMS_PROG_CCAS
RTEMS_CHECK_NETWORKING
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
RTEMS_BSPOPTS_SET([csb637],[csb637],[1])
RTEMS_BSPOPTS_SET([csb637],[*],[0])
RTEMS_BSPOPTS_HELP([csb637],
[If defined, this indicates that the BSP is being built for the
csb637 variant.])
RTEMS_BSPOPTS_SET([BSP_PRESS_KEY_FOR_RESET],[*],[1])
RTEMS_BSPOPTS_HELP([BSP_PRESS_KEY_FOR_RESET],
[If defined, print a message and wait until pressed before resetting

View File

@@ -65,3 +65,7 @@ $(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
$(PROJECT_LIB)/linkcmds.csb637: startup/linkcmds.csb637 $(PROJECT_LIB)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds.csb637
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds.csb637

View File

@@ -12,11 +12,6 @@
* $Id$
*/
#warning Call to boot_card has changed and needs checking.
#warning The call is "void boot_card(const char* cmdline);"
#warning You need to pass a NULL.
#warning Please check and remove these warnings.
/* Some standard definitions...*/
.equ PSR_MODE_USR, 0x10
.equ PSR_MODE_FIQ, 0x11
@@ -105,6 +100,7 @@ _bss_init:
stmia r0!, {r2-r9}
/* Now we are prepared to start the BSP's C code */
mov r0, #0
bl boot_card
/*

View File

@@ -0,0 +1,233 @@
/*
* Cogent CSB337 Linker script
*
* Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
*
* http://www.rtems.com/license/LICENSE.
*
*
* $Id$
*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
"elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
MEMORY
{
sdram : ORIGIN = 0x20100000, LENGTH = 63M
sram : ORIGIN = 0x00200000, LENGTH = 16K
}
/*
* Declare some sizes.
*/
_sdram_base = DEFINED(_sdram_base) ? _sdram_base : 0x20100000;
_sdram_size = DEFINED(_sdram_size) ? _sdram_size : 63M;
RamBase = _sdram_base;
RamSize = _sdram_size;
HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
_sram_base = DEFINED(_sram_base) ? _sram_base : 0x00000000;
_sram_size = DEFINED(_sram_size) ? _sram_size : 16K;
_irq_stack_size = DEFINED(_irq_stack_size) ? _irq_stack_size : 0x1000;
_fiq_stack_size = DEFINED(_fiq_stack_size) ? _fiq_stack_size : 0x400;
_abt_stack_size = DEFINED(_abt_stack_size) ? _abt_stack_size : 0x100;
_svc_stack_size = DEFINED(_svc_stack_size) ? _svc_stack_size : 0x1000;
/* Do we need any of these for elf?
__DYNAMIC = 0; */
SECTIONS
{
.base :
{
_sram_base = .;
/* reserve room for the vectors and function pointers */
arm_exception_table = .;
. += 64;
/* 256 byte aligned rx buffer header array */
. = ALIGN (0x100);
at91rm9200_emac_rxbuf_hdrs = .;
/* 1 transmit buffer, 0x600 size */
. += (0x100);
at91rm9200_emac_txbuf = .;
. += (0x600);
/* 8 receive buffers, 0x600 each */
at91rm9200_emac_rxbufs = .;
. += (0x600 * 8);
} > sram
.init :
{
KEEP (*(.init))
} > sdram /*=0*/
.text :
{
_text_start = .;
CREATE_OBJECT_SYMBOLS
*(.text)
*(.text.*)
/*
* Special FreeBSD sysctl sections.
*/
. = ALIGN (16);
__start_set_sysctl_set = .;
*(set_sysctl_*);
__stop_set_sysctl_set = ABSOLUTE(.);
*(set_domain_*);
*(set_pseudo_*);
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
*(.gnu.linkonce.t*)
*(.glue_7)
*(.glue_7t)
/* I think these come from the ld docs: */
___CTOR_LIST__ = .;
LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)
*(.ctors)
LONG(0)
___CTOR_END__ = .;
___DTOR_LIST__ = .;
LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)
*(.dtors)
LONG(0)
___DTOR_END__ = .;
_etext = .;
PROVIDE (etext = .);
} > sdram
.fini :
{
KEEP (*(.fini))
} > sdram /*=0*/
.data :
{
*(.data)
*(.data.*)
*(.gnu.linkonce.d*)
*(.jcr)
SORT(CONSTRUCTORS)
_edata = .;
} > sdram
.eh_frame : { *(.eh_frame) } > sdram
.data1 : { *(.data1) } > sdram
.eh_frame : { *(.eh_frame) } > sdram
.gcc_except_table : { *(.gcc_except_table*) } > sdram
.rodata :
{
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r*)
} > sdram
.bss :
{
_bss_start_ = .;
_clear_start = .;
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(64);
_clear_end = .;
. = ALIGN (256);
_abt_stack = .;
. += _abt_stack_size;
. = ALIGN (256);
_irq_stack = .;
. += _irq_stack_size;
. = ALIGN (256);
_fiq_stack = .;
. += _fiq_stack_size;
. = ALIGN (256);
_svc_stack = .;
. += _svc_stack_size;
_bss_end_ = .;
_end = .;
__end = .;
/*
* Ideally, the MMU's translation table would be in SRAM. But we need
* 16K which is the size of SRAM. If we do the mapping right, the TLB
* should be big enough that to hold all the translations that matter,
* so keeping the table in SDRAM won't be a problem.
*/
. = ALIGN (16 * 1024);
_ttbl_base = .;
. += (16 * 1024);
. = ALIGN (1024);
_bss_free_start = .;
. = ALIGN (32);
WorkAreaBase = .;
} > sdram
/* Debugging stuff follows? */
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
.debug_info 0 : { *(.debug_info) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* SGI/MIPS DWARF 2 extensions */
.debug_weaknames 0 : { *(.debug_weaknames) }
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
/* .stack 0x80000 : { _stack = .; *(.stack) }*/
/* These must appear regardless of . */
}

View File

@@ -9,6 +9,8 @@
#include <rtems.h>
#include <libcpu/mmu.h>
#include <bspopts.h>
/* Remember, the ARM920 has 64 TLBs. If you have more 1MB sections than
* that, you'll have TLB lookups, which could hurt performance.
*/
@@ -17,8 +19,12 @@ mmu_sect_map_t mem_map[] = {
{0x00200000, 0x00000000, 1, MMU_CACHE_NONE}, /* SRAM */
{0x00200000, 0x00200000, 1, MMU_CACHE_NONE}, /* SRAM */
{0x10000000, 0x10000000, 8, MMU_CACHE_NONE}, /* FLASH */
#if csb637
{0x20000000, 0x20000000, 64, MMU_CACHE_WTHROUGH}, /* SDRAM */
#else /* CSB337 */
{0x20000000, 0x20000000, 32, MMU_CACHE_WTHROUGH}, /* SDRAM */
{0x30000000, 0x30000000, 1, MMU_CACHE_NONE}, /* video */
#endif
{0x30000000, 0x30000000, 8, MMU_CACHE_NONE}, /* video */
{0x40000000, 0x40000000, 1, MMU_CACHE_NONE}, /* Expansion CS0 */
{0x50000000, 0x50000000, 1, MMU_CACHE_NONE}, /* CF CE 1 */
{0x60000000, 0x60000000, 1, MMU_CACHE_NONE}, /* CF CE 1 */