From owner-svn-src-all@FreeBSD.ORG Fri Jun 29 01:55:21 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66B3A106564A; Fri, 29 Jun 2012 01:55:21 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51B0C8FC08; Fri, 29 Jun 2012 01:55:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5T1tLtL011839; Fri, 29 Jun 2012 01:55:21 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5T1tLBO011836; Fri, 29 Jun 2012 01:55:21 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201206290155.q5T1tLBO011836@svn.freebsd.org> From: Rui Paulo Date: Fri, 29 Jun 2012 01:55:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237737 - head/sys/powerpc/aim X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2012 01:55:21 -0000 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