forked from Imagelibrary/rtems
Compare commits
89 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55c936b88b | ||
|
|
4d3810ad1a | ||
|
|
26660ffff2 | ||
|
|
eab1cfee71 | ||
|
|
b065ec1c5c | ||
|
|
6fa29378a2 | ||
|
|
01540d3691 | ||
|
|
c2cfcd2835 | ||
|
|
cadb5d1641 | ||
|
|
4f5a5985a9 | ||
|
|
276619872b | ||
|
|
d42d899877 | ||
|
|
ca6df52f0b | ||
|
|
ede4f1621a | ||
|
|
5b07faf305 | ||
|
|
79eb6e21ca | ||
|
|
5b78cd6bc9 | ||
|
|
ec24e12693 | ||
|
|
3d34e70fc2 | ||
|
|
dda09e3b1e | ||
|
|
d6d628dc25 | ||
|
|
c9c835cc08 | ||
|
|
45a71c9d90 | ||
|
|
23e7d30803 | ||
|
|
36cf8f6753 | ||
|
|
491b62fdcb | ||
|
|
dad43ef2eb | ||
|
|
165527795f | ||
|
|
be1ab03a92 | ||
|
|
4d790ba43e | ||
|
|
7a7ddeb0af | ||
|
|
2d1119e7ed | ||
|
|
a5222eeff9 | ||
|
|
5d6e54d08b | ||
|
|
6fa59698c7 | ||
|
|
cdd0fc8a89 | ||
|
|
ae557d1abb | ||
|
|
37f094158b | ||
|
|
aba5ed401e | ||
|
|
7a92e3ddc3 | ||
|
|
eefbe35533 | ||
|
|
59d55753a8 | ||
|
|
3ffa814199 | ||
|
|
774515b753 | ||
|
|
1348869fbb | ||
|
|
d2a30c77f5 | ||
|
|
73c2d237de | ||
|
|
d490fff3c1 | ||
|
|
e75e10dcac | ||
|
|
fb573a71f1 | ||
|
|
24b6d2f9a8 | ||
|
|
a3b4632866 | ||
|
|
dc4bd19dfa | ||
|
|
3741506c42 | ||
|
|
8747cac1e3 | ||
|
|
5a5af8c1a1 | ||
|
|
21a6137140 | ||
|
|
52adbd42e5 | ||
|
|
d7bf841a96 | ||
|
|
58cfecc76a | ||
|
|
0bb4dd0337 | ||
|
|
feedcdc65f | ||
|
|
3c838f1ac8 | ||
|
|
45a32542db | ||
|
|
f54bc05285 | ||
|
|
fd06f6c0d4 | ||
|
|
cc2efb6012 | ||
|
|
82973a283f | ||
|
|
4a4c78d97f | ||
|
|
3d7d233c03 | ||
|
|
ecfdafc62e | ||
|
|
f45e8840c8 | ||
|
|
5978038f77 | ||
|
|
5c12a265fa | ||
|
|
3424a93ace | ||
|
|
28e7d30f34 | ||
|
|
cec508dafb | ||
|
|
73ca21f95e | ||
|
|
b0c516bfa1 | ||
|
|
7918027fad | ||
|
|
da56a02f6c | ||
|
|
c230bc312d | ||
|
|
c3f26834d6 | ||
|
|
41ef136059 | ||
|
|
9d31e3498c | ||
|
|
d2565cefae | ||
|
|
0bdfa8d3ff | ||
|
|
53923e8377 | ||
|
|
64c3f790a2 |
33
ChangeLog
33
ChangeLog
@@ -1,3 +1,36 @@
|
||||
2006-04-24 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* VERSION: Updated to rtems-4.6.6.
|
||||
|
||||
2006-04-24 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* aclocal/version.m4: Updated to rtems-4.6.6.
|
||||
|
||||
2005-10-06 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* VERSION: Updated to rtems-4.6.5.
|
||||
|
||||
2005-10-06 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* aclocal/version.m4: Updated to rtems-4.6.5.
|
||||
|
||||
2005-10-05 Jiri Gaisler <jiri@gaisler.com>
|
||||
Edvin Catovic <edvin@gaisler.com>
|
||||
Konrad Eisele <konrad@gaisler.com>
|
||||
|
||||
PR 827/bsps
|
||||
* aclocal/bsp-alias.m4, aclocal/check-bsps.m4: Portion of large update
|
||||
of SPARC BSPs. Includes addition of sis, leon2 and leon3 BSPs,
|
||||
deletion of leon BSP, addition of SMC91111 NIC driver and much more.
|
||||
|
||||
2005-09-01 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* VERSION: Updated to rtems-4.6.4.
|
||||
|
||||
2005-09-01 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* aclocal/version.m4: Updated to rtems-4.6.4.
|
||||
|
||||
2005-03-17 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* VERSION: Updated to rtems-4.6.3.
|
||||
|
||||
@@ -24,9 +24,9 @@ AC_DEFUN([_RTEMS_BSP_ALIAS],
|
||||
pc686) $2=pc386 ;; # i386 - PC with PentiumPro
|
||||
pck6) $2=pc386 ;; # i386 - PC with K6
|
||||
bare*) $2=bare ;; # EXP: bare-aliases
|
||||
erc32nfp) $2=erc32 ;; # erc32 without fpu
|
||||
leon1) $2=leon ;; # leon without fpu
|
||||
leon2) $2=leon ;; # leon with fpu
|
||||
sis) $2=erc32 ;; # ERC32 SIS simulator
|
||||
leon2) $2=leon2 ;; # leon with fpu
|
||||
leon3) $2=leon3 ;; # another leon variant
|
||||
simsh7032) $2=shsim ;; # SH7032 simulator
|
||||
simsh7045) $2=shsim ;; # SH7045 simulator
|
||||
*) $2=$1;;
|
||||
|
||||
@@ -21,8 +21,8 @@ AC_MSG_CHECKING([for bsps])
|
||||
mbx8xx) $1="[$]$1 mbx821_001 mbx860_002 mbx860_005b";;
|
||||
motorola_powerpc) $1="[$]$1 mvme2307 mcp750 mtx603e";;
|
||||
pc386) $1="[$]$1 pc386 pc386dx pc486 pc586 pc686 pck6";;
|
||||
erc32) $1="[$]$1 erc32 erc32nfp";;
|
||||
leon) $1="[$]$1 leon1 leon2";;
|
||||
erc32) $1="[$]$1 erc32 sis";;
|
||||
leon) $1="[$]$1 leon2 leon3";;
|
||||
sim68000) $1="[$]$1 sim68000 simcpu32";;
|
||||
shsim) $1="[$]$1 simsh7032 simsh7045";;
|
||||
*) $1="[$]$1 $file";;
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
AC_DEFUN([RTEMS_VERSIONING],
|
||||
m4_define([_RTEMS_VERSION],[4.6.2]))
|
||||
m4_define([_RTEMS_VERSION],[4.6.6]))
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
2006-04-24 Jiri Gaisler <jiri@gaisler.com>
|
||||
Edvin Catovic <edvin@gaisler.com>
|
||||
|
||||
PR bsps/972
|
||||
* shmdr/shm_driver.h: Add sparc lock/unlock values.
|
||||
|
||||
2003-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Use rtems-bugs@rtems.com as bug report email address.
|
||||
|
||||
@@ -1,3 +1,39 @@
|
||||
2006-04-24 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* configure.ac, console/console.c:
|
||||
|
||||
2005-11-08 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR832/bsps
|
||||
* startup/ldsegs.S: move CPU segment descriptor tables from .text to
|
||||
.data; the CPU modifies the descriptor tables and this could be a
|
||||
problem: a) if text segment is ever write-protected b) rtems-gdb-stub
|
||||
checksums the text segment against the file gdb is using. A checksum
|
||||
mismatch results because of the CPU touching the accessed bit...
|
||||
|
||||
2005-08-23 Karel Gardas <kgardas@objectsecurity.com>>
|
||||
|
||||
* timer/timer.c: Enhance to use either interupt-based timer
|
||||
functions on older CPUs or to use TSC-based timer functions on
|
||||
more recent (Pentium and above) CPUs. The decision is made in
|
||||
Timer_initialize function when it is called for the first time
|
||||
based on a result obtained from cpuid instruction during the BSP
|
||||
initialization phase. During the first call, there are also late
|
||||
bindings to the implementation functions initialized to
|
||||
appropriate values.
|
||||
|
||||
2005-09-29 Thomas Doerfler <Thomas.Doerfler@imd-systems.de>
|
||||
|
||||
PR 649/filesystem
|
||||
* ide/idecfg.c: added configuration items for primary/secondary
|
||||
IDE interface
|
||||
* configure.ac: added configuration items for primary/secondary
|
||||
IDE interface
|
||||
|
||||
2005-09-01 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* clock/Makefile.am, include/Makefile.am: Install tod.h
|
||||
|
||||
2005-01-20 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
PR 743/bsps
|
||||
|
||||
@@ -9,21 +9,6 @@ PGM = $(ARCH)/clock.rel
|
||||
C_FILES = ckinit.c todcfg.c tod.c
|
||||
clock_rel_OBJECTS = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
|
||||
|
||||
include_HEADERS = tod.h
|
||||
|
||||
tod.h: $(top_srcdir)/../../shared/tod.h
|
||||
cp $< $@
|
||||
CLEANFILES = tod
|
||||
|
||||
$(PROJECT_INCLUDE):
|
||||
$(mkinstalldirs) $@
|
||||
|
||||
$(PROJECT_INCLUDE)/%.h: %.h
|
||||
$(INSTALL_DATA) $< $@
|
||||
|
||||
PREINSTALL_FILES = $(PROJECT_INCLUDE) \
|
||||
$(include_HEADERS:%=$(PROJECT_INCLUDE)/%)
|
||||
|
||||
include $(top_srcdir)/../../../../../../automake/compile.am
|
||||
include $(top_srcdir)/../../../../../../automake/lib.am
|
||||
|
||||
|
||||
@@ -16,6 +16,28 @@ RTEMS_CANONICALIZE_TOOLS
|
||||
|
||||
RTEMS_CHECK_NETWORKING
|
||||
|
||||
RTEMS_BSPOPTS_SET([USE_COM1_AS_CONSOLE],[*],[0])
|
||||
RTEMS_BSPOPTS_HELP([USE_COM1_AS_CONSOLE],
|
||||
[Determines, whether the console will be associated with the standard
|
||||
VGA display or with the COM1 serial port. Currently only the VGA
|
||||
display and COM1 support printk.])
|
||||
|
||||
RTEMS_BSPOPTS_SET([IDE_USE_PRIMARY_INTERFACE],[*],[1])
|
||||
RTEMS_BSPOPTS_HELP([IDE_USE_PRIMARY_INTERFACE],
|
||||
[Determines, whether RTEMS will try to use the primary IDE interface.
|
||||
Disable it, if:
|
||||
- you have no primary IDE interface
|
||||
- or you have no disk attached to this interface
|
||||
- or you do not want to access disks attached to this interface])
|
||||
|
||||
RTEMS_BSPOPTS_SET([IDE_USE_SECONDARY_INTERFACE],[*],[0])
|
||||
RTEMS_BSPOPTS_HELP([IDE_USE_SECONDARY_INTERFACE],
|
||||
[Determines, whether RTEMS will try to use the primary IDE interface.
|
||||
Enable it, if:
|
||||
- you have a secondary IDE interface
|
||||
- and you have at least one disk attached to this interface
|
||||
- and you do want to access disks attached to this interface])
|
||||
|
||||
## if this is an i386, does gas have good code16 support?
|
||||
RTEMS_I386_GAS_CODE16
|
||||
AM_CONDITIONAL(RTEMS_GAS_CODE16,[test "$RTEMS_GAS_CODE16" = "yes"])
|
||||
|
||||
@@ -61,10 +61,14 @@ void __assert (const char *file, int line, const char *msg);
|
||||
* to same serial device it does not work that great
|
||||
*/
|
||||
|
||||
#if (USE_COM1_AS_CONSOLE == 1)
|
||||
int BSPConsolePort = BSP_UART_COM1;
|
||||
int BSPPrintkPort = BSP_UART_COM1;
|
||||
#else
|
||||
int BSPConsolePort = BSP_CONSOLE_PORT_CONSOLE;
|
||||
int BSPPrintkPort = BSP_CONSOLE_PORT_CONSOLE;
|
||||
#endif
|
||||
|
||||
/* int BSPConsolePort = BSP_UART_COM2; */
|
||||
int BSPBaseBaud = 115200;
|
||||
|
||||
extern BSP_polling_getchar_function_type BSP_poll_char;
|
||||
|
||||
@@ -36,7 +36,8 @@ extern ide_ctrl_fns_t pc386_ide_ctrl_fns;
|
||||
|
||||
/* IDE controllers Table */
|
||||
ide_controller_bsp_table_t IDE_Controller_Table[] = {
|
||||
{"/dev/ide",
|
||||
#if IDE_USE_PRIMARY_INTERFACE
|
||||
{"/dev/ide0",
|
||||
IDE_STD, /* standard IDE controller */
|
||||
&pc386_ide_ctrl_fns,
|
||||
NULL, /* probe for IDE standard registers */
|
||||
@@ -45,6 +46,21 @@ ide_controller_bsp_table_t IDE_Controller_Table[] = {
|
||||
FALSE,0, /* not (yet) interrupt driven */
|
||||
NULL
|
||||
}
|
||||
#if IDE_USE_SECONDARY_INTERFACE
|
||||
, /* colon only neede when bith interfaces present */
|
||||
#endif
|
||||
#endif
|
||||
#if IDE_USE_SECONDARY_INTERFACE
|
||||
{"/dev/ide1",
|
||||
IDE_STD, /* standard IDE controller */
|
||||
&pc386_ide_ctrl_fns,
|
||||
NULL, /* probe for IDE standard registers */
|
||||
FALSE, /* not (yet) initialized */
|
||||
0x170, /* base I/O address for second IDE controller */
|
||||
FALSE,0, /* not (yet) interrupt driven */
|
||||
NULL
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Number of rows in IDE_Controller_Table */
|
||||
|
||||
@@ -9,11 +9,15 @@ if HAS_NETWORKING
|
||||
WD80X3 = wd80x3.h
|
||||
endif
|
||||
|
||||
include_HEADERS = bsp.h crt.h coverhd.h $(WD80X3) bspopts.h
|
||||
include_HEADERS = bsp.h crt.h coverhd.h tod.h $(WD80X3) bspopts.h
|
||||
|
||||
coverhd.h: $(top_srcdir)/../../shared/include/coverhd.h
|
||||
cp $< $@
|
||||
CLEANFILES = coverhd.h
|
||||
|
||||
tod.h: $(top_srcdir)/../../shared/tod.h
|
||||
cp $< $@
|
||||
|
||||
CLEANFILES = coverhd.h tod.h
|
||||
|
||||
$(PROJECT_INCLUDE):
|
||||
$(mkinstalldirs) $@
|
||||
|
||||
@@ -187,6 +187,7 @@ SYM (_return_to_monitor):
|
||||
| GDT itself
|
||||
+--------------------------------------------------------------------------*/
|
||||
|
||||
BEGIN_DATA
|
||||
.p2align 4
|
||||
|
||||
PUBLIC (_Global_descriptor_table)
|
||||
@@ -216,7 +217,6 @@ SYM (gdtdesc):
|
||||
/*---------------------------------------------------------------------------+
|
||||
| IDT itself
|
||||
+---------------------------------------------------------------------------*/
|
||||
BEGIN_DATA
|
||||
.p2align 4
|
||||
|
||||
PUBLIC(Interrupt_descriptor_table)
|
||||
@@ -224,18 +224,17 @@ SYM(Interrupt_descriptor_table):
|
||||
.rept 256
|
||||
.word 0,0,0,0
|
||||
.endr
|
||||
END_DATA
|
||||
|
||||
/*---------------------------------------------------------------------------+
|
||||
| Descriptor of IDT
|
||||
+--------------------------------------------------------------------------*/
|
||||
BEGIN_CODE
|
||||
|
||||
.p2align 4
|
||||
SYM(idtdesc):
|
||||
.word (256*8 - 1)
|
||||
.long SYM (Interrupt_descriptor_table)
|
||||
|
||||
END_CODE
|
||||
END_DATA
|
||||
|
||||
.section .m_hdr
|
||||
.long 0x1BADB002
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
| $Id$
|
||||
+--------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <bsp.h>
|
||||
@@ -51,7 +50,7 @@
|
||||
#define LEAST_VALID 1 /* Don't trust a value lower than this. */
|
||||
#define SLOW_DOWN_IO 0x80 /* io which does nothing */
|
||||
|
||||
#define TWO_MS (rtems_unsigned32)(2000) /* TWO_MS = 2000us (sic!) */
|
||||
#define TWO_MS (uint32_t)(2000) /* TWO_MS = 2000us (sic!) */
|
||||
|
||||
#define MSK_NULL_COUNT 0x40 /* bit counter available for reading */
|
||||
|
||||
@@ -59,27 +58,36 @@
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Global Variables
|
||||
+--------------------------------------------------------------------------*/
|
||||
volatile rtems_unsigned32 Ttimer_val;
|
||||
volatile uint32_t Ttimer_val;
|
||||
rtems_boolean Timer_driver_Find_average_overhead = TRUE;
|
||||
volatile unsigned int fastLoop1ms, slowLoop1ms;
|
||||
void (*Timer_initialize_function)(void) = 0;
|
||||
uint32_t (*Read_timer_function)(void) = 0;
|
||||
void (*Timer_exit_function)(void) = 0;
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| External Prototypes
|
||||
+--------------------------------------------------------------------------*/
|
||||
extern void timerisr(void);
|
||||
/* timer (int 08h) Interrupt Service Routine (defined in 'timerisr.s') */
|
||||
extern int x86_capability;
|
||||
|
||||
/*
|
||||
* forward declarations
|
||||
*/
|
||||
|
||||
void Timer_exit();
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Pentium optimized timer handling.
|
||||
+--------------------------------------------------------------------------*/
|
||||
#if defined(pentium)
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: rdtsc
|
||||
| Description: Read the value of PENTIUM on-chip cycle counter.
|
||||
| Global Variables: None.
|
||||
| Arguments: None.
|
||||
| Returns: Value of PENTIUM on-chip cycle counter.
|
||||
| Returns: Value of PENTIUM on-chip cycle counter.
|
||||
+--------------------------------------------------------------------------*/
|
||||
static inline unsigned long long
|
||||
rdtsc(void)
|
||||
@@ -90,30 +98,28 @@ rdtsc(void)
|
||||
return result;
|
||||
} /* rdtsc */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: Timer_exit
|
||||
| Description: Timer cleanup routine at RTEMS exit. NOTE: This routine is
|
||||
| not really necessary, since there will be a reset at exit.
|
||||
| Global Variables: None.
|
||||
| Arguments: None.
|
||||
| Returns: Nothing.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
void
|
||||
Timer_exit(void)
|
||||
tsc_timer_exit(void)
|
||||
{
|
||||
} /* Timer_exit */
|
||||
|
||||
} /* tsc_timer_exit */
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: Timer_initialize
|
||||
| Description: Timer initialization routine.
|
||||
| Global Variables: Ttimer_val.
|
||||
| Arguments: None.
|
||||
| Returns: Nothing.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
void
|
||||
Timer_initialize(void)
|
||||
tsc_timer_initialize(void)
|
||||
{
|
||||
static rtems_boolean First = TRUE;
|
||||
|
||||
@@ -124,22 +130,21 @@ Timer_initialize(void)
|
||||
atexit(Timer_exit); /* Try not to hose the system at exit. */
|
||||
}
|
||||
Ttimer_val = rdtsc(); /* read starting time */
|
||||
} /* Timer_initialize */
|
||||
|
||||
} /* tsc_timer_initialize */
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: Read_timer
|
||||
| Description: Read hardware timer value.
|
||||
| Global Variables: Ttimer_val, Timer_driver_Find_average_overhead.
|
||||
| Arguments: None.
|
||||
| Returns: Nothing.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
rtems_unsigned32
|
||||
Read_timer(void)
|
||||
uint32_t
|
||||
tsc_read_timer(void)
|
||||
{
|
||||
register rtems_unsigned32 total;
|
||||
register uint32_t total;
|
||||
|
||||
total = (rtems_unsigned32)(rdtsc() - Ttimer_val);
|
||||
total = (uint32_t)(rdtsc() - Ttimer_val);
|
||||
|
||||
if (Timer_driver_Find_average_overhead)
|
||||
return total;
|
||||
@@ -147,23 +152,20 @@ Read_timer(void)
|
||||
return 0; /* below timer resolution */
|
||||
else
|
||||
return (total - AVG_OVERHEAD);
|
||||
} /* Read_timer */
|
||||
|
||||
#else /* pentium */
|
||||
} /* tsc_read_timer */
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Non-Pentium timer handling.
|
||||
+--------------------------------------------------------------------------*/
|
||||
#define US_PER_ISR 250 /* Number of micro-seconds per timer interruption */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: Timer_exit
|
||||
| Description: Timer cleanup routine at RTEMS exit. NOTE: This routine is
|
||||
| not really necessary, since there will be a reset at exit.
|
||||
| Global Variables: None.
|
||||
| Arguments: None.
|
||||
| Returns: Nothing.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
static void
|
||||
timerOff(const rtems_raw_irq_connect_data* used)
|
||||
@@ -178,8 +180,7 @@ timerOff(const rtems_raw_irq_connect_data* used)
|
||||
outport_byte(TIMER_CNTR0, 0);
|
||||
} /* Timer_exit */
|
||||
|
||||
|
||||
static void
|
||||
static void
|
||||
timerOn(const rtems_raw_irq_connect_data* used)
|
||||
{
|
||||
/* load timer for US_PER_ISR microsecond period */
|
||||
@@ -192,10 +193,11 @@ timerOn(const rtems_raw_irq_connect_data* used)
|
||||
BSP_irq_enable_at_i8259s(used->idtIndex - BSP_IRQ_VECTOR_BASE);
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
timerIsOn(const rtems_raw_irq_connect_data *used)
|
||||
{
|
||||
return BSP_irq_enabled_at_i8259s(used->idtIndex - BSP_IRQ_VECTOR_BASE);}
|
||||
return BSP_irq_enabled_at_i8259s(used->idtIndex - BSP_IRQ_VECTOR_BASE);
|
||||
}
|
||||
|
||||
static rtems_raw_irq_connect_data timer_raw_irq_data = {
|
||||
BSP_PERIODIC_TIMER + BSP_IRQ_VECTOR_BASE,
|
||||
@@ -211,10 +213,10 @@ static rtems_raw_irq_connect_data timer_raw_irq_data = {
|
||||
| not really necessary, since there will be a reset at exit.
|
||||
| Global Variables: None.
|
||||
| Arguments: None.
|
||||
| Returns: Nothing.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
void
|
||||
Timer_exit(void)
|
||||
i386_timer_exit(void)
|
||||
{
|
||||
i386_delete_idt_entry (&timer_raw_irq_data);
|
||||
} /* Timer_exit */
|
||||
@@ -224,10 +226,10 @@ Timer_exit(void)
|
||||
| Description: Timer initialization routine.
|
||||
| Global Variables: Ttimer_val.
|
||||
| Arguments: None.
|
||||
| Returns: Nothing.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
void
|
||||
Timer_initialize(void)
|
||||
i386_timer_initialize(void)
|
||||
{
|
||||
static rtems_boolean First = TRUE;
|
||||
|
||||
@@ -248,19 +250,18 @@ Timer_initialize(void)
|
||||
Ttimer_val = 0;
|
||||
} /* Timer_initialize */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: Read_timer
|
||||
| Description: Read hardware timer value.
|
||||
| Global Variables: Ttimer_val, Timer_driver_Find_average_overhead.
|
||||
| Arguments: None.
|
||||
| Returns: Nothing.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
rtems_unsigned32
|
||||
Read_timer(void)
|
||||
uint32_t
|
||||
i386_read_timer(void)
|
||||
{
|
||||
register rtems_unsigned32 total, clicks;
|
||||
register rtems_unsigned8 lsb, msb;
|
||||
register uint32_t total, clicks;
|
||||
register uint8_t lsb, msb;
|
||||
|
||||
outport_byte(TIMER_MODE, TIMER_SEL0|TIMER_LATCH);
|
||||
inport_byte(TIMER_CNTR0, lsb);
|
||||
@@ -276,28 +277,68 @@ Read_timer(void)
|
||||
return (total - AVG_OVERHEAD);
|
||||
}
|
||||
|
||||
#endif /* pentium */
|
||||
/*
|
||||
* General timer functions using either TSC-based implementation
|
||||
* or interrupt-based implementation
|
||||
*/
|
||||
|
||||
void
|
||||
Timer_initialize(void)
|
||||
{
|
||||
static rtems_boolean First = TRUE;
|
||||
|
||||
if (First) {
|
||||
if (x86_capability & (1 << 4) ) {
|
||||
#if defined(DEBUG)
|
||||
printk("TSC: timer initialization\n");
|
||||
#endif
|
||||
Timer_initialize_function = &tsc_timer_initialize;
|
||||
Read_timer_function = &tsc_read_timer;
|
||||
Timer_exit_function = &tsc_timer_exit;
|
||||
}
|
||||
else {
|
||||
#if defined(DEBUG)
|
||||
printk("ISR: timer initialization\n");
|
||||
#endif
|
||||
Timer_initialize_function = &i386_timer_initialize;
|
||||
Read_timer_function = &i386_read_timer;
|
||||
Timer_exit_function = &i386_timer_exit;
|
||||
}
|
||||
First = FALSE;
|
||||
}
|
||||
(*Timer_initialize_function)();
|
||||
}
|
||||
|
||||
uint32_t
|
||||
Read_timer()
|
||||
{
|
||||
return (*Read_timer_function)();
|
||||
}
|
||||
|
||||
void
|
||||
Timer_exit()
|
||||
{
|
||||
return (*Timer_exit_function)();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: Empty_function
|
||||
| Description: Empty function used in time tests.
|
||||
| Global Variables: None.
|
||||
| Arguments: None.
|
||||
| Returns: Nothing.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
rtems_status_code Empty_function(void)
|
||||
{
|
||||
return RTEMS_SUCCESSFUL;
|
||||
} /* Empty function */
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: Set_find_average_overhead
|
||||
| Description: Set internal Timer_driver_Find_average_overhead flag value.
|
||||
| Global Variables: Timer_driver_Find_average_overhead.
|
||||
| Arguments: find_flag - new value of the flag.
|
||||
| Returns: Nothing.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
void
|
||||
Set_find_average_overhead(rtems_boolean find_flag)
|
||||
@@ -319,11 +360,10 @@ void loadTimerValue( unsigned short loadedValue )
|
||||
outport_byte(TIMER_CNTR0, (loadedValue >> 8) & 0xff);
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Description: Reads the current value of the timer, and converts the
|
||||
| number of ticks to micro-seconds.
|
||||
| Returns: number of clock bits elapsed since last load.
|
||||
| Description: Reads the current value of the timer, and converts the
|
||||
| number of ticks to micro-seconds.
|
||||
| Returns: number of clock bits elapsed since last load.
|
||||
+--------------------------------------------------------------------------*/
|
||||
unsigned int readTimer0()
|
||||
{
|
||||
@@ -338,7 +378,7 @@ unsigned int readTimer0()
|
||||
count = ( msb << 8 ) | lsb ;
|
||||
if (status & RB_OUTPUT )
|
||||
count += lastLoadedValue;
|
||||
|
||||
|
||||
return (2*lastLoadedValue - count);
|
||||
}
|
||||
|
||||
@@ -372,19 +412,19 @@ Calibrate_loop_1ms(void)
|
||||
unsigned int targetClockBits, currentClockBits;
|
||||
unsigned int slowLoopGranularity, fastLoopGranularity;
|
||||
rtems_interrupt_level level;
|
||||
|
||||
|
||||
#ifdef DEBUG_CALIBRATE
|
||||
printk( "Calibrate_loop_1ms is starting, please wait ( but not too loooong. )\n" );
|
||||
#endif
|
||||
#endif
|
||||
targetClockBits = US_TO_TICK(1000);
|
||||
|
||||
|
||||
rtems_interrupt_disable(level);
|
||||
/*
|
||||
* Fill up the cache to get a correct offset
|
||||
*/
|
||||
Timer0Reset();
|
||||
readTimer0();
|
||||
/*
|
||||
/*
|
||||
* Compute the minimal offset to apply due to read counter register.
|
||||
*/
|
||||
offset = 0xffffffff;
|
||||
@@ -437,24 +477,24 @@ Calibrate_loop_1ms(void)
|
||||
while (1);
|
||||
}
|
||||
slowLoopGranularity = (res - offset - emptyCall)/ 10;
|
||||
|
||||
|
||||
if (slowLoopGranularity == 0) {
|
||||
printk("Problem #3 in Calibrate_loop_1ms in file libbsp/i386/pc386/timer/timer.c\n");
|
||||
while (1);
|
||||
}
|
||||
|
||||
targetClockBits += offset;
|
||||
#ifdef DEBUG_CALIBRATE
|
||||
#ifdef DEBUG_CALIBRATE
|
||||
printk("offset = %u, emptyCall = %u, targetClockBits = %u\n",
|
||||
offset, emptyCall, targetClockBits);
|
||||
printk("slowLoopGranularity = %u fastLoopGranularity = %u\n",
|
||||
slowLoopGranularity, fastLoopGranularity);
|
||||
#endif
|
||||
#endif
|
||||
slowLoop1ms = (targetClockBits - emptyCall) / slowLoopGranularity;
|
||||
if (slowLoop1ms != 0) {
|
||||
fastLoop1ms = targetClockBits % slowLoopGranularity;
|
||||
if (fastLoop1ms > emptyCall) fastLoop1ms -= emptyCall;
|
||||
}
|
||||
}
|
||||
else
|
||||
fastLoop1ms = targetClockBits - emptyCall / fastLoopGranularity;
|
||||
|
||||
@@ -462,7 +502,7 @@ Calibrate_loop_1ms(void)
|
||||
/*
|
||||
* calibrate slow loop
|
||||
*/
|
||||
|
||||
|
||||
while(1)
|
||||
{
|
||||
int previousSign = 0; /* 0 = unset, 1 = incrementing, 2 = decrementing */
|
||||
@@ -497,7 +537,7 @@ Calibrate_loop_1ms(void)
|
||||
/*
|
||||
* calibrate fast loop
|
||||
*/
|
||||
|
||||
|
||||
if (fastLoopGranularity != 0 ) {
|
||||
while(1) {
|
||||
int previousSign = 0; /* 0 = unset, 1 = incrementing, 2 = decrementing */
|
||||
@@ -525,11 +565,11 @@ Calibrate_loop_1ms(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG_CALIBRATE
|
||||
#ifdef DEBUG_CALIBRATE
|
||||
printk("slowLoop1ms = %u, fastLoop1ms = %u\n", slowLoop1ms, fastLoop1ms);
|
||||
#endif
|
||||
#endif
|
||||
rtems_interrupt_enable(level);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
@@ -537,7 +577,7 @@ Calibrate_loop_1ms(void)
|
||||
| Description: loop which waits at least timeToWait ms
|
||||
| Global Variables: loop1ms
|
||||
| Arguments: timeToWait
|
||||
| Returns: Nothing.
|
||||
| Returns: Nothing.
|
||||
+--------------------------------------------------------------------------*/
|
||||
void
|
||||
Wait_X_ms( unsigned int timeToWait){
|
||||
@@ -550,9 +590,3 @@ Wait_X_ms( unsigned int timeToWait){
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
2005-11-08 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR832/bsps
|
||||
* pci/pcibios.c: replace BSP_pciFindDevice implementation by pcibios
|
||||
call.
|
||||
|
||||
2004-09-27 Greg Menke <gregory.menke@gsfc.nasa.gov>
|
||||
|
||||
PR 608/bsps
|
||||
|
||||
@@ -281,54 +281,17 @@ int
|
||||
BSP_pciFindDevice( unsigned short vendorid, unsigned short deviceid,
|
||||
int instance, int *pbus, int *pdev, int *pfun )
|
||||
{
|
||||
int sig;
|
||||
unsigned int d;
|
||||
unsigned short s;
|
||||
unsigned char bus,dev,fun,hd;
|
||||
int sig, rval;
|
||||
|
||||
for (bus=0; bus<BusCountPCI(); bus++)
|
||||
{
|
||||
for (dev=0; dev<PCI_MAX_DEVICES; dev++)
|
||||
{
|
||||
sig = PCIB_DEVSIG_MAKE(bus,dev,0);
|
||||
rval = pcib_find_by_devid(vendorid, deviceid, instance, &sig);
|
||||
|
||||
/* pci_read_config_byte(bus,dev,0, PCI_HEADER_TYPE, &hd); */
|
||||
pcib_conf_read8(sig, 0xe, &hd);
|
||||
|
||||
hd = (hd & PCI_MULTI_FUNCTION ? PCI_MAX_FUNCTIONS : 1);
|
||||
|
||||
for (fun=0; fun<hd; fun++) {
|
||||
/*
|
||||
* The last devfn id/slot is special; must skip it
|
||||
*/
|
||||
if( PCI_MAX_DEVICES-1 == dev && PCI_MAX_FUNCTIONS-1 == fun )
|
||||
break;
|
||||
|
||||
/*pci_read_config_dword(bus,dev,fun,PCI_VENDOR_ID,&d); */
|
||||
pcib_conf_read32(sig, 0, &d);
|
||||
if( d == -1 )
|
||||
continue;
|
||||
#ifdef PCI_DEBUG
|
||||
printk("BSP_pciFindDevice: found 0x%08x at %d/%d/%d\n",d,bus,dev,fun);
|
||||
#endif
|
||||
/* pci_read_config_word(bus,dev,fun,PCI_VENDOR_ID,&s); */
|
||||
pcib_conf_read16(sig, 0, &s);
|
||||
if (vendorid != s)
|
||||
continue;
|
||||
|
||||
/* pci_read_config_word(bus,dev,fun,PCI_DEVICE_ID,&s); */
|
||||
pcib_conf_read16(sig, 0x2, &s);
|
||||
if (deviceid == s) {
|
||||
if (instance--) continue;
|
||||
*pbus=bus;
|
||||
*pdev=dev;
|
||||
*pfun=fun;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( PCIB_ERR_SUCCESS == rval ) {
|
||||
*pbus = PCIB_DEVSIG_BUS(sig);
|
||||
*pdev = PCIB_DEVSIG_DEV(sig);
|
||||
*pfun = PCIB_DEVSIG_FUNC(sig);
|
||||
}
|
||||
return -1;
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
2006-03-07 Aaron Frye <aaron@frye.com>
|
||||
|
||||
PR 719/bsps
|
||||
* m68kpretaskinghook.c: The optimizer on gcc 3.4.2 assumes that the
|
||||
address of a variable cannot be 0, so it optimizes out any such
|
||||
checks. this breaks the shared m68k bsp_pretasking_hook() which uses
|
||||
such a check to determine heap size during runtime.
|
||||
|
||||
2004-03-05 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
PR 505/bsps
|
||||
|
||||
@@ -36,20 +36,21 @@ extern rtems_configuration_table BSP_Configuration;
|
||||
|
||||
extern void *_RamBase;
|
||||
extern void *_WorkspaceBase;
|
||||
extern void *_HeapSize;
|
||||
extern volatile void *_HeapSize;
|
||||
|
||||
|
||||
unsigned long _M68k_Ramsize;
|
||||
|
||||
void bsp_pretasking_hook(void)
|
||||
{
|
||||
void *heapStart;
|
||||
unsigned long heapSize = (unsigned long)&_HeapSize;
|
||||
unsigned long ramSpace;
|
||||
void *heapStart;
|
||||
volatile unsigned long heapSize = (volatile unsigned long)&_HeapSize;
|
||||
unsigned long ramSpace;
|
||||
|
||||
heapStart = (void *)
|
||||
((unsigned long)&_WorkspaceBase + BSP_Configuration.work_space_size);
|
||||
ramSpace = (unsigned long) &_RamBase + _M68k_Ramsize - (unsigned long) heapStart;
|
||||
ramSpace = (unsigned long) &_RamBase + _M68k_Ramsize -
|
||||
(unsigned long) heapStart;
|
||||
|
||||
if (heapSize == 0)
|
||||
heapSize = ramSpace;
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
2005-11-07 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR 834/bsps
|
||||
* vectors/vectors.S: reload stack pointer/R1 from exception frame
|
||||
instead of adding static offset.
|
||||
|
||||
2005-10-06 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR 833/bsps
|
||||
* irq/irq_asm.S: Currently, all (new exception) BSPs explicitely enable
|
||||
the FPU across the user ISR but DONT save/restore the FPU context.
|
||||
Any use of the FPU fron the user handler (e.g., due to GCC
|
||||
optimizations) result in corruption. The fix results in an exception
|
||||
in such cases (user ISR must explicitely save/enable/restore FPU).
|
||||
|
||||
2003-12-19 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
PR 545/bsps
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
* Till Straumann <strauman@slac.stanford.edu>, 2003/7:
|
||||
* - store isr nesting level in _ISR_Nest_level rather than
|
||||
* SPRG0 - RTEMS relies on that variable.
|
||||
* Till Straumann <strauman@slac.stanford.edu>, 2005/4:
|
||||
* - DONT enable FP across user USR since fpregs are never saved!!
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
@@ -88,14 +90,8 @@ SYM (shared_raw_irq_code_entry):
|
||||
/*
|
||||
* Enable data and instruction address translation, exception recovery
|
||||
*
|
||||
* also, on CPUs with FP, enable FP so that FP context can be
|
||||
* saved and restored (using FP instructions)
|
||||
*/
|
||||
#if (PPC_HAS_FPU == 0)
|
||||
ori r3, r3, MSR_RI | MSR_IR | MSR_DR
|
||||
#else
|
||||
ori r3, r3, MSR_RI | MSR_IR | MSR_DR | MSR_FP
|
||||
#endif
|
||||
mtmsr r3
|
||||
SYNC
|
||||
/*
|
||||
@@ -298,6 +294,27 @@ nested:
|
||||
rfi
|
||||
|
||||
switch:
|
||||
#if ( PPC_HAS_FPU != 0 )
|
||||
#if ! defined( CPU_USE_DEFERRED_FP_SWITCH )
|
||||
#error missing include file???
|
||||
#endif
|
||||
mfmsr r4
|
||||
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
|
||||
/* if the executing thread has FP enabled propagate
|
||||
* this now so _Thread_Dispatch can save/restore the FPREGS
|
||||
* NOTE: it is *crucial* to disable the FPU across the
|
||||
* user ISR [independent of using the 'deferred'
|
||||
* strategy or not]. We don't save FP regs across
|
||||
* the user ISR and hence we prefer an exception to
|
||||
* be raised rather than experiencing corruption.
|
||||
*/
|
||||
lwz r3, SRR1_FRAME_OFFSET(r1)
|
||||
rlwimi r4, r3, 0, 18, 18 /* MSR_FP */
|
||||
#else
|
||||
ori r4, r4, MSR_FP
|
||||
#endif
|
||||
mtmsr r4
|
||||
#endif
|
||||
bl SYM (_Thread_Dispatch)
|
||||
|
||||
easy_exit:
|
||||
|
||||
@@ -137,6 +137,10 @@ SYM (push_normalized_frame):
|
||||
mtsrr0 r3
|
||||
|
||||
lwz r3, GPR3_OFFSET(r1)
|
||||
addi r1,r1, EXCEPTION_FRAME_END
|
||||
/* DONT add back the frame size but reload the value
|
||||
* stored in the frame -- maybe the exception handler
|
||||
* changed it with good reason (e.g., gdb pushed a dummy frame)
|
||||
*/
|
||||
lwz r1, GPR1_OFFSET(r1)
|
||||
SYNC
|
||||
rfi
|
||||
|
||||
@@ -1,3 +1,29 @@
|
||||
2005-11-07 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR 834/bsps
|
||||
* vectors/vectors.S: reload stack pointer/R1 from exception frame
|
||||
instead of adding static offset.
|
||||
|
||||
2005-10-06 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR 833/bsps
|
||||
* irq/irq_asm.S: Currently, all (new exception) BSPs explicitely enable
|
||||
the FPU across the user ISR but DONT save/restore the FPU context.
|
||||
Any use of the FPU fron the user handler (e.g., due to GCC
|
||||
optimizations) result in corruption. The fix results in an exception
|
||||
in such cases (user ISR must explicitely save/enable/restore FPU).
|
||||
|
||||
2005-09-12 Thomas Doerfler <Thomas.Doerfler@imd-systems.de>
|
||||
|
||||
PR 527/bsps
|
||||
PR 822/bsps
|
||||
* console/console.c, startup/bspstart.c, startup/imbx8xx.c,
|
||||
startup/mmutlbtab.c, startup/start.S, vectors/vectors_init.c:
|
||||
Currently the MBX8xx BSP does not boot, because some logical errors
|
||||
are in the startup code. Additionally, the mpc8xx shared clock driver
|
||||
does not support the clocking scheme of some of the board variants,
|
||||
which are clocked from a 32768Hz (!) external crystal.
|
||||
|
||||
2003-12-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* startup/Makefile.am: start.S instead of start.s.
|
||||
|
||||
@@ -542,6 +542,13 @@ serial_init()
|
||||
unsigned int dpaddr, memaddr;
|
||||
bd_t *bd;
|
||||
|
||||
#if NVRAM_CONFIGURE == 1
|
||||
if ( ((nvram->console_mode & 0x06) != 0x04 ) ||
|
||||
((nvram->console_mode & 0x30) != 0x20 )) {
|
||||
/*
|
||||
* FIXME: refine this condition...
|
||||
*/
|
||||
#endif
|
||||
bd = eppcbugInfo;
|
||||
|
||||
cp = cpmp;
|
||||
@@ -647,7 +654,26 @@ serial_init()
|
||||
/* Enable transmitter/receiver.
|
||||
*/
|
||||
sp->smc_smcmr |= SMCMR_REN | SMCMR_TEN;
|
||||
#if NVRAM_CONFIGURE == 1
|
||||
}
|
||||
else {
|
||||
const char bootmsg_text[]= "using EPPC bug for console I/O\n";
|
||||
_EPPCBug_pollWrite((nvram->console_printk_port & 0x70) >> 4,
|
||||
bootmsg_text,
|
||||
sizeof(bootmsg_text)-1);
|
||||
}
|
||||
#endif
|
||||
#if NVRAM_CONFIGURE == 1
|
||||
if ((nvram->console_mode & 0x30) == 0x20 ) {
|
||||
BSP_output_char = _BSP_output_char;
|
||||
}
|
||||
else {
|
||||
BSP_output_char = serial_putchar;
|
||||
}
|
||||
#else
|
||||
|
||||
BSP_output_char = serial_putchar;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
* Till Straumann <strauman@slac.stanford.edu>, 2003/7:
|
||||
* - store isr nesting level in _ISR_Nest_level rather than
|
||||
* SPRG0 - RTEMS relies on that variable.
|
||||
* Till Straumann <strauman@slac.stanford.edu>, 2005/4:
|
||||
* - DONT enable FP across user ISR since fpregs are never saved!!
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
@@ -127,11 +129,7 @@ SYM (shared_raw_irq_code_entry):
|
||||
* also, on CPUs with FP, enable FP so that FP context can be
|
||||
* saved and restored (using FP instructions)
|
||||
*/
|
||||
#if (PPC_HAS_FPU == 0)
|
||||
ori r3, r3, MSR_RI | MSR_IR | MSR_DR
|
||||
#else
|
||||
ori r3, r3, MSR_RI | MSR_IR | MSR_DR | MSR_FP
|
||||
#endif
|
||||
mtmsr r3
|
||||
SYNC
|
||||
/*
|
||||
@@ -338,6 +336,27 @@ nested:
|
||||
rfi
|
||||
|
||||
switch:
|
||||
#if ( PPC_HAS_FPU != 0 )
|
||||
#if ! defined( CPU_USE_DEFERRED_FP_SWITCH )
|
||||
#error missing include file???
|
||||
#endif
|
||||
mfmsr r4
|
||||
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
|
||||
/* if the executing thread has FP enabled propagate
|
||||
* this now so _Thread_Dispatch can save/restore the FPREGS
|
||||
* NOTE: it is *crucial* to disable the FPU across the
|
||||
* user ISR [independent of using the 'deferred'
|
||||
* strategy or not]. We don't save FP regs across
|
||||
* the user ISR and hence we prefer an exception to
|
||||
* be raised rather than experiencing corruption.
|
||||
*/
|
||||
lwz r3, SRR1_FRAME_OFFSET(r1)
|
||||
rlwimi r4, r3, 0, 18, 18 /* MSR_FP */
|
||||
#else
|
||||
ori r4, r4, MSR_FP
|
||||
#endif
|
||||
mtmsr r4
|
||||
#endif
|
||||
bl SYM (_Thread_Dispatch)
|
||||
|
||||
easy_exit:
|
||||
|
||||
@@ -148,7 +148,7 @@ void bsp_start(void)
|
||||
myCpuRevision = get_ppc_cpu_revision();
|
||||
|
||||
mmu_init();
|
||||
|
||||
|
||||
/*
|
||||
* Enable instruction and data caches. Do not force writethrough mode.
|
||||
*/
|
||||
@@ -201,7 +201,22 @@ void bsp_start(void)
|
||||
if( Cpu_table.interrupt_stack_size < 4 * 1024 )
|
||||
Cpu_table.interrupt_stack_size = 4 * 1024;
|
||||
|
||||
Cpu_table.clicks_per_usec = 1; /* for 4MHz extclk */
|
||||
#if ( defined(mbx821_001b) ||\
|
||||
defined(mbx821_002b) ||\
|
||||
defined(mbx821_003b) ||\
|
||||
defined(mbx821_004b) ||\
|
||||
defined(mbx821_005b) ||\
|
||||
defined(mbx821_006b) ||\
|
||||
defined(mbx860_001b) ||\
|
||||
defined(mbx860_002b) ||\
|
||||
defined(mbx860_003b) ||\
|
||||
defined(mbx860_004b) ||\
|
||||
defined(mbx860_005b) ||\
|
||||
defined(mbx860_006b))
|
||||
Cpu_table.clicks_per_usec = 0; /* for 32768 Hz oscclk */
|
||||
#else
|
||||
Cpu_table.clicks_per_usec = 1; /* for 4MHz oscclk */
|
||||
#endif
|
||||
Cpu_table.serial_per_sec = 10000000;
|
||||
Cpu_table.serial_external_clock = 1;
|
||||
Cpu_table.serial_xon_xoff = 0;
|
||||
|
||||
@@ -271,6 +271,7 @@ void _InitMBX8xx (void)
|
||||
m8xx.sccrk = M8xx_UNLOCK_KEY; /* unlock SCCR */
|
||||
m8xx.sccr = 0x02800000; /* for MBX860/MBX821 */
|
||||
|
||||
#if 0 /* IMD hack: do not init PLL after EPPCbug load */
|
||||
/* Initialize the PLL, Low-Power, and Reset Control Register (PLPRCR) */
|
||||
/* - set the clock speed and set normal power mode */
|
||||
m8xx.plprck = M8xx_UNLOCK_KEY; /* unlock PLPRCR */
|
||||
@@ -300,6 +301,7 @@ void _InitMBX8xx (void)
|
||||
m8xx.plprcr = 0x4C400000;
|
||||
#else
|
||||
#error "MBX board not defined"
|
||||
#endif
|
||||
#endif
|
||||
/* Unlock the timebase and decrementer registers. */
|
||||
m8xx.tbk = M8xx_UNLOCK_KEY;
|
||||
@@ -316,6 +318,7 @@ void _InitMBX8xx (void)
|
||||
_mtspr( M8xx_TBU_WR, r1 );
|
||||
_mtspr( M8xx_TBL_WR, r1 );
|
||||
|
||||
#if 0 /* IMD hack: do not init UPMs after EPPCbug load */
|
||||
/*
|
||||
* Memory Controller Initialization
|
||||
*/
|
||||
@@ -584,6 +587,7 @@ void _InitMBX8xx (void)
|
||||
#endif
|
||||
m8xx.memc[7]._br = M8xx_BR_BA(0xFC000000) | M8xx_BR_AT(0) | M8xx_BR_PS8 |
|
||||
M8xx_BR_MS_GPCM | M8xx_MEMC_BR_V;
|
||||
#endif /* IMD hack */
|
||||
/*
|
||||
* PCMCIA initialization
|
||||
*/
|
||||
|
||||
@@ -31,19 +31,8 @@
|
||||
* location is equal to its real address.
|
||||
*/
|
||||
MMU_TLB_table_t MMU_TLB_table[] = {
|
||||
#if ( defined(mbx860_001b) )
|
||||
/*
|
||||
* DRAM: CS1, Start address 0x00000000, 2M,
|
||||
* ASID=0x0, APG=0x0, not guarded memory, copyback data cache policy,
|
||||
* R/W,X for all, no ASID comparison, not cache-inhibited.
|
||||
* Last 512K block is cache-inhibited, but not guarded for use by EPPCBug.
|
||||
* EPN TWC RPN
|
||||
*/
|
||||
{ 0x00000200, 0x05, 0x000009FD }, /* DRAM - PS=512K */
|
||||
{ 0x00080200, 0x05, 0x000809FD }, /* DRAM - PS=512K */
|
||||
{ 0x00100200, 0x05, 0x001009FD }, /* DRAM - PS=512K */
|
||||
{ 0x00180200, 0x05, 0x001809FF }, /* DRAM - PS=512K, cache-inhibited */
|
||||
#elif ( defined(mbx860_002b) || \
|
||||
#if ( defined(mbx860_001b) || \
|
||||
defined(mbx860_002b) || \
|
||||
defined(mbx860_003b) || \
|
||||
defined(mbx821_001b) || \
|
||||
defined(mbx821_002b) || \
|
||||
|
||||
@@ -243,6 +243,46 @@ spin:
|
||||
*/
|
||||
#define LOADED_BY_EPPCBUG
|
||||
#define EARLY_CONSOLE
|
||||
/*
|
||||
* test function: blink orange led once
|
||||
*/
|
||||
#define LEDBLINK_DELAY (5*1000*1000)
|
||||
#define LEDPORT 0xFA100001
|
||||
#define LEDMASK 0xf0
|
||||
#define LEDON 0x00
|
||||
#define LEDOFF 0x08
|
||||
|
||||
PUBLIC_VAR(ledblink)
|
||||
SYM(ledblink):
|
||||
lis r3,LEDBLINK_DELAY>>16
|
||||
ledblink1:
|
||||
subi r3,r3,1
|
||||
cmpi 0,1,r3,0
|
||||
bne ledblink1
|
||||
/*
|
||||
* turn orange led off
|
||||
*/
|
||||
lis r3,LEDPORT@ha
|
||||
lbz r0,LEDPORT@l(r3)
|
||||
andi. r0,r0,LEDMASK
|
||||
ori r0,r0,LEDOFF
|
||||
stb r0,LEDPORT@l(r3)
|
||||
|
||||
lis r3,LEDBLINK_DELAY>>16
|
||||
ledblink2:
|
||||
subi r3,r3,1
|
||||
cmpi 0,1,r3,0
|
||||
bne ledblink2
|
||||
/*
|
||||
* turn orange led on
|
||||
*/
|
||||
lis r3,LEDPORT@ha
|
||||
lbz r0,LEDPORT@l(r3)
|
||||
andi. r0,r0,LEDMASK
|
||||
ori r0,r0,LEDON
|
||||
stb r0,LEDPORT@l(r3)
|
||||
|
||||
blr
|
||||
/*
|
||||
* Initialization code
|
||||
*/
|
||||
|
||||
@@ -144,6 +144,10 @@ SYM (push_normalized_frame):
|
||||
mtsrr0 r3
|
||||
|
||||
lwz r3, GPR3_OFFSET(r1)
|
||||
addi r1,r1, EXCEPTION_FRAME_END
|
||||
/* DONT add back the frame size but reload the value
|
||||
* stored in the frame -- maybe the exception handler
|
||||
* changed it with good reason (e.g., gdb pushed a dummy frame)
|
||||
*/
|
||||
lwz r1, GPR1_OFFSET(r1)
|
||||
SYNC
|
||||
rfi
|
||||
|
||||
@@ -115,6 +115,11 @@ void initialize_exceptions()
|
||||
if (!mpc8xx_vector_is_valid (i)) {
|
||||
continue;
|
||||
}
|
||||
#if 0 /* FIXME: refine this condition, leave Syscall for EPPCBug console */
|
||||
if (i == ASM_SYS_VECTOR) {
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
exception_table[i].exceptIndex = i;
|
||||
exception_table[i].hdl = exception_config.defaultRawEntry.hdl;
|
||||
exception_table[i].hdl.vector = i;
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2005-05-20 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
PR 717/bsps
|
||||
* bootloader/Makefile.am: Typo results in wrong flags being used.
|
||||
|
||||
2004-11-16 Richard Campbell <richard.campbell@OARcorp.com>
|
||||
|
||||
* README.MVME2100: Update to include DBAT0.
|
||||
|
||||
@@ -24,7 +24,7 @@ LD = @LD@
|
||||
DEFAULT_INCLUDES =
|
||||
|
||||
# Remove references to EABI when compiling bootloader
|
||||
BOOTLOADER_CPU_FLAGS=$(subst -msdata=eabi,,$(subst -meabi,,$(CPU_CFLAGS)))
|
||||
BOOTLOADER_CPU_CFLAGS=$(subst -msdata=eabi,,$(subst -meabi,,$(CPU_CFLAGS)))
|
||||
AM_CPPFLAGS = -D__BOOT__
|
||||
AM_CFLAGS = \
|
||||
$(GCC_SPECS) -specs bsp_specs -qrtems -mrelocatable \
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
2005-11-07 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR 834/bsps
|
||||
* vectors/vectors.S: reload stack pointer/R1 from exception frame
|
||||
instead of adding static offset.
|
||||
|
||||
2005-10-06 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR 833/bsps
|
||||
* irq/irq_asm.S: Currently, all (new exception) BSPs explicitely enable
|
||||
the FPU across the user ISR but DONT save/restore the FPU context.
|
||||
Any use of the FPU fron the user handler (e.g., due to GCC
|
||||
optimizations) result in corruption. The fix results in an exception
|
||||
in such cases (user ISR must explicitely save/enable/restore FPU).
|
||||
|
||||
2004-09-27 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
PR 680/bsps
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
* Modifications to store nesting level in global _ISR_Nest_level
|
||||
* variable instead of SPRG0. Andy Dachs <a.dachs@sstl.co.uk>
|
||||
*
|
||||
* Till Straumann <strauman@slac.stanford.edu>, 2005/4:
|
||||
* - DONT enable FP across user ISR since fpregs are never saved!!
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
@@ -93,11 +96,7 @@ SYM (shared_raw_irq_code_entry):
|
||||
* also, on CPUs with FP, enable FP so that FP context can be
|
||||
* saved and restored (using FP instructions)
|
||||
*/
|
||||
#if (PPC_HAS_FPU == 0)
|
||||
ori r3, r3, MSR_RI /*| MSR_IR | MSR_DR*/
|
||||
#else
|
||||
ori r3, r3, MSR_RI | /*MSR_IR | MSR_DR |*/ MSR_FP
|
||||
#endif
|
||||
mtmsr r3
|
||||
SYNC
|
||||
|
||||
@@ -301,6 +300,27 @@ nested:
|
||||
rfi
|
||||
|
||||
switch:
|
||||
#if ( PPC_HAS_FPU != 0 )
|
||||
#if ! defined( CPU_USE_DEFERRED_FP_SWITCH )
|
||||
#error missing include file???
|
||||
#endif
|
||||
mfmsr r4
|
||||
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
|
||||
/* if the executing thread has FP enabled propagate
|
||||
* this now so _Thread_Dispatch can save/restore the FPREGS
|
||||
* NOTE: it is *crucial* to disable the FPU across the
|
||||
* user ISR [independent of using the 'deferred'
|
||||
* strategy or not]. We don't save FP regs across
|
||||
* the user ISR and hence we prefer an exception to
|
||||
* be raised rather than experiencing corruption.
|
||||
*/
|
||||
lwz r3, SRR1_FRAME_OFFSET(r1)
|
||||
rlwimi r4, r3, 0, 18, 18 /* MSR_FP */
|
||||
#else
|
||||
ori r4, r4, MSR_FP
|
||||
#endif
|
||||
mtmsr r4
|
||||
#endif
|
||||
bl SYM (_Thread_Dispatch)
|
||||
|
||||
easy_exit:
|
||||
|
||||
@@ -139,6 +139,10 @@ SYM (push_normalized_frame):
|
||||
mtsrr0 r3
|
||||
|
||||
lwz r3, GPR3_OFFSET(r1)
|
||||
addi r1,r1, EXCEPTION_FRAME_END
|
||||
/* DONT add back the frame size but reload the value
|
||||
* stored in the frame -- maybe the exception handler
|
||||
* changed it with good reason (e.g., gdb pushed a dummy frame)
|
||||
*/
|
||||
lwz r1, GPR1_OFFSET(r1)
|
||||
SYNC
|
||||
rfi
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
2005-11-07 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR 834/bsps
|
||||
* vectors/vectors.S: reload stack pointer/R1 from exception frame
|
||||
instead of adding static offset.
|
||||
|
||||
2005-04-11 Jennifer Averett <jennifer@OARcorp.com>
|
||||
|
||||
PR 777/bsps
|
||||
* include/bsp.h: Add a Processor_Synchronize command in bsp.h
|
||||
|
||||
2005-03-17 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* irq/.cvsignore: New file.
|
||||
|
||||
@@ -136,6 +136,10 @@ extern int end; /* last address in the program */
|
||||
|
||||
#define BSP_Convert_decrementer( _value ) ( (unsigned long long) _value )
|
||||
|
||||
/* macros */
|
||||
#define Processor_Synchronize() \
|
||||
asm(" eieio ")
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_isr_entry set_vector( /* returns old vector */
|
||||
|
||||
@@ -155,6 +155,10 @@ SYM (push_normalized_frame):
|
||||
mtsrr0 r3
|
||||
|
||||
lwz r3, GPR3_OFFSET(r1)
|
||||
addi r1,r1, EXCEPTION_FRAME_END
|
||||
/* DONT add back the frame size but reload the value
|
||||
* stored in the frame -- maybe the exception handler
|
||||
* changed it with good reason (e.g., gdb pushed a dummy frame)
|
||||
*/
|
||||
lwz r1, GPR1_OFFSET(r1)
|
||||
SYNC
|
||||
rfi
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
2005-04-11 Jennifer Averett<jennifer.averett@oarcorp.com>
|
||||
|
||||
PR 778/bsps
|
||||
* include/bsp.h, include/gen2.h, startup/FPGA.c, startup/Hwr_init.c,
|
||||
startup/bspstart.c, tod/tod.c:
|
||||
modify SCORE_.. to BSP_.. for externally used define's.
|
||||
|
||||
2003-09-04 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* PCI_bus/PCI.h, clock/clock.c, console/85c30.c, console/85c30.h,
|
||||
|
||||
@@ -69,7 +69,10 @@ extern "C" {
|
||||
|
||||
#define Initialize_Board_ctrl_register() \
|
||||
*SCORE603E_BOARD_CTRL_REG = (*SCORE603E_BOARD_CTRL_REG | \
|
||||
SCORE603E_BRD_FLASH_DISABLE_MASK) \
|
||||
SCORE603E_BRD_FLASH_DISABLE_MASK)
|
||||
|
||||
#define Processor_Synchronize() \
|
||||
asm(" eieio ")
|
||||
|
||||
/*
|
||||
* Define the time limits for RTEMS Test Suite test durations.
|
||||
@@ -249,6 +252,9 @@ unsigned int SCORE603e_FLASH_Enable_writes(
|
||||
rtems_unsigned32 area /* Unused */
|
||||
);
|
||||
|
||||
#define BSP_FLASH_ENABLE_WRITES( _area) SCORE603e_FLASH_Enable_writes( _area )
|
||||
#define BSP_FLASH_DISABLE_WRITES(_area) SCORE603e_FLASH_Disable( _area )
|
||||
|
||||
#define Convert_Endian_32( _data ) \
|
||||
( ((_data&0x000000ff)<<24) | ((_data&0x0000ff00)<<8) | \
|
||||
((_data&0x00ff0000)>>8) | ((_data&0xff000000)>>24) )
|
||||
|
||||
@@ -25,7 +25,7 @@ extern "C" {
|
||||
* ISA/PCI I/O space.
|
||||
*/
|
||||
#define SCORE603E_VME_JUMPER_ADDR 0x00e20000
|
||||
#define SCORE603E_FLASH_BASE_ADDR 0x04000000
|
||||
#define BSP_FLASH_BASE 0x04000000
|
||||
#define SCORE603E_ISA_PCI_IO_BASE 0x80000000
|
||||
#define SCORE603E_TIMER_PORT_C 0xfd000000
|
||||
#define SCORE603E_TIMER_INT_ACK 0xfd000000
|
||||
@@ -47,62 +47,61 @@ extern "C" {
|
||||
/*
|
||||
* PSC8 - PMC Card
|
||||
*/
|
||||
#define SCORE603E_PCI_CONFIGURATION_BASE 0x80800000
|
||||
#define SCORE603E_PMC_BASE SCORE603E_PCI_CONFIGURATION_BASE
|
||||
#define SCORE603E_PCI_PMC_DEVICE_BASE 0x80808000
|
||||
#define BSP_PCI_CONFIGURATION_BASE 0x80800000
|
||||
#define BSP_PMC_BASE BSP_PCI_CONFIGURATION_BASE
|
||||
#define BSP_PCI_PMC_DEVICE_BASE 0x80808000
|
||||
|
||||
#define SCORE603E_PCI_REGISTER_BASE 0xfc000000
|
||||
#define BSP_PCI_REGISTER_BASE 0xfc000000
|
||||
|
||||
#define SCORE603E_PCI_DEVICE_ADDRESS( _offset) \
|
||||
((volatile rtems_unsigned32 *)( SCORE603E_PCI_PMC_DEVICE_BASE + _offset ))
|
||||
|
||||
#define BSP_PCI_DEVICE_ADDRESS( _offset) \
|
||||
((volatile rtems_unsigned32 *)( BSP_PCI_PMC_DEVICE_BASE + _offset ))
|
||||
|
||||
#define SCORE603E_PMC_SERIAL_ADDRESS( _offset ) \
|
||||
((volatile rtems_unsigned8 *)(SCORE603E_PCI_REGISTER_BASE + _offset))
|
||||
|
||||
#define BSP_PMC_SERIAL_ADDRESS( _offset ) \
|
||||
((volatile rtems_unsigned8 *)(BSP_PCI_REGISTER_BASE + _offset))
|
||||
|
||||
/*
|
||||
* PMC serial channels - (4-7: 232 and 8-11: 422)
|
||||
*/
|
||||
#define SCORE603E_85C30_CTRL_4 SCORE603E_PMC_SERIAL_ADDRESS(0x200020)
|
||||
#define SCORE603E_85C30_DATA_4 SCORE603E_PMC_SERIAL_ADDRESS(0x200024)
|
||||
#define SCORE603E_85C30_CTRL_5 SCORE603E_PMC_SERIAL_ADDRESS(0x200028)
|
||||
#define SCORE603E_85C30_DATA_5 SCORE603E_PMC_SERIAL_ADDRESS(0x20002c)
|
||||
#define SCORE603E_85C30_CTRL_6 SCORE603E_PMC_SERIAL_ADDRESS(0x200030)
|
||||
#define SCORE603E_85C30_DATA_6 SCORE603E_PMC_SERIAL_ADDRESS(0x200034)
|
||||
#define SCORE603E_85C30_CTRL_7 SCORE603E_PMC_SERIAL_ADDRESS(0x200038)
|
||||
#define SCORE603E_85C30_DATA_7 SCORE603E_PMC_SERIAL_ADDRESS(0x20003c)
|
||||
#define SCORE603E_85C30_CTRL_8 SCORE603E_PMC_SERIAL_ADDRESS(0x200000)
|
||||
#define SCORE603E_85C30_DATA_8 SCORE603E_PMC_SERIAL_ADDRESS(0x200004)
|
||||
#define SCORE603E_85C30_CTRL_9 SCORE603E_PMC_SERIAL_ADDRESS(0x200008)
|
||||
#define SCORE603E_85C30_DATA_9 SCORE603E_PMC_SERIAL_ADDRESS(0x20000c)
|
||||
#define SCORE603E_85C30_CTRL_10 SCORE603E_PMC_SERIAL_ADDRESS(0x200010)
|
||||
#define SCORE603E_85C30_DATA_10 SCORE603E_PMC_SERIAL_ADDRESS(0x200014)
|
||||
#define SCORE603E_85C30_CTRL_11 SCORE603E_PMC_SERIAL_ADDRESS(0x200018)
|
||||
#define SCORE603E_85C30_DATA_11 SCORE603E_PMC_SERIAL_ADDRESS(0x20001c)
|
||||
#define SCORE603E_85C30_CTRL_4 BSP_PMC_SERIAL_ADDRESS(0x200020)
|
||||
#define SCORE603E_85C30_DATA_4 BSP_PMC_SERIAL_ADDRESS(0x200024)
|
||||
#define SCORE603E_85C30_CTRL_5 BSP_PMC_SERIAL_ADDRESS(0x200028)
|
||||
#define SCORE603E_85C30_DATA_5 BSP_PMC_SERIAL_ADDRESS(0x20002c)
|
||||
#define SCORE603E_85C30_CTRL_6 BSP_PMC_SERIAL_ADDRESS(0x200030)
|
||||
#define SCORE603E_85C30_DATA_6 BSP_PMC_SERIAL_ADDRESS(0x200034)
|
||||
#define SCORE603E_85C30_CTRL_7 BSP_PMC_SERIAL_ADDRESS(0x200038)
|
||||
#define SCORE603E_85C30_DATA_7 BSP_PMC_SERIAL_ADDRESS(0x20003c)
|
||||
#define SCORE603E_85C30_CTRL_8 BSP_PMC_SERIAL_ADDRESS(0x200000)
|
||||
#define SCORE603E_85C30_DATA_8 BSP_PMC_SERIAL_ADDRESS(0x200004)
|
||||
#define SCORE603E_85C30_CTRL_9 BSP_PMC_SERIAL_ADDRESS(0x200008)
|
||||
#define SCORE603E_85C30_DATA_9 BSP_PMC_SERIAL_ADDRESS(0x20000c)
|
||||
#define SCORE603E_85C30_CTRL_10 BSP_PMC_SERIAL_ADDRESS(0x200010)
|
||||
#define SCORE603E_85C30_DATA_10 BSP_PMC_SERIAL_ADDRESS(0x200014)
|
||||
#define SCORE603E_85C30_CTRL_11 BSP_PMC_SERIAL_ADDRESS(0x200018)
|
||||
#define SCORE603E_85C30_DATA_11 BSP_PMC_SERIAL_ADDRESS(0x20001c)
|
||||
|
||||
#define SCORE603E_PCI_IO_CFG_ADDR 0x80000cf8
|
||||
#define SCORE603E_PCI_IO_CFG_DATA 0x80000cfc
|
||||
|
||||
#define SCORE603E_UNIVERSE_BASE 0x80030000
|
||||
#define SCORE603E_IO_VME_UNIVERSE_BASE 0x80007000
|
||||
#define SCORE603E_PCI_MEM_BASE 0xc0000000
|
||||
#define SCORE603E_NVRAM_BASE 0xfd100000
|
||||
#define SCORE603E_RTC_ADDRESS ((volatile unsigned char *)0xfd180000)
|
||||
#define BSP_PCI_MEM_BASE 0xc0000000
|
||||
#define BSP_NVRAM_BASE 0xfd100000
|
||||
#define BSP_RTC_ADDRESS ((volatile unsigned char *)0xfd180000)
|
||||
#define SCORE603E_JP1_JP2_PROM_BASE 0xfff00000
|
||||
#define SCORE603E_NOT_JP1_2_FLASH_BASE 0xff800000
|
||||
|
||||
|
||||
#if (SCORE603E_USE_SDS) | (SCORE603E_USE_OPEN_FIRMWARE) | (SCORE603E_USE_NONE)
|
||||
#define SCORE603E_VME_A16_OFFSET 0x04000000
|
||||
#elif (SCORE603E_USE_DINK)
|
||||
#define SCORE603E_VME_A16_OFFSET 0x11000000
|
||||
#define SCORE603E_VME_A24_OFFSET 0x10000000
|
||||
#define SCORE603E_VME_A24_BASE (SCORE603E_PCI_MEM_BASE+SCORE603E_VME_A24_OFFSET)
|
||||
#define BSP_VME_A24_BASE (BSP_PCI_MEM_BASE+SCORE603E_VME_A24_OFFSET)
|
||||
#else
|
||||
#error "SCORE603E gen2.h -- what ROM monitor are you using"
|
||||
#endif
|
||||
|
||||
#define SCORE603E_VME_A16_BASE (SCORE603E_PCI_MEM_BASE+SCORE603E_VME_A16_OFFSET)
|
||||
#define BSP_VME_A16_BASE (BSP_PCI_MEM_BASE+SCORE603E_VME_A16_OFFSET)
|
||||
|
||||
/*
|
||||
* Definations for the ICM 1770 RTC chip
|
||||
@@ -115,7 +114,7 @@ extern "C" {
|
||||
#define ICM1770_CRYSTAL_FREQ_2M 0x02
|
||||
#define ICM1770_CRYSTAL_FREQ_4M 0x03
|
||||
|
||||
#define SCORE_RTC_FREQUENCY ICM1770_CRYSTAL_FREQ_32K
|
||||
#define BSP_RTC_FREQUENCY ICM1770_CRYSTAL_FREQ_32K
|
||||
|
||||
/*
|
||||
* Z85C30 Definations for the 423 interface.
|
||||
@@ -158,13 +157,13 @@ extern "C" {
|
||||
/*
|
||||
* The PMC status word is at the PMC base address
|
||||
*/
|
||||
#define SCORE603E_PMC_STATUS_ADDRESS (SCORE603E_PMC_SERIAL_ADDRESS (0))
|
||||
#define BSP_PMC_STATUS_ADDRESS (BSP_PMC_SERIAL_ADDRESS (0))
|
||||
#define Is_PMC_85C30_4_IRQ( _status ) (_status & 0x80) /* SCC 422-1 */
|
||||
#define Is_PMC_85C30_2_IRQ( _status ) (_status & 0x40) /* SCC 232-1 */
|
||||
#define Is_PMC_85C30_5_IRQ( _status ) (_status & 0x20) /* SCC 422-2 */
|
||||
#define Is_PMC_85C30_3_IRQ( _status ) (_status & 0x08) /* SCC 232-2 */
|
||||
|
||||
#define SCORE603E_PMC_CONTROL_ADDRESS SCORE603E_PMC_SERIAL_ADDRESS(0x100000)
|
||||
#define SCORE603E_PMC_CONTROL_ADDRESS BSP_PMC_SERIAL_ADDRESS(0x100000)
|
||||
#define SCORE603E_PMC_SCC_232_LOOPBACK (_word) (_word|0x20)
|
||||
|
||||
#define PMC_SET_232_LOOPBACK(_word) (_word | 0x02)
|
||||
|
||||
@@ -115,7 +115,7 @@ rtems_unsigned16 read_and_clear_PMC_irq(
|
||||
{
|
||||
rtems_unsigned16 status_word = irq;
|
||||
|
||||
status_word = (*SCORE603E_PMC_STATUS_ADDRESS);
|
||||
status_word = (*BSP_PMC_STATUS_ADDRESS);
|
||||
|
||||
return status_word;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ void init_RTC()
|
||||
{
|
||||
volatile Harris_RTC *the_RTC;
|
||||
|
||||
the_RTC = (volatile Harris_RTC *)SCORE603E_RTC_ADDRESS;
|
||||
the_RTC = (volatile Harris_RTC *)BSP_RTC_ADDRESS;
|
||||
|
||||
the_RTC->command_register = 0x0;
|
||||
}
|
||||
|
||||
@@ -116,20 +116,20 @@ void initialize_PMC() {
|
||||
/*
|
||||
* set PMC base address.
|
||||
*/
|
||||
PMC_addr = SCORE603E_PCI_DEVICE_ADDRESS( 0x14 );
|
||||
*PMC_addr = (SCORE603E_PCI_REGISTER_BASE >> 24) & 0x3f;
|
||||
PMC_addr = BSP_PCI_DEVICE_ADDRESS( 0x14 );
|
||||
*PMC_addr = (BSP_PCI_REGISTER_BASE >> 24) & 0x3f;
|
||||
|
||||
/*
|
||||
* Clear status, enable SERR and memory space only.
|
||||
*/
|
||||
PMC_addr = SCORE603E_PCI_DEVICE_ADDRESS( 0x4 );
|
||||
PMC_addr = BSP_PCI_DEVICE_ADDRESS( 0x4 );
|
||||
*PMC_addr = 0x0201ff37;
|
||||
|
||||
/*
|
||||
* Bit 0 and 1 HI cause Medium Loopback to occur.
|
||||
*/
|
||||
PMC_addr = (volatile rtems_unsigned32 *)
|
||||
SCORE603E_PMC_SERIAL_ADDRESS( 0x100000 );
|
||||
BSP_PMC_SERIAL_ADDRESS( 0x100000 );
|
||||
data = *PMC_addr;
|
||||
/* *PMC_addr = data | 0x3; */
|
||||
*PMC_addr = data & 0xfc;
|
||||
@@ -142,17 +142,17 @@ void initialize_PMC() {
|
||||
/*
|
||||
* Clear status, enable SERR and memory space only.
|
||||
*/
|
||||
PMC_addr = SCORE603E_PCI_DEVICE_ADDRESS( 0x4 );
|
||||
PMC_addr = BSP_PCI_DEVICE_ADDRESS( 0x4 );
|
||||
*PMC_addr = 0x020080cc;
|
||||
|
||||
/*
|
||||
* set PMC base address.
|
||||
*/
|
||||
PMC_addr = SCORE603E_PCI_DEVICE_ADDRESS( 0x14 );
|
||||
*PMC_addr = (SCORE603E_PCI_REGISTER_BASE >> 24) & 0x3f;
|
||||
PMC_addr = BSP_PCI_DEVICE_ADDRESS( 0x14 );
|
||||
*PMC_addr = (BSP_PCI_REGISTER_BASE >> 24) & 0x3f;
|
||||
|
||||
PMC_addr = (volatile rtems_unsigned32 *)
|
||||
SCORE603E_PMC_SERIAL_ADDRESS( 0x100000 );
|
||||
BSP_PMC_SERIAL_ADDRESS( 0x100000 );
|
||||
data = *PMC_addr;
|
||||
*PMC_addr = data & 0xfc;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ void setRealTimeToRTEMS()
|
||||
{
|
||||
rtems_time_of_day rtc_tod;
|
||||
|
||||
ICM7170_GetTOD( SCORE603E_RTC_ADDRESS, SCORE_RTC_FREQUENCY, &rtc_tod );
|
||||
ICM7170_GetTOD( BSP_RTC_ADDRESS, BSP_RTC_FREQUENCY, &rtc_tod );
|
||||
rtems_clock_set( &rtc_tod );
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ void setRealTimeFromRTEMS()
|
||||
rtems_time_of_day rtems_tod;
|
||||
|
||||
rtems_clock_get( RTEMS_CLOCK_GET_TOD, &rtems_tod );
|
||||
ICM7170_SetTOD( SCORE603E_RTC_ADDRESS, SCORE_RTC_FREQUENCY, &rtems_tod );
|
||||
ICM7170_SetTOD( BSP_RTC_ADDRESS, BSP_RTC_FREQUENCY, &rtems_tod );
|
||||
}
|
||||
|
||||
int checkRealTime()
|
||||
@@ -60,7 +60,7 @@ int checkRealTime()
|
||||
rtems_time_of_day rtems_tod;
|
||||
rtems_time_of_day rtc_tod;
|
||||
|
||||
ICM7170_GetTOD( SCORE603E_RTC_ADDRESS, SCORE_RTC_FREQUENCY, &rtc_tod );
|
||||
ICM7170_GetTOD( BSP_RTC_ADDRESS, BSP_RTC_FREQUENCY, &rtc_tod );
|
||||
rtems_clock_get( RTEMS_CLOCK_GET_TOD, &rtems_tod );
|
||||
|
||||
if( rtems_tod.year == rtc_tod.year &&
|
||||
|
||||
@@ -1,3 +1,38 @@
|
||||
2005-11-08 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR 845/bsps
|
||||
* startup/bspstart.c, start/start.S: setup BATs prior to attempting any
|
||||
device access - missing BAT mappings were probably the reason for the
|
||||
MMU malfunction assumption. Enabled MSR_DR.
|
||||
|
||||
2005-11-08 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR 837/bsps
|
||||
* startup/bspstart.c, pci/detect_raven_bridge.c: Make sure
|
||||
exceptions_in_RAM flag is set prior to initializing exception
|
||||
handling. Keep MCP disabled for memory probes :-( (the raven would
|
||||
otherwise fault on PCI config space access to empty slots).
|
||||
|
||||
2005-11-07 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR 834/bsps
|
||||
* vectors/vectors.S: reload stack pointer/R1 from exception frame
|
||||
instead of adding static offset.
|
||||
|
||||
2005-10-06 Till Straumann <strauman@slac.stanford.edu>
|
||||
|
||||
PR 833/bsps
|
||||
* irq/irq_asm.S: Currently, all (new exception) BSPs explicitely enable
|
||||
the FPU across the user ISR but DONT save/restore the FPU context.
|
||||
Any use of the FPU fron the user handler (e.g., due to GCC
|
||||
optimizations) result in corruption. The fix results in an exception
|
||||
in such cases (user ISR must explicitely save/enable/restore FPU).
|
||||
|
||||
2005-09-01 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* include/bsp.h: This file is only to be used by BSPs with the new
|
||||
interrupt API so checking for USE_ENHANCED_INTR_API is not needed.
|
||||
|
||||
2004-11-23 Richard Campbell <richard.campbell@oarcorp.com>
|
||||
|
||||
* startup/bspstart.c: Removed mpc824x conditionals around call to
|
||||
|
||||
@@ -151,7 +151,7 @@ extern unsigned long _BSP_clear_hostbridge_errors(int enableMCP, int quiet);
|
||||
* TM27 stuff
|
||||
*/
|
||||
|
||||
#if defined(USE_ENHANCED_INTR_API) && defined(RTEMS_TM27)
|
||||
#if defined(RTEMS_TM27)
|
||||
|
||||
#include <bsp/irq.h>
|
||||
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
* Till Straumann <strauman@slac.stanford.edu>, 2003/7:
|
||||
* - store isr nesting level in _ISR_Nest_level rather than
|
||||
* SPRG0 - RTEMS relies on that variable.
|
||||
* Till Straumann <strauman@slac.stanford.edu>, 2005/4:
|
||||
* - DONT enable FP across ISR since fpregs are not saved!!
|
||||
* FPU is used by Thread_Dispatch however...
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
@@ -95,11 +98,7 @@ SYM (shared_raw_irq_code_entry):
|
||||
* also, on CPUs with FP, enable FP so that FP context can be
|
||||
* saved and restored (using FP instructions)
|
||||
*/
|
||||
#if (PPC_HAS_FPU == 0)
|
||||
ori r3, r3, MSR_RI | MSR_IR | MSR_DR
|
||||
#else
|
||||
ori r3, r3, MSR_RI | MSR_IR | MSR_DR | MSR_FP
|
||||
#endif
|
||||
mtmsr r3
|
||||
SYNC
|
||||
/*
|
||||
@@ -302,6 +301,27 @@ nested:
|
||||
rfi
|
||||
|
||||
switch:
|
||||
#if ( PPC_HAS_FPU != 0 )
|
||||
#if ! defined( CPU_USE_DEFERRED_FP_SWITCH )
|
||||
#error missing include file???
|
||||
#endif
|
||||
mfmsr r4
|
||||
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
|
||||
/* if the executing thread has FP enabled propagate
|
||||
* this now so _Thread_Dispatch can save/restore the FPREGS
|
||||
* NOTE: it is *crucial* to disable the FPU across the
|
||||
* user ISR [independent of using the 'deferred'
|
||||
* strategy or not]. We don't save FP regs across
|
||||
* the user ISR and hence we prefer an exception to
|
||||
* be raised rather than experiencing corruption.
|
||||
*/
|
||||
lwz r3, SRR1_FRAME_OFFSET(r1)
|
||||
rlwimi r4, r3, 0, 18, 18 /* MSR_FP */
|
||||
#else
|
||||
ori r4, r4, MSR_FP
|
||||
#endif
|
||||
mtmsr r4
|
||||
#endif
|
||||
bl SYM (_Thread_Dispatch)
|
||||
|
||||
easy_exit:
|
||||
|
||||
@@ -42,6 +42,8 @@ unsigned merst;
|
||||
out_be32(RAVEN_MPIC_MERST, merst);
|
||||
|
||||
if (enableMCP) {
|
||||
/* disallow MCP for now; (pci config access to empty slot faults :-() */
|
||||
return -1;
|
||||
if (!quiet)
|
||||
printk("Enabling MCP generation on hostbridge errors\n");
|
||||
out_be32(RAVEN_MPIC_MEREN, MEREN_VAL);
|
||||
|
||||
@@ -131,10 +131,6 @@ enter_C_code:
|
||||
MMUon:
|
||||
mfmsr r0
|
||||
ori r0,r0, MSR_IP | MSR_RI | MSR_IR | MSR_DR | MSR_EE | MSR_FE0 | MSR_FE1 | MSR_FP
|
||||
#if defined(mvme2100)
|
||||
/* Data addr translation is broken for the mvme2100, disable it here */
|
||||
xori r0,r0, MSR_DR
|
||||
#endif
|
||||
#if (PPC_HAS_FPU == 0)
|
||||
xori r0, r0, MSR_EE | MSR_IP | MSR_FP
|
||||
#else
|
||||
|
||||
@@ -262,11 +262,32 @@ void bsp_start( void )
|
||||
myCpu = get_ppc_cpu_type();
|
||||
myCpuRevision = get_ppc_cpu_revision();
|
||||
|
||||
/*
|
||||
* Init MMU block address translation to enable hardware access
|
||||
*/
|
||||
|
||||
#if !defined(mvme2100)
|
||||
/*
|
||||
* PC legacy IO space used for inb/outb and all PC compatible hardware
|
||||
*/
|
||||
setdbat(1, _IO_BASE, _IO_BASE, 0x10000000, IO_PAGE);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* PCI devices memory area. Needed to access OpenPIC features
|
||||
* provided by the Raven
|
||||
*
|
||||
* T. Straumann: give more PCI address space
|
||||
*/
|
||||
setdbat(2, PCI_MEM_BASE, PCI_MEM_BASE, 0x10000000, IO_PAGE);
|
||||
|
||||
/*
|
||||
* Must have access to OpenPIC PCI ACK registers provided by the Raven
|
||||
*/
|
||||
setdbat(3, 0xf0000000, 0xf0000000, 0x10000000, IO_PAGE);
|
||||
|
||||
#if defined(mvme2100)
|
||||
EUMBBAR = get_eumbbar();
|
||||
|
||||
Cpu_table.exceptions_in_RAM = TRUE;
|
||||
{ unsigned v = 0x3000 ; _CPU_MSR_SET(v); }
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -318,34 +339,13 @@ void bsp_start( void )
|
||||
/* signal them that we have fixed PR288 - eventually, this should go away */
|
||||
_write_SPRG0(PPC_BSP_HAS_FIXED_PR288);
|
||||
|
||||
/* initialize_exceptions() evaluates the exceptions_in_RAM flag */
|
||||
Cpu_table.exceptions_in_RAM = TRUE;
|
||||
/*
|
||||
* Initialize default raw exception handlers. See vectors/vectors_init.c
|
||||
*/
|
||||
initialize_exceptions();
|
||||
|
||||
/*
|
||||
* Init MMU block address translation to enable hardware access
|
||||
*/
|
||||
#if !defined(mvme2100)
|
||||
/*
|
||||
* PC legacy IO space used for inb/outb and all PC compatible hardware
|
||||
*/
|
||||
setdbat(1, _IO_BASE, _IO_BASE, 0x10000000, IO_PAGE);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* PCI devices memory area. Needed to access OpenPIC features
|
||||
* provided by the Raven
|
||||
*
|
||||
* T. Straumann: give more PCI address space
|
||||
*/
|
||||
setdbat(2, PCI_MEM_BASE, PCI_MEM_BASE, 0x10000000, IO_PAGE);
|
||||
|
||||
/*
|
||||
* Must have access to OpenPIC PCI ACK registers provided by the Raven
|
||||
*/
|
||||
setdbat(3, 0xf0000000, 0xf0000000, 0x10000000, IO_PAGE);
|
||||
|
||||
select_console(CONSOLE_LOG);
|
||||
|
||||
/*
|
||||
@@ -467,7 +467,6 @@ void bsp_start( void )
|
||||
Cpu_table.do_zero_of_workspace = TRUE;
|
||||
Cpu_table.interrupt_stack_size = CONFIGURE_INTERRUPT_STACK_MEMORY;
|
||||
Cpu_table.clicks_per_usec = BSP_processor_frequency/(BSP_time_base_divisor * 1000);
|
||||
Cpu_table.exceptions_in_RAM = TRUE;
|
||||
|
||||
#ifdef SHOW_MORE_INIT_SETTINGS
|
||||
printk("BSP_Configuration.work_space_size = %x\n",
|
||||
|
||||
@@ -155,6 +155,10 @@ SYM (push_normalized_frame):
|
||||
mtsrr0 r3
|
||||
|
||||
lwz r3, GPR3_OFFSET(r1)
|
||||
addi r1,r1, EXCEPTION_FRAME_END
|
||||
/* DONT add back the frame size but reload the value
|
||||
* stored in the frame -- maybe the exception handler
|
||||
* changed it with good reason (e.g., gdb pushed a dummy frame)
|
||||
*/
|
||||
lwz r1, GPR1_OFFSET(r1)
|
||||
SYNC
|
||||
rfi
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
2005-09-09 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
PR 577/bsps
|
||||
* console.c: Make the previously committed patch for this PR compile.
|
||||
|
||||
2005-08-19 Cedric Aubert <cedric_aubert@yahoo.fr>
|
||||
|
||||
PR 577/bsps
|
||||
* console.c: The console_close() method currently calls StopRemoteTx()
|
||||
on all invocations. It should should be ok for last close only but
|
||||
not for any others. If you open a port multiple times, you only want
|
||||
to call StopRemoteTx() only as part of the last close.
|
||||
|
||||
2004-12-10 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
PR 704/bsps.
|
||||
|
||||
@@ -127,11 +127,20 @@ rtems_device_driver console_close(
|
||||
)
|
||||
{
|
||||
rtems_libio_open_close_args_t *args = arg;
|
||||
struct rtems_termios_tty *current_tty;
|
||||
|
||||
if ( (args->iop->flags&LIBIO_FLAGS_READ) &&
|
||||
Console_Port_Tbl[minor].pDeviceFlow &&
|
||||
Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx) {
|
||||
Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx(minor);
|
||||
/* Get tty pointeur from the Console_Port_Data */
|
||||
current_tty = Console_Port_Data[minor].termios_data;
|
||||
|
||||
/* Get the tty refcount to determine if we need to do deviceStopRemoteTx.
|
||||
* Stop only if it's the last one opened.
|
||||
*/
|
||||
if ( (current_tty->refcount == 1) ) {
|
||||
if ( (args->iop->flags&LIBIO_FLAGS_READ) &&
|
||||
Console_Port_Tbl[minor].pDeviceFlow &&
|
||||
Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx) {
|
||||
Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx(minor);
|
||||
}
|
||||
}
|
||||
|
||||
return rtems_termios_close (arg);
|
||||
|
||||
@@ -144,6 +144,9 @@ extern "C" {
|
||||
#elif defined(_AM29K)
|
||||
#define SHM_LOCK_VALUE 0
|
||||
#define SHM_UNLOCK_VALUE 1
|
||||
#elif defined(__sparc__)
|
||||
#define SHM_LOCK_VALUE 1
|
||||
#define SHM_UNLOCK_VALUE 0
|
||||
#elif defined(no_cpu) /* for this values are irrelevant */
|
||||
#define SHM_LOCK_VALUE 1
|
||||
#define SHM_UNLOCK_VALUE 0
|
||||
|
||||
@@ -1,14 +1,4 @@
|
||||
aclocal.m4
|
||||
autom4te*.cache
|
||||
config.cache
|
||||
config.guess
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
depcomp
|
||||
install-sh
|
||||
Makefile
|
||||
Makefile.in
|
||||
missing
|
||||
mkinstalldirs
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
configure
|
||||
|
||||
@@ -1,3 +1,30 @@
|
||||
2005-10-05 Jiri Gaisler <jiri@gaisler.com>
|
||||
Edvin Catovic <edvin@gaisler.com>
|
||||
Konrad Eisele <konrad@gaisler.com>
|
||||
|
||||
PR 827/bsps
|
||||
* .cvsignore, acinclude.m4: Portion of large update of SPARC BSPs.
|
||||
Includes addition of sis, leon2 and leon3 BSPs, deletion of leon BSP,
|
||||
addition of SMC91111 NIC driver and much more.
|
||||
* leon/.cvsignore, leon/ChangeLog, leon/Makefile.am, leon/README,
|
||||
leon/bsp_specs, leon/configure.ac, leon/times, leon/clock/.cvsignore,
|
||||
leon/clock/Makefile.am, leon/clock/ckinit.c, leon/console/.cvsignore,
|
||||
leon/console/Makefile.am, leon/console/console.c,
|
||||
leon/console/consolereserveresources.c, leon/console/debugputs.c,
|
||||
leon/gnatsupp/.cvsignore, leon/gnatsupp/Makefile.am,
|
||||
leon/gnatsupp/gnatsupp.c, leon/include/.cvsignore,
|
||||
leon/include/Makefile.am, leon/include/bsp.h, leon/include/coverhd.h,
|
||||
leon/include/leon.h, leon/leon_open_eth/.cvsignore,
|
||||
leon/leon_open_eth/Makefile.am, leon/leon_open_eth/leon_open_eth.c,
|
||||
leon/start/.cvsignore, leon/start/Makefile.am,
|
||||
leon/startup/.cvsignore, leon/startup/Makefile.am,
|
||||
leon/startup/boardinit.S, leon/startup/linkcmds,
|
||||
leon/startup/setvec.c, leon/startup/spurious.c,
|
||||
leon/timer/.cvsignore, leon/timer/Makefile.am, leon/timer/timer.c,
|
||||
leon/tools/.cvsignore, leon/tools/ChangeLog, leon/tools/Makefile.am,
|
||||
leon/tools/configure.ac, leon/tools/runtest.in,
|
||||
leon/wrapup/.cvsignore, leon/wrapup/Makefile.am: Removed.
|
||||
|
||||
2003-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Use rtems-bugs@rtems.com as bug report email address.
|
||||
|
||||
@@ -5,8 +5,10 @@ AC_DEFUN([RTEMS_CHECK_BSPDIR],
|
||||
case "$bspdir" in
|
||||
erc32 )
|
||||
AC_CONFIG_SUBDIRS([erc32]);;
|
||||
leon )
|
||||
AC_CONFIG_SUBDIRS([leon]);;
|
||||
leon2 )
|
||||
AC_CONFIG_SUBDIRS([leon2]);;
|
||||
leon3 )
|
||||
AC_CONFIG_SUBDIRS([leon3]);;
|
||||
*)
|
||||
AC_MSG_ERROR([Invalid BSP]);;
|
||||
esac
|
||||
|
||||
@@ -1,3 +1,36 @@
|
||||
2006-03-07 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* wrapup/Makefile.am: Correct minor mistake.
|
||||
|
||||
2005-10-05 Jiri Gaisler <jiri@gaisler.com>
|
||||
Edvin Catovic <edvin@gaisler.com>
|
||||
Konrad Eisele <konrad@gaisler.com>
|
||||
|
||||
PR 827/bsps
|
||||
* ChangeLog, configure.ac, console/Makefile.am, console/console.c,
|
||||
console/debugputs.c, startup/Makefile.am, startup/linkcmds,
|
||||
tools/Makefile.am: Portion of large update of SPARC BSPs. Includes
|
||||
addition of sis, leon2 and leon3 BSPs, deletion of leon BSP, addition
|
||||
of SMC91111 NIC driver and much more.
|
||||
|
||||
|
||||
2005-01-20 Jiri Gaisler <jiri@gaisler.com>
|
||||
|
||||
Added support for printk in console/console.c
|
||||
|
||||
2004-11-17 Edvin Catovic <edvin@gaisler.com>
|
||||
|
||||
Removed obsolete startup/boardinit.S
|
||||
|
||||
|
||||
2004-06-16 Edvin Catovic <edvin@gaisler.com>
|
||||
|
||||
* Makefile.am: Added bspstart (moved here from ../shared)
|
||||
* configure.ac: Added bspstart/Makefile
|
||||
* bspstart/bspstart.c: Moved here from ../shared
|
||||
* bspstart/Makefile.am: New file
|
||||
* wrapup/Makefile.am: Included bspstart in BSP_PIECES
|
||||
|
||||
2003-09-04 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* clock/ckinit.c, console/console.c, console/consolereserveresources.c,
|
||||
|
||||
@@ -36,6 +36,13 @@ RTEMS_BSPOPTS_HELP([SIMSPARC_FAST_IDLE],
|
||||
time spent in the idle task is minimized. This significantly reduces
|
||||
the wall time required to execute the RTEMS test suites.])
|
||||
|
||||
RTEMS_BSPOPTS_SET([ENABLE_SIS_QUIRKS],[sis],[1])
|
||||
RTEMS_BSPOPTS_SET([ENABLE_SIS_QUIRKS],[*],[0])
|
||||
RTEMS_BSPOPTS_HELP([ENABLE_SIS_QUIRKS],
|
||||
[If defined, then the SIS simulator specific code in the
|
||||
BSP will be enabled. In particular, SIS requires special
|
||||
initialization not used on real ERC32 hardware.])
|
||||
|
||||
# Explicitly list all Makefiles here
|
||||
AC_CONFIG_FILES([Makefile
|
||||
clock/Makefile
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
PGM = $(ARCH)/console.rel
|
||||
|
||||
C_FILES = console.c consolereserveresources.c debugputs.c
|
||||
C_FILES = console.c debugputs.c
|
||||
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
|
||||
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <rtems/libio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
/*
|
||||
* Should we use a polled or interrupt drived console?
|
||||
@@ -417,3 +418,23 @@ rtems_device_driver console_control(
|
||||
return rtems_termios_ioctl (arg);
|
||||
}
|
||||
|
||||
/* putchar/getchar for printk */
|
||||
|
||||
static void bsp_out_char (char c)
|
||||
{
|
||||
console_outbyte_polled(0, c);
|
||||
}
|
||||
|
||||
BSP_output_char_function_type BSP_output_char = bsp_out_char;
|
||||
|
||||
static char bsp_in_char(void)
|
||||
{
|
||||
int tmp;
|
||||
|
||||
while ((tmp = console_inbyte_nonblocking(0)) < 0);
|
||||
return (char) tmp;
|
||||
}
|
||||
|
||||
BSP_polling_getchar_function_type BSP_poll_char = bsp_in_char;
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <rtems/libio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
/*
|
||||
* console_outbyte_polled
|
||||
|
||||
@@ -11,7 +11,7 @@ C_FILES = bspclean.c bsplibc.c bsppost.c bspstart.c main.c bootcard.c sbrk.c \
|
||||
setvec.c spurious.c erc32mec.c
|
||||
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
|
||||
|
||||
S_FILES = boardinit.S
|
||||
S_FILES =
|
||||
S_O_FILES = $(S_FILES:%.S=$(ARCH)/%.$(OBJEXT))
|
||||
|
||||
OBJS = $(C_O_FILES) $(S_O_FILES)
|
||||
@@ -40,6 +40,6 @@ all-local: $(ARCH) $(OBJS) $(PGM) $(TMPINSTALL_FILES)
|
||||
|
||||
.PRECIOUS: $(PGM)
|
||||
|
||||
EXTRA_DIST = linkcmds setvec.c spurious.c boardinit.S
|
||||
EXTRA_DIST = linkcmds setvec.c spurious.c
|
||||
|
||||
include $(top_srcdir)/../../../../../../automake/local.am
|
||||
|
||||
@@ -138,15 +138,6 @@ SECTIONS
|
||||
. = ALIGN (16);
|
||||
_endtext = .;
|
||||
} > ram
|
||||
.dynamic : { *(.dynamic) } >ram
|
||||
.jcr : { *(.jcr) } >ram
|
||||
.got : { *(.got) } >ram
|
||||
.plt : { *(.plt) } >ram
|
||||
.hash : { *(.hash) } >ram
|
||||
.dynrel : { *(.dynrel) } >ram
|
||||
.dynsym : { *(.dynsym) } >ram
|
||||
.dynstr : { *(.dynstr) } >ram
|
||||
.hash : { *(.hash) } >ram
|
||||
.data :
|
||||
{
|
||||
data_start = .;
|
||||
@@ -159,6 +150,15 @@ SECTIONS
|
||||
edata = .;
|
||||
_edata = .;
|
||||
} > ram
|
||||
.dynamic : { *(.dynamic) } >ram
|
||||
.jcr : { *(.jcr) } >ram
|
||||
.got : { *(.got) } >ram
|
||||
.plt : { *(.plt) } >ram
|
||||
.hash : { *(.hash) } >ram
|
||||
.dynrel : { *(.dynrel) } >ram
|
||||
.dynsym : { *(.dynsym) } >ram
|
||||
.dynstr : { *(.dynstr) } >ram
|
||||
.hash : { *(.hash) } >ram
|
||||
.shbss :
|
||||
{
|
||||
*(.shbss)
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2006-03-07 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* Makefile.am: Correct minor mistakes.
|
||||
|
||||
2003-08-14 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* runtest.in: Add fileio to list of interactive tests.
|
||||
|
||||
@@ -5,16 +5,15 @@
|
||||
ACLOCAL_AMFLAGS = -I ../../../../../../../aclocal
|
||||
|
||||
transform =
|
||||
bsptools_bindir = ${exec_prefix}/@RTEMS_BSP@/tests
|
||||
bsptools_bindir = $(PROJECT_ROOT)/@RTEMS_BSP@/tests
|
||||
bsptools_bin_SCRIPTS = runtest
|
||||
|
||||
TMPINSTALL_FILES = $(PROJECT_ROOT)/erc32/tests \
|
||||
$(PROJECT_ROOT)/erc32/tests/runtest
|
||||
TMPINSTALL_FILES = $(bsptools_bindir) $(bsptools_bindir)/runtest
|
||||
|
||||
$(PROJECT_ROOT)/erc32/tests:
|
||||
$(bsptools_bindir):
|
||||
$(mkinstalldirs) $@
|
||||
|
||||
$(PROJECT_ROOT)/erc32/tests/runtest: runtest
|
||||
$(bsptools_bindir)/runtest: runtest
|
||||
$(INSTALL_SCRIPT) $< $@
|
||||
|
||||
all-local: $(TMPINSTALL_FILES)
|
||||
|
||||
@@ -13,7 +13,7 @@ CPU_PIECES = cache reg_win syscall
|
||||
|
||||
# bummer; have to use $foreach since % pattern subst rules only replace 1x
|
||||
OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.$(OBJEXT))) \
|
||||
$(foreach piece, $(CPU_PIECES), ../../../../libcpu/$(RTEMS_CPU)/$(piece)/$(ARCH)/*.$(OBJEXT))
|
||||
$(foreach piece, $(CPU_PIECES), $(wildcard ../../../../libcpu/$(RTEMS_CPU)/$(piece)/$(ARCH)/*.$(OBJEXT)))
|
||||
LIB = $(ARCH)/libbsp.a
|
||||
|
||||
include $(top_srcdir)/../../../../../../automake/compile.am
|
||||
|
||||
@@ -1,242 +0,0 @@
|
||||
2003-12-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
PR 538/bsps:
|
||||
* wrapup/Makefile.am: Add $(NETWORKING_DRIVER) instead of $(NETWORK)
|
||||
to BSP_PIECES.
|
||||
|
||||
2003-09-04 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* clock/ckinit.c, console/console.c, console/consolereserveresources.c,
|
||||
console/debugputs.c, include/bsp.h, include/coverhd.h,
|
||||
include/leon.h, startup/setvec.c, timer/timer.c: URL for license
|
||||
changed.
|
||||
|
||||
2003-09-04 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* include/bsp.h: Removed incorrect statement about copyright
|
||||
assignment.
|
||||
|
||||
2003-09-03 Jiri Gaisler <jiri@gaisler.com>
|
||||
|
||||
PR 477/networking
|
||||
* Makefile.am, configure.ac, console/console.c, include/bsp.h,
|
||||
startup/setvec.c, wrapup/Makefile.am: Add network support and enable
|
||||
custom power down.
|
||||
* leon_open_eth/.cvsignore, leon_open_eth/Makefile.am,
|
||||
leon_open_eth/leon_open_eth.c: New files.
|
||||
|
||||
2003-08-22 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
PR 445/bsps
|
||||
* bsp_specs: Hand edited to duplicate change Ralf applied to the CVS
|
||||
trunk.
|
||||
|
||||
2003-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Use rtems-bugs@rtems.com as bug report email address.
|
||||
|
||||
2003-03-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Remove AC_CONFIG_AUX_DIR.
|
||||
|
||||
2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: AM_INIT_AUTOMAKE([1.7.2]).
|
||||
|
||||
2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: AC_PREREQ(2.57).
|
||||
|
||||
2003-01-20 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/linkcmds*: Add FreeBSD sysctl() sections.
|
||||
|
||||
2002-12-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* clock/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
* console/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
* gnatsupp/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
* start/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
* startup/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
* timer/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
|
||||
2002-12-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* start/Makefile.am: Use install-data-local to install startfile.
|
||||
|
||||
2002-12-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* wrapup/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
|
||||
2002-11-01 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* gnatsupp/gnatsupp.c, startup/spurious.c: Removed warnings.
|
||||
|
||||
2002-10-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* .cvsignore: Reformat.
|
||||
Add autom4te*cache.
|
||||
Remove autom4te.cache.
|
||||
|
||||
2002-08-21 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* bsp_specs: Added support for -nostdlibs.
|
||||
|
||||
2002-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* start/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* wrapup/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
|
||||
2002-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* clock/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* console/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* gnatsupp/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* start/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* startup/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* timer/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
|
||||
2002-07-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* start/Makefile.am: Eliminate PGM.
|
||||
Add bsplib_DATA = $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o.
|
||||
|
||||
2002-07-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* startup/Makefile.am: Add bsplib_DATA = linkcmds.
|
||||
|
||||
2002-07-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* wrapup/Makefile.am: Eliminate TMPINSTALL_FILES.
|
||||
Remove $(OBJS) from all-local.
|
||||
|
||||
2002-06-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* wrapup/Makefile.am: Remove preinstallation of libbsp.a,
|
||||
|
||||
2001-05-09 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/linkcmds: In support of gcc 3.1, added one of more
|
||||
of the sections .jcr, .rodata*, .data.*, .gnu.linkonce.s2.*,
|
||||
.gnu.linkonce.sb2.*, and .gnu.linkonce.s.*. Spacing corrections
|
||||
and direction of segments to memory regions may also have been
|
||||
addressed. This was a sweep across all BSPs.
|
||||
|
||||
2002-04-01 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Remove BSPOPTS_*(NO_TABLE_MOVE).
|
||||
Remove BSPOPTS_*(FPU_REVB).
|
||||
* wrapup/Makefile.am: Remove tbr.
|
||||
|
||||
2002-03-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Add BSPOPTS_*(NO_TABLE_MOVE).
|
||||
Add BSPOPTS_*(FPU_REVB).
|
||||
* wrapup/Makefile.am: Add tbr.
|
||||
|
||||
2002-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac:
|
||||
AC_INIT(package,_RTEMS_VERSION,_RTEMS_BUGS).
|
||||
AM_INIT_AUTOMAKE([no-define foreign 1.6]).
|
||||
* clock/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* console/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* gnatsupp/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* include/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* start/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* startup/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* timer/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* wrapup/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
|
||||
2002-02-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Remove NETWORKING support.
|
||||
* wrapup/Makefile.am: Remove NETWORKING support.
|
||||
|
||||
2001-12-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Add RTEMS_BSPOPTS*(CONSOLE_USE_INTERRUPTS).
|
||||
Add RTEMS_BSPOPTS*(SIMSPARC_FAST_IDLE).
|
||||
Remove RTEMS_OUTPUT_BUILD_SUBDIRS.
|
||||
* include/bsp.h: include bspopts.h.
|
||||
|
||||
2001-11-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Introduce RTEMS_BSP_CONFIGURE.
|
||||
|
||||
2001-11-08 Jiri Gaisler <jiri@gaisler.com>
|
||||
|
||||
This fix is in response to test results reported by Jerry Needell
|
||||
<jerry.needell@unh.edu> for the SPARC/ERC32 and tracked as PR80.
|
||||
* include/bsp.h: TM27 was not running properly because the ERC32
|
||||
and LEON cannot nest interrupts at the same level. The BSP test support
|
||||
had to be modified to support using two different interrupt sources.
|
||||
|
||||
2001-10-12 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* clock/ckinit.c, console/console.c, include/bsp.h, include/leon.h,
|
||||
startup/setvec.c, timer/timer.c: Fixed typo.
|
||||
|
||||
2001-10-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* .cvsignore: Add autom4te.cache for autoconf > 2.52.
|
||||
* configure.in: Remove.
|
||||
* configure.ac: New file, generated from configure.in by autoupdate.
|
||||
|
||||
2001-09-27 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* include/bsp.h: Renamed delay() to rtems_bsp_delay().
|
||||
|
||||
2001-09-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* include/Makefile.am: Use 'PREINSTALL_FILES ='.
|
||||
|
||||
2001-05-26 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.in: Add bspopts.h.
|
||||
* include/.cvsignore: Add bspopts.h*, stamp-h*.
|
||||
* include/Makefile.am: Use *_HEADERS instead of *H_FILES.
|
||||
* include/bsp.h: Include bspopts.h.
|
||||
|
||||
2001-05-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.in: Use RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm]).
|
||||
|
||||
2000-04-23 Jiri Gaisler <jiri@gaisler.com>
|
||||
|
||||
* console/debugputs.c: Switched to unsigned characters.
|
||||
|
||||
2000-12-06 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* console/console.c: Removed console_reserve_resources().
|
||||
|
||||
2000-11-13 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* include/Makefile.am: Cleanup.
|
||||
|
||||
2000-11-14 Jiri Gaisler <jgais@ws.estec.esa.nl>
|
||||
|
||||
* wrapup/Makefile.am: Pick up cache code from libcpu and pick
|
||||
up .o's instead of .rel's from libcpu.
|
||||
|
||||
2000-11-14 Jiri Gaisler <jgais@ws.estec.esa.nl>
|
||||
|
||||
* startup/boardinit.S: St 32-bit ram width by default.
|
||||
|
||||
2000-11-13 Jiri Gaisler <jgais@ws.estec.esa.nl>
|
||||
|
||||
* .cvsignore, ChangeLog, Makefile.am, README, bsp_specs,
|
||||
configure.in, times, clock/.cvsignore, clock/Makefile.am,
|
||||
clock/ckinit.c, console/.cvsignore, console/Makefile.am,
|
||||
console/console.c, console/consolereserveresources.c,
|
||||
console/debugputs.c, gnatsupp/.cvsignore,
|
||||
gnatsupp/Makefile.am, gnatsupp/gnatsupp.c,
|
||||
include/.cvsignore, include/Makefile.am, include/bsp.h,
|
||||
include/coverhd.h, include/leon.h, start/.cvsignore,
|
||||
start/Makefile.am, startup/.cvsignore, startup/Makefile.am,
|
||||
startup/boardinit.S, startup/linkcmds, startup/setvec.c,
|
||||
startup/spurious.c, timer/.cvsignore, timer/Makefile.am,
|
||||
timer/timer.c, tools/.cvsignore, tools/Makefile.am,
|
||||
tools/configure.in, tools/runtest.in, wrapup/.cvsignore,
|
||||
wrapup/Makefile.am: New file.
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
* boardinit.s
|
||||
*
|
||||
* Start code for the LEON.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <asm.h>
|
||||
#include <leon.h>
|
||||
|
||||
.global __bsp_board_init
|
||||
|
||||
__bsp_board_init:
|
||||
|
||||
/* Check if LEON is initialised. If not, this means that we are
|
||||
running on the simulator. Initiate some of the parameters
|
||||
that are done by the boot-prom otherwise.
|
||||
*/
|
||||
|
||||
set SYM(LEON_REG), %l0 ! %l0 = base address of peripherals
|
||||
ld [%l0+LEON_REG_CACHECTRL_OFFSET], %l1 ! Check if LEON has been initialised
|
||||
andcc %l1, 3, %g0
|
||||
bne 2f
|
||||
nop
|
||||
|
||||
|
||||
flush
|
||||
set 0x1000f, %l1
|
||||
st %l1, [%l0 + LEON_REG_CACHECTRL_OFFSET] ! enable caches
|
||||
ld [%l0 + LEON_REG_SIM_ROM_SIZE_OFFSET], %g1 ! load simulator rom size
|
||||
clr %l2
|
||||
srl %g1, 13, %g1 ! calculate appropriate rom size
|
||||
1:
|
||||
srl %g1, 1, %g1
|
||||
tst %g1
|
||||
bne,a 1b
|
||||
inc %l2
|
||||
sll %l2, 14, %l2
|
||||
st %l2, [%l0 + LEON_REG_MEMCFG1_OFFSET] ! set prom size in memcfg1
|
||||
|
||||
set 0, %l2
|
||||
ld [%l0 + LEON_REG_SIM_RAM_SIZE_OFFSET], %g2 ! load simulator ram size
|
||||
srl %g2, 13, %g1 ! calculate appropriate ram size
|
||||
1:
|
||||
srl %g1, 1, %g1
|
||||
tst %g1
|
||||
bne,a 1b
|
||||
inc %l2
|
||||
sll %l2, 9, %l2
|
||||
or %l2, 0x20, %l2 ! set 32-bit ram width by default
|
||||
st %l2, [%l0 + LEON_REG_MEMCFG2_OFFSET] ! set ram size in memcfg2
|
||||
|
||||
set SYM(RAM_START), %l1 ! Cannot use RAM_END due to bug in linker
|
||||
set SYM(RAM_SIZE), %l2
|
||||
add %l1, %l2, %sp
|
||||
set 49, %l2
|
||||
st %l2, [%l0 + LEON_REG_SCALER_LOAD_OFFSET] ! scaler reload register
|
||||
st %l2, [%l0 + LEON_REG_SCALERCNT_OFFSET] ! scaler counter register
|
||||
|
||||
2:
|
||||
retl
|
||||
nop
|
||||
|
||||
/* end of file */
|
||||
@@ -1,52 +0,0 @@
|
||||
2003-08-14 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* runtest.in: Add fileio to list of interactive tests.
|
||||
|
||||
2003-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Use rtems-bugs@rtems.com as bug report email address.
|
||||
|
||||
2003-03-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Remove AC_CONFIG_AUX_DIR.
|
||||
|
||||
2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: AM_INIT_AUTOMAKE([1.7.2]).
|
||||
|
||||
2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: AC_PREREQ(2.57).
|
||||
|
||||
2002-10-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* .cvsignore: Reformat.
|
||||
Add autom4te*cache.
|
||||
Remove autom4te.cache.
|
||||
|
||||
2002-07-26 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Add transform and bsptools_bindir hacks.
|
||||
* configure.ac: Add RTEMS_ENV_RTEMSBSP.
|
||||
|
||||
2002-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac:
|
||||
AC_INIT(package,_RTEMS_VERSION,_RTEMS_BUGS).
|
||||
AM_INIT_AUTOMAKE([no-define foreign 1.6]).
|
||||
* Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
|
||||
2001-10-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* .cvsignore: Add autom4te.cache for autoconf > 2.52.
|
||||
* configure.in: Remove.
|
||||
* configure.ac: New file, generated from configure.in by autoupdate.
|
||||
|
||||
2001-09-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Use 'TMPINSTALL_FILES ='.
|
||||
|
||||
2001-09-14 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* ChangeLog: New file.
|
||||
|
||||
34
c/src/lib/libbsp/sparc/leon2/ChangeLog
Normal file
34
c/src/lib/libbsp/sparc/leon2/ChangeLog
Normal file
@@ -0,0 +1,34 @@
|
||||
2006-04-24 Jiri Gaisler <jiri@gaisler.com>
|
||||
Edvin Catovic <edvin@gaisler.com>
|
||||
|
||||
PR bsps/972
|
||||
* console/debugputs.c, include/bsp.h, include/coverhd.h,
|
||||
include/leon.h, leon_smc91111/leon_smc91111.c, startup/setvec.c,
|
||||
startup/spurious.c: Add tm27 support and cleanup.
|
||||
|
||||
2005-10-06 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* include/bsp.h: Remove include of libchip/smc91111exp.h from bsp.h
|
||||
since it is not available when networking is disabled.
|
||||
|
||||
2005-10-05 Jiri Gaisler <jiri@gaisler.com>
|
||||
Edvin Catovic <edvin@gaisler.com>
|
||||
Konrad Eisele <konrad@gaisler.com>
|
||||
|
||||
PR 827/bsps
|
||||
* .cvsignore, ChangeLog, Makefile.am, README, bsp_specs, configure.ac,
|
||||
times, clock/.cvsignore, clock/Makefile.am, clock/ckinit.c,
|
||||
console/.cvsignore, console/Makefile.am, console/console.c,
|
||||
console/consolereserveresources.c, console/debugputs.c,
|
||||
gnatsupp/.cvsignore, gnatsupp/Makefile.am, gnatsupp/gnatsupp.c,
|
||||
include/.cvsignore, include/Makefile.am, include/bsp.h,
|
||||
include/coverhd.h, include/leon.h, leon_open_eth/.cvsignore,
|
||||
leon_open_eth/Makefile.am, leon_open_eth/leon_open_eth.c,
|
||||
leon_smc91111/.cvsignore, leon_smc91111/Makefile.am,
|
||||
leon_smc91111/leon_smc91111.c, start/.cvsignore, start/Makefile.am,
|
||||
startup/.cvsignore, startup/Makefile.am, startup/linkcmds,
|
||||
startup/setvec.c, startup/spurious.c, timer/.cvsignore,
|
||||
timer/Makefile.am, timer/timer.c, tools/.cvsignore, tools/ChangeLog,
|
||||
tools/Makefile.am, tools/configure.ac, tools/runtest.in,
|
||||
wrapup/.cvsignore, wrapup/Makefile.am: New files.
|
||||
|
||||
@@ -7,7 +7,7 @@ ACLOCAL_AMFLAGS = -I ../../../../../../aclocal
|
||||
# wrapup is the one that actually builds and installs the library
|
||||
# from the individual .rel files built in other directories
|
||||
SUBDIRS = . include start startup gnatsupp console clock timer \
|
||||
leon_open_eth wrapup tools
|
||||
leon_open_eth leon_smc91111 wrapup tools
|
||||
|
||||
include $(top_srcdir)/../../bsp.am
|
||||
|
||||
@@ -41,6 +41,7 @@ AC_CONFIG_FILES([Makefile
|
||||
clock/Makefile
|
||||
console/Makefile
|
||||
leon_open_eth/Makefile
|
||||
leon_smc91111/Makefile
|
||||
gnatsupp/Makefile
|
||||
include/Makefile
|
||||
start/Makefile
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <rtems/libio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
/*
|
||||
* Should we use a polled or interrupt drived console?
|
||||
@@ -429,3 +430,21 @@ rtems_device_driver console_control(
|
||||
return rtems_termios_ioctl (arg);
|
||||
}
|
||||
|
||||
/* putchar/getchar for printk */
|
||||
|
||||
static void bsp_out_char (char c)
|
||||
{
|
||||
console_outbyte_polled(0, c);
|
||||
}
|
||||
|
||||
BSP_output_char_function_type BSP_output_char = bsp_out_char;
|
||||
|
||||
static char bsp_in_char(void)
|
||||
{
|
||||
int tmp;
|
||||
|
||||
while ((tmp = console_inbyte_nonblocking(0)) < 0);
|
||||
return (char) tmp;
|
||||
}
|
||||
|
||||
BSP_polling_getchar_function_type BSP_poll_char = bsp_in_char;
|
||||
@@ -3,6 +3,7 @@
|
||||
* Support for gnat/rtems interrupts and exception handling.
|
||||
* Jiri Gaisler, ESA/ESTEC, 17-02-1999.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
void __gnat_install_handler_common (int t1, int t2);
|
||||
@@ -34,7 +34,7 @@ extern "C" {
|
||||
#include <clockdrv.h>
|
||||
|
||||
#include <console.h>
|
||||
|
||||
|
||||
/*
|
||||
* confdefs.h overrides for this BSP:
|
||||
* - two termios serial ports
|
||||
@@ -50,9 +50,15 @@ extern "C" {
|
||||
|
||||
struct rtems_bsdnet_ifconfig;
|
||||
extern int rtems_leon_open_eth_driver_attach (struct rtems_bsdnet_ifconfig *config);
|
||||
extern int rtems_smc91111_driver_attach_leon2(struct rtems_bsdnet_ifconfig *config);
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME "open_eth1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_leon_open_eth_driver_attach
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH_OPENETH rtems_leon_open_eth_driver_attach
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME_SMC91111 "smc_eth1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_ATTACH_SMC91111 rtems_smc91111_driver_attach_leon2
|
||||
|
||||
#ifndef RTEMS_BSP_NETWORK_DRIVER_NAME
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME RTEMS_BSP_NETWORK_DRIVER_NAME_OPENETH
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Define the time limits for RTEMS Test Suite test durations.
|
||||
@@ -193,4 +199,3 @@ extern rtems_cpu_table Cpu_table; /* owned by BSP */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
109
c/src/lib/libbsp/sparc/leon2/include/coverhd.h
Normal file
109
c/src/lib/libbsp/sparc/leon2/include/coverhd.h
Normal file
@@ -0,0 +1,109 @@
|
||||
/* coverhd.h
|
||||
*
|
||||
* This include file has defines to represent the overhead associated
|
||||
* with calling a particular directive from C for this target.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Ported to ERC32 implementation of the SPARC by On-Line Applications
|
||||
* Research Corporation (OAR) under contract to the European Space
|
||||
* Agency (ESA).
|
||||
*
|
||||
* ERC32 modifications of respective RTEMS file: COPYRIGHT (c) 1995.
|
||||
* European Space Agency.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __COVERHD_h
|
||||
#define __COVERHD_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define CALLING_OVERHEAD_INITIALIZE_EXECUTIVE 0
|
||||
#define CALLING_OVERHEAD_SHUTDOWN_EXECUTIVE 0
|
||||
#define CALLING_OVERHEAD_TASK_CREATE 0
|
||||
#define CALLING_OVERHEAD_TASK_IDENT 0
|
||||
#define CALLING_OVERHEAD_TASK_START 0
|
||||
#define CALLING_OVERHEAD_TASK_RESTART 0
|
||||
#define CALLING_OVERHEAD_TASK_DELETE 0
|
||||
#define CALLING_OVERHEAD_TASK_SUSPEND 0
|
||||
#define CALLING_OVERHEAD_TASK_RESUME 0
|
||||
#define CALLING_OVERHEAD_TASK_SET_PRIORITY 0
|
||||
#define CALLING_OVERHEAD_TASK_MODE 0
|
||||
#define CALLING_OVERHEAD_TASK_GET_NOTE 0
|
||||
#define CALLING_OVERHEAD_TASK_SET_NOTE 0
|
||||
#define CALLING_OVERHEAD_TASK_WAKE_WHEN 0
|
||||
#define CALLING_OVERHEAD_TASK_WAKE_AFTER 0
|
||||
#define CALLING_OVERHEAD_INTERRUPT_CATCH 0
|
||||
#define CALLING_OVERHEAD_CLOCK_GET 0
|
||||
#define CALLING_OVERHEAD_CLOCK_SET 0
|
||||
#define CALLING_OVERHEAD_CLOCK_TICK 0
|
||||
|
||||
#define CALLING_OVERHEAD_TIMER_CREATE 0
|
||||
#define CALLING_OVERHEAD_TIMER_IDENT 0
|
||||
#define CALLING_OVERHEAD_TIMER_DELETE 0
|
||||
#define CALLING_OVERHEAD_TIMER_FIRE_AFTER 0
|
||||
#define CALLING_OVERHEAD_TIMER_FIRE_WHEN 0
|
||||
#define CALLING_OVERHEAD_TIMER_RESET 0
|
||||
#define CALLING_OVERHEAD_TIMER_CANCEL 0
|
||||
#define CALLING_OVERHEAD_SEMAPHORE_CREATE 0
|
||||
#define CALLING_OVERHEAD_SEMAPHORE_IDENT 0
|
||||
#define CALLING_OVERHEAD_SEMAPHORE_DELETE 0
|
||||
#define CALLING_OVERHEAD_SEMAPHORE_OBTAIN 0
|
||||
#define CALLING_OVERHEAD_SEMAPHORE_RELEASE 0
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE 0
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT 0
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE 0
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_SEND 0
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT 0
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST 0
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE 0
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH 0
|
||||
|
||||
#define CALLING_OVERHEAD_EVENT_SEND 0
|
||||
#define CALLING_OVERHEAD_EVENT_RECEIVE 0
|
||||
#define CALLING_OVERHEAD_SIGNAL_CATCH 0
|
||||
#define CALLING_OVERHEAD_SIGNAL_SEND 0
|
||||
#define CALLING_OVERHEAD_PARTITION_CREATE 0
|
||||
#define CALLING_OVERHEAD_PARTITION_IDENT 0
|
||||
#define CALLING_OVERHEAD_PARTITION_DELETE 0
|
||||
#define CALLING_OVERHEAD_PARTITION_GET_BUFFER 0
|
||||
#define CALLING_OVERHEAD_PARTITION_RETURN_BUFFER 0
|
||||
#define CALLING_OVERHEAD_REGION_CREATE 0
|
||||
#define CALLING_OVERHEAD_REGION_IDENT 0
|
||||
#define CALLING_OVERHEAD_REGION_DELETE 0
|
||||
#define CALLING_OVERHEAD_REGION_GET_SEGMENT 0
|
||||
#define CALLING_OVERHEAD_REGION_RETURN_SEGMENT 0
|
||||
#define CALLING_OVERHEAD_PORT_CREATE 0
|
||||
#define CALLING_OVERHEAD_PORT_IDENT 0
|
||||
#define CALLING_OVERHEAD_PORT_DELETE 0
|
||||
#define CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL 0
|
||||
#define CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL 0
|
||||
|
||||
#define CALLING_OVERHEAD_IO_INITIALIZE 0
|
||||
#define CALLING_OVERHEAD_IO_OPEN 0
|
||||
#define CALLING_OVERHEAD_IO_CLOSE 0
|
||||
#define CALLING_OVERHEAD_IO_READ 0
|
||||
#define CALLING_OVERHEAD_IO_WRITE 0
|
||||
#define CALLING_OVERHEAD_IO_CONTROL 0
|
||||
#define CALLING_OVERHEAD_FATAL_ERROR_OCCURRED 0
|
||||
#define CALLING_OVERHEAD_RATE_MONOTONIC_CREATE 0
|
||||
#define CALLING_OVERHEAD_RATE_MONOTONIC_IDENT 0
|
||||
#define CALLING_OVERHEAD_RATE_MONOTONIC_DELETE 0
|
||||
#define CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL 0
|
||||
#define CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD 0
|
||||
#define CALLING_OVERHEAD_MULTIPROCESSING_ANNOUNCE 0
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -236,6 +236,7 @@ typedef struct {
|
||||
* The following defines the bits in the LEON UART Status Registers.
|
||||
*/
|
||||
|
||||
#define LEON_REG_UART_STATUS_CLR 0x00000000 /* Clear all status bits */
|
||||
#define LEON_REG_UART_STATUS_DR 0x00000001 /* Data Ready */
|
||||
#define LEON_REG_UART_STATUS_TSE 0x00000002 /* TX Send Register Empty */
|
||||
#define LEON_REG_UART_STATUS_THE 0x00000004 /* TX Hold Register Empty */
|
||||
@@ -375,5 +376,3 @@ extern LEON_Register_Map LEON_REG;
|
||||
#endif
|
||||
|
||||
#endif /* !_INCLUDE_LEON_h */
|
||||
/* end of include file */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
##
|
||||
## Makefile.am,v 1.5 2002/12/14 08:17:45 ralf Exp
|
||||
## $Id$
|
||||
##
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* LEON2 Opencores Ethernet MAC Configuration Information
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
|
||||
@@ -30,19 +31,24 @@ open_eth_configuration_t leon_open_eth_configuration = {
|
||||
OPEN_ETH_BASE_ADDRESS, /* base address */
|
||||
OPEN_ETH_VECTOR, /* vector number */
|
||||
TDA_COUNT, /* number of transmit descriptors */
|
||||
RDA_COUNT /* number of receive descriptors */
|
||||
RDA_COUNT, /* number of receive descriptors */
|
||||
0 /* 100 MHz operation */
|
||||
};
|
||||
|
||||
int rtems_leon_open_eth_driver_attach(struct rtems_bsdnet_ifconfig *config)
|
||||
{
|
||||
|
||||
/* clear control register and reset NIC */
|
||||
*(volatile int *) OPEN_ETH_BASE_ADDRESS = 0;
|
||||
*(volatile int *) OPEN_ETH_BASE_ADDRESS = 0x800;
|
||||
*(volatile int *) OPEN_ETH_BASE_ADDRESS = 0;
|
||||
|
||||
/* enable 100 MHz operation only if cpu frequency >= 50 MHz */
|
||||
if (LEON_REG.Scaler_Reload >= 49) leon_open_eth_configuration.en100MHz = 1;
|
||||
|
||||
if (rtems_open_eth_driver_attach( config, &leon_open_eth_configuration )) {
|
||||
LEON_REG.Interrupt_Clear = (1 << (OPEN_ETH_VECTOR - 0x10));
|
||||
LEON_REG.Interrupt_Mask |= (1 << (OPEN_ETH_VECTOR - 0x10));
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
35
c/src/lib/libbsp/sparc/leon2/leon_smc91111/Makefile.am
Normal file
35
c/src/lib/libbsp/sparc/leon2/leon_smc91111/Makefile.am
Normal file
@@ -0,0 +1,35 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
|
||||
PGM = $(ARCH)/leon_smc91111.rel
|
||||
|
||||
C_FILES = leon_smc91111.c
|
||||
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
|
||||
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
include $(top_srcdir)/../../../../../../automake/compile.am
|
||||
include $(top_srcdir)/../../../../../../automake/lib.am
|
||||
|
||||
#
|
||||
# (OPTIONAL) Add local stuff here using +=
|
||||
#
|
||||
|
||||
AM_CPPFLAGS += -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
|
||||
|
||||
$(PGM): $(OBJS)
|
||||
$(make-rel)
|
||||
|
||||
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
|
||||
|
||||
if HAS_NETWORKING
|
||||
all-local: $(ARCH) $(OBJS) $(PGM)
|
||||
endif
|
||||
|
||||
.PRECIOUS: $(PGM)
|
||||
|
||||
EXTRA_DIST = leon_smc91111.c
|
||||
|
||||
include $(top_srcdir)/../../../../../../automake/local.am
|
||||
63
c/src/lib/libbsp/sparc/leon2/leon_smc91111/leon_smc91111.c
Normal file
63
c/src/lib/libbsp/sparc/leon2/leon_smc91111/leon_smc91111.c
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
|
||||
#include <bsp.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <rtems/error.h>
|
||||
#include <rtems/rtems_bsdnet.h>
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/mbuf.h>
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/sockio.h>
|
||||
#include <net/if.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/if_ether.h>
|
||||
|
||||
#include <libchip/smc91111exp.h>
|
||||
|
||||
|
||||
#define SMC91111_BASE_ADDR (void*)0x20000300
|
||||
#define SMC91111_BASE_IRQ LEON_TRAP_TYPE(4)
|
||||
#define SMC91111_BASE_PIO 4
|
||||
|
||||
scmv91111_configuration_t leon_scmv91111_configuration = {
|
||||
SMC91111_BASE_ADDR, /* base address */
|
||||
SMC91111_BASE_IRQ, /* vector number */
|
||||
SMC91111_BASE_PIO, /* PIO */
|
||||
100, /* 100b */
|
||||
1, /* fulldx */
|
||||
1 /* autoneg */
|
||||
};
|
||||
|
||||
int _rtems_smc91111_driver_attach(
|
||||
struct rtems_bsdnet_ifconfig *config,
|
||||
scmv91111_configuration_t *scm_config
|
||||
);
|
||||
|
||||
/*
|
||||
* Attach an SMC91111 driver to the system
|
||||
*/
|
||||
int rtems_smc91111_driver_attach_leon2(struct rtems_bsdnet_ifconfig *config)
|
||||
{
|
||||
|
||||
/* activate io area */
|
||||
|
||||
/*configure pio */
|
||||
*((volatile unsigned int *)0x80000000) |= 0x10f80000;
|
||||
*((volatile unsigned int *)0x800000A8) |=
|
||||
(0xe0 | leon_scmv91111_configuration.pio)
|
||||
<< (8 * ((leon_scmv91111_configuration.vector & 0x0f) - 4));
|
||||
|
||||
return _rtems_smc91111_driver_attach(config,&leon_scmv91111_configuration);
|
||||
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user