forked from digidotcom/DCRabbit_10
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathucos2-patch2.patch
More file actions
31 lines (24 loc) · 1.22 KB
/
ucos2-patch2.patch
File metadata and controls
31 lines (24 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
This patch fixes an issue that can arise when using the AES opcodes
on a Rabbit 6000. AES opcodes on Rabbit 6000 require canonical
ordering of Px/Px' registers. We maintain the ordering as well as
possible, but need to ensure that task switching doesn't throw it off.
The Dynamic C 10.72F release includes the patched UCOS2.LIB file, but
the uC/OS-II source isn't included in the Open Source GitHub code
repository. If your Dynamic C installation is based on 10.72E or
earlier, you will need to manually apply this fix using `patch`:
patch -p1 --forward < ucos2-patch2.patch
Include the command-line option "--dry-run" to test the patch. The
"--forward" option ignores the patch if already applied.
--- a/Lib/Rabbit4000/UCOS2/UCOS2.LIB
+++ b/Lib/Rabbit4000/UCOS2/UCOS2.LIB
@@ -2661,10 +2661,12 @@ OSCtxSw::
push py
push pz
+ _EXP_IF_RAB6K ; Maintain the p/'p order if possible
; Suspend this task and start running the highest-priority task. We will
; resume the suspended task when this function or the periodic ISR swaps
; our stack back and performs an LRET.
lcall oscs_1
+ _EXP_IF_RAB6K ; Maintain the p/'p order if possible
; Resuming current task, need to restore registers from stack.
pop pz