=================================================================== RCS file: /cvs/prex-old/boot/arm/gba/head.S,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -r1.1.1.1 -r1.1.1.1.2.1 --- prex-old/boot/arm/gba/head.S 2008/06/03 10:38:40 1.1.1.1 +++ prex-old/boot/arm/gba/head.S 2008/08/13 17:12:20 1.1.1.1.2.1 @@ -141,7 +141,7 @@ lsl r3, #7 /* r3 = 0x2000 (8K) */ mov r2, #3 lsl r2, #24 /* r2 = 0x3000000 */ - lsl r1, r2, #2 /* r1 = 0x8000000 */ + lsl r1, r3, #14 /* r1 = 0x8000000 */ copy_loop: ldmia r1!, {r0} @@ -160,7 +160,33 @@ ENTRY(start_kernel) bx r0 - .section .tail,"ax" +/* + * Put one character to Visual Boy Advance (VBA) emulator console. + * + * Important: + * This BIOS call is not supported by actual GBA BIOS. So, you must + * disable this function when you run it on actual GBA H/W. + * Otherwise, it will hang. + */ +putbuf: + .long 0 + +ENTRY(putchar) +#if defined(DEBUG) && defined(CONFIG_DIAG_VBA) + ldr r1, =putbuf + str r0, [r1] + mov r0, r1 + swi $0xff0000 +#endif + mov pc, lr +/* + * Panic handler + */ +ENTRY(machine_panic) +stop: + b stop + + .section .tail,"ax" dummy: .byte 0xff