Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Apr 2018 21:37:26 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r332154 - in stable/11/stand: common efi/boot1 efi/include efi/libefi efi/loader efi/loader/arch/arm ficl/aarch64 ficl/amd64 ficl/arm ficl/i386 ficl/mips ficl/mips64 ficl/powerpc ficl/r...
Message-ID:  <201804062137.w36LbQXV094285@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Fri Apr  6 21:37:25 2018
New Revision: 332154
URL: https://svnweb.freebsd.org/changeset/base/332154

Log:
  MFC r330806-r330815, r330837, r330864, r330883
  
  pc98 changes associated with the named commits are also included in this
  commit, despite not having been made with the original commits due to its
  removal in head.
  
  r330806:
  Minor cosmetic changes.
  
  Make sure { on the same line as struct for all struct *devdesc.  Move
  some type definitions to next to the dv_type define, since that's what
  sets the d_type.
  
  r330807:
  We can't use d_opendata for blkio storage.
  
  open_disk uses d_opendata for it's own purpse. We can't store blkio
  there. Fortunately, blkio is stored elsewhere and we never actually
  retrieve blkio from d_opendata. Eliminate it as a source of confusion.
  Eliminate all stores of d_opendata in efi since this layer doesn't own
  that field.
  
  r330808:
  Make struct libi386_devdesc match the struct devdesc better
  
  Move data to top and call it d_opendata.
  
  r330809:
  Use the actual struct devdesc at the start of all *_devdesc structs
  
  The current system is fragile and requires very careful layout of all
  *_devdesc structures. It also makes it hard to change the base
  devdesc. Take a page from CAM and put the 'header' in all the derived
  classes and adjust the code to match.
  
  For OFW, move the iHandle h_handle out of a slot conflicting with
  d_opendata. Due to quirks in the alignment rules, this worked.
  However changing the code to use d_opendata storage now that it's a
  pointer is hard, so just have a separate field for it.
  
  All other cleanups were to make the *_devdesc structures match where
  they'd taken some liberties that were none-the-less compatible enough
  to work.
  
  r330810:
  Remove d_type from devdesc. It's not needed as we can fetch it from
  d_dev->dv_type when we need it.
  
  r330811:
  GC unused routines.
  
  Sponsored by: Netflix
  
  r330812:
  Use the one-line-per-file pattern here, and sort the file names.
  
  Sponsored by: Netflix
  
  r330813:
  Move the env convenience routines out of boot1.c.
  
  These routines are more generally useful. Even though boot1 is on its
  way out, it's better to make these common during the transition than
  copy them.
  
  r330814:
  Star BootCurrent entry when booting.
  
  Sponsored by: Netflix
  
  r330815:
  Print the load and device path as well as BootCurrent and BootOrder
  
  Sponsored by: Netflix
  
  r330837:
  biosdisk.c should not set d_opendata.
  
  Same as 330807, d_opendata is owned by open_disk and we should not
  set it.
  
  M    stand/i386/libi386/biosdisk.c
  
  r330864:
  Prefer uintXX_t to u_intXX_t
  
  A foolish consistency is the hobgoblin of little minds, adored by
  little statesmen and philosophers and divines. With consistency a
  great soul has simply nothing to do. -- Ralph Waldo Emerson
  
  r330883:
  Fix typo that misteriously passes compilation.

Added:
  stable/11/stand/efi/libefi/efienv.c
     - copied unchanged from r330815, head/stand/efi/libefi/efienv.c
Modified:
  stable/11/stand/common/bootstrap.h
  stable/11/stand/common/disk.c
  stable/11/stand/common/disk.h
  stable/11/stand/common/isapnp.c
  stable/11/stand/common/load_elf.c
  stable/11/stand/common/load_elf_obj.c
  stable/11/stand/common/metadata.c
  stable/11/stand/common/misc.c
  stable/11/stand/common/pnp.c
  stable/11/stand/efi/boot1/boot1.c
  stable/11/stand/efi/boot1/ufs_module.c
  stable/11/stand/efi/include/efilib.h
  stable/11/stand/efi/libefi/Makefile
  stable/11/stand/efi/libefi/devicename.c
  stable/11/stand/efi/libefi/efipart.c
  stable/11/stand/efi/libefi/efizfs.c
  stable/11/stand/efi/libefi/env.c
  stable/11/stand/efi/loader/arch/arm/exec.c
  stable/11/stand/efi/loader/main.c
  stable/11/stand/ficl/aarch64/sysdep.c
  stable/11/stand/ficl/amd64/sysdep.c
  stable/11/stand/ficl/arm/sysdep.c
  stable/11/stand/ficl/i386/sysdep.c
  stable/11/stand/ficl/mips/sysdep.c
  stable/11/stand/ficl/mips64/sysdep.c
  stable/11/stand/ficl/powerpc/sysdep.c
  stable/11/stand/ficl/riscv/sysdep.c
  stable/11/stand/ficl/sparc64/sysdep.c
  stable/11/stand/i386/btx/lib/btxv86.h
  stable/11/stand/i386/libi386/biosacpi.c
  stable/11/stand/i386/libi386/bioscd.c
  stable/11/stand/i386/libi386/biosdisk.c
  stable/11/stand/i386/libi386/biospnp.c
  stable/11/stand/i386/libi386/bootinfo32.c
  stable/11/stand/i386/libi386/bootinfo64.c
  stable/11/stand/i386/libi386/devicename.c
  stable/11/stand/i386/libi386/elf64_freebsd.c
  stable/11/stand/i386/libi386/libi386.h
  stable/11/stand/i386/libi386/multiboot.c
  stable/11/stand/i386/libi386/pxe.c
  stable/11/stand/i386/loader/chain.c
  stable/11/stand/i386/loader/main.c
  stable/11/stand/libsa/arp.c
  stable/11/stand/libsa/bootp.c
  stable/11/stand/libsa/bootparam.c
  stable/11/stand/libsa/dosfs.h
  stable/11/stand/libsa/ext2fs.c
  stable/11/stand/libsa/net.h
  stable/11/stand/libsa/rpc.c
  stable/11/stand/libsa/stand.h
  stable/11/stand/mips/beri/loader/beri_disk_cfi.c
  stable/11/stand/mips/beri/loader/beri_disk_sdcard.c
  stable/11/stand/mips/beri/loader/devicename.c
  stable/11/stand/ofw/libofw/devicename.c
  stable/11/stand/ofw/libofw/libofw.h
  stable/11/stand/ofw/libofw/openfirm.c
  stable/11/stand/pc98/libpc98/bioscd.c
  stable/11/stand/pc98/libpc98/biosdisk.c
  stable/11/stand/pc98/loader/main.c
  stable/11/stand/powerpc/boot1.chrp/boot1.c
  stable/11/stand/powerpc/kboot/ppc64_elf_freebsd.c
  stable/11/stand/powerpc/ofw/elf_freebsd.c
  stable/11/stand/powerpc/ofw/main.c
  stable/11/stand/powerpc/ofw/ppc64_elf_freebsd.c
  stable/11/stand/sparc64/boot1/boot1.c
  stable/11/stand/sparc64/loader/main.c
  stable/11/stand/uboot/common/main.c
  stable/11/stand/uboot/lib/devicename.c
  stable/11/stand/uboot/lib/disk.c
  stable/11/stand/uboot/lib/elf_freebsd.c
  stable/11/stand/uboot/lib/libuboot.h
  stable/11/stand/userboot/userboot/bootinfo32.c
  stable/11/stand/userboot/userboot/bootinfo64.c
  stable/11/stand/userboot/userboot/devicename.c
  stable/11/stand/userboot/userboot/elf64_freebsd.c
  stable/11/stand/userboot/userboot/main.c
  stable/11/stand/userboot/userboot/userboot_disk.c
  stable/11/stand/zfs/libzfs.h
  stable/11/stand/zfs/zfs.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/stand/common/bootstrap.h
==============================================================================
--- stable/11/stand/common/bootstrap.h	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/common/bootstrap.h	Fri Apr  6 21:37:25 2018	(r332154)
@@ -150,7 +150,7 @@ void			pnp_addident(struct pnpinfo *pi, char *ident);
 struct pnpinfo		*pnp_allocinfo(void);
 void			pnp_freeinfo(struct pnpinfo *pi);
 void			pnp_addinfo(struct pnpinfo *pi);
-char			*pnp_eisaformat(u_int8_t *data);
+char			*pnp_eisaformat(uint8_t *data);
 
 /*
  *  < 0	- No ISA in system
@@ -168,7 +168,7 @@ extern int			isapnp_readport;
 struct file_metadata 
 {
     size_t			md_size;
-    u_int16_t			md_type;
+    uint16_t			md_type;
     struct file_metadata	*md_next;
     char			md_data[1];	/* data are immediately appended */
 };
@@ -210,7 +210,7 @@ struct preloaded_file
 struct file_format
 {
     /* Load function must return EFTYPE if it can't handle the module supplied */
-    int		(* l_load)(char *filename, u_int64_t dest, struct preloaded_file **result);
+    int		(* l_load)(char *filename, uint64_t dest, struct preloaded_file **result);
     /* Only a loader that will load a kernel (first module) should have an exec handler */
     int		(* l_exec)(struct preloaded_file *mp);
 };
@@ -239,20 +239,20 @@ void file_removemetadata(struct preloaded_file *fp);
 #define ELF_RELOC_RELA	2
 
 /* Relocation offset for some architectures */
-extern u_int64_t __elfN(relocation_offset);
+extern uint64_t __elfN(relocation_offset);
 
 struct elf_file;
 typedef Elf_Addr (symaddr_fn)(struct elf_file *ef, Elf_Size symidx);
 
-int	__elfN(loadfile)(char *filename, u_int64_t dest, struct preloaded_file **result);
-int	__elfN(obj_loadfile)(char *filename, u_int64_t dest,
+int	__elfN(loadfile)(char *filename, uint64_t dest, struct preloaded_file **result);
+int	__elfN(obj_loadfile)(char *filename, uint64_t dest,
 	    struct preloaded_file **result);
 int	__elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr,
 	    const void *reldata, int reltype, Elf_Addr relbase,
 	    Elf_Addr dataaddr, void *data, size_t len);
-int __elfN(loadfile_raw)(char *filename, u_int64_t dest,
+int __elfN(loadfile_raw)(char *filename, uint64_t dest,
 	    struct preloaded_file **result, int multiboot);
-int __elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest);
+int __elfN(load_modmetadata)(struct preloaded_file *fp, uint64_t dest);
 #endif
 
 /*

Modified: stable/11/stand/common/disk.c
==============================================================================
--- stable/11/stand/common/disk.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/common/disk.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -86,7 +86,7 @@ ptblread(void *d, void *buf, size_t blocks, uint64_t o
 	struct open_disk *od;
 
 	dev = (struct disk_devdesc *)d;
-	od = (struct open_disk *)dev->d_opendata;
+	od = (struct open_disk *)dev->dd.d_opendata;
 
 	/*
 	 * The strategy function assumes the offset is in units of 512 byte
@@ -98,7 +98,7 @@ ptblread(void *d, void *buf, size_t blocks, uint64_t o
 	 * As the GPT backup partition is located at the end of the disk,
 	 * to avoid reading past disk end, flag bcache not to use RA.
 	 */
-	return (dev->d_dev->dv_strategy(dev, F_READ | F_NORA, offset,
+	return (dev->dd.d_dev->dv_strategy(dev, F_READ | F_NORA, offset,
 	    blocks * od->sectorsize, (char *)buf, NULL));
 }
 
@@ -114,7 +114,7 @@ ptable_print(void *arg, const char *pname, const struc
 	int res;
 
 	pa = (struct print_args *)arg;
-	od = (struct open_disk *)pa->dev->d_opendata;
+	od = (struct open_disk *)pa->dev->dd.d_opendata;
 	sprintf(line, "  %s%s: %s", pa->prefix, pname,
 	    parttype2str(part->type));
 	if (pa->verbose)
@@ -127,8 +127,8 @@ ptable_print(void *arg, const char *pname, const struc
 	res = 0;
 	if (part->type == PART_FREEBSD) {
 		/* Open slice with BSD label */
-		dev.d_dev = pa->dev->d_dev;
-		dev.d_unit = pa->dev->d_unit;
+		dev.dd.d_dev = pa->dev->dd.d_dev;
+		dev.dd.d_unit = pa->dev->dd.d_unit;
 		dev.d_slice = part->index;
 		dev.d_partition = -1;
 		if (disk_open(&dev, part->end - part->start + 1,
@@ -158,7 +158,7 @@ disk_print(struct disk_devdesc *dev, char *prefix, int
 	struct print_args pa;
 
 	/* Disk should be opened */
-	od = (struct open_disk *)dev->d_opendata;
+	od = (struct open_disk *)dev->dd.d_opendata;
 	pa.dev = dev;
 	pa.prefix = prefix;
 	pa.verbose = verbose;
@@ -171,8 +171,8 @@ disk_read(struct disk_devdesc *dev, void *buf, uint64_
 	struct open_disk *od;
 	int ret;
 
-	od = (struct open_disk *)dev->d_opendata;
-	ret = dev->d_dev->dv_strategy(dev, F_READ, dev->d_offset + offset,
+	od = (struct open_disk *)dev->dd.d_opendata;
+	ret = dev->dd.d_dev->dv_strategy(dev, F_READ, dev->d_offset + offset,
 	    blocks * od->sectorsize, buf, NULL);
 
 	return (ret);
@@ -184,8 +184,8 @@ disk_write(struct disk_devdesc *dev, void *buf, uint64
 	struct open_disk *od;
 	int ret;
 
-	od = (struct open_disk *)dev->d_opendata;
-	ret = dev->d_dev->dv_strategy(dev, F_WRITE, dev->d_offset + offset,
+	od = (struct open_disk *)dev->dd.d_opendata;
+	ret = dev->dd.d_dev->dv_strategy(dev, F_WRITE, dev->d_offset + offset,
 	    blocks * od->sectorsize, buf, NULL);
 
 	return (ret);
@@ -194,7 +194,7 @@ disk_write(struct disk_devdesc *dev, void *buf, uint64
 int
 disk_ioctl(struct disk_devdesc *dev, u_long cmd, void *data)
 {
-	struct open_disk *od = dev->d_opendata;
+	struct open_disk *od = dev->dd.d_opendata;
 
 	if (od == NULL)
 		return (ENOTTY);
@@ -238,7 +238,7 @@ disk_open(struct disk_devdesc *dev, uint64_t mediasize
 		DEBUG("no memory");
 		return (ENOMEM);
 	}
-	dev->d_opendata = od;
+	dev->dd.d_opendata = od;
 	od->entrysize = 0;
 	od->mediasize = mediasize;
 	od->sectorsize = sectorsize;
@@ -348,7 +348,7 @@ disk_close(struct disk_devdesc *dev)
 {
 	struct open_disk *od;
 
-	od = (struct open_disk *)dev->d_opendata;
+	od = (struct open_disk *)dev->dd.d_opendata;
 	DEBUG("%s closed => %p", disk_fmtdev(dev), od);
 	ptable_close(od->table);
 	free(od);
@@ -361,7 +361,7 @@ disk_fmtdev(struct disk_devdesc *dev)
 	static char buf[128];
 	char *cp;
 
-	cp = buf + sprintf(buf, "%s%d", dev->d_dev->dv_name, dev->d_unit);
+	cp = buf + sprintf(buf, "%s%d", dev->dd.d_dev->dv_name, dev->dd.d_unit);
 	if (dev->d_slice >= 0) {
 #ifdef LOADER_GPT_SUPPORT
 		if (dev->d_partition == 255) {
@@ -423,7 +423,7 @@ disk_parsedev(struct disk_devdesc *dev, const char *de
 
 	if (*cp != '\0' && *cp != ':')
 		return (EINVAL);
-	dev->d_unit = unit;
+	dev->dd.d_unit = unit;
 	dev->d_slice = slice;
 	dev->d_partition = partition;
 	if (path != NULL)

Modified: stable/11/stand/common/disk.h
==============================================================================
--- stable/11/stand/common/disk.h	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/common/disk.h	Fri Apr  6 21:37:25 2018	(r332154)
@@ -81,12 +81,9 @@
 #ifndef	_DISK_H
 #define	_DISK_H
 
-struct disk_devdesc
-{
-	struct devsw	*d_dev;
-	int		d_type;
-	int		d_unit;
-	void		*d_opendata;
+/* Note: Must match the 'struct devdesc' in stand.h */
+struct disk_devdesc {
+	struct devdesc	dd;
 	int		d_slice;
 	int		d_partition;
 	uint64_t	d_offset;

Modified: stable/11/stand/common/isapnp.c
==============================================================================
--- stable/11/stand/common/isapnp.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/common/isapnp.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
 
 static void	isapnp_write(int d, int r);
 static void	isapnp_send_Initiation_LFSR(void);
-static int	isapnp_get_serial(u_int8_t *p);
+static int	isapnp_get_serial(uint8_t *p);
 static int	isapnp_isolation_protocol(void);
 static void	isapnp_enumerate(void);
 
@@ -90,7 +90,7 @@ isapnp_send_Initiation_LFSR(void)
  * Get the device's serial number.  Returns 1 if the serial is valid.
  */
 static int
-isapnp_get_serial(u_int8_t *data)
+isapnp_get_serial(uint8_t *data)
 {
     int		i, bit, valid = 0, sum = 0x6a;
 
@@ -123,7 +123,7 @@ isapnp_get_serial(u_int8_t *data)
  * Returns nonzero if the device fails to report
  */
 static int
-isapnp_get_resource_info(u_int8_t *buffer, int len)
+isapnp_get_resource_info(uint8_t *buffer, int len)
 {
     int		i, j;
     u_char	temp;
@@ -229,7 +229,7 @@ isapnp_isolation_protocol(void)
 {
     int			csn;
     struct pnpinfo	*pi;
-    u_int8_t		cardid[_PNP_ID_LEN];
+    uint8_t		cardid[_PNP_ID_LEN];
     int			ndevs;
 
     isapnp_send_Initiation_LFSR();

Modified: stable/11/stand/common/load_elf.c
==============================================================================
--- stable/11/stand/common/load_elf.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/common/load_elf.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -70,11 +70,11 @@ typedef struct elf_file {
 	caddr_t	firstpage;
 	size_t	firstlen;
 	int		kernel;
-	u_int64_t	off;
+	uint64_t	off;
 } *elf_file_t;
 
 static int __elfN(loadimage)(struct preloaded_file *mp, elf_file_t ef,
-    u_int64_t loadaddr);
+    uint64_t loadaddr);
 static int __elfN(lookup_symbol)(struct preloaded_file *mp, elf_file_t ef,
     const char* name, Elf_Sym* sym);
 static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef,
@@ -87,7 +87,7 @@ static char	*fake_modname(const char *name);
 const char	*__elfN(kerneltype) = "elf kernel";
 const char	*__elfN(moduletype) = "elf module";
 
-u_int64_t	__elfN(relocation_offset) = 0;
+uint64_t	__elfN(relocation_offset) = 0;
 
 extern void elf_wrong_field_size(void);
 #define CONVERT_FIELD(b, f, e)			\
@@ -265,13 +265,13 @@ error:
  * will be saved in (result).
  */
 int
-__elfN(loadfile)(char *filename, u_int64_t dest, struct preloaded_file **result)
+__elfN(loadfile)(char *filename, uint64_t dest, struct preloaded_file **result)
 {
 	return (__elfN(loadfile_raw)(filename, dest, result, 0));
 }
 
 int
-__elfN(loadfile_raw)(char *filename, u_int64_t dest,
+__elfN(loadfile_raw)(char *filename, uint64_t dest,
     struct preloaded_file **result, int multiboot)
 {
 	struct preloaded_file	*fp, *kfp;
@@ -419,7 +419,7 @@ out:
  * the Elf header, load the image at (off)
  */
 static int
-__elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off)
+__elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, uint64_t off)
 {
 	int		i;
 	u_int		j;
@@ -883,21 +883,21 @@ fake_modname(const char *name)
 struct mod_metadata64 {
 	int		md_version;	/* structure version MDTV_* */
 	int		md_type;	/* type of entry MDT_* */
-	u_int64_t	md_data;	/* specific data */
-	u_int64_t	md_cval;	/* common string label */
+	uint64_t	md_data;	/* specific data */
+	uint64_t	md_cval;	/* common string label */
 };
 #endif
 #if defined(__amd64__) && __ELF_WORD_SIZE == 32
 struct mod_metadata32 {
 	int		md_version;	/* structure version MDTV_* */
 	int		md_type;	/* type of entry MDT_* */
-	u_int32_t	md_data;	/* specific data */
-	u_int32_t	md_cval;	/* common string label */
+	uint32_t	md_data;	/* specific data */
+	uint32_t	md_cval;	/* common string label */
 };
 #endif
 
 int
-__elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest)
+__elfN(load_modmetadata)(struct preloaded_file *fp, uint64_t dest)
 {
 	struct elf_file		 ef;
 	int			 err, i, j;

Modified: stable/11/stand/common/load_elf_obj.c
==============================================================================
--- stable/11/stand/common/load_elf_obj.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/common/load_elf_obj.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -63,7 +63,7 @@ typedef struct elf_file {
 } *elf_file_t;
 
 static int __elfN(obj_loadimage)(struct preloaded_file *mp, elf_file_t ef,
-    u_int64_t loadaddr);
+    uint64_t loadaddr);
 static int __elfN(obj_lookup_set)(struct preloaded_file *mp, elf_file_t ef,
     const char *name, Elf_Addr *startp, Elf_Addr *stopp, int *countp);
 static int __elfN(obj_reloc_ptr)(struct preloaded_file *mp, elf_file_t ef,
@@ -81,7 +81,7 @@ const char	*__elfN(obj_moduletype) = "elf obj module";
  * will be saved in (result).
  */
 int
-__elfN(obj_loadfile)(char *filename, u_int64_t dest,
+__elfN(obj_loadfile)(char *filename, uint64_t dest,
     struct preloaded_file **result)
 {
 	struct preloaded_file *fp, *kfp;
@@ -186,7 +186,7 @@ out:
  * the Elf header, load the image at (off)
  */
 static int
-__elfN(obj_loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off)
+__elfN(obj_loadimage)(struct preloaded_file *fp, elf_file_t ef, uint64_t off)
 {
 	Elf_Ehdr *hdr;
 	Elf_Shdr *shdr, *cshdr, *lshdr;
@@ -345,8 +345,8 @@ out:
 struct mod_metadata64 {
 	int		md_version;	/* structure version MDTV_* */
 	int		md_type;	/* type of entry MDT_* */
-	u_int64_t	md_data;	/* specific data */
-	u_int64_t	md_cval;	/* common string label */
+	uint64_t	md_data;	/* specific data */
+	uint64_t	md_cval;	/* common string label */
 };
 #endif
 

Modified: stable/11/stand/common/metadata.c
==============================================================================
--- stable/11/stand/common/metadata.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/common/metadata.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -217,7 +217,7 @@ md_copyenv(vm_offset_t addr)
 static int align;
 
 #define COPY32(v, a, c) {			\
-    u_int32_t	x = (v);			\
+    uint32_t	x = (v);			\
     if (c)					\
         archsw.arch_copyin(&x, a, sizeof(x));	\
     a += sizeof(x);				\

Modified: stable/11/stand/common/misc.c
==============================================================================
--- stable/11/stand/common/misc.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/common/misc.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -185,7 +185,7 @@ hexdump(caddr_t region, size_t len)
 	
 	for (x = 0; x < 16; x++) {
 	    if ((line + x) < (region + len)) {
-		emit("%02x ", *(u_int8_t *)(line + x));
+		emit("%02x ", *(uint8_t *)(line + x));
 	    } else {
 		emit("-- ");
 	    }
@@ -195,7 +195,7 @@ hexdump(caddr_t region, size_t len)
 	emit(" |");
 	for (x = 0; x < 16; x++) {
 	    if ((line + x) < (region + len)) {
-		c = *(u_int8_t *)(line + x);
+		c = *(uint8_t *)(line + x);
 		if ((c < ' ') || (c > '~'))	/* !isprint(c) */
 		    c = '.';
 		emit("%c", c);

Modified: stable/11/stand/common/pnp.c
==============================================================================
--- stable/11/stand/common/pnp.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/common/pnp.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -169,7 +169,7 @@ pnp_addinfo(struct pnpinfo *pi)
  * where 'AAA' is the EISA vendor ID, II is the product ID and RR the revision ID.
  */
 char *
-pnp_eisaformat(u_int8_t *data)
+pnp_eisaformat(uint8_t *data)
 {
     static char	idbuf[8];
     const char	hextoascii[] = "0123456789abcdef";

Modified: stable/11/stand/efi/boot1/boot1.c
==============================================================================
--- stable/11/stand/efi/boot1/boot1.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/efi/boot1/boot1.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -54,8 +54,6 @@ static EFI_GUID BlockIoProtocolGUID = BLOCK_IO_PROTOCO
 static EFI_GUID DevicePathGUID = DEVICE_PATH_PROTOCOL;
 static EFI_GUID LoadedImageGUID = LOADED_IMAGE_PROTOCOL;
 static EFI_GUID ConsoleControlGUID = EFI_CONSOLE_CONTROL_PROTOCOL_GUID;
-static EFI_GUID FreeBSDBootVarGUID = FREEBSD_BOOT_VAR_GUID;
-static EFI_GUID GlobalBootVarGUID = UEFI_BOOT_VAR_GUID;
 
 /*
  * Provide Malloc / Free backed by EFIs AllocatePool / FreePool which ensures
@@ -80,42 +78,6 @@ Free(void *buf, const char *file __unused, int line __
 		(void)BS->FreePool(buf);
 }
 
-static EFI_STATUS
-efi_getenv(EFI_GUID *g, const char *v, void *data, size_t *len)
-{
-	size_t ul;
-	CHAR16 *uv;
-	UINT32 attr;
-	UINTN dl;
-	EFI_STATUS rv;
-
-	uv = NULL;
-	if (utf8_to_ucs2(v, &uv, &ul) != 0)
-		return (EFI_OUT_OF_RESOURCES);
-	dl = *len;
-	rv = RS->GetVariable(uv, g, &attr, &dl, data);
-	if (rv == EFI_SUCCESS)
-		*len = dl;
-	free(uv);
-	return (rv);
-}
-
-static EFI_STATUS
-efi_setenv_freebsd_wcs(const char *varname, CHAR16 *valstr)
-{
-	CHAR16 *var = NULL;
-	size_t len;
-	EFI_STATUS rv;
-
-	if (utf8_to_ucs2(varname, &var, &len) != 0)
-		return (EFI_OUT_OF_RESOURCES);
-	rv = RS->SetVariable(var, &FreeBSDBootVarGUID,
-	    EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
-	    (ucs2len(valstr) + 1) * sizeof(efi_char), valstr);
-	free(var);
-	return (rv);
-}
-
 /*
  * nodes_match returns TRUE if the imgpath isn't NULL and the nodes match,
  * FALSE otherwise.
@@ -505,14 +467,15 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab)
 
 	boot_current = 0;
 	sz = sizeof(boot_current);
-	efi_getenv(&GlobalBootVarGUID, "BootCurrent", &boot_current, &sz);
+	efi_global_getenv("BootCurrent", &boot_current, &sz);
 	printf("   BootCurrent: %04x\n", boot_current);
 
 	sz = sizeof(boot_order);
-	efi_getenv(&GlobalBootVarGUID, "BootOrder", &boot_order, &sz);
+	efi_global_getenv("BootOrder", &boot_order, &sz);
 	printf("   BootOrder:");
 	for (i = 0; i < sz / sizeof(boot_order[0]); i++)
-		printf(" %04x", boot_order[i]);
+		printf(" %04x%s", boot_order[i],
+		    boot_order[i] == boot_current ? "[*]" : "");
 	printf("\n");
 
 #ifdef TEST_FAILURE

Modified: stable/11/stand/efi/boot1/ufs_module.c
==============================================================================
--- stable/11/stand/efi/boot1/ufs_module.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/efi/boot1/ufs_module.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -44,7 +44,7 @@ static dev_info_t *devinfo;
 static dev_info_t *devices;
 
 static int
-dskread(void *buf, u_int64_t lba, int nblk)
+dskread(void *buf, uint64_t lba, int nblk)
 {
 	int size;
 	EFI_STATUS status;

Modified: stable/11/stand/efi/include/efilib.h
==============================================================================
--- stable/11/stand/efi/include/efilib.h	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/efi/include/efilib.h	Fri Apr  6 21:37:25 2018	(r332154)
@@ -106,6 +106,17 @@ int wcscmp(CHAR16 *, CHAR16 *);
 void cpy8to16(const char *, CHAR16 *, size_t);
 void cpy16to8(const CHAR16 *, char *, size_t);
 
+/*
+ * Routines for interacting with EFI's env vars in a more unix-like
+ * way than the standard APIs. In addition, convenience routines for
+ * the loader setting / getting FreeBSD specific variables.
+ */
+
+EFI_STATUS efi_freebsd_getenv(const char *v, void *data, __size_t *len);
+EFI_STATUS efi_getenv(EFI_GUID *g, const char *v, void *data, __size_t *len);
+EFI_STATUS efi_global_getenv(const char *v, void *data, __size_t *len);
+EFI_STATUS efi_setenv_freebsd_wcs(const char *varname, CHAR16 *valstr);
+
 /* efipart.c */
 int	efipart_inithandles(void);
 

Modified: stable/11/stand/efi/libefi/Makefile
==============================================================================
--- stable/11/stand/efi/libefi/Makefile	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/efi/libefi/Makefile	Fri Apr  6 21:37:25 2018	(r332154)
@@ -5,8 +5,21 @@
 LIB=	efi
 WARNS?=	2
 
-SRCS=	delay.c devpath.c efi_console.c efichar.c efinet.c efipart.c env.c errno.c \
-	handles.c wchar.c libefi.c efi_driver_utils.c efizfs.c devicename.c
+SRCS=	delay.c \
+	devicename.c \
+	devpath.c \
+	efi_console.c \
+	efi_driver_utils.c \
+	efichar.c \
+	efienv.c \
+	efinet.c \
+	efipart.c \
+	efizfs.c \
+	env.c \
+	errno.c \
+	handles.c \
+	libefi.c \
+	wchar.c
 
 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
 SRCS+=	time.c

Modified: stable/11/stand/efi/libefi/devicename.c
==============================================================================
--- stable/11/stand/efi/libefi/devicename.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/efi/libefi/devicename.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -161,7 +161,6 @@ efi_parsedev(struct devdesc **dev, const char *devspec
 	}
 
 	idev->d_dev = dv;
-	idev->d_type = dv->dv_type;
 
 	if (dev != NULL)
 		*dev = idev;
@@ -180,7 +179,7 @@ efi_fmtdev(void *vdev)
 	struct devdesc *dev = (struct devdesc *)vdev;
 	static char buf[SPECNAMELEN + 1];
 
-	switch(dev->d_type) {
+	switch(dev->d_dev->dv_type) {
 	case DEVT_NONE:
 		strcpy(buf, "(no device)");
 		break;

Copied: stable/11/stand/efi/libefi/efienv.c (from r330815, head/stand/efi/libefi/efienv.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/11/stand/efi/libefi/efienv.c	Fri Apr  6 21:37:25 2018	(r332154, copy of r330815, head/stand/efi/libefi/efienv.c)
@@ -0,0 +1,87 @@
+/*-
+ * Copyright (c) 2018 Netflix, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <stand.h>
+#include <efi.h>
+#include <efichar.h>
+#include <efilib.h>
+
+static EFI_GUID FreeBSDBootVarGUID = FREEBSD_BOOT_VAR_GUID;
+static EFI_GUID GlobalBootVarGUID = UEFI_BOOT_VAR_GUID;
+
+EFI_STATUS
+efi_getenv(EFI_GUID *g, const char *v, void *data, size_t *len)
+{
+	size_t ul;
+	CHAR16 *uv;
+	UINT32 attr;
+	UINTN dl;
+	EFI_STATUS rv;
+
+	uv = NULL;
+	if (utf8_to_ucs2(v, &uv, &ul) != 0)
+		return (EFI_OUT_OF_RESOURCES);
+	dl = *len;
+	rv = RS->GetVariable(uv, g, &attr, &dl, data);
+	if (rv == EFI_SUCCESS)
+		*len = dl;
+	free(uv);
+	return (rv);
+}
+
+EFI_STATUS
+efi_global_getenv(const char *v, void *data, size_t *len)
+{
+
+	return (efi_getenv(&GlobalBootVarGUID, v, data, len));
+}
+
+EFI_STATUS
+efi_freebsd_getenv(const char *v, void *data, size_t *len)
+{
+
+	return (efi_getenv(&FreeBSDBootVarGUID, v, data, len));
+}
+
+EFI_STATUS
+efi_setenv_freebsd_wcs(const char *varname, CHAR16 *valstr)
+{
+	CHAR16 *var = NULL;
+	size_t len;
+	EFI_STATUS rv;
+
+	if (utf8_to_ucs2(varname, &var, &len) != 0)
+		return (EFI_OUT_OF_RESOURCES);
+	rv = RS->SetVariable(var, &FreeBSDBootVarGUID,
+	    EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
+	    (ucs2len(valstr) + 1) * sizeof(efi_char), valstr);
+	free(var);
+	return (rv);
+}
+

Modified: stable/11/stand/efi/libefi/efipart.c
==============================================================================
--- stable/11/stand/efi/libefi/efipart.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/efi/libefi/efipart.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -744,11 +744,10 @@ efipart_print_common(struct devsw *dev, pdinfo_list_t 
 				continue;
 
 			pd->pd_blkio = blkio;
-			pd_dev.d_dev = dev;
-			pd_dev.d_unit = pd->pd_unit;
+			pd_dev.dd.d_dev = dev;
+			pd_dev.dd.d_unit = pd->pd_unit;
 			pd_dev.d_slice = -1;
 			pd_dev.d_partition = -1;
-			pd_dev.d_opendata = blkio;
 			ret = disk_open(&pd_dev, blkio->Media->BlockSize *
 			    (blkio->Media->LastBlock + 1),
 			    blkio->Media->BlockSize);
@@ -821,7 +820,7 @@ efipart_open(struct open_file *f, ...)
 	if (pd->pd_bcache == NULL)
 		pd->pd_bcache = bcache_allocate();
 
-	if (dev->d_dev->dv_type == DEVT_DISK) {
+	if (dev->dd.d_dev->dv_type == DEVT_DISK) {
 		int rc;
 
 		rc = disk_open(dev,
@@ -860,7 +859,7 @@ efipart_close(struct open_file *f)
 		bcache_free(pd->pd_bcache);
 		pd->pd_bcache = NULL;
 	}
-	if (dev->d_dev->dv_type == DEVT_DISK)
+	if (dev->dd.d_dev->dv_type == DEVT_DISK)
 		return (disk_close(dev));
 	return (0);
 }
@@ -880,7 +879,7 @@ efipart_ioctl(struct open_file *f, u_long cmd, void *d
 	if (pd == NULL)
 		return (EINVAL);
 
-	if (dev->d_dev->dv_type == DEVT_DISK) {
+	if (dev->dd.d_dev->dv_type == DEVT_DISK) {
 		rc = disk_ioctl(dev, cmd, data);
 		if (rc != ENOTTY)
 			return (rc);
@@ -967,7 +966,7 @@ efipart_strategy(void *devdata, int rw, daddr_t blk, s
 	bcd.dv_devdata = devdata;
 	bcd.dv_cache = pd->pd_bcache;
 
-	if (dev->d_dev->dv_type == DEVT_DISK) {
+	if (dev->dd.d_dev->dv_type == DEVT_DISK) {
 		daddr_t offset;
 
 		offset = dev->d_offset * pd->pd_blkio->Media->BlockSize;
@@ -1011,7 +1010,7 @@ efipart_realstrategy(void *devdata, int rw, daddr_t bl
 	 * partition.
 	 */
 	disk_blocks = 0;
-	if (dev->d_dev->dv_type == DEVT_DISK) {
+	if (dev->dd.d_dev->dv_type == DEVT_DISK) {
 		if (disk_ioctl(dev, DIOCGMEDIASIZE, &disk_blocks) == 0) {
 			/* DIOCGMEDIASIZE does return bytes. */
 			disk_blocks /= blkio->Media->BlockSize;

Modified: stable/11/stand/efi/libefi/efizfs.c
==============================================================================
--- stable/11/stand/efi/libefi/efizfs.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/efi/libefi/efizfs.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -29,8 +29,7 @@
 __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
-#include <sys/disk.h>
-#include <stdint.h>
+#include <stand.h>
 
 #ifdef EFI_ZFS_BOOT
 #include <libzfs.h>

Modified: stable/11/stand/efi/libefi/env.c
==============================================================================
--- stable/11/stand/efi/libefi/env.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/efi/libefi/env.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -35,35 +35,6 @@ __FBSDID("$FreeBSD$");
 #include <stdbool.h>
 #include "bootstrap.h"
 
-/*
- * Simple wrappers to the underlying UEFI functions.
- * See http://wiki.phoenix.com/wiki/index.php/EFI_RUNTIME_SERVICES
- * for details.
- */
-EFI_STATUS
-efi_get_next_variable_name(UINTN *variable_name_size, CHAR16 *variable_name,
-    EFI_GUID *vendor_guid)
-{
-	return (RS->GetNextVariableName(variable_name_size, variable_name,
-	    vendor_guid));
-}
-
-EFI_STATUS
-efi_get_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid,
-    UINT32 *attributes, UINTN *data_size, void *data)
-{
-	return (RS->GetVariable(variable_name, vendor_guid, attributes,
-	    data_size, data));
-}
-
-EFI_STATUS
-efi_set_variable(CHAR16 *variable_name, EFI_GUID *vendor_guid,
-    UINT32 attributes, UINTN data_size, void *data)
-{
-	return (RS->SetVariable(variable_name, vendor_guid, attributes,
-	    data_size, data));
-}
-
 void
 efi_init_environment(void)
 {

Modified: stable/11/stand/efi/loader/arch/arm/exec.c
==============================================================================
--- stable/11/stand/efi/loader/arch/arm/exec.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/efi/loader/arch/arm/exec.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -47,7 +47,7 @@ extern vm_offset_t md_load(char *, vm_offset_t *);
 extern int bi_load(char *, vm_offset_t *, vm_offset_t *);
 
 static int
-__elfN(arm_load)(char *filename, u_int64_t dest,
+__elfN(arm_load)(char *filename, uint64_t dest,
     struct preloaded_file **result)
 {
 	int r;

Modified: stable/11/stand/efi/loader/main.c
==============================================================================
--- stable/11/stand/efi/loader/main.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/efi/loader/main.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -175,9 +175,7 @@ set_devdesc_currdev(struct devsw *dev, int unit)
 	char *devname;
 
 	currdev.d_dev = dev;
-	currdev.d_type = currdev.d_dev->dv_type;
 	currdev.d_unit = unit;
-	currdev.d_opendata = NULL;
 	devname = efi_fmtdev(&currdev);
 
 	env_setenv("currdev", EV_VOLATILE, devname, efi_setcurrdev,
@@ -202,10 +200,8 @@ find_currdev(EFI_LOADED_IMAGE *img)
 	if (pool_guid != 0) {
 		struct zfs_devdesc currdev;
 
-		currdev.d_dev = &zfs_dev;
-		currdev.d_unit = 0;
-		currdev.d_type = currdev.d_dev->dv_type;
-		currdev.d_opendata = NULL;
+		currdev.dd.d_dev = &zfs_dev;
+		currdev.dd.d_unit = 0;
 		currdev.pool_guid = pool_guid;
 		currdev.root_guid = 0;
 		devname = efi_fmtdev(&currdev);
@@ -224,10 +220,8 @@ find_currdev(EFI_LOADED_IMAGE *img)
 	STAILQ_FOREACH(dp, pdi_list, pd_link) {
 		struct disk_devdesc currdev;
 
-		currdev.d_dev = &efipart_hddev;
-		currdev.d_type = currdev.d_dev->dv_type;
-		currdev.d_unit = dp->pd_unit;
-		currdev.d_opendata = NULL;
+		currdev.dd.d_dev = &efipart_hddev;
+		currdev.dd.d_unit = dp->pd_unit;
 		currdev.d_slice = -1;
 		currdev.d_partition = -1;
 
@@ -318,6 +312,12 @@ main(int argc, CHAR16 *argv[])
 	int i, j, vargood, howto;
 	UINTN k;
 	int has_kbd;
+	CHAR16 *text;
+	UINT16 boot_current;
+	size_t sz;
+	UINT16 boot_order[100];
+	EFI_DEVICE_PATH *imgpath;
+	EFI_STATUS status;
 #if !defined(__arm__)
 	char buf[40];
 #endif
@@ -479,6 +479,36 @@ main(int argc, CHAR16 *argv[])
 
 	printf("\n%s", bootprog_info);
 
+	text = efi_devpath_name(img->FilePath);
+	if (text != NULL) {
+		printf("   Load Path: %S\n", text);
+		efi_setenv_freebsd_wcs("LoaderPath", text);
+		efi_free_devpath_name(text);
+	}
+
+	status = BS->HandleProtocol(img->DeviceHandle, &devid, (void **)&imgpath);
+	if (status == EFI_SUCCESS) {
+		text = efi_devpath_name(imgpath);
+		if (text != NULL) {
+			printf("   Load Device: %S\n", text);
+			efi_setenv_freebsd_wcs("LoaderDev", text);
+			efi_free_devpath_name(text);
+		}
+	}
+
+	boot_current = 0;
+	sz = sizeof(boot_current);
+	efi_global_getenv("BootCurrent", &boot_current, &sz);
+	printf("   BootCurrent: %04x\n", boot_current);
+
+	sz = sizeof(boot_order);
+	efi_global_getenv("BootOrder", &boot_order, &sz);
+	printf("   BootOrder:");
+	for (i = 0; i < sz / sizeof(boot_order[0]); i++)
+		printf(" %04x%s", boot_order[i],
+		    boot_order[i] == boot_current ? "[*]" : "");
+	printf("\n");
+
 	/*
 	 * Disable the watchdog timer. By default the boot manager sets
 	 * the timer to 5 minutes before invoking a boot option. If we
@@ -848,7 +878,7 @@ command_chain(int argc, char *argv[])
 		struct disk_devdesc *d_dev;
 		pdinfo_t *hd, *pd;
 
-		switch (dev->d_type) {
+		switch (dev->d_dev->dv_type) {
 #ifdef EFI_ZFS_BOOT
 		case DEVT_ZFS:
 			z_dev = (struct zfs_devdesc *)dev;

Modified: stable/11/stand/ficl/aarch64/sysdep.c
==============================================================================
--- stable/11/stand/ficl/aarch64/sysdep.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/ficl/aarch64/sysdep.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -25,12 +25,12 @@
 DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
 {
     DPUNS q;
-    u_int64_t qx;
+    uint64_t qx;
 
-    qx = (u_int64_t)x * (u_int64_t) y;
+    qx = (uint64_t)x * (uint64_t) y;
 
-    q.hi = (u_int32_t)( qx >> 32 );
-    q.lo = (u_int32_t)( qx & 0xFFFFFFFFL);
+    q.hi = (uint32_t)( qx >> 32 );
+    q.lo = (uint32_t)( qx & 0xFFFFFFFFL);
 
     return q;
 }
@@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
 UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
 {
     UNSQR result;
-    u_int64_t qx, qh;
+    uint64_t qx, qh;
 
     qh = q.hi;
     qx = (qh << 32) | q.lo;

Modified: stable/11/stand/ficl/amd64/sysdep.c
==============================================================================
--- stable/11/stand/ficl/amd64/sysdep.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/ficl/amd64/sysdep.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -25,12 +25,12 @@
 DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
 {
     DPUNS q;
-    u_int64_t qx;
+    uint64_t qx;
 
-    qx = (u_int64_t)x * (u_int64_t) y;
+    qx = (uint64_t)x * (uint64_t) y;
 
-    q.hi = (u_int32_t)( qx >> 32 );
-    q.lo = (u_int32_t)( qx & 0xFFFFFFFFL);
+    q.hi = (uint32_t)( qx >> 32 );
+    q.lo = (uint32_t)( qx & 0xFFFFFFFFL);
 
     return q;
 }
@@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
 UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
 {
     UNSQR result;
-    u_int64_t qx, qh;
+    uint64_t qx, qh;
 
     qh = q.hi;
     qx = (qh << 32) | q.lo;

Modified: stable/11/stand/ficl/arm/sysdep.c
==============================================================================
--- stable/11/stand/ficl/arm/sysdep.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/ficl/arm/sysdep.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -25,12 +25,12 @@
 DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
 {
     DPUNS q;
-    u_int64_t qx;
+    uint64_t qx;
 
-    qx = (u_int64_t)x * (u_int64_t) y;
+    qx = (uint64_t)x * (uint64_t) y;
 
-    q.hi = (u_int32_t)( qx >> 32 );
-    q.lo = (u_int32_t)( qx & 0xFFFFFFFFL);
+    q.hi = (uint32_t)( qx >> 32 );
+    q.lo = (uint32_t)( qx & 0xFFFFFFFFL);
 
     return q;
 }
@@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
 UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
 {
     UNSQR result;
-    u_int64_t qx, qh;
+    uint64_t qx, qh;
 
     qh = q.hi;
     qx = (qh << 32) | q.lo;

Modified: stable/11/stand/ficl/i386/sysdep.c
==============================================================================
--- stable/11/stand/ficl/i386/sysdep.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/ficl/i386/sysdep.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -28,12 +28,12 @@
 DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
 {
     DPUNS q;
-    u_int64_t qx;
+    uint64_t qx;
 
-    qx = (u_int64_t)x * (u_int64_t) y;
+    qx = (uint64_t)x * (uint64_t) y;
 
-    q.hi = (u_int32_t)( qx >> 32 );
-    q.lo = (u_int32_t)( qx & 0xFFFFFFFFL);
+    q.hi = (uint32_t)( qx >> 32 );
+    q.lo = (uint32_t)( qx & 0xFFFFFFFFL);
 
     return q;
 }
@@ -41,7 +41,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
 UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
 {
     UNSQR result;
-    u_int64_t qx, qh;
+    uint64_t qx, qh;
 
     qh = q.hi;
     qx = (qh << 32) | q.lo;
@@ -89,7 +89,7 @@ void
 ficlOutb(FICL_VM *pVM)
 {
 	u_char c;
-	u_int32_t port;
+	uint32_t port;
 
 	port=stackPopUNS(pVM->pStack);
 	c=(u_char)stackPopINT(pVM->pStack);
@@ -104,7 +104,7 @@ void
 ficlInb(FICL_VM *pVM)
 {
 	u_char c;
-	u_int32_t port;
+	uint32_t port;
 
 	port=stackPopUNS(pVM->pStack);
 	c=inb(port);

Modified: stable/11/stand/ficl/mips/sysdep.c
==============================================================================
--- stable/11/stand/ficl/mips/sysdep.c	Fri Apr  6 20:56:06 2018	(r332153)
+++ stable/11/stand/ficl/mips/sysdep.c	Fri Apr  6 21:37:25 2018	(r332154)
@@ -25,12 +25,12 @@
 DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
 {
     DPUNS q;
-    u_int64_t qx;
+    uint64_t qx;
 
-    qx = (u_int64_t)x * (u_int64_t) y;
+    qx = (uint64_t)x * (uint64_t) y;
 
-    q.hi = (u_int32_t)( qx >> 32 );
-    q.lo = (u_int32_t)( qx & 0xFFFFFFFFL);
+    q.hi = (uint32_t)( qx >> 32 );
+    q.lo = (uint32_t)( qx & 0xFFFFFFFFL);
 
     return q;
 }
@@ -38,7 +38,7 @@ DPUNS ficlLongMul(FICL_UNS x, FICL_UNS y)
 UNSQR ficlLongDiv(DPUNS q, FICL_UNS y)
 {
     UNSQR result;
-    u_int64_t qx, qh;
+    uint64_t qx, qh;
 

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



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