Author: rpaulo Date: Fri Jun 29 01:55:20 2012 New Revision: 237737 URL: http://svn.freebsd.org/changeset/base/237737
Log: The `end' symbol doesn't match the end of the kernel image because it's relative to the start address (unless the start address is 0, which is not the case). This is currently not a problem because all powerpc architectures are using loader(8) which passes metadata to the kernel including the correct `endkernel' address. If we don't use loader(8), register 4 and 5 will have the size of the kernel ELF file, not its end address. We fix that simply by adding `kernel_text' to `end' to compute `endkernel'. Discussed with: nathanw Modified: head/sys/powerpc/aim/locore32.S head/sys/powerpc/aim/locore64.S Modified: head/sys/powerpc/aim/locore32.S ============================================================================== --- head/sys/powerpc/aim/locore32.S Thu Jun 28 23:48:40 2012 (r237736) +++ head/sys/powerpc/aim/locore32.S Fri Jun 29 01:55:20 2012 (r237737) @@ -164,13 +164,14 @@ __start: bl OF_initial_setup + lis 3,kernel_text@ha + addi 3,3,kernel_text@l + lis 4,end@ha addi 4,4,end@l + add 4,4,3 mr 5,4 - lis 3,kernel_text@ha - addi 3,3,kernel_text@l - /* Restore the argument pointer and length */ mr 6,20 mr 7,21 Modified: head/sys/powerpc/aim/locore64.S ============================================================================== --- head/sys/powerpc/aim/locore64.S Thu Jun 28 23:48:40 2012 (r237736) +++ head/sys/powerpc/aim/locore64.S Fri Jun 29 01:55:20 2012 (r237737) @@ -164,13 +164,14 @@ ASENTRY_NOPROF(__start) bl OF_initial_setup nop + lis 3,kernbase@ha + addi 3,3,kernbase@l + lis 4,end@ha addi 4,4,end@l + add 4,4,3 mr 5,4 - lis 3,kernbase@ha - addi 3,3,kernbase@l - /* Restore the argument pointer and length */ mr 6,20 mr 7,21 _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"