From: Kenn H. <ke...@us...> - 2001-02-21 00:34:27
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/boot In directory usw-pr-cvs1:/tmp/cvs-serv23478 Modified Files: head.S Log Message: Remove some variables that are no longer needed. Also keep phys_kern_end in a register, rather than in RAM since it may not survive the kernel relocation. And replace phys_start location with KERNEL_START_PHYS constant. Index: head.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/boot/head.S,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- head.S 2001/02/18 16:42:45 1.4 +++ head.S 2001/02/21 00:35:24 1.5 @@ -29,10 +29,10 @@ jsb identify_cpu -# now fix up the machine vector entries (They currently contain +# now fix up the machine vector entries. (They currently contain # pointers to virtual addresses in S0 space. We need to change # the pointers to the functions we use before VM init to point -# into the newly-loaded kernel image +# into the newly-loaded kernel image.) movl mv, r2 moval start, r3 @@ -88,7 +88,7 @@ subl2 $start,r6 # byte count to r6 movab __bss_start,r1 subl2 $0xffff, r1 # r1 points to top chunk of source - movl phys_start, r3 # dest address to r3 + movl $KERNEL_START_PHYS, r3 # dest address to r3 addl2 r6,r3 subl2 $0xffff,r3 #r3 points to top chunk of dest # @@ -103,7 +103,7 @@ brb copy_chunk last_chunk: movab start,r1 - movl phys_start,r3 + movl $KERNEL_START_PHYS,r3 movc3 r6,(r1),(r3) copy_done: @@ -119,8 +119,7 @@ subl3 $__bss_start, $_end, r6 # length of .bss to r6 subl3 $start, $__bss_start, r3 # offset of .bss to r3 - addl2 phys_start, r3 # phys address of .bss start now in r3 - + addl2 $KERNEL_START_PHYS, r3 # phys address of .bss start now in r3 fill_chunk: cmpl $0xffff, r6 bgeq last_fill @@ -135,7 +134,8 @@ # end of kernel fill_done: decl r3 # - movl r3, r6 # save phys addr of last byte of kernel + movl r3, r9 # save phys addr of last byte of kernel + # in R9. We'll need this later # Need to know the distance we have moved the kernel, so that we can # fix up the machine vector pointer after we jump @@ -143,7 +143,7 @@ subl3 r2, $KERNEL_START_PHYS, r2 # r2 = START_PHYS - load_address # calculate the position after jump to reloc - movl phys_start, r3 + movl $KERNEL_START_PHYS, r3 addl2 $reloc, r3 subl2 $start,r3 jmp (r3) @@ -153,9 +153,6 @@ # made it, note that sp is still down there # halt -# Save physical address of end of kernel - movl r6, phys_kern_end - # fix up the machine vector pointer (by restoring it from R11 and # adding in the distance that the kernel was re-located) addl3 r2, r11, mv @@ -197,8 +194,8 @@ # p0br/p0lr, p1br/p1lr, sbr/slr # First find a suitable start position for the SPT. This must be # longword aligned - addl3 $4, phys_kern_end, r5 - bicl2 $3, r5 + addl3 $4, r9, r5 # R9 holds kernel end + bicl2 $3, r5 # R5 is R9 rounded up to longword aligned moval swapper_pg_dir, r0 movl r5, 16(r0) # save address of base of system page table @@ -319,27 +316,6 @@ # # memory locations. # - -# This is the place we want to relocate to (physical address) -.globl phys_start -phys_start: .int KERNEL_START_PHYS - -# This is the virtual offset we start at (== PAGE_OFFSET + phys_start) -.globl virt_start -virt_start: .int KERNEL_START_VIRT - -# pg0 is the PHYSICAL ADDRESS of the system page table directory. -# This is immediately after the end of the bss section -# Once VM is enabled, this is replaced with the VIRTUAL address -#.globl pg0 -#pg0: .int 0x00000000 - -# spt_size holds the length of the SPT (in entries, not bytes) -#.globl spt_size -#spt_size: .int 0x00000000 - -.globl phys_kern_end -phys_kern_end: .int 0x00000000 # iomap_base holds the physical address of the first PTE in the # IOMAP portion of the system page table. |