summaryrefslogtreecommitdiff
path: root/utils/AMS/hacking/test.S
diff options
context:
space:
mode:
Diffstat (limited to 'utils/AMS/hacking/test.S')
-rw-r--r--utils/AMS/hacking/test.S31
1 files changed, 27 insertions, 4 deletions
diff --git a/utils/AMS/hacking/test.S b/utils/AMS/hacking/test.S
index 52f54bdaf6..d4bb2143bb 100644
--- a/utils/AMS/hacking/test.S
+++ b/utils/AMS/hacking/test.S
@@ -1,11 +1,34 @@
1/* int ucl_nrv2e_decompress_8(const unsigned char *src, unsigned char *dst,
2 unsigned long *dst_len) */
1 3
2/* This value is filled in by mkamsboot */ 4.text
3originalentry: .word 0 5.global ucl_nrv2e_decompress_8
4 6
7
8/* Vectors */
9 ldr pc, =start
10.word 0
11.word 0
12.word 0
13.word 0
14.word 0
15.word 0
16.word 0
17
18/* These values are filled in by mkamsboot - don't move them from offset 0x20 */
19ucl_unpack: .word 0 /* Entry point (plus 1 - for thumb) of ucl_unpack */
20ucl_start: .word 0 /* Start of the ucl-compressed OF image */
21
22
23start:
5 /* A delay loop - just to prove we're running */ 24 /* A delay loop - just to prove we're running */
6 mov r1, #0x500000 /* Approximately 5 seconds */ 25 mov r1, #0x500000 /* Approximately 5 seconds */
7loop: subs r1, r1, #1 26loop: subs r1, r1, #1
8 bne loop 27 bne loop
9 28
10 /* Now branch back to the original firmware's entry point */ 29 /* Call the ucl decompress function, which will branch to 0x0
11 ldr pc, originalentry 30 on completion */
31 ldr r0, ucl_start /* Source */
32 mov r1, #0 /* Destination */
33 ldr r2, ucl_unpack
34 bx r2