forked from Imagelibrary/rtems
2009-02-26 Joel Sherrill <joel.sherrill@oarcorp.com>
* shared/clock/ckinit.c, shared/start/start.S, shared/timer/timer.c: Run better on simulator. Timer is probably not right yet but
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2009-02-26 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* shared/clock/ckinit.c, shared/start/start.S, shared/timer/timer.c:
|
||||
Run better on simulator. Timer is probably not right yet but
|
||||
|
||||
2009-02-25 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* shared/clock/ckinit.c: Use shared Clock Driver Template and support
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "clock.h"
|
||||
#include "bspopts.h"
|
||||
|
||||
#if SIMULATOR_FAST_IDLE
|
||||
#if ON_SIMULATOR
|
||||
#define CLOCK_DRIVER_USE_FAST_IDLE
|
||||
#endif
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
* Micro-Research Finland Oy
|
||||
*/
|
||||
|
||||
#include "bspopts.h"
|
||||
|
||||
.section .boot,"a",@progbits
|
||||
.align 4
|
||||
|
||||
@@ -145,12 +147,14 @@ crt0:
|
||||
mvi r2, 0
|
||||
mvi r3, 0
|
||||
calli boot_card
|
||||
# boot_card returns when RTEMS is shutdown
|
||||
#if ON_SIMULATOR
|
||||
#define SYS_exit 1
|
||||
|
||||
mvi r8, SYS_exit
|
||||
scall
|
||||
#endif
|
||||
|
||||
.dead_end:
|
||||
bi .dead_end
|
||||
|
||||
calli boot_card
|
||||
# boot_card should never return
|
||||
_stuck_in_start:
|
||||
bi _stuck_in_start
|
||||
|
||||
|
||||
|
||||
@@ -29,17 +29,21 @@
|
||||
|
||||
static inline int timerread(unsigned int reg)
|
||||
{
|
||||
#ifdef TIMER1_BASE_ADDRESS
|
||||
#if ON_SIMULATOR && defined(TIMER0_BASE_ADDRESS)
|
||||
return *((int*)(TIMER0_BASE_ADDRESS + reg));
|
||||
#elif defined(TIMER1_BASE_ADDRESS)
|
||||
return *((int*)(TIMER1_BASE_ADDRESS + reg));
|
||||
#else
|
||||
#warning "Benchmarking timer TIMER1 not available!"
|
||||
#warning "Benchmarking timer not available!"
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void timerwrite(unsigned int reg, int value)
|
||||
{
|
||||
#ifdef TIMER1_BASE_ADDRESS
|
||||
#if ON_SIMULATOR && defined(TIMER0_BASE_ADDRESS)
|
||||
*((int*)(TIMER0_BASE_ADDRESS + reg)) = value;
|
||||
#elif defined(TIMER1_BASE_ADDRESS)
|
||||
*((int*)(TIMER1_BASE_ADDRESS + reg)) = value;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user