From: Andy P. <at...@us...> - 2001-06-24 19:35:04
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/boot In directory usw-pr-cvs1:/tmp/cvs-serv2641/boot Modified Files: head.S Log Message: Fix to machine vector overwrite bug. Index: head.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/boot/head.S,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- head.S 2001/06/10 10:35:27 1.9 +++ head.S 2001/06/24 19:34:56 1.10 @@ -27,7 +27,6 @@ movl r11, boot_r11 mfpr $PR_SCBB, boot_scb - jsb identify_cpu # now fix up the machine vector entries. (They currently contain @@ -35,10 +34,9 @@ # the pointers to the functions we use before VM init to point # into the newly-loaded kernel image.) movl mv, r2 - moval start, r3 - subl2 $PAGE_OFFSET+KERNEL_START_PHYS, r3 + subl2 $PAGE_OFFSET+KERNEL_START_PHYS, r3 addl2 r3, MV_PRE_VM_PUTCHAR(r2) addl2 r3, MV_PRE_VM_GETCHAR(r2) addl2 r3, MV_CPU_TYPE_STR(r2) @@ -47,9 +45,9 @@ subl2 $PAGE_OFFSET, MV_PRE_VM_INIT(r2) # print the cpu type - jsb crlf + jsb crlf movab msg_cpu_type, r10 - jsb printstr + jsb printstr movl mv, r10 calls $0, *MV_CPU_TYPE_STR(r10) @@ -80,6 +78,15 @@ jsb printint jsb 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... +# - atp. in fact it gets clobbered real quick, if your kernel is +# larger than about 950k, as the relocation code clobbers it, along +# with every thing else poking its head above $KERNEL_START_PHYS, +# like the entire .bss section. + + movl mv, boot_mv + # copy the loaded image higher up in physical RAM #chunks of 65535B data are moved top-to-bottom while #inside one chunk the data is moved bottom-to-top. @@ -108,10 +115,6 @@ movc3 r6,(r1),(r3) copy_done: -# Save off the current machine vector address in R11, because it -# lies in the .bss section and it will get clobbered real soon... - - movl mv, r11 # # Next we have to fill the .bss section will zeros. We do it now # instead of when we are preparing the loadable image because it @@ -154,9 +157,9 @@ # made it, note that sp is still down there # halt -# fix up the machine vector pointer (by restoring it from R11 and +# fix up the machine vector pointer (by restoring it from boot_mv and # adding in the distance that the kernel was re-located) - addl3 r2, r11, mv + addl3 r2, boot_mv, mv movl mv, r3 #and the pre-vm i/o functions @@ -359,6 +362,11 @@ boot_r11: .int 0x00000000 .globl boot_scb boot_scb: .int 0x00000000 +# +# This is here because we need a safe place to store it as we +# relocate around in memory. It may be handy later. +.globl boot_mv +boot_mv: .int 0x00000000 cpu_type: .int 0x00000000 prom_sidex: .int 0x00000000 |