URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
Compare Revisions
- This comparison shows the changes necessary to convert path
/openrisc/trunk/rtos
- from Rev 525 to Rev 526
- ↔ Reverse comparison
Rev 525 → Rev 526
/ucos-ii/2.91/ChangeLog-OR32
1,6 → 1,9
2011-04-20 Julius Baxter <julius@opencores.org> |
* ucos-port/os_cpu_c.c: |
(OSTaskStkInit): Made stack initialisation skip red zone (128 bytes). |
* ucos-port/os_cpu_a.S: |
(UserISR): Fix register used on entry. (submitted by user keviny) |
|
2011-01-14 Julius Baxter <julius@opencores.org> |
* config.mk: <LDFLAGS>: Added entry point at 0x100 (decimal 256). |
|
/ucos-ii/2.91/ucos-port/os_cpu_a.S
19,13 → 19,17
_reset Boot code installed at interrupt vector 0x100 |
_start Start up sequence |
|
_OSTickISR Operating system timer tick interrupt service routine |
_OSStartHighRdy Starts the highest priority task that is available to run |
_OSTickISR Operating system timer tick interrupt service |
routine |
_OSStartHighRdy Starts the highest priority task that is |
available to run |
_OSCtxSwBP |
_OSCtxSw Task switch |
_OSIntCtxSw Task switch after interrupt |
_UserISR Interrupt service routine template - requires code |
_align Attempts to recover from memory alignment errors |
_UserISR Interrupt service routine template - requires |
code |
_align Attempts to recover from memory alignment |
errors |
nest_not_one |
|
External Routines : |
72,7 → 76,8
|
#define RED_ZONE_SIZE 128 |
#define STK_FRAME_SIZE (128+RED_ZONE_SIZE) |
#define SPR_TTMR_LOAD (SPR_TTMR_IE | SPR_TTMR_RT | ((IN_CLK/TICKS_PER_SEC) & SPR_TTMR_PERIOD)) |
#define SPR_TTMR_LOAD (SPR_TTMR_IE | SPR_TTMR_RT | \ |
((IN_CLK/TICKS_PER_SEC) & SPR_TTMR_PERIOD)) |
|
/* function prototypes */ |
|
414,9 → 419,11
/* l.sys exception for now so we are in supervisor mode */ |
/* exception - recover pc from epcr */ |
|
l.mfspr r3,r0,SPR_EPCR_BASE /* save program counter that was put in exception register */ |
l.mfspr r3,r0,SPR_EPCR_BASE /* save program counter that was put in |
exception register */ |
l.sw 0(r1),r3 |
l.mfspr r3,r0,SPR_ESR_BASE /* save status register that was put in exception register */ |
l.mfspr r3,r0,SPR_ESR_BASE /* save status register that was put in |
exception register */ |
l.sw 4(r1),r3 |
|
store_context |
473,15 → 480,16
*/ |
OSStartHighRdy: |
|
l.jal OSTaskSwHook /* call OSTaskSwHook */ |
l.jal OSTaskSwHook /* call OSTaskSwHook */ |
l.nop |
|
load32i r3,OSRunning /* r3= &OSRunning */ |
load32i r3,OSRunning /* r3= &OSRunning */ |
|
l.ori r4,r0, 0x01 /* set OSRunning == TRUE */ |
l.sb 0(r3), r4 |
/* load stack pointer from next task's TCB area */ |
load32i r3,OSTCBHighRdy /* r3 = &OSTCBHighRdy */ |
/* load stack pointer from next task's |
TCB area */ |
load32i r3,OSTCBHighRdy /* r3 = &OSTCBHighRdy */ |
l.lwz r3,0(r3) /* r3 = &OS_TCB */ |
l.lwz r1, 0(r3) /* stack is the first element */ |
|
507,9 → 515,11
------------------------------ |
*/ |
OSTickISR: |
l.mfspr r3,r0,SPR_EPCR_BASE /* save program counter that was put in exception register */ |
l.mfspr r3,r0,SPR_EPCR_BASE /* save program counter that was put |
in exception register */ |
l.sw 0(r1),r3 |
l.mfspr r3,r0,SPR_ESR_BASE /* save status register that was put in exception register */ |
l.mfspr r3,r0,SPR_ESR_BASE /* save status register that was put in |
exception register */ |
l.sw 4(r1),r3 |
|
store_context |
551,8 → 561,9
/*Call OSIntExit()*/ |
l.jal OSIntExit |
l.nop |
/* load stack pointer from next task's TCB area */ |
load32i r3,OSTCBHighRdy /* r3 = &OSTCBHighRdy */ |
/* load stack pointer from next task's |
TCB area */ |
load32i r3,OSTCBHighRdy /* r3 = &OSTCBHighRdy */ |
l.lwz r3,0(r3) /* r3 = &OS_TCB */ |
l.lwz r1, 0(r3) /* stack is the first element */ |
|
579,10 → 590,12
------------------------------ |
*/ |
UserISR: |
l.mfspr r2,r0,SPR_EPCR_BASE /* save program counter that was put in exception register */ |
l.sw 0(r1),r2 |
l.mfspr r2,r0,SPR_ESR_BASE /* save status register that was put in exception register */ |
l.sw 4(r1),r2 |
l.mfspr r3,r0,SPR_EPCR_BASE /* save program counter that was put in |
exception register */ |
l.sw 0(r1),r3 |
l.mfspr r3,r0,SPR_ESR_BASE /* save status register that was put |
in exception register */ |
l.sw 4(r1),r3 |
|
store_context |
/* either call OSIntEnter or Increment OSIntNesting */ |