From owner-svn-src-all@FreeBSD.ORG Wed Jul 7 19:06:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C246106566C; Wed, 7 Jul 2010 19:06:54 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01DAE8FC1B; Wed, 7 Jul 2010 19:06:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o67J6rvQ077943; Wed, 7 Jul 2010 19:06:53 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o67J6rSL077940; Wed, 7 Jul 2010 19:06:53 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201007071906.o67J6rSL077940@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 7 Jul 2010 19:06:53 +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: r209774 - in head/sys/boot/ia64: common efi 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: Wed, 07 Jul 2010 19:06:54 -0000 Author: marcel Date: Wed Jul 7 19:06:53 2010 New Revision: 209774 URL: http://svn.freebsd.org/changeset/base/209774 Log: Use the kernel's start address to determine what to map. This allows us to link the kernel at different addresses without needing to build a corresponding loader. Modified: head/sys/boot/ia64/common/exec.c head/sys/boot/ia64/efi/version Modified: head/sys/boot/ia64/common/exec.c ============================================================================== --- head/sys/boot/ia64/common/exec.c Wed Jul 7 17:52:13 2010 (r209773) +++ head/sys/boot/ia64/common/exec.c Wed Jul 7 19:06:53 2010 (r209774) @@ -106,11 +106,12 @@ elf64_exec(struct preloaded_file *fp) pte = PTE_PRESENT | PTE_MA_WB | PTE_ACCESSED | PTE_DIRTY | PTE_PL_KERN | PTE_AR_RWX | PTE_ED; + pte |= IA64_RR_MASK(hdr->e_entry) & PTE_PPN_MASK; - __asm __volatile("mov cr.ifa=%0" :: "r"(IA64_RR_BASE(7))); + __asm __volatile("mov cr.ifa=%0" :: "r"(hdr->e_entry)); __asm __volatile("mov cr.itir=%0" :: "r"(28 << 2)); - __asm __volatile("ptr.i %0,%1" :: "r"(IA64_RR_BASE(7)), "r"(28<<2)); - __asm __volatile("ptr.d %0,%1" :: "r"(IA64_RR_BASE(7)), "r"(28<<2)); + __asm __volatile("ptr.i %0,%1" :: "r"(hdr->e_entry), "r"(28<<2)); + __asm __volatile("ptr.d %0,%1" :: "r"(hdr->e_entry), "r"(28<<2)); __asm __volatile("srlz.i;;"); __asm __volatile("itr.i itr[%0]=%1;;" :: "r"(0), "r"(pte)); __asm __volatile("srlz.i;;"); Modified: head/sys/boot/ia64/efi/version ============================================================================== --- head/sys/boot/ia64/efi/version Wed Jul 7 17:52:13 2010 (r209773) +++ head/sys/boot/ia64/efi/version Wed Jul 7 19:06:53 2010 (r209774) @@ -3,6 +3,8 @@ $FreeBSD$ NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this file is important. Make sure the current version number is on line 6. +2.2: Create direct mapping based on start address instead of mapping + first 256M. 2.1: Add support for "-dev " argument parsing. 2.0: Provide devices based on the block I/O protocol, rather than the simple file services protocol. Use the FreeBSD file system code