Update of /cvsroot/blob/blob/src
In directory usw-pr-cvs1:/tmp/cvs-serv31406
Modified Files:
Tag: blob_1_0_9_hack
start.S
Log Message:
- remove old LED codein favour of led_on/led_off
- rewrite blinky
- first MB memory tester works
Index: start.S
===================================================================
RCS file: /cvsroot/blob/blob/src/start.S,v
retrieving revision 1.1.1.1.2.7
retrieving revision 1.1.1.1.2.8
diff -u -r1.1.1.1.2.7 -r1.1.1.1.2.8
--- start.S 2001/07/16 21:43:20 1.1.1.1.2.7
+++ start.S 2001/07/16 23:21:56 1.1.1.1.2.8
@@ -129,18 +129,16 @@
mov r6, r7, lsl #8 /* 4k << 2^8 = 1MB */
ldr r5, MEM_START
-/*wook found that this loop never completes! */
-test_loop:
-// mov r0, r5
-// bl testram
-// tst r0, #1
-// beq badram
-
-// add r5, r5, r7
-// sub r6, r6, r7
-// bne test_loop
+mem_test_loop:
+ mov r0, r5
+ bl testram
+ teq r0, #1
+ beq badram
+
+ add r5, r5, r7
+ subs r6, r6, r7
+ bne mem_test_loop
-
/* the first megabyte is OK, so let's copy ourself to it */
mov r0, #0x400
ldr r1, MEM_START
@@ -163,42 +161,34 @@
mov pc, r0
+badram:
+ b blinky
+
+
+
+
blinky:
/* This is test code to blink the LED
very useful if nothing else works */
- mov r2, #0x90000000
- add r2, r2, #0x40000
- mov r1, #0x00800000
-
-old_led_on:
- /* turn on the LED by writing the GPSR (GPIO Pin output Set
- Register) */
- str r1, [r2, #0x08]
- mov r4, #0x10000
-loop1:
- subs r4, r4, #1
- bne loop1
-
-old_led_off:
- /* turn off the LED by writing the GPCR (GPIO Pin output Clear
- Register) */
- str r1, [r2, #0x0c]
-
- mov r4, #0x10000
-loop2:
- subs r4, r4, #1
- bne loop2
-
- /* and loop forever */
- b old_led_on
-
-
-badram:
- /* should do something useful over here */
- b badram
-
+ bl led_on
+ bl wait_loop
+ bl led_off
+ bl wait_loop
+ b blinky
+
+wait_loop:
+ /* busy wait loop*/
+ mov r2, #0x1000000
+wait_loop1:
+ subs r2, r2, #1
+ bne wait_loop1
+ mov pc, lr
+
+
+
+
undefined_instruction:
- b undefined_instruction
+ b blinky
@@ -209,34 +199,34 @@
* problem is in the kernel: you should *disable* CONFIG_ANGELBOOT
* simply because blob is not angel. -- Erik
*/
- b software_interrupt
+ b blinky
prefetch_abort:
- b prefetch_abort
+ b blinky
data_abort:
- b data_abort
+ b blinky
not_used:
- b not_used
+ b blinky
irq:
- b irq
+ b blinky
fiq:
- b fiq
+ b blinky
|