From owner-svn-src-all@freebsd.org Tue Mar 28 07:10:36 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64B6CD224E0; Tue, 28 Mar 2017 07:10:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 31409CCD; Tue, 28 Mar 2017 07:10:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2S7AZep032176; Tue, 28 Mar 2017 07:10:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2S7AZjf032175; Tue, 28 Mar 2017 07:10:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201703280710.v2S7AZjf032175@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 28 Mar 2017 07:10:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316078 - head/sys/boot/i386/gptboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Tue, 28 Mar 2017 07:10:36 -0000 Author: ngie Date: Tue Mar 28 07:10:35 2017 New Revision: 316078 URL: https://svnweb.freebsd.org/changeset/base/316078 Log: gpt*boot: Save a bit more memory when LOADER_NO_GELI_SUPPORT is specified Don't compile geliargs into the image and don't pass geliargs to the respective bootloader code via __exec(..). This saves a negligible amount of memory/disk space. X-MFC with: r296963 Obtained from: Isilon OneFS Sponsored by: Dell EMC Isilon Modified: head/sys/boot/i386/gptboot/gptboot.c Modified: head/sys/boot/i386/gptboot/gptboot.c ============================================================================== --- head/sys/boot/i386/gptboot/gptboot.c Tue Mar 28 07:01:40 2017 (r316077) +++ head/sys/boot/i386/gptboot/gptboot.c Tue Mar 28 07:10:35 2017 (r316078) @@ -84,7 +84,9 @@ static struct dsk dsk; static char kname[1024]; static int comspeed = SIOSPD; static struct bootinfo bootinfo; +#ifdef LOADER_GELI_SUPPORT static struct geli_boot_args geliargs; +#endif static vm_offset_t high_heap_base; static uint32_t bios_basemem, bios_extmem, high_heap_size; @@ -476,16 +478,18 @@ load(void) bootinfo.bi_esymtab = VTOP(p); bootinfo.bi_kernelname = VTOP(kname); bootinfo.bi_bios_dev = dsk.drive; - geliargs.size = sizeof(geliargs); #ifdef LOADER_GELI_SUPPORT + geliargs.size = sizeof(geliargs); bcopy(gelipw, geliargs.gelipw, sizeof(geliargs.gelipw)); bzero(gelipw, sizeof(gelipw)); -#else - geliargs.gelipw[0] = '\0'; #endif __exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK), MAKEBOOTDEV(dev_maj[dsk.type], dsk.part + 1, dsk.unit, 0xff), - KARGS_FLAGS_EXTARG, 0, 0, VTOP(&bootinfo), geliargs); + KARGS_FLAGS_EXTARG, 0, 0, VTOP(&bootinfo) +#ifdef LOADER_GELI_SUPPORT + , geliargs +#endif + ); } static int