|
From: Kenn H. <ke...@us...> - 2004-09-26 14:44:42
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/boot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32324 Modified Files: head.S hexdump.S Added Files: lib.c Removed Files: lib.S Log Message: Convert boot-time printing code in lib.S from assembler to C and update all callers Index: hexdump.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/boot/hexdump.S,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- hexdump.S 15 Jun 2003 22:33:56 -0000 1.4 +++ hexdump.S 26 Sep 2004 14:44:06 -0000 1.5 @@ -13,32 +13,33 @@ # movl $0x0, r4 movl %r10,%r4 movl %r9,%r11 - jsb printint - jsb space - movl (%r4),%r10 - jsb printint - jsb space - movl %r11,%r10 - jsb printint - jsb crlf + pushl %r10 + calls $1, boot_printint + calls $1, boot_printspace + pushl (%r4) + calls $1, boot_printint + calls $1, boot_printspace + pushl %r11 + calls $1, boot_printint + calls $0, boot_crlf clrl %r3 clrl %r9 LOOP: - movl %r11, %r10 - jsb printint - jsb space - movl %r3, %r10 - jsb printint - jsb space - movl %r4, %r10 - jsb printint - jsb space - movl (%r4), %r10 - jsb printint - jsb space + pushl %r11 + calls $1, boot_printint + calls $1, boot_printspace + pushl %r3 + calls $1, boot_printint + calls $1, boot_printspace + pushl %r4 + calls $1, boot_printint + calls $1, boot_printspace + pushl (%r4) + calls $1, boot_printint + calls $1, boot_printspace jmp PASC -LRET: jsb crlf +LRET: calls $1, boot_crlf incl %r3 incl %r9 # page length on my uvax is about 0x1f lines @@ -51,27 +52,27 @@ rsb PASC: movl %r4, %r6 - movl %r6, %r10 - jsb printchar + pushl (%r6) + calls $1, boot_printchar incl %r6 - movl %r6, %r10 - jsb printchar + pushl (%r6) + calls $1, boot_printchar incl %r6 - movl %r6, %r10 - jsb printchar + pushl (%r6) + calls $1, boot_printchar incl %r6 - movl %r6, %r10 - jsb printchar + pushl (%r6) + calls $1, boot_printchar jmp LRET pause: - movab more, %r10 - jsb printstr + pushab more + calls $1, boot_printstr GCLOOP: jsb 0x20040044 tstl %r0 beql GCLOOP clrl %r9 - jsb crlf + calls $1, boot_crlf jmp LRET2 more: --- NEW FILE: lib.c --- #include <linux/init.h> #include <asm/mv.h> void __init boot_putchar(unsigned int c) { mv->pre_vm_putchar(c); } void __init boot_crlf(void) { boot_putchar('\n'); boot_putchar('\r'); } void __init boot_printspace(void) { boot_putchar(' '); } void __init boot_printstr(char *s) { while (*s) { boot_putchar(*s); s++; } } void __init boot_printchar(unsigned int c) { if ((c >= 0x20) && (c <= 0x7e)) { boot_putchar(c); } else { boot_putchar('.'); } } void __init boot_printint(unsigned int x) { int i; int d; for (i = 28; i>= 0; i -= 4) { d = (x >> i) & 0x0f; if (d > 9) { boot_putchar(d - 10 + 'A'); } else { boot_putchar(d + '0'); } } } Index: head.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/boot/head.S,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- head.S 14 Jun 2004 12:14:20 -0000 1.11 +++ head.S 26 Sep 2004 14:44:06 -0000 1.12 @@ -69,38 +69,38 @@ subl2 $PAGE_OFFSET, MV_PRE_VM_INIT(%r2) # print the cpu type - jsb crlf - movab msg_cpu_type, %r10 - jsb printstr + calls $0, boot_crlf + pushab msg_cpu_type + calls $1, boot_printstr movl mv, %r10 calls $0, *MV_CPU_TYPE_STR(%r10) - movl %r0, %r10 - jsb printstr - jsb crlf + pushl %r0 + calls $1, boot_printstr + calls $0, boot_crlf # print first line of debug diagnostics - movab msg_loaded, %r10 # ascii string - jsb printstr - moval start, %r10 # where we were loaded - jsb printint - jsb crlf - movab msg_registers, %r10 # ascii string - jsb printstr - jsb space + pushab msg_loaded # ascii string + calls $1, boot_printstr + pushal start # where we were loaded + calls $1, boot_printint + calls $0, boot_crlf + pushab msg_registers # ascii string + calls $1, boot_printstr + calls $0, boot_printspace movl boot_r11, %r11 - movl %r11,%r10 # r11 (holds the rpb base address, usually 0x0) - jsb printint - jsb space - movl 48(%r11), %r10 # saved r5 in RPB (argument to BOOT command) - jsb printint - jsb space - movl %ap, %r10 # argument pointer (struct arglist) - jsb printint - jsb space - movl %sp, %r10 # stack pointer - jsb printint - jsb crlf + pushl %r11 # r11 (holds the rpb base address, usually 0x0) + calls $1, boot_printint + calls $0, boot_printspace + pushl 48(%r11) # saved r5 in RPB (argument to BOOT command) + calls $1, boot_printint + calls $0, boot_printspace + pushl %ap # argument pointer (struct arglist) + calls $1, boot_printint + calls $0, boot_printspace + pushl %sp # stack pointer + calls $1, boot_printint + calls $0, boot_crlf # Save off the current machine vector address in boot_mv, because it # lies in the .bss section and it will get clobbered real soon... @@ -186,11 +186,11 @@ addl2 %r2, MV_PRE_VM_GETCHAR(%r3) addl2 %r2, MV_CPU_TYPE_STR(%r3) - movab msg_relocated, %r10 # debugging line no 2 - jsb printstr - moval reloc, %r10 # where we are now (physical) - jsb printint - jsb crlf + pushab msg_relocated # debugging line no 2 + calls $1, boot_printstr + pushal reloc # where we are now (physical) + calls $1, boot_printint + calls $0, boot_crlf # Grab stuff we need between ioremaps in setup_arch/paging_init and # start of virtual memory @@ -290,9 +290,9 @@ # no need to TBIA - memory mapping not enabled # ready to turn on VM - moval msg_starting_vm, %r10 - jsb printstr - jsb crlf + moval msg_starting_vm, -(%sp) + calls $1, boot_printstr + calls $0, boot_crlf calls $0, VAX_start_mm # do that ole black magic # made it @@ -352,11 +352,11 @@ clrl prom_sidex clrl cpu_type mfpr $PR_SID, cpu_type - movab msg_cpu_type, %r10 - jsb printstr - movl cpu_type, %r10 - jsb printint - jsb space + pushab msg_cpu_type + calls $1, boot_printstr + pushl cpu_type + calls $1, boot_printint + calls $0, boot_printspace movl cpu_type, %r7 extv $24, $8, %r7, %r6 cmpl %r6, $0x0A @@ -364,13 +364,13 @@ # note - we may not need to do this here. Is the board type used # before we remap prom? movl 0x20040004, prom_sidex # FIXME: This looks bogus... Do all VAXen have sidex at this address, if they have it at all? - movab msg_sidex, %r10 - jsb printstr - movl prom_sidex, %r10 - jsb printint + pushab msg_sidex + calls $1, boot_printstr + pushl prom_sidex + calls $1, boot_printint no_sidex: - jsb crlf - jsb crlf + calls $0, boot_crlf + calls $0, boot_crlf rsb msg_cpu_type: --- lib.S DELETED --- |