Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 2016 17:23:43 +0000 (UTC)
From:      Glen Barber <gjb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r293336 - in projects/release-pkg: . contrib/llvm/projects/libunwind/src etc etc/mtree gnu/usr.bin/binutils/ld lib/libstand lib/libsysdecode libexec/rtld-elf release sbin/geom/class/eli...
Message-ID:  <201601071723.u07HNhhh075822@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gjb
Date: Thu Jan  7 17:23:43 2016
New Revision: 293336
URL: https://svnweb.freebsd.org/changeset/base/293336

Log:
  MFH
  
  Sponsored by:	The FreeBSD Foundation

Added:
  projects/release-pkg/lib/libsysdecode/Makefile.depend
     - copied unchanged from r293335, head/lib/libsysdecode/Makefile.depend
  projects/release-pkg/sys/geom/eli/g_eli_hmac.c
     - copied unchanged from r293335, head/sys/geom/eli/g_eli_hmac.c
  projects/release-pkg/usr.sbin/rpcbind/tests/
     - copied from r293335, head/usr.sbin/rpcbind/tests/
Deleted:
  projects/release-pkg/sys/ofed/include/rdma/Kbuild
Modified:
  projects/release-pkg/Makefile.inc1
  projects/release-pkg/contrib/llvm/projects/libunwind/src/AddressSpace.hpp
  projects/release-pkg/etc/mtree/BSD.tests.dist
  projects/release-pkg/etc/rc
  projects/release-pkg/gnu/usr.bin/binutils/ld/Makefile
  projects/release-pkg/lib/libstand/Makefile
  projects/release-pkg/libexec/rtld-elf/rtld.c
  projects/release-pkg/release/Makefile
  projects/release-pkg/sbin/geom/class/eli/Makefile
  projects/release-pkg/share/man/man7/ascii.7
  projects/release-pkg/share/misc/ascii   (contents, props changed)
  projects/release-pkg/sys/arm/arm/db_interface.c
  projects/release-pkg/sys/boot/efi/boot1/boot1.c
  projects/release-pkg/sys/boot/efi/include/amd64/efibind.h
  projects/release-pkg/sys/boot/efi/include/arm64/efibind.h
  projects/release-pkg/sys/boot/efi/include/efierr.h
  projects/release-pkg/sys/boot/efi/include/i386/efibind.h
  projects/release-pkg/sys/boot/efi/libefi/Makefile
  projects/release-pkg/sys/boot/efi/libefi/efi_console.c
  projects/release-pkg/sys/boot/efi/loader/arch/amd64/framebuffer.c
  projects/release-pkg/sys/boot/efi/loader/bootinfo.c
  projects/release-pkg/sys/boot/efi/loader/copy.c
  projects/release-pkg/sys/boot/efi/loader/devicename.c
  projects/release-pkg/sys/boot/efi/loader/main.c
  projects/release-pkg/sys/boot/ficl/amd64/sysdep.c
  projects/release-pkg/sys/boot/forth/beastie.4th
  projects/release-pkg/sys/boot/forth/beastie.4th.8
  projects/release-pkg/sys/boot/forth/loader.conf.5
  projects/release-pkg/sys/boot/zfs/zfs.c
  projects/release-pkg/sys/cddl/boot/zfs/lz4.c
  projects/release-pkg/sys/conf/files
  projects/release-pkg/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c
  projects/release-pkg/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
  projects/release-pkg/sys/dev/cxgb/ulp/tom/cxgb_listen.c
  projects/release-pkg/sys/dev/cxgbe/iw_cxgbe/cm.c
  projects/release-pkg/sys/dev/cxgbe/tom/t4_cpl_io.c
  projects/release-pkg/sys/dev/cxgbe/tom/t4_listen.c
  projects/release-pkg/sys/dev/e1000/if_em.c
  projects/release-pkg/sys/dev/e1000/if_em.h
  projects/release-pkg/sys/dev/ixgbe/if_ix.c
  projects/release-pkg/sys/dev/netmap/if_em_netmap.h
  projects/release-pkg/sys/dev/nvd/nvd.c
  projects/release-pkg/sys/dev/nvme/nvme.c
  projects/release-pkg/sys/dev/nvme/nvme_ctrlr.c
  projects/release-pkg/sys/dev/nvme/nvme_private.h
  projects/release-pkg/sys/dev/nvme/nvme_qpair.c
  projects/release-pkg/sys/geom/eli/g_eli.c
  projects/release-pkg/sys/geom/eli/g_eli.h
  projects/release-pkg/sys/geom/eli/g_eli_crypto.c
  projects/release-pkg/sys/geom/eli/g_eli_key_cache.c
  projects/release-pkg/sys/geom/eli/pkcs5v2.c
  projects/release-pkg/sys/kern/vfs_cache.c
  projects/release-pkg/sys/modules/geom/geom_eli/Makefile
  projects/release-pkg/sys/netgraph/netflow/netflow.c
  projects/release-pkg/sys/netinet/tcp_input.c
  projects/release-pkg/sys/netinet/tcp_output.c
  projects/release-pkg/sys/netinet/tcp_stacks/fastpath.c
  projects/release-pkg/sys/netinet/tcp_subr.c
  projects/release-pkg/sys/netinet/tcp_timer.c
  projects/release-pkg/sys/netinet/tcp_usrreq.c
  projects/release-pkg/sys/netinet/tcp_var.h
  projects/release-pkg/sys/netpfil/pf/pf.c
  projects/release-pkg/targets/pseudo/userland/lib/Makefile.depend
  projects/release-pkg/usr.bin/cap_mkdb/cap_mkdb.c
  projects/release-pkg/usr.bin/truss/Makefile.depend.amd64
  projects/release-pkg/usr.sbin/mountd/exports.5
  projects/release-pkg/usr.sbin/mountd/mountd.c
  projects/release-pkg/usr.sbin/rpcbind/Makefile
  projects/release-pkg/usr.sbin/rpcbind/check_bound.c
  projects/release-pkg/usr.sbin/rpcbind/rpcbind.h
  projects/release-pkg/usr.sbin/rpcbind/util.c
  projects/release-pkg/usr.sbin/services_mkdb/services_mkdb.c
Directory Properties:
  projects/release-pkg/   (props changed)
  projects/release-pkg/contrib/llvm/   (props changed)
  projects/release-pkg/contrib/llvm/projects/libunwind/   (props changed)
  projects/release-pkg/gnu/usr.bin/binutils/   (props changed)
  projects/release-pkg/sbin/   (props changed)
  projects/release-pkg/share/   (props changed)
  projects/release-pkg/sys/   (props changed)
  projects/release-pkg/sys/boot/   (props changed)
  projects/release-pkg/sys/conf/   (props changed)
  projects/release-pkg/targets/   (props changed)

Modified: projects/release-pkg/Makefile.inc1
==============================================================================
--- projects/release-pkg/Makefile.inc1	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/Makefile.inc1	Thu Jan  7 17:23:43 2016	(r293336)
@@ -1263,7 +1263,7 @@ reinstallkernel reinstallkernel.debug: _
 	    ${CROSSENV} PATH=${TMPPATH} \
 	    ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//}
 .endif
-.if ${BUILDKERNELS:[#]} > 1
+.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS)
 .for _kernel in ${BUILDKERNELS:[2..-1]}
 	@echo "--------------------------------------------------------------"
 	@echo ">>> Installing kernel ${_kernel}"
@@ -1294,7 +1294,7 @@ distributekernel distributekernel.debug:
 	    ${DESTDIR}/${DISTDIR}/kernel.meta
 .endif
 .endif
-.if ${BUILDKERNELS:[#]} > 1
+.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS)
 .for _kernel in ${BUILDKERNELS:[2..-1]}
 .if defined(NO_ROOT)
 	echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta
@@ -1325,7 +1325,7 @@ packagekernel:
 	    tar cvf - --include '*/*/*.debug' \
 	    @${DESTDIR}/${DISTDIR}/kernel.meta | \
 	    ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel-dbg.txz
-.if ${BUILDKERNELS:[#]} > 1
+.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS)
 .for _kernel in ${BUILDKERNELS:[2..-1]}
 	cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
 	    tar cvf - --exclude '*.debug' \
@@ -1346,7 +1346,7 @@ packagekernel:
 	cd ${DESTDIR}/${DISTDIR}/kernel; \
 	    tar cvf - --include '*/*/*.debug' $$(eval find .) | \
 	    ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel-dbg.txz
-.if ${BUILDKERNELS:[#]} > 1
+.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS)
 .for _kernel in ${BUILDKERNELS:[2..-1]}
 	cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
 	    tar cvf - --exclude '*.debug' . | \

Modified: projects/release-pkg/contrib/llvm/projects/libunwind/src/AddressSpace.hpp
==============================================================================
--- projects/release-pkg/contrib/llvm/projects/libunwind/src/AddressSpace.hpp	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/contrib/llvm/projects/libunwind/src/AddressSpace.hpp	Thu Jan  7 17:23:43 2016	(r293336)
@@ -37,6 +37,7 @@ namespace libunwind {
 #if _LIBUNWIND_ARM_EHABI
 #if defined(__FreeBSD__)
 
+#include <sys/link_elf.h>
 typedef void *_Unwind_Ptr;
 
 #elif defined(__linux__)

Modified: projects/release-pkg/etc/mtree/BSD.tests.dist
==============================================================================
--- projects/release-pkg/etc/mtree/BSD.tests.dist	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/etc/mtree/BSD.tests.dist	Thu Jan  7 17:23:43 2016	(r293336)
@@ -622,6 +622,8 @@
         ..
         pw
         ..
+        rpcbind
+        ..
         sa
         ..
     ..

Modified: projects/release-pkg/etc/rc
==============================================================================
--- projects/release-pkg/etc/rc	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/etc/rc	Thu Jan  7 17:23:43 2016	(r293336)
@@ -130,11 +130,17 @@ for _rc_elem in ${files}; do
 done
 
 # Remove the firstboot sentinel, and reboot if it was requested.
+# Be a bit paranoid about removing it to handle the common failure
+# modes since the consequence of failure can be big.
+# Note: this assumes firstboot_sentinel is on / when we have
+# a read-only /, or that it is on media that's writable.
 if [ -e ${firstboot_sentinel} ]; then
 	[ ${root_rw_mount} = "yes" ] || mount -uw /
-	/bin/rm ${firstboot_sentinel}
+	chflags -R 0 ${firstboot_sentinel}
+	rm -rf ${firstboot_sentinel}
 	if [ -e ${firstboot_sentinel}-reboot ]; then
-		/bin/rm ${firstboot_sentinel}-reboot
+		chflags -R 0 ${firstboot_sentinel}-reboot
+		rm -rf ${firstboot_sentinel}-reboot
 		[ ${root_rw_mount} = "yes" ] || mount -ur /
 		kill -INT 1
 	fi

Modified: projects/release-pkg/gnu/usr.bin/binutils/ld/Makefile
==============================================================================
--- projects/release-pkg/gnu/usr.bin/binutils/ld/Makefile	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/gnu/usr.bin/binutils/ld/Makefile	Thu Jan  7 17:23:43 2016	(r293336)
@@ -6,7 +6,8 @@ ELF_SCR_EXT=	x xbn xc xd xdc xdw xn xr x
 
 .PATH: ${SRCDIR}/ld
 
-PROG=	ld
+PROG=	ld.bfd
+MAN=	ld.1
 SCRIPTDIR= /usr/libdata/ldscripts
 SRCS+=	ldcref.c \
 	ldctor.c \
@@ -48,7 +49,7 @@ CLEANFILES+=	ldemul-list.h stringify.sed
 
 FILES=		${LDSCRIPTS:S|^|ldscripts/|}
 FILESDIR=	${SCRIPTDIR}
-LINKS=		${BINDIR}/ld ${BINDIR}/ld.bfd
+LINKS=		${BINDIR}/ld.bfd ${BINDIR}/ld
 
 HOST=		${TARGET_TUPLE}
 LIBSEARCHPATH=	\"=/lib\":\"=/usr/lib\"

Modified: projects/release-pkg/lib/libstand/Makefile
==============================================================================
--- projects/release-pkg/lib/libstand/Makefile	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/lib/libstand/Makefile	Thu Jan  7 17:23:43 2016	(r293336)
@@ -38,8 +38,9 @@ SRCS+= ntoh.c
 
 # string functions from libc
 .PATH: ${LIBC_SRC}/string
-SRCS+=	bcmp.c bcopy.c bzero.c ffs.c memccpy.c memchr.c memcmp.c memcpy.c \
-	memmove.c memset.c qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \
+SRCS+=	bcmp.c bcopy.c bzero.c ffs.c fls.c \
+	memccpy.c memchr.c memcmp.c memcpy.c memmove.c memset.c \
+	qdivrem.c strcat.c strchr.c strcmp.c strcpy.c \
 	strcspn.c strlcat.c strlcpy.c strlen.c strncat.c strncmp.c strncpy.c \
 	strpbrk.c strrchr.c strsep.c strspn.c strstr.c strtok.c swab.c
 .if ${MACHINE_CPUARCH} == "arm"

Copied: projects/release-pkg/lib/libsysdecode/Makefile.depend (from r293335, head/lib/libsysdecode/Makefile.depend)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/release-pkg/lib/libsysdecode/Makefile.depend	Thu Jan  7 17:23:43 2016	(r293336, copy of r293335, head/lib/libsysdecode/Makefile.depend)
@@ -0,0 +1,22 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+	gnu/lib/csu \
+	gnu/lib/libgcc \
+	include \
+	include/rpc \
+	include/xlocale \
+	lib/${CSU_DIR} \
+	lib/libc \
+	lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+ioctl.So: ioctl.c
+ioctl.o: ioctl.c
+ioctl.po: ioctl.c
+.endif

Modified: projects/release-pkg/libexec/rtld-elf/rtld.c
==============================================================================
--- projects/release-pkg/libexec/rtld-elf/rtld.c	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/libexec/rtld-elf/rtld.c	Thu Jan  7 17:23:43 2016	(r293336)
@@ -435,7 +435,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_
 
     trust = !issetugid();
 
-    md_abi_variant_hook(aux_info);
+/*  md_abi_variant_hook(aux_info); */
 
     ld_bind_now = getenv(_LD("BIND_NOW"));
     /* 

Modified: projects/release-pkg/release/Makefile
==============================================================================
--- projects/release-pkg/release/Makefile	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/release/Makefile	Thu Jan  7 17:23:43 2016	(r293336)
@@ -281,7 +281,11 @@ ftp: packagesystem
 	cp *.txz MANIFEST ftp
 
 release:	real-release vm-release cloudware-release
-	touch ${.OBJDIR}/${.TARGET}
+	${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} release-done
+	true
+
+release-done:
+	touch release
 
 real-release:
 	${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj

Modified: projects/release-pkg/sbin/geom/class/eli/Makefile
==============================================================================
--- projects/release-pkg/sbin/geom/class/eli/Makefile	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/sbin/geom/class/eli/Makefile	Thu Jan  7 17:23:43 2016	(r293336)
@@ -4,6 +4,7 @@
 
 GEOM_CLASS=	eli
 SRCS=	g_eli_crypto.c
+SRCS+=	g_eli_hmac.c
 SRCS+=	g_eli_key.c
 SRCS+=	pkcs5v2.c
 SRCS+=	sha256c.c

Modified: projects/release-pkg/share/man/man7/ascii.7
==============================================================================
--- projects/release-pkg/share/man/man7/ascii.7	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/share/man/man7/ascii.7	Thu Jan  7 17:23:43 2016	(r293336)
@@ -28,7 +28,7 @@
 .\"	@(#)ascii.7	8.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd June 5, 1993
+.Dd January 6, 2016
 .Dt ASCII 7
 .Os
 .Sh NAME
@@ -42,7 +42,7 @@ The
 set:
 .Bd -literal -offset left
 000 NUL  001 SOH  002 STX  003 ETX  004 EOT  005 ENQ  006 ACK  007 BEL
-010 BS   011 HT   012 NL   013 VT   014 NP   015 CR   016 SO   017 SI
+010 BS   011 HT   012 LF   013 VT   014 FF   015 CR   016 SO   017 SI
 020 DLE  021 DC1  022 DC2  023 DC3  024 DC4  025 NAK  026 SYN  027 ETB
 030 CAN  031 EM   032 SUB  033 ESC  034 FS   035 GS   036 RS   037 US
 040 SP   041  !   042  "   043  #   044  $   045  %   046  &   047  '
@@ -64,7 +64,7 @@ The
 set:
 .Bd -literal -offset left
 00 NUL   01 SOH   02 STX   03 ETX   04 EOT   05 ENQ   06 ACK   07 BEL
-08 BS    09 HT    0A NL    0B VT    0C NP    0D CR    0E SO    0F SI
+08 BS    09 HT    0A LF    0B VT    0C FF    0D CR    0E SO    0F SI
 10 DLE   11 DC1   12 DC2   13 DC3   14 DC4   15 NAK   16 SYN   17 ETB
 18 CAN   19 EM    1A SUB   1B ESC   1C FS    1D GS    1E RS    1F US
 20 SP    21  !    22  "    23  #    24  $    25  %    26  &    27  '
@@ -86,7 +86,7 @@ The
 set:
 .Bd -literal -offset left
   0 NUL    1 SOH    2 STX    3 ETX    4 EOT    5 ENQ    6 ACK    7 BEL
-  8 BS     9 HT    10 NL    11 VT    12 NP    13 CR    14 SO    15 SI
+  8 BS     9 HT    10 LF    11 VT    12 FF    13 CR    14 SO    15 SI
  16 DLE   17 DC1   18 DC2   19 DC3   20 DC4   21 NAK   22 SYN   23 ETB
  24 CAN   25 EM    26 SUB   27 ESC   28 FS    29 GS    30 RS    31 US
  32 SP    33  !    34  "    35  #    36  $    37  %    38  &    39  '

Modified: projects/release-pkg/share/misc/ascii
==============================================================================
--- projects/release-pkg/share/misc/ascii	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/share/misc/ascii	Thu Jan  7 17:23:43 2016	(r293336)
@@ -1,5 +1,5 @@
 |000 nul|001 soh|002 stx|003 etx|004 eot|005 enq|006 ack|007 bel|
-|010 bs |011 ht |012 nl |013 vt |014 np |015 cr |016 so |017 si |
+|010 bs |011 ht |012 lf |013 vt |014 ff |015 cr |016 so |017 si |
 |020 dle|021 dc1|022 dc2|023 dc3|024 dc4|025 nak|026 syn|027 etb|
 |030 can|031 em |032 sub|033 esc|034 fs |035 gs |036 rs |037 us |
 |040 sp |041  ! |042  " |043  # |044  $ |045  % |046  & |047  ' |
@@ -16,7 +16,7 @@
 |170  x |171  y |172  z |173  { |174  | |175  } |176  ~ |177 del|
 
 | 00 nul| 01 soh| 02 stx| 03 etx| 04 eot| 05 enq| 06 ack| 07 bel|
-| 08 bs | 09 ht | 0a nl | 0b vt | 0c np | 0d cr | 0e so | 0f si |
+| 08 bs | 09 ht | 0a lf | 0b vt | 0c ff | 0d cr | 0e so | 0f si |
 | 10 dle| 11 dc1| 12 dc2| 13 dc3| 14 dc4| 15 nak| 16 syn| 17 etb|
 | 18 can| 19 em | 1a sub| 1b esc| 1c fs | 1d gs | 1e rs | 1f us |
 | 20 sp | 21  ! | 22  " | 23  # | 24  $ | 25  % | 26  & | 27  ' |
@@ -33,7 +33,7 @@
 | 78  x | 79  y | 7a  z | 7b  { | 7c  | | 7d  } | 7e  ~ | 7f del|
 
 |  0 nul|  1 soh|  2 stx|  3 etx|  4 eot|  5 enq|  6 ack|  7 bel|
-|  8 bs |  9 ht | 10 nl | 11 vt | 12 np | 13 cr | 14 so | 15 si |
+|  8 bs |  9 ht | 10 lf | 11 vt | 12 ff | 13 cr | 14 so | 15 si |
 | 16 dle| 17 dc1| 18 dc2| 19 dc3| 20 dc4| 21 nak| 22 syn| 23 etb|
 | 24 can| 25 em | 26 sub| 27 esc| 28 fs | 29 gs | 30 rs | 31 us |
 | 32 sp | 33  ! | 34  " | 35  # | 36  $ | 37  % | 38  & | 39  ' |

Modified: projects/release-pkg/sys/arm/arm/db_interface.c
==============================================================================
--- projects/release-pkg/sys/arm/arm/db_interface.c	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/sys/arm/arm/db_interface.c	Thu Jan  7 17:23:43 2016	(r293336)
@@ -152,6 +152,10 @@ int db_frame(struct db_variable *vp, db_
 void
 db_show_mdpcpu(struct pcpu *pc)
 {
+
+#if __ARM_ARCH >= 6
+	db_printf("curpmap      = %p\n", pc->pc_curpmap);
+#endif
 }
 int
 db_validate_address(vm_offset_t addr)

Modified: projects/release-pkg/sys/boot/efi/boot1/boot1.c
==============================================================================
--- projects/release-pkg/sys/boot/efi/boot1/boot1.c	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/sys/boot/efi/boot1/boot1.c	Thu Jan  7 17:23:43 2016	(r293336)
@@ -132,8 +132,7 @@ EFI_STATUS efi_main(EFI_HANDLE Ximage, E
 	conout->Reset(conout, TRUE);
 	max_dim = best_mode = 0;
 	for (i = 0; ; i++) {
-		status = conout->QueryMode(conout, i,
-		    &cols, &rows);
+		status = conout->QueryMode(conout, i, &cols, &rows);
 		if (EFI_ERROR(status))
 			break;
 		if (cols * rows > max_dim) {
@@ -331,20 +330,20 @@ load(const char *fname)
 	    buffer, bufsize, &loaderhandle);
 	if (EFI_ERROR(status))
 		printf("LoadImage failed with error %lu\n",
-		    status & ~EFI_ERROR_MASK);
+		    EFI_ERROR_CODE(status));
 
 	status = systab->BootServices->HandleProtocol(loaderhandle,
 	    &LoadedImageGUID, (VOID**)&loaded_image);
 	if (EFI_ERROR(status))
 		printf("HandleProtocol failed with error %lu\n",
-		    status & ~EFI_ERROR_MASK);
+		    EFI_ERROR_CODE(status));
 
 	loaded_image->DeviceHandle = bootdevhandle;
 
 	status = systab->BootServices->StartImage(loaderhandle, NULL, NULL);
 	if (EFI_ERROR(status))
 		printf("StartImage failed with error %lu\n",
-		    status & ~EFI_ERROR_MASK);
+		    EFI_ERROR_CODE(status));
 }
 
 static void

Modified: projects/release-pkg/sys/boot/efi/include/amd64/efibind.h
==============================================================================
--- projects/release-pkg/sys/boot/efi/include/amd64/efibind.h	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/sys/boot/efi/include/amd64/efibind.h	Thu Jan  7 17:23:43 2016	(r293336)
@@ -39,7 +39,7 @@ Revision History
 
     // No ANSI C 1999/2000 stdint.h integer width declarations 
 
-    #if _MSC_EXTENSIONS
+    #ifdef _MSC_EXTENSIONS
 
         // Use Microsoft C compiler integer width declarations 
 
@@ -164,7 +164,7 @@ typedef uint64_t   UINTN;
 #endif
 
 #ifndef EFIAPI                  // Forces EFI calling conventions reguardless of compiler options 
-    #if _MSC_EXTENSIONS
+    #ifdef _MSC_EXTENSIONS
         #define EFIAPI __cdecl  // Force C calling convention for Microsoft C compiler 
     #else
         #define EFIAPI          // Substitute expresion to force C calling convention 
@@ -265,7 +265,7 @@ typedef uint64_t   UINTN;
 #endif
 #endif	/* __FreeBSD__ */
 
-#if _MSC_EXTENSIONS
+#ifdef _MSC_EXTENSIONS
 #pragma warning ( disable : 4731 )  // Suppress warnings about modification of EBP
 #endif
 

Modified: projects/release-pkg/sys/boot/efi/include/arm64/efibind.h
==============================================================================
--- projects/release-pkg/sys/boot/efi/include/arm64/efibind.h	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/sys/boot/efi/include/arm64/efibind.h	Thu Jan  7 17:23:43 2016	(r293336)
@@ -39,7 +39,7 @@ Revision History
 
     // No ANSI C 1999/2000 stdint.h integer width declarations 
 
-    #if _MSC_EXTENSIONS
+    #ifdef _MSC_EXTENSIONS
 
         // Use Microsoft C compiler integer width declarations 
 
@@ -159,7 +159,7 @@ typedef uint64_t   UINTN;
 //
 
 #ifndef EFIAPI                  // Forces EFI calling conventions reguardless of compiler options 
-    #if _MSC_EXTENSIONS
+    #ifdef _MSC_EXTENSIONS
         #define EFIAPI __cdecl  // Force C calling convention for Microsoft C compiler 
     #else
         #define EFIAPI          // Substitute expresion to force C calling convention 

Modified: projects/release-pkg/sys/boot/efi/include/efierr.h
==============================================================================
--- projects/release-pkg/sys/boot/efi/include/efierr.h	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/sys/boot/efi/include/efierr.h	Thu Jan  7 17:23:43 2016	(r293336)
@@ -30,7 +30,8 @@ Revision History
 
 
 #define EFIWARN(a)                            (a)
-#define EFI_ERROR(a)              (((INTN) a) < 0)
+#define EFI_ERROR(a)             (((INTN) a) < 0)
+#define EFI_ERROR_CODE(a)   (a & ~EFI_ERROR_MASK)
 
 
 #define EFI_SUCCESS                             0

Modified: projects/release-pkg/sys/boot/efi/include/i386/efibind.h
==============================================================================
--- projects/release-pkg/sys/boot/efi/include/i386/efibind.h	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/sys/boot/efi/include/i386/efibind.h	Thu Jan  7 17:23:43 2016	(r293336)
@@ -39,7 +39,7 @@ Revision History
 
     // No ANSI C 1999/2000 stdint.h integer width declarations 
 
-    #if _MSC_EXTENSIONS
+    #ifdef _MSC_EXTENSIONS
 
         // Use Microsoft C compiler integer width declarations 
 
@@ -160,7 +160,7 @@ typedef uint32_t   UINTN;
 //
 
 #ifndef EFIAPI                  // Forces EFI calling conventions reguardless of compiler options 
-    #if _MSC_EXTENSIONS
+    #ifdef _MSC_EXTENSIONS
         #define EFIAPI __cdecl  // Force C calling convention for Microsoft C compiler 
     #else
         #define EFIAPI          // Substitute expresion to force C calling convention 
@@ -261,7 +261,7 @@ typedef uint32_t   UINTN;
 #endif
 #endif	/* __FreeBSD__ */
 
-#if _MSC_EXTENSIONS
+#ifdef _MSC_EXTENSIONS
 #pragma warning ( disable : 4731 )  // Suppress warnings about modification of EBP
 #endif
 

Modified: projects/release-pkg/sys/boot/efi/libefi/Makefile
==============================================================================
--- projects/release-pkg/sys/boot/efi/libefi/Makefile	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/sys/boot/efi/libefi/Makefile	Thu Jan  7 17:23:43 2016	(r293336)
@@ -21,5 +21,6 @@ CFLAGS+= -I${.CURDIR}/../../common
 
 # Handle FreeBSD specific %b and %D printf format specifiers
 CFLAGS+= ${FORMAT_EXTENSIONS}
+CFLAGS+= -DTERM_EMU
 
 .include <bsd.lib.mk>

Modified: projects/release-pkg/sys/boot/efi/libefi/efi_console.c
==============================================================================
--- projects/release-pkg/sys/boot/efi/libefi/efi_console.c	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/sys/boot/efi/libefi/efi_console.c	Thu Jan  7 17:23:43 2016	(r293336)
@@ -35,6 +35,69 @@ __FBSDID("$FreeBSD$");
 static SIMPLE_TEXT_OUTPUT_INTERFACE	*conout;
 static SIMPLE_INPUT_INTERFACE		*conin;
 
+#ifdef TERM_EMU
+#define	DEFAULT_FGCOLOR	EFI_LIGHTGRAY
+#define	DEFAULT_BGCOLOR	EFI_BLACK
+
+#define	MAXARGS	8
+static int args[MAXARGS], argc;
+static int fg_c, bg_c, curx, cury;
+static int esc;
+
+void get_pos(int *x, int *y);
+void curs_move(int *_x, int *_y, int x, int y);
+static void CL(int);
+#endif
+
+static void efi_cons_probe(struct console *);
+static int efi_cons_init(int);
+void efi_cons_putchar(int);
+int efi_cons_getchar(void);
+void efi_cons_efiputchar(int);
+int efi_cons_poll(void);
+
+struct console efi_console = {
+	"efi",
+	"EFI console",
+	0,
+	efi_cons_probe,
+	efi_cons_init,
+	efi_cons_putchar,
+	efi_cons_getchar,
+	efi_cons_poll
+};
+
+#ifdef TERM_EMU
+
+/* Get cursor position. */
+void
+get_pos(int *x, int *y)
+{
+	*x = conout->Mode->CursorColumn;
+	*y = conout->Mode->CursorRow;
+}
+
+/* Move cursor to x rows and y cols (0-based). */
+void
+curs_move(int *_x, int *_y, int x, int y)
+{
+	conout->SetCursorPosition(conout, x, y);
+	if (_x != NULL)
+		*_x = conout->Mode->CursorColumn;
+	if (_y != NULL)
+		*_y = conout->Mode->CursorRow;
+}
+
+/* Clear internal state of the terminal emulation code. */
+void
+end_term(void)
+{
+	esc = 0;
+	argc = -1;
+}
+
+#endif
+
 static void
 efi_cons_probe(struct console *cp)
 {
@@ -46,22 +109,314 @@ efi_cons_probe(struct console *cp)
 static int
 efi_cons_init(int arg)
 {
-	conout->SetAttribute(conout, EFI_TEXT_ATTR(EFI_LIGHTGRAY, EFI_BLACK));
+	conout->SetAttribute(conout, EFI_TEXT_ATTR(DEFAULT_FGCOLOR,
+	    DEFAULT_BGCOLOR));
+#ifdef TERM_EMU
+	end_term();
+	get_pos(&curx, &cury);
+	curs_move(&curx, &cury, curx, cury);
+	fg_c = DEFAULT_FGCOLOR;
+	bg_c = DEFAULT_BGCOLOR;
+#endif
+	conout->EnableCursor(conout, TRUE);
 	return 0;
 }
 
+static void
+efi_cons_rawputchar(int c)
+{
+	int i;
+	UINTN x, y;
+	conout->QueryMode(conout, conout->Mode->Mode, &x, &y);
+
+	if (c == '\t')
+		/* XXX lame tab expansion */
+		for (i = 0; i < 8; i++)
+			efi_cons_rawputchar(' ');
+	else {
+#ifndef	TERM_EMU
+		if (c == '\n')
+			efi_cons_efiputchar('\r');
+		else
+			efi_cons_efiputchar(c);
+#else
+		switch (c) {
+		case '\r':
+			curx = 0;
+			curs_move(&curx, &cury, curx, cury);
+			return;
+		case '\n':
+			cury++;
+			if (cury >= y) {
+				efi_cons_efiputchar('\n');
+				cury--;
+			} else
+				curs_move(&curx, &cury, curx, cury);
+			return;
+		case '\b':
+			if (curx > 0) {
+				curx--;
+				curs_move(&curx, &cury, curx, cury);
+			}
+			return;
+		default:
+			efi_cons_efiputchar(c);
+			curx++;
+			if (curx > x-1) {
+				curx = 0;
+				cury++;
+			}
+			if (cury > y-1) {
+				curx = 0;
+				cury--;
+			}
+		}
+		curs_move(&curx, &cury, curx, cury);
+#endif
+	}
+}
+
+/* Gracefully exit ESC-sequence processing in case of misunderstanding. */
+static void
+bail_out(int c)
+{
+	char buf[16], *ch;
+	int i;
+
+	if (esc) {
+		efi_cons_rawputchar('\033');
+		if (esc != '\033')
+			efi_cons_rawputchar(esc);
+		for (i = 0; i <= argc; ++i) {
+			sprintf(buf, "%d", args[i]);
+			ch = buf;
+			while (*ch)
+				efi_cons_rawputchar(*ch++);
+		}
+	}
+	efi_cons_rawputchar(c);
+	end_term();
+}
+
+/* Clear display from current position to end of screen. */
+static void
+CD(void) {
+	int i;
+	UINTN x, y;
+
+	get_pos(&curx, &cury);
+	if (curx == 0 && cury == 0) {
+		conout->ClearScreen(conout);
+		end_term();
+		return;
+	}
+
+	conout->QueryMode(conout, conout->Mode->Mode, &x, &y);
+	CL(0);  /* clear current line from cursor to end */
+	for (i = cury + 1; i < y-1; i++) {
+		curs_move(NULL, NULL, 0, i);
+		CL(0);
+	}
+	curs_move(NULL, NULL, curx, cury);
+	end_term();
+}
+
+/*
+ * Absolute cursor move to args[0] rows and args[1] columns
+ * (the coordinates are 1-based).
+ */
+static void
+CM(void)
+{
+	if (args[0] > 0)
+		args[0]--;
+	if (args[1] > 0)
+		args[1]--;
+	curs_move(&curx, &cury, args[1], args[0]);
+	end_term();
+}
+
+/* Home cursor (left top corner), also called from mode command. */
 void
-efi_cons_putchar(int c)
+HO(void)
 {
-	CHAR16 buf[2];
+	argc = 1;
+	args[0] = args[1] = 1;
+	CM();
+}
 
-	if (c == '\n')
-		efi_cons_putchar('\r');
+/* Clear line from current position to end of line */
+static void
+CL(int direction)
+{
+	int i, len;
+	UINTN x, y;
+	CHAR16 *line;
 
-	buf[0] = c;
-	buf[1] = 0;
+	conout->QueryMode(conout, conout->Mode->Mode, &x, &y);
+	switch (direction) {
+	case 0:         /* from cursor to end */
+		len = x - curx + 1;
+		break;
+	case 1:         /* from beginning to cursor */
+		len = curx;
+		break;
+	case 2:         /* entire line */
+		len = x;
+		break;
+	}
 
-	conout->OutputString(conout, buf);
+	if (cury == y - 1)
+		len--;
+
+	line = malloc(len * sizeof (CHAR16));
+	if (line == NULL) {
+		printf("out of memory\n");
+		return;
+	}
+	for (i = 0; i < len; i++)
+		line[i] = ' ';
+	line[len-1] = 0;
+
+	if (direction != 0)
+		curs_move(NULL, NULL, 0, cury);
+
+	conout->OutputString(conout, line);
+	/* restore cursor position */
+	curs_move(NULL, NULL, curx, cury);
+	free(line);
+	end_term();
+}
+
+static void
+get_arg(int c)
+{
+	if (argc < 0)
+		argc = 0;
+	args[argc] *= 10;
+	args[argc] += c - '0';
+}
+
+/* Emulate basic capabilities of cons25 terminal */
+static void
+efi_term_emu(int c)
+{
+	static int ansi_col[] = {
+		0, 4, 2, 6, 1, 5, 3, 7
+	};
+	int t, i;
+
+	switch (esc) {
+	case 0:
+		switch (c) {
+		case '\033':
+			esc = c;
+			break;
+		default:
+			efi_cons_rawputchar(c);
+			break;
+		}
+		break;
+	case '\033':
+		switch (c) {
+		case '[':
+			esc = c;
+			args[0] = 0;
+			argc = -1;
+			break;
+		default:
+			bail_out(c);
+			break;
+		}
+		break;
+	case '[':
+		switch (c) {
+		case ';':
+			if (argc < 0)
+				argc = 0;
+			else if (argc + 1 >= MAXARGS)
+				bail_out(c);
+			else
+				args[++argc] = 0;
+			break;
+		case 'H':               /* ho = \E[H */
+			if (argc < 0)
+				HO();
+			else if (argc == 1)
+				CM();
+			else
+				bail_out(c);
+			break;
+		case 'J':               /* cd = \E[J */
+			if (argc < 0)
+				CD();
+			else
+				bail_out(c);
+			break;
+		case 'm':
+			if (argc < 0) {
+				fg_c = DEFAULT_FGCOLOR;
+				bg_c = DEFAULT_BGCOLOR;
+			}
+			for (i = 0; i <= argc; ++i) {
+				switch (args[i]) {
+				case 0:         /* back to normal */
+					fg_c = DEFAULT_FGCOLOR;
+					bg_c = DEFAULT_BGCOLOR;
+					break;
+				case 1:         /* bold */
+					fg_c |= 0x8;
+					break;
+				case 4:         /* underline */
+				case 5:         /* blink */
+					bg_c |= 0x8;
+					break;
+				case 7:         /* reverse */
+					t = fg_c;
+					fg_c = bg_c;
+					bg_c = t;
+					break;
+				case 30: case 31: case 32: case 33:
+				case 34: case 35: case 36: case 37:
+					fg_c = ansi_col[args[i] - 30];
+					break;
+				case 39:        /* normal */
+					fg_c = DEFAULT_FGCOLOR;
+					break;
+				case 40: case 41: case 42: case 43:
+				case 44: case 45: case 46: case 47:
+					bg_c = ansi_col[args[i] - 40];
+					break;
+				case 49:        /* normal */
+					bg_c = DEFAULT_BGCOLOR;
+					break;
+				}
+			}
+			conout->SetAttribute(conout, EFI_TEXT_ATTR(fg_c, bg_c));
+			end_term();
+			break;
+		default:
+			if (isdigit(c))
+				get_arg(c);
+			else
+				bail_out(c);
+			break;
+		}
+		break;
+	default:
+		bail_out(c);
+		break;
+	}
+}
+
+void
+efi_cons_putchar(int c)
+{
+#ifdef TERM_EMU
+	efi_term_emu(c);
+#else
+	efi_cons_rawputchar(c);
+#endif
 }
 
 int
@@ -77,6 +432,12 @@ efi_cons_getchar()
 		BS->WaitForEvent(1, &conin->WaitForKey, &junk);
 		status = conin->ReadKeyStroke(conin, &key);
 	}
+	switch (key.ScanCode) {
+	case 0x17: /* ESC */
+		return (0x1b);  /* esc */
+	}
+
+	/* this can return  */
 	return (key.UnicodeChar);
 }
 
@@ -87,13 +448,36 @@ efi_cons_poll()
 	return (BS->CheckEvent(conin->WaitForKey) == EFI_SUCCESS);
 }
 
-struct console efi_console = {
-	"efi",
-	"EFI console",
-	0,
-	efi_cons_probe,
-	efi_cons_init,
-	efi_cons_putchar,
-	efi_cons_getchar,
-	efi_cons_poll
-};
+/* Plain direct access to EFI OutputString(). */
+void
+efi_cons_efiputchar(int c)
+{
+	CHAR16 buf[2];
+
+	/*
+	 * translate box chars to unicode
+	 */
+	switch (c) {
+	/* single frame */
+	case 0xb3: buf[0] = BOXDRAW_VERTICAL; break;
+	case 0xbf: buf[0] = BOXDRAW_DOWN_LEFT; break;
+	case 0xc0: buf[0] = BOXDRAW_UP_RIGHT; break;
+	case 0xc4: buf[0] = BOXDRAW_HORIZONTAL; break;
+	case 0xda: buf[0] = BOXDRAW_DOWN_RIGHT; break;
+	case 0xd9: buf[0] = BOXDRAW_UP_LEFT; break;
+
+	/* double frame */
+	case 0xba: buf[0] = BOXDRAW_DOUBLE_VERTICAL; break;
+	case 0xbb: buf[0] = BOXDRAW_DOUBLE_DOWN_LEFT; break;
+	case 0xbc: buf[0] = BOXDRAW_DOUBLE_UP_LEFT; break;
+	case 0xc8: buf[0] = BOXDRAW_DOUBLE_UP_RIGHT; break;
+	case 0xc9: buf[0] = BOXDRAW_DOUBLE_DOWN_RIGHT; break;
+	case 0xcd: buf[0] = BOXDRAW_DOUBLE_HORIZONTAL; break;
+
+	default:
+		buf[0] = c;
+	}
+        buf[1] = 0;     /* terminate string */
+
+	conout->OutputString(conout, buf);
+}

Modified: projects/release-pkg/sys/boot/efi/loader/arch/amd64/framebuffer.c
==============================================================================
--- projects/release-pkg/sys/boot/efi/loader/arch/amd64/framebuffer.c	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/sys/boot/efi/loader/arch/amd64/framebuffer.c	Thu Jan  7 17:23:43 2016	(r293336)
@@ -178,7 +178,7 @@ efifb_uga_find_pixel(EFI_UGA_DRAW_PROTOC
 	printf("No change detected in frame buffer");
 
  fail:
-	printf(" -- error %lu\n", status & ~EFI_ERROR_MASK);
+	printf(" -- error %lu\n", EFI_ERROR_CODE(status));
 	free(data1);
 	return (-1);
 }
@@ -473,7 +473,7 @@ command_gop(int argc, char *argv[])
 	status = BS->LocateProtocol(&gop_guid, NULL, (VOID **)&gop);
 	if (EFI_ERROR(status)) {
 		sprintf(command_errbuf, "%s: Graphics Output Protocol not "
-		    "present (error=%lu)", argv[0], status & ~EFI_ERROR_MASK);
+		    "present (error=%lu)", argv[0], EFI_ERROR_CODE(status));
 		return (CMD_ERROR);
 	}
 
@@ -494,7 +494,7 @@ command_gop(int argc, char *argv[])
 		if (EFI_ERROR(status)) {
 			sprintf(command_errbuf, "%s: Unable to set mode to "
 			    "%u (error=%lu)", argv[0], mode,
-			    status & ~EFI_ERROR_MASK);
+			    EFI_ERROR_CODE(status));
 			return (CMD_ERROR);
 		}
 	} else if (!strcmp(argv[1], "get")) {
@@ -541,7 +541,7 @@ command_uga(int argc, char *argv[])
 	status = BS->LocateProtocol(&uga_guid, NULL, (VOID **)&uga);
 	if (EFI_ERROR(status)) {
 		sprintf(command_errbuf, "%s: UGA Protocol not present "
-		    "(error=%lu)", argv[0], status & ~EFI_ERROR_MASK);
+		    "(error=%lu)", argv[0], EFI_ERROR_CODE(status));
 		return (CMD_ERROR);
 	}
 

Modified: projects/release-pkg/sys/boot/efi/loader/bootinfo.c
==============================================================================
--- projects/release-pkg/sys/boot/efi/loader/bootinfo.c	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/sys/boot/efi/loader/bootinfo.c	Thu Jan  7 17:23:43 2016	(r293336)
@@ -290,7 +290,7 @@ bi_load_efi_data(struct preloaded_file *
 		     pages, &addr);
 		if (EFI_ERROR(status)) {
 			printf("%s: AllocatePages error %lu\n", __func__,
-			    (unsigned long)(status & ~EFI_ERROR_MASK));
+			    EFI_ERROR_CODE(status));
 			return (ENOMEM);
 		}
 
@@ -306,7 +306,7 @@ bi_load_efi_data(struct preloaded_file *
 		status = BS->GetMemoryMap(&sz, mm, &efi_mapkey, &mmsz, &mmver);
 		if (EFI_ERROR(status)) {
 			printf("%s: GetMemoryMap error %lu\n", __func__,
-			    (unsigned long)(status & ~EFI_ERROR_MASK));
+			    EFI_ERROR_CODE(status));
 			return (EINVAL);
 		}
 		status = BS->ExitBootServices(IH, efi_mapkey);
@@ -320,8 +320,7 @@ bi_load_efi_data(struct preloaded_file *
 		}
 		BS->FreePages(addr, pages);
 	}
-	printf("ExitBootServices error %lu\n",
-	    (unsigned long)(status & ~EFI_ERROR_MASK));
+	printf("ExitBootServices error %lu\n", EFI_ERROR_CODE(status));
 	return (EINVAL);
 }
 

Modified: projects/release-pkg/sys/boot/efi/loader/copy.c
==============================================================================
--- projects/release-pkg/sys/boot/efi/loader/copy.c	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/sys/boot/efi/loader/copy.c	Thu Jan  7 17:23:43 2016	(r293336)
@@ -56,7 +56,7 @@ efi_copy_init(void)
 	    STAGE_PAGES, &staging);
 	if (EFI_ERROR(status)) {
 		printf("failed to allocate staging area: %lu\n",
-		    (unsigned long)(status & EFI_ERROR_MASK));
+		    EFI_ERROR_CODE(status));
 		return (status);
 	}
 	staging_end = staging + STAGE_PAGES * EFI_PAGE_SIZE;

Modified: projects/release-pkg/sys/boot/efi/loader/devicename.c
==============================================================================
--- projects/release-pkg/sys/boot/efi/loader/devicename.c	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/sys/boot/efi/loader/devicename.c	Thu Jan  7 17:23:43 2016	(r293336)
@@ -147,7 +147,7 @@ efi_fmtdev(void *vdev)
 		break;
 	}
 
-	return(buf);
+	return (buf);
 }
 
 /*
@@ -161,7 +161,7 @@ efi_setcurrdev(struct env_var *ev, int f
 
 	rv = efi_parsedev(&ncurr, value, NULL);
 	if (rv != 0)
-		return(rv);
+		return (rv);
 
 	free(ncurr);
 	env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);

Modified: projects/release-pkg/sys/boot/efi/loader/main.c
==============================================================================
--- projects/release-pkg/sys/boot/efi/loader/main.c	Thu Jan  7 17:03:26 2016	(r293335)
+++ projects/release-pkg/sys/boot/efi/loader/main.c	Thu Jan  7 17:23:43 2016	(r293336)
@@ -227,50 +227,47 @@ command_memmap(int argc, char *argv[])
 	status = BS->GetMemoryMap(&sz, 0, &key, &dsz, &dver);
 	if (status != EFI_BUFFER_TOO_SMALL) {
 		printf("Can't determine memory map size\n");
-		return CMD_ERROR;
+		return (CMD_ERROR);
 	}
 	map = malloc(sz);
 	status = BS->GetMemoryMap(&sz, map, &key, &dsz, &dver);
 	if (EFI_ERROR(status)) {
 		printf("Can't read memory map\n");
-		return CMD_ERROR;
+		return (CMD_ERROR);
 	}
 
 	ndesc = sz / dsz;
 	printf("%23s %12s %12s %8s %4s\n",
-	       "Type", "Physical", "Virtual", "#Pages", "Attr");
+	    "Type", "Physical", "Virtual", "#Pages", "Attr");
 
 	for (i = 0, p = map; i < ndesc;
 	     i++, p = NextMemoryDescriptor(p, dsz)) {
-	    printf("%23s %012lx %012lx %08lx ",
-		   types[p->Type],
-		   p->PhysicalStart,
-		   p->VirtualStart,
-		   p->NumberOfPages);
-	    if (p->Attribute & EFI_MEMORY_UC)
-		printf("UC ");
-	    if (p->Attribute & EFI_MEMORY_WC)
-		printf("WC ");
-	    if (p->Attribute & EFI_MEMORY_WT)
-		printf("WT ");
-	    if (p->Attribute & EFI_MEMORY_WB)
-		printf("WB ");
-	    if (p->Attribute & EFI_MEMORY_UCE)
-		printf("UCE ");
-	    if (p->Attribute & EFI_MEMORY_WP)
-		printf("WP ");
-	    if (p->Attribute & EFI_MEMORY_RP)
-		printf("RP ");
-	    if (p->Attribute & EFI_MEMORY_XP)
-		printf("XP ");
-	    printf("\n");
+		printf("%23s %012lx %012lx %08lx ", types[p->Type],
+		   p->PhysicalStart, p->VirtualStart, p->NumberOfPages);
+		if (p->Attribute & EFI_MEMORY_UC)
+			printf("UC ");
+		if (p->Attribute & EFI_MEMORY_WC)
+			printf("WC ");
+		if (p->Attribute & EFI_MEMORY_WT)
+			printf("WT ");
+		if (p->Attribute & EFI_MEMORY_WB)
+			printf("WB ");

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601071723.u07HNhhh075822>