mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-14 02:02:39 +08:00
2009-06-04 Xi Yang <hiyangxi@gmail.com>
* .cvsignore, ChangeLog, Makefile.am, README, bsp_specs, configure.ac, preinstall.am, console/uarts.c, include/bsp.h, include/bspopts.h.in, include/tm27.h, start/start.S, startup/bspstart.c, startup/linkcmds, startup/memmap.c: New files.
This commit is contained in:
1 parent
efb0cf6947
commit
6e27be70e1
15 files changed
+787
No files matched your search
@@ -0,0 +1,8 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
config.cache
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
@@ -0,0 +1,7 @@
|
||||
2009-06-04 Xi Yang <hiyangxi@gmail.com>
|
||||
|
||||
* .cvsignore, ChangeLog, Makefile.am, README, bsp_specs, configure.ac,
|
||||
preinstall.am, console/uarts.c, include/bsp.h, include/bspopts.h.in,
|
||||
include/tm27.h, start/start.S, startup/bspstart.c, startup/linkcmds,
|
||||
startup/memmap.c: New files.
|
||||
|
||||
Executable
+62
@@ -0,0 +1,62 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../../../aclocal
|
||||
|
||||
include $(top_srcdir)/../../../../automake/compile.am
|
||||
include $(top_srcdir)/../../bsp.am
|
||||
|
||||
include_bspdir = $(includedir)/bsp
|
||||
|
||||
dist_project_lib_DATA = bsp_specs
|
||||
|
||||
include_HEADERS = include/bsp.h
|
||||
include_HEADERS += include/tm27.h
|
||||
|
||||
nodist_include_HEADERS = include/bspopts.h
|
||||
nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
|
||||
DISTCLEANFILES = include/bspopts.h
|
||||
noinst_PROGRAMS =
|
||||
|
||||
nodist_include_HEADERS += ../../shared/include/coverhd.h
|
||||
|
||||
EXTRA_DIST = start/start.S
|
||||
start.$(OBJEXT): start/start.S
|
||||
$(CPPASCOMPILE) -o $@ -c $<
|
||||
project_lib_DATA = start.$(OBJEXT)
|
||||
|
||||
dist_project_lib_DATA += startup/linkcmds
|
||||
|
||||
noinst_PROGRAMS += startup.rel
|
||||
startup_rel_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
|
||||
../../shared/bsppredriverhook.c ../../shared/bspgetworkarea.c \
|
||||
../../shared/bootcard.c ../../shared/sbrk.c \
|
||||
../../shared/gnatinstallhandler.c ../../shared/bsppretaskinghook.c \
|
||||
../../shared/bspclean.c ../../shared/bspreset.c \
|
||||
startup/bspstart.c startup/memmap.c
|
||||
|
||||
startup_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
noinst_PROGRAMS += console.rel
|
||||
console_rel_SOURCES = console/uarts.c ../../shared/console.c
|
||||
console_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
noinst_PROGRAMS += abort.rel
|
||||
abort_rel_SOURCES = ../shared/abort/abort.c
|
||||
abort_rel_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
abort_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
|
||||
|
||||
noinst_LIBRARIES = libbsp.a
|
||||
libbsp_a_SOURCES =
|
||||
libbsp_a_LIBADD = startup.rel console.rel abort.rel
|
||||
libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/arm920.rel \
|
||||
../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/clock.rel \
|
||||
../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/timer.rel \
|
||||
../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/ffuart.rel \
|
||||
../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/irq.rel
|
||||
|
||||
include $(srcdir)/preinstall.am
|
||||
include $(top_srcdir)/../../../../automake/local.am
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
This is the BSP for GUMSTIX which has a PXA255 CPU.
|
||||
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
%rename endfile old_endfile
|
||||
%rename startfile old_startfile
|
||||
%rename link old_link
|
||||
|
||||
*startfile:
|
||||
%{!qrtems: %(old_startfile)} \
|
||||
%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
|
||||
|
||||
*link:
|
||||
%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -N -e _start}
|
||||
|
||||
*endfile:
|
||||
%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
## Process this file with autoconf to produce a configure script.
|
||||
##
|
||||
## configure.ac,v 1.5 2003/03/11 09:39:07 ralf Exp
|
||||
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT([rtems-c-src-lib-libbsp-arm-gumstix],[_RTEMS_VERSION],[rtems-bugs@OARcorp.com])
|
||||
AC_CONFIG_SRCDIR([bsp_specs])
|
||||
RTEMS_TOP(../../../../../..)
|
||||
|
||||
RTEMS_CANONICAL_TARGET_CPU
|
||||
AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.10])
|
||||
RTEMS_BSP_CONFIGURE
|
||||
|
||||
RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
|
||||
RTEMS_CANONICALIZE_TOOLS
|
||||
RTEMS_PROG_CCAS
|
||||
|
||||
RTEMS_CHECK_NETWORKING
|
||||
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
|
||||
|
||||
# Explicitly list all Makefiles here
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
Executable
+71
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Console driver for GUMSTIX by Yang Xi <hiyangxi@gmail.com>
|
||||
*
|
||||
* This driver uses the shared console driver in
|
||||
* ...../libbsp/shared/console.c
|
||||
*
|
||||
* Copyright (c) 2003 by Cogent Computer Systems
|
||||
* Written 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$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
#include <termios.h>
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
#include <pxa255.h>
|
||||
#include <libchip/serial.h>
|
||||
#include <libchip/sersupp.h>
|
||||
|
||||
/* How many serial ports? */
|
||||
#define NUM_DEVS 1
|
||||
|
||||
/* These are used by code in console.c */
|
||||
unsigned long Console_Port_Count = NUM_DEVS;
|
||||
console_data Console_Port_Data[NUM_DEVS];
|
||||
|
||||
/* rtems console uses the following minor number */
|
||||
rtems_device_minor_number Console_Port_Minor = 0;
|
||||
extern console_fns ffuart_fns;
|
||||
|
||||
/*
|
||||
* There's one item in array for each UART.
|
||||
*
|
||||
* Some of these fields are marked "NOT USED". They are not used
|
||||
* by console.c, but may be used by drivers in libchip
|
||||
*
|
||||
* when we add other types of UARTS we will need to move this
|
||||
* structure to a generic uart.c file with only this in it
|
||||
*/
|
||||
console_tbl Console_Port_Tbl[] = {
|
||||
{
|
||||
"/dev/console", /* sDeviceName */
|
||||
SERIAL_CUSTOM, /* deviceType */
|
||||
&ffuart_fns, /* pDeviceFns */
|
||||
NULL, /* deviceProbe */
|
||||
NULL, /* pDeviceFlow */
|
||||
0, /* ulMargin - NOT USED */
|
||||
0, /* ulHysteresis - NOT USED */
|
||||
NULL, /* pDeviceParams */
|
||||
FFUART_BASE, /* ulCtrlPort1 - Pointer to DBGU regs */
|
||||
0, /* ulCtrlPort2 - NOT USED */
|
||||
0, /* ulDataPort - NOT USED */
|
||||
NULL, /* getRegister - NOT USED */
|
||||
NULL, /* setRegister - NOT USED */
|
||||
NULL, /* getData - NOT USED */
|
||||
NULL, /* setData - NOT USED */
|
||||
0, /* ulClock - NOT USED */
|
||||
0 /* ulIntVector - NOT USED */
|
||||
}};
|
||||
|
||||
|
||||
console_tbl *BSP_get_uart_from_minor(int minor)
|
||||
{
|
||||
return &Console_Port_Tbl[minor];
|
||||
}
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* By Yang Xi <hiyangxi@gmail.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$
|
||||
*/
|
||||
|
||||
#ifndef _BSP_H
|
||||
#define _BSP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <bspopts.h>
|
||||
|
||||
#include <rtems.h>
|
||||
#include <rtems/console.h>
|
||||
#include <rtems/clockdrv.h>
|
||||
#include <libchip/serial.h>
|
||||
|
||||
/* What is the input clock freq in hertz */
|
||||
#define BSP_MAIN_FREQ 3686400 /* 3.6864 MHz */
|
||||
#define BSP_SLCK_FREQ 32768 /* 32.768 KHz */
|
||||
|
||||
/* What is the last interrupt */
|
||||
#define BSP_MAX_INT AT91RM9200_MAX_INT
|
||||
|
||||
console_tbl *BSP_get_uart_from_minor(int minor);
|
||||
static inline int32_t BSP_get_baud(void) {return 115200;}
|
||||
|
||||
/* How many serial ports? */
|
||||
#define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 1
|
||||
|
||||
/* How big should the interrupt stack be? */
|
||||
#define CONFIGURE_INTERRUPT_STACK_MEMORY (16 * 1024)
|
||||
|
||||
extern rtems_configuration_table Configuration;
|
||||
|
||||
#define ST_PIMR_PIV 33 /* 33 ticks of the 32.768Khz clock ~= 1msec */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _BSP_H */
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/* include/bspopts.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* tm27.h
|
||||
*
|
||||
* 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$
|
||||
*/
|
||||
|
||||
#ifndef _RTEMS_TMTEST27
|
||||
#error "This is an RTEMS internal file you must not include directly."
|
||||
#endif
|
||||
|
||||
#ifndef __tm27_h
|
||||
#define __tm27_h
|
||||
|
||||
/*
|
||||
* Define the interrupt mechanism for Time Test 27
|
||||
*/
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 0
|
||||
|
||||
#define Install_tm27_vector( handler ) /* empty */
|
||||
|
||||
#define Cause_tm27_intr() /* empty */
|
||||
|
||||
#define Clear_tm27_intr() /* empty */
|
||||
|
||||
#define Lower_tm27_intr() /* empty */
|
||||
|
||||
#endif
|
||||
Executable
+67
@@ -0,0 +1,67 @@
|
||||
## Automatically generated by ampolish3 - Do not edit
|
||||
|
||||
if AMPOLISH3
|
||||
$(srcdir)/preinstall.am: Makefile.am
|
||||
$(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
|
||||
endif
|
||||
|
||||
PREINSTALL_DIRS =
|
||||
DISTCLEANFILES += $(PREINSTALL_DIRS)
|
||||
|
||||
all-local: $(TMPINSTALL_FILES)
|
||||
|
||||
TMPINSTALL_FILES =
|
||||
CLEANFILES = $(TMPINSTALL_FILES)
|
||||
|
||||
all-am: $(PREINSTALL_FILES)
|
||||
|
||||
PREINSTALL_FILES =
|
||||
CLEANFILES += $(PREINSTALL_FILES)
|
||||
|
||||
$(PROJECT_LIB)/$(dirstamp):
|
||||
@$(MKDIR_P) $(PROJECT_LIB)
|
||||
@: > $(PROJECT_LIB)/$(dirstamp)
|
||||
PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
|
||||
|
||||
$(PROJECT_INCLUDE)/$(dirstamp):
|
||||
@$(MKDIR_P) $(PROJECT_INCLUDE)
|
||||
@: > $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp/$(dirstamp):
|
||||
@$(MKDIR_P) $(PROJECT_INCLUDE)/bsp
|
||||
@: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
|
||||
$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
|
||||
PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
|
||||
|
||||
$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
|
||||
|
||||
$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h
|
||||
|
||||
$(PROJECT_INCLUDE)/coverhd.h: ../../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
|
||||
|
||||
$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
|
||||
TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
|
||||
|
||||
$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
|
||||
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
|
||||
|
||||
Executable
+149
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
* By Yang Xi <hiyangxi@gmail.com>.
|
||||
* Based upon CSB336
|
||||
*
|
||||
* 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$
|
||||
*/
|
||||
|
||||
|
||||
/* Some standard definitions...*/
|
||||
.equ PSR_MODE_USR, 0x10
|
||||
.equ PSR_MODE_FIQ, 0x11
|
||||
.equ PSR_MODE_IRQ, 0x12
|
||||
.equ PSR_MODE_SVC, 0x13
|
||||
.equ PSR_MODE_ABT, 0x17
|
||||
.equ PSR_MODE_UNDEF, 0x1B
|
||||
.equ PSR_MODE_SYS, 0x1F
|
||||
|
||||
.equ PSR_I, 0x80
|
||||
.equ PSR_F, 0x40
|
||||
.equ PSR_T, 0x20
|
||||
|
||||
.text
|
||||
.globl _start
|
||||
_start:
|
||||
/*
|
||||
* Since I don't plan to return to the bootloader,
|
||||
* I don't have to save the registers.
|
||||
*
|
||||
* I'll just set the CPSR for SVC mode, interrupts
|
||||
* off, and ARM instructions.
|
||||
*/
|
||||
mov r0, #(PSR_MODE_SVC | PSR_I | PSR_F)
|
||||
msr cpsr, r0
|
||||
|
||||
|
||||
/* zero the bss */
|
||||
ldr r1, =_bss_end_
|
||||
ldr r0, =_bss_start_
|
||||
|
||||
_bss_init:
|
||||
mov r2, #0
|
||||
cmp r0, r1
|
||||
strlot r2, [r0], #4
|
||||
blo _bss_init /* loop while r0 < r1 */
|
||||
|
||||
/* --- Initialize stack pointer registers */
|
||||
/* Enter IRQ mode and set up the IRQ stack pointer */
|
||||
mov r0, #(PSR_MODE_IRQ | PSR_I | PSR_F) /* No interrupts */
|
||||
msr cpsr, r0
|
||||
ldr r1, =_irq_stack_size
|
||||
ldr sp, =_irq_stack
|
||||
add sp, sp, r1
|
||||
|
||||
/* Enter FIQ mode and set up the FIQ stack pointer */
|
||||
mov r0, #(PSR_MODE_FIQ | PSR_I | PSR_F) /* No interrupts */
|
||||
msr cpsr, r0
|
||||
ldr r1, =_fiq_stack_size
|
||||
ldr sp, =_fiq_stack
|
||||
add sp, sp, r1
|
||||
|
||||
/* Enter ABT mode and set up the ABT stack pointer */
|
||||
mov r0, #(PSR_MODE_ABT | PSR_I | PSR_F) /* No interrupts */
|
||||
msr cpsr, r0
|
||||
ldr r1, =_abt_stack_size
|
||||
ldr sp, =_abt_stack
|
||||
add sp, sp, r1
|
||||
|
||||
/* Set up the SVC stack pointer last and stay in SVC mode */
|
||||
mov r0, #(PSR_MODE_SVC | PSR_I | PSR_F) /* No interrupts */
|
||||
msr cpsr, r0
|
||||
ldr r1, =_svc_stack_size
|
||||
ldr sp, =_svc_stack
|
||||
add sp, sp, r1
|
||||
sub sp, sp, #0x64
|
||||
|
||||
/*
|
||||
* Initialize the MMU. After we return, the MMU is enabled,
|
||||
* and memory may be remapped. I hope we don't remap this
|
||||
* memory away.
|
||||
*/
|
||||
|
||||
ldr r0, =mem_map
|
||||
bl mmu_init
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Initialize the exception vectors. This includes the
|
||||
* exceptions vectors (0x00000000-0x0000001c), and the
|
||||
* pointers to the exception handlers (0x00000020-0x0000003c).
|
||||
*/
|
||||
mov r0, #0
|
||||
adr r1, vector_block
|
||||
ldmia r1!, {r2-r9}
|
||||
stmia r0!, {r2-r9}
|
||||
ldmia r1!, {r2-r9}
|
||||
stmia r0!, {r2-r9}
|
||||
|
||||
|
||||
|
||||
/* Now we are prepared to start the BSP's C code */
|
||||
bl boot_card
|
||||
|
||||
/*
|
||||
* Theoretically, we could return to what started us up,
|
||||
* but we'd have to have saved the registers and stacks.
|
||||
* Instead, we'll just reset.
|
||||
*/
|
||||
bl bsp_reset
|
||||
|
||||
/* We shouldn't get here. If we do, hang */
|
||||
_hang: b _hang
|
||||
|
||||
|
||||
/*
|
||||
* This is the exception vector table and the pointers to
|
||||
* the functions that handle the exceptions. It's a total
|
||||
* of 16 words (64 bytes)
|
||||
*/
|
||||
vector_block:
|
||||
ldr pc, Reset_Handler
|
||||
ldr pc, Undefined_Handler
|
||||
ldr pc, SWI_Handler
|
||||
ldr pc, Prefetch_Handler
|
||||
ldr pc, Abort_Handler
|
||||
nop
|
||||
ldr pc, IRQ_Handler
|
||||
ldr pc, FIQ_Handler
|
||||
|
||||
Reset_Handler: b bsp_reset
|
||||
Undefined_Handler: b Undefined_Handler
|
||||
SWI_Handler: b SWI_Handler
|
||||
Prefetch_Handler: b Prefetch_Handler
|
||||
Abort_Handler: b Abort_Handler
|
||||
nop
|
||||
IRQ_Handler: b IRQ_Handler
|
||||
FIQ_Handler: b FIQ_Handler
|
||||
|
||||
.globl Reset_Handler
|
||||
.globl Undefined_Handler
|
||||
.globl SWI_Handler
|
||||
.globl Prefetch_Handler
|
||||
.globl Abort_Handler
|
||||
.globl IRQ_Handler
|
||||
.globl FIQ_Handler
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* By Yang Xi <hiyangxi@gmail.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$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/libcsupport.h>
|
||||
#include <rtems/libio.h>
|
||||
#include <pxa255.h>
|
||||
|
||||
/* Function prototypes */
|
||||
extern void rtems_irq_mngt_init(void);
|
||||
|
||||
/*
|
||||
*
|
||||
* NAME: bsp_start_default - BSP initialization function
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* This function is called before RTEMS is initialized and used
|
||||
* adjust the kernel's configuration.
|
||||
*
|
||||
* This function also configures the CPU's memory protection unit.
|
||||
*
|
||||
* RESTRICTIONS/LIMITATIONS:
|
||||
* Since RTEMS is not configured, no RTEMS functions can be called.
|
||||
*
|
||||
*/
|
||||
void bsp_start_default( void )
|
||||
{
|
||||
/* disable interrupts */
|
||||
XSCALE_INT_ICMR = 0x0;
|
||||
rtems_exception_init_mngt();
|
||||
rtems_irq_mngt_init();
|
||||
} /* bsp_start */
|
||||
|
||||
/*
|
||||
* By making this a weak alias for bsp_start_default, a brave soul
|
||||
* can override the actual bsp_start routine used.
|
||||
*/
|
||||
void bsp_start (void) __attribute__ ((weak, alias("bsp_start_default")));
|
||||
+219
File diff suppressed because it is too large.
Load diff
+19
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Gumstix Memory Map
|
||||
* 2008 By Yang Xi <hiyangxi@gmail.com>
|
||||
* Copyright (c) 2004 by Cogent Computer Systems
|
||||
* Written by Jay Monkman <jtm@lopingdog.com>
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#include <libcpu/mmu.h>
|
||||
|
||||
mmu_sect_map_t mem_map[] = {
|
||||
/* <phys addr> <virt addr> <size> <flags> */
|
||||
{0x40000000, 0x40000000, 20, MMU_CACHE_NONE}, /*Map I/O*/
|
||||
{0xA0000000, 0x00000000, 1, MMU_CACHE_NONE}, /*sram*/
|
||||
{0xA0000000, 0xA0000000, 64, MMU_CACHE_WBACK}, /* SDRAM */
|
||||
{0x00000000, 0x00000000, 0, 0} /* The end */
|
||||
};
|
||||
Reference in new issue
Block a user