svn commit: r316078 - head/sys/boot/i386/gptboot
Ngie Cooper
ngie at FreeBSD.org
Tue Mar 28 07:10:36 UTC 2017
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
More information about the svn-src-head
mailing list