From owner-svn-src-projects@FreeBSD.ORG Sat Apr 5 17:29:41 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E111A62; Sat, 5 Apr 2014 17:29:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D51D899E; Sat, 5 Apr 2014 17:29:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s35HTeer095415; Sat, 5 Apr 2014 17:29:40 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s35HTeW9095413; Sat, 5 Apr 2014 17:29:40 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201404051729.s35HTeW9095413@svn.freebsd.org> From: Andrew Turner Date: Sat, 5 Apr 2014 17:29:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r264152 - projects/arm64/sys/boot/arm64/efi X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 17:29:41 -0000 Author: andrew Date: Sat Apr 5 17:29:40 2014 New Revision: 264152 URL: http://svnweb.freebsd.org/changeset/base/264152 Log: Set MODINFOMD_KERNEND correctly. While here remove an unneeded printf and fix the style a little. Modified: projects/arm64/sys/boot/arm64/efi/bootinfo.c projects/arm64/sys/boot/arm64/efi/exec.c Modified: projects/arm64/sys/boot/arm64/efi/bootinfo.c ============================================================================== --- projects/arm64/sys/boot/arm64/efi/bootinfo.c Sat Apr 5 16:54:47 2014 (r264151) +++ projects/arm64/sys/boot/arm64/efi/bootinfo.c Sat Apr 5 17:29:40 2014 (r264152) @@ -199,14 +199,15 @@ int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp) { struct preloaded_file *xp, *kfp; + struct file_metadata *md; uint64_t kernend; vm_offset_t addr, size; /* find the last module in the chain */ addr = 0; for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) { - if (addr < (xp->f_addr + xp->f_size)) - addr = xp->f_addr + xp->f_size; + if (addr < (xp->f_addr + xp->f_size)) + addr = xp->f_addr + xp->f_size; } /* pad to a page boundary */ addr = roundup(addr, PAGE_SIZE); @@ -227,6 +228,9 @@ bi_load(char *args, vm_offset_t *modulep kernend = roundup(addr + size, PAGE_SIZE); *kernendp = kernend; + md = file_findmetadata(kfp, MODINFOMD_KERNEND); + bcopy(&kernend, md->md_data, sizeof kernend); + /* copy module list and metadata */ (void)bi_copymodules(addr); Modified: projects/arm64/sys/boot/arm64/efi/exec.c ============================================================================== --- projects/arm64/sys/boot/arm64/efi/exec.c Sat Apr 5 16:54:47 2014 (r264151) +++ projects/arm64/sys/boot/arm64/efi/exec.c Sat Apr 5 17:29:40 2014 (r264152) @@ -79,8 +79,6 @@ elf64_exec(struct preloaded_file *fp) if (err != 0) return (err); - printf("%llx %llx\n", modulep, kernendp); - status = BS->ExitBootServices(IH, arm64_efi_mapkey); if (EFI_ERROR(status)) { printf("%s: ExitBootServices() returned 0x%lx\n", __func__,