|
From: Kenn H. <ke...@us...> - 2004-09-29 21:50:11
|
Update of /cvsroot/linux-vax/kernel-2.5/arch/vax/boot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9739 Modified Files: head.S lib.c Log Message: Move printing of the CPU type line at start of boot into C code Index: head.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/boot/head.S,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- head.S 28 Sep 2004 22:26:38 -0000 1.15 +++ head.S 29 Sep 2004 21:49:58 -0000 1.16 @@ -72,15 +72,7 @@ subl2 $PAGE_OFFSET, MV_PRE_VM_INIT(%r10) # print the cpu type - calls $0, boot_crlf - pushab msg_cpu_type - calls $1, boot_printstr - - movl mv, %r10 - calls $0, *MV_CPU_TYPE_STR(%r10) - pushl %r0 - calls $1, boot_printstr - calls $0, boot_crlf + calls $0, boot_print_cpu_id # print first line of debug diagnostics pushab msg_loaded # ascii string @@ -170,10 +162,7 @@ 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 - jsb cpu_id + calls $0, boot_crlf # save RPB before it gets obliterated movl boot_r11, %r11 @@ -325,38 +314,6 @@ .ascii "Starting VM\0" .align 1 -# identify cpu -.globl cpu_id -cpu_id: - clrl prom_sidex - clrl cpu_type - mfpr $PR_SID, cpu_type - 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 - blss no_sidex - # 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? - pushab msg_sidex - calls $1, boot_printstr - pushl prom_sidex - calls $1, boot_printint -no_sidex: - calls $0, boot_crlf - calls $0, boot_crlf - rsb - -msg_cpu_type: - .ascii "CPU type: \0" -msg_sidex: - .ascii "sidex: \0" - # # memory locations. @@ -390,10 +347,6 @@ .globl boot_mv boot_mv: .int 0x00000000 -cpu_type: - .int 0x00000000 -prom_sidex: - .int 0x00000000 # our dummy pcb __INITDATA Index: lib.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/arch/vax/boot/lib.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- lib.c 28 Sep 2004 22:24:39 -0000 1.4 +++ lib.c 29 Sep 2004 21:49:58 -0000 1.5 @@ -3,6 +3,7 @@ #include <linux/types.h> #include <asm/mv.h> +#include <asm/mtpr.h> #include "boot_sections.h" @@ -22,7 +23,7 @@ boot_putchar(' '); } -void __boot boot_printstr(char *s) +void __boot boot_printstr(const char *s) { while (*s) { boot_putchar(*s); @@ -88,3 +89,17 @@ } } +void __boot boot_print_cpu_id(void) +{ + boot_printstr("CPU type: "); + boot_printstr(mv->cpu_type_str()); + + boot_printstr(" SID: "); + boot_printint(__mfpr(PR_SID)); + + boot_printstr(" SIDEX: "); + boot_printint(mv->sidex); + + boot_crlf(); +} + |