svn commit: r281173 - in projects/ifnet: etc/rc.d lib/libc/sys sys/arm/include sys/arm64/include sys/boot/efi sys/boot/efi/boot1 sys/boot/efi/include/arm sys/boot/efi/loader sys/boot/efi/loader/arc...
Gleb Smirnoff
glebius at FreeBSD.org
Mon Apr 6 22:20:01 UTC 2015
Author: glebius
Date: Mon Apr 6 22:19:51 2015
New Revision: 281173
URL: https://svnweb.freebsd.org/changeset/base/281173
Log:
Merge head r257698 through r281172.
Added:
projects/ifnet/sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu
- copied unchanged from r281172, head/sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu
projects/ifnet/sys/boot/efi/boot1/fat-arm.tmpl.bz2.uu
- copied unchanged from r281172, head/sys/boot/efi/boot1/fat-arm.tmpl.bz2.uu
projects/ifnet/sys/boot/efi/include/arm/
- copied from r281172, head/sys/boot/efi/include/arm/
projects/ifnet/sys/boot/efi/loader/arch/arm/
- copied from r281172, head/sys/boot/efi/loader/arch/arm/
Deleted:
projects/ifnet/sys/boot/efi/boot1/fat.tmpl.bz2.uu
Modified:
projects/ifnet/etc/rc.d/pflog
projects/ifnet/lib/libc/sys/vfork.2
projects/ifnet/sys/arm/include/metadata.h
projects/ifnet/sys/arm64/include/atomic.h
projects/ifnet/sys/boot/efi/Makefile
projects/ifnet/sys/boot/efi/boot1/Makefile
projects/ifnet/sys/boot/efi/boot1/boot1.c
projects/ifnet/sys/boot/efi/boot1/generate-fat.sh
projects/ifnet/sys/boot/efi/loader/Makefile
projects/ifnet/sys/boot/efi/loader/bootinfo.c
projects/ifnet/sys/boot/efi/loader/copy.c
projects/ifnet/sys/dev/acpica/acpi.c
projects/ifnet/sys/netinet6/ip6_forward.c
projects/ifnet/sys/netinet6/ip6_mroute.c
projects/ifnet/sys/netinet6/ip6_mroute.h
projects/ifnet/sys/netpfil/pf/pf_norm.c
projects/ifnet/sys/powerpc/powerpc/trap.c
projects/ifnet/sys/sys/param.h
projects/ifnet/sys/vm/uma_core.c
projects/ifnet/usr.bin/netstat/mroute6.c
projects/ifnet/usr.bin/netstat/netstat.1
projects/ifnet/usr.sbin/acpi/acpiconf/acpiconf.c
projects/ifnet/usr.sbin/bsdinstall/scripts/zfsboot
projects/ifnet/usr.sbin/ctld/ctld.c
Directory Properties:
projects/ifnet/ (props changed)
projects/ifnet/etc/ (props changed)
projects/ifnet/lib/libc/ (props changed)
projects/ifnet/sys/ (props changed)
projects/ifnet/sys/boot/ (props changed)
Modified: projects/ifnet/etc/rc.d/pflog
==============================================================================
--- projects/ifnet/etc/rc.d/pflog Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/etc/rc.d/pflog Mon Apr 6 22:19:51 2015 (r281173)
@@ -38,7 +38,7 @@ pflog_prestart()
return 1
fi
- # -p flag requires striping pidfile's leading /var/run and trailing .pid
+ # -p flag requires stripping pidfile's leading /var/run and trailing .pid
pidfile=$(echo $pidfile | sed -e 's|/var/run/||' -e 's|.pid$||')
# prepare the command line for pflogd
Modified: projects/ifnet/lib/libc/sys/vfork.2
==============================================================================
--- projects/ifnet/lib/libc/sys/vfork.2 Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/lib/libc/sys/vfork.2 Mon Apr 6 22:19:51 2015 (r281173)
@@ -28,7 +28,7 @@
.\" @(#)vfork.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd November 13, 2009
+.Dd April 6, 2015
.Dt VFORK 2
.Os
.Sh NAME
@@ -111,7 +111,7 @@ Same as for
The
.Fn vfork
system call appeared in
-.Bx 2.9 .
+.Bx 3 .
.Sh BUGS
To avoid a possible deadlock situation,
processes that are children in the middle
Modified: projects/ifnet/sys/arm/include/metadata.h
==============================================================================
--- projects/ifnet/sys/arm/include/metadata.h Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/arm/include/metadata.h Mon Apr 6 22:19:51 2015 (r281173)
@@ -31,5 +31,12 @@
#define MODINFOMD_BOOTINFO 0x1001
#define MODINFOMD_DTBP 0x1002
+#define MODINFOMD_EFI_MAP 0x1003
+
+struct efi_map_header {
+ uint64_t memory_size;
+ uint64_t descriptor_size;
+ uint32_t descriptor_version;
+};
#endif /* !_MACHINE_METADATA_H_ */
Modified: projects/ifnet/sys/arm64/include/atomic.h
==============================================================================
--- projects/ifnet/sys/arm64/include/atomic.h Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/arm64/include/atomic.h Mon Apr 6 22:19:51 2015 (r281173)
@@ -160,7 +160,6 @@ atomic_subtract_32(volatile uint32_t *p,
#define atomic_set_int atomic_set_32
#define atomic_subtract_int atomic_subtract_32
-
static __inline void
atomic_add_acq_32(volatile uint32_t *p, uint32_t val)
{
@@ -170,7 +169,7 @@ atomic_add_acq_32(volatile uint32_t *p,
__asm __volatile(
"1: ldaxr %w0, [%2] \n"
" add %w0, %w0, %w3 \n"
- " stlxr %w1, %w0, [%2] \n"
+ " stxr %w1, %w0, [%2] \n"
" cbnz %w1, 1b \n"
"2:"
: "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
@@ -186,7 +185,7 @@ atomic_clear_acq_32(volatile uint32_t *p
__asm __volatile(
"1: ldaxr %w0, [%2] \n"
" bic %w0, %w0, %w3 \n"
- " stlxr %w1, %w0, [%2] \n"
+ " stxr %w1, %w0, [%2] \n"
" cbnz %w1, 1b \n"
: "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
);
@@ -203,7 +202,7 @@ atomic_cmpset_acq_32(volatile uint32_t *
" ldaxr %w0, [%2] \n"
" cmp %w0, %w3 \n"
" b.ne 2f \n"
- " stlxr %w1, %w4, [%2] \n"
+ " stxr %w1, %w4, [%2] \n"
" cbnz %w1, 1b \n"
"2:"
: "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (cmpval), "+r" (newval)
@@ -218,8 +217,9 @@ atomic_load_acq_32(volatile uint32_t *p)
{
uint32_t ret;
- ret = *p;
- dmb();
+ __asm __volatile(
+ "ldar %w0, [%1] \n"
+ : "=&r" (ret) : "r" (p) : "memory");
return (ret);
}
@@ -233,7 +233,7 @@ atomic_set_acq_32(volatile uint32_t *p,
__asm __volatile(
"1: ldaxr %w0, [%2] \n"
" orr %w0, %w0, %w3 \n"
- " stlxr %w1, %w0, [%2] \n"
+ " stxr %w1, %w0, [%2] \n"
" cbnz %w1, 1b \n"
: "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
);
@@ -248,6 +248,82 @@ atomic_subtract_acq_32(volatile uint32_t
__asm __volatile(
"1: ldaxr %w0, [%2] \n"
" sub %w0, %w0, %w3 \n"
+ " stxr %w1, %w0, [%2] \n"
+ " cbnz %w1, 1b \n"
+ : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
+ );
+}
+
+#define atomic_add_acq_int atomic_add_acq_32
+#define atomic_clear_acq_int atomic_clear_acq_32
+#define atomic_cmpset_acq_int atomic_cmpset_acq_32
+#define atomic_load_acq_int atomic_load_acq_32
+#define atomic_set_acq_int atomic_set_acq_32
+#define atomic_subtract_acq_int atomic_subtract_acq_32
+
+/* The atomic functions currently are both acq and rel, we should fix this. */
+
+static __inline void
+atomic_add_rel_32(volatile uint32_t *p, uint32_t val)
+{
+ uint32_t tmp;
+ int res;
+
+ __asm __volatile(
+ "1: ldxr %w0, [%2] \n"
+ " add %w0, %w0, %w3 \n"
+ " stlxr %w1, %w0, [%2] \n"
+ " cbnz %w1, 1b \n"
+ "2:"
+ : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
+ );
+}
+
+static __inline void
+atomic_clear_rel_32(volatile uint32_t *p, uint32_t val)
+{
+ uint32_t tmp;
+ int res;
+
+ __asm __volatile(
+ "1: ldxr %w0, [%2] \n"
+ " bic %w0, %w0, %w3 \n"
+ " stlxr %w1, %w0, [%2] \n"
+ " cbnz %w1, 1b \n"
+ : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
+ );
+}
+
+static __inline int
+atomic_cmpset_rel_32(volatile uint32_t *p, uint32_t cmpval, uint32_t newval)
+{
+ uint32_t tmp;
+ int res;
+
+ __asm __volatile(
+ "1: mov %w1, #1 \n"
+ " ldxr %w0, [%2] \n"
+ " cmp %w0, %w3 \n"
+ " b.ne 2f \n"
+ " stlxr %w1, %w4, [%2] \n"
+ " cbnz %w1, 1b \n"
+ "2:"
+ : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (cmpval), "+r" (newval)
+ : : "cc", "memory"
+ );
+
+ return (!res);
+}
+
+static __inline void
+atomic_set_rel_32(volatile uint32_t *p, uint32_t val)
+{
+ uint32_t tmp;
+ int res;
+
+ __asm __volatile(
+ "1: ldxr %w0, [%2] \n"
+ " orr %w0, %w0, %w3 \n"
" stlxr %w1, %w0, [%2] \n"
" cbnz %w1, 1b \n"
: "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
@@ -258,23 +334,25 @@ static __inline void
atomic_store_rel_32(volatile uint32_t *p, uint32_t val)
{
- dmb();
- *p = val;
+ __asm __volatile(
+ "stlr %w0, [%1] \n"
+ : : "r" (val), "r" (p) : "memory");
}
-#define atomic_add_acq_int atomic_add_acq_32
-#define atomic_clear_acq_int atomic_add_acq_32
-#define atomic_cmpset_acq_int atomic_cmpset_acq_32
-#define atomic_load_acq_int atomic_load_acq_32
-#define atomic_set_acq_int atomic_set_acq_32
-#define atomic_subtract_acq_int atomic_subtract_acq_32
+static __inline void
+atomic_subtract_rel_32(volatile uint32_t *p, uint32_t val)
+{
+ uint32_t tmp;
+ int res;
-/* The atomic functions currently are both acq and rel, we should fix this. */
-#define atomic_add_rel_32 atomic_add_acq_32
-#define atomic_clear_rel_32 atomic_add_acq_32
-#define atomic_cmpset_rel_32 atomic_cmpset_acq_32
-#define atomic_set_rel_32 atomic_set_acq_32
-#define atomic_subtract_rel_32 atomic_subtract_acq_32
+ __asm __volatile(
+ "1: ldxr %w0, [%2] \n"
+ " sub %w0, %w0, %w3 \n"
+ " stlxr %w1, %w0, [%2] \n"
+ " cbnz %w1, 1b \n"
+ : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
+ );
+}
#define atomic_add_rel_int atomic_add_rel_32
#define atomic_clear_rel_int atomic_add_rel_32
@@ -440,7 +518,7 @@ atomic_add_acq_64(volatile uint64_t *p,
__asm __volatile(
"1: ldaxr %0, [%2] \n"
" add %0, %0, %3 \n"
- " stlxr %w1, %0, [%2] \n"
+ " stxr %w1, %0, [%2] \n"
" cbnz %w1, 1b \n"
"2:"
: "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
@@ -456,7 +534,7 @@ atomic_clear_acq_64(volatile uint64_t *p
__asm __volatile(
"1: ldaxr %0, [%2] \n"
" bic %0, %0, %3 \n"
- " stlxr %w1, %0, [%2] \n"
+ " stxr %w1, %0, [%2] \n"
" cbnz %w1, 1b \n"
: "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
);
@@ -473,7 +551,7 @@ atomic_cmpset_acq_64(volatile uint64_t *
" ldaxr %0, [%2] \n"
" cmp %0, %3 \n"
" b.ne 2f \n"
- " stlxr %w1, %4, [%2] \n"
+ " stxr %w1, %4, [%2] \n"
" cbnz %w1, 1b \n"
"2:"
: "=&r" (tmp), "=&r" (res), "+r" (p), "+r" (cmpval), "+r" (newval)
@@ -488,8 +566,9 @@ atomic_load_acq_64(volatile uint64_t *p)
{
uint64_t ret;
- ret = *p;
- dmb();
+ __asm __volatile(
+ "ldar %0, [%1] \n"
+ : "=&r" (ret) : "r" (p) : "memory");
return (ret);
}
@@ -503,7 +582,7 @@ atomic_set_acq_64(volatile uint64_t *p,
__asm __volatile(
"1: ldaxr %0, [%2] \n"
" orr %0, %0, %3 \n"
- " stlxr %w1, %0, [%2] \n"
+ " stxr %w1, %0, [%2] \n"
" cbnz %w1, 1b \n"
: "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
);
@@ -518,20 +597,12 @@ atomic_subtract_acq_64(volatile uint64_t
__asm __volatile(
"1: ldaxr %0, [%2] \n"
" sub %0, %0, %3 \n"
- " stlxr %w1, %0, [%2] \n"
+ " stxr %w1, %0, [%2] \n"
" cbnz %w1, 1b \n"
: "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
);
}
-static __inline void
-atomic_store_rel_64(volatile uint64_t *p, uint64_t val)
-{
-
- dmb();
- *p = val;
-}
-
#define atomic_add_acq_long atomic_add_acq_64
#define atomic_clear_acq_long atomic_add_acq_64
#define atomic_cmpset_acq_long atomic_cmpset_acq_64
@@ -550,21 +621,106 @@ atomic_store_rel_64(volatile uint64_t *p
* TODO: The atomic functions currently are both acq and rel, we should fix
* this.
*/
-#define atomic_add_rel_64 atomic_add_acq_64
-#define atomic_clear_rel_64 atomic_add_acq_64
-#define atomic_cmpset_rel_64 atomic_cmpset_acq_64
-#define atomic_set_rel_64 atomic_set_acq_64
-#define atomic_subtract_rel_64 atomic_subtract_acq_64
+static __inline void
+atomic_add_rel_64(volatile uint64_t *p, uint64_t val)
+{
+ uint64_t tmp;
+ int res;
+
+ __asm __volatile(
+ "1: ldxr %0, [%2] \n"
+ " add %0, %0, %3 \n"
+ " stlxr %w1, %0, [%2] \n"
+ " cbnz %w1, 1b \n"
+ "2:"
+ : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
+ );
+}
+
+static __inline void
+atomic_clear_rel_64(volatile uint64_t *p, uint64_t val)
+{
+ uint64_t tmp;
+ int res;
+
+ __asm __volatile(
+ "1: ldxr %0, [%2] \n"
+ " bic %0, %0, %3 \n"
+ " stlxr %w1, %0, [%2] \n"
+ " cbnz %w1, 1b \n"
+ : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
+ );
+}
+
+static __inline int
+atomic_cmpset_rel_64(volatile uint64_t *p, uint64_t cmpval, uint64_t newval)
+{
+ uint64_t tmp;
+ int res;
+
+ __asm __volatile(
+ "1: mov %w1, #1 \n"
+ " ldxr %0, [%2] \n"
+ " cmp %0, %3 \n"
+ " b.ne 2f \n"
+ " stlxr %w1, %4, [%2] \n"
+ " cbnz %w1, 1b \n"
+ "2:"
+ : "=&r" (tmp), "=&r" (res), "+r" (p), "+r" (cmpval), "+r" (newval)
+ : : "cc", "memory"
+ );
+
+ return (!res);
+}
+
+static __inline void
+atomic_set_rel_64(volatile uint64_t *p, uint64_t val)
+{
+ uint64_t tmp;
+ int res;
+
+ __asm __volatile(
+ "1: ldxr %0, [%2] \n"
+ " orr %0, %0, %3 \n"
+ " stlxr %w1, %0, [%2] \n"
+ " cbnz %w1, 1b \n"
+ : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
+ );
+}
+
+static __inline void
+atomic_store_rel_64(volatile uint64_t *p, uint64_t val)
+{
+
+ __asm __volatile(
+ "stlr %0, [%1] \n"
+ : : "r" (val), "r" (p) : "memory");
+}
+
+static __inline void
+atomic_subtract_rel_64(volatile uint64_t *p, uint64_t val)
+{
+ uint64_t tmp;
+ int res;
+
+ __asm __volatile(
+ "1: ldxr %0, [%2] \n"
+ " sub %0, %0, %3 \n"
+ " stlxr %w1, %0, [%2] \n"
+ " cbnz %w1, 1b \n"
+ : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory"
+ );
+}
#define atomic_add_rel_long atomic_add_rel_64
-#define atomic_clear_rel_long atomic_add_rel_64
+#define atomic_clear_rel_long atomic_clear_rel_64
#define atomic_cmpset_rel_long atomic_cmpset_rel_64
#define atomic_set_rel_long atomic_set_rel_64
#define atomic_subtract_rel_long atomic_subtract_rel_64
#define atomic_store_rel_long atomic_store_rel_64
#define atomic_add_rel_ptr atomic_add_rel_64
-#define atomic_clear_rel_ptr atomic_add_rel_64
+#define atomic_clear_rel_ptr atomic_clear_rel_64
#define atomic_cmpset_rel_ptr atomic_cmpset_rel_64
#define atomic_set_rel_ptr atomic_set_rel_64
#define atomic_subtract_rel_ptr atomic_subtract_rel_64
Modified: projects/ifnet/sys/boot/efi/Makefile
==============================================================================
--- projects/ifnet/sys/boot/efi/Makefile Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/boot/efi/Makefile Mon Apr 6 22:19:51 2015 (r281173)
@@ -10,7 +10,7 @@ SUBDIR+= fdt
.endif
.endif
-.if ${MACHINE_CPUARCH} == "amd64"
+.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "arm"
SUBDIR+= loader boot1
.endif
Modified: projects/ifnet/sys/boot/efi/boot1/Makefile
==============================================================================
--- projects/ifnet/sys/boot/efi/boot1/Makefile Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/boot/efi/boot1/Makefile Mon Apr 6 22:19:51 2015 (r281173)
@@ -36,6 +36,14 @@ LDFLAGS= -Wl,-T${LDSCRIPT} -Wl,-Bsymboli
LDFLAGS+= -Wl,-znocombreloc
.endif
+.if ${MACHINE_CPUARCH} == "arm"
+#
+# Add libstand for the __aeabi_* functions used by the compiler
+#
+DPADD+= ${LIBSTAND}
+LDADD+= -lstand
+.endif
+
${PROG}: ${LDSCRIPT}
OBJCOPY?= objcopy
@@ -45,6 +53,8 @@ OBJDUMP?= objdump
EFI_TARGET= efi-app-x86_64
.elif ${MACHINE_CPUARCH} == "i386"
EFI_TARGET= efi-app-ia32
+.else
+EFI_TARGET= binary
.endif
boot1.efi: loader.sym
@@ -52,7 +62,7 @@ boot1.efi: loader.sym
${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \
exit 1; \
fi
- ${OBJCOPY} -j .text -j .sdata -j .data \
+ ${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \
-j .dynamic -j .dynsym -j .rel.dyn \
-j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \
--output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET}
@@ -66,8 +76,8 @@ boot1.o: ${.CURDIR}/../../common/ufsread
boot1.efifat: boot1.efi
echo ${.OBJDIR}
- uudecode ${.CURDIR}/fat.tmpl.bz2.uu
- mv fat.tmpl.bz2 ${.TARGET}.bz2
+ uudecode ${.CURDIR}/fat-${MACHINE_CPUARCH}.tmpl.bz2.uu
+ mv fat-${MACHINE_CPUARCH}.tmpl.bz2 ${.TARGET}.bz2
bzip2 -f -d ${.TARGET}.bz2
dd if=boot1.efi of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc
Modified: projects/ifnet/sys/boot/efi/boot1/boot1.c
==============================================================================
--- projects/ifnet/sys/boot/efi/boot1/boot1.c Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/boot/efi/boot1/boot1.c Mon Apr 6 22:19:51 2015 (r281173)
@@ -59,8 +59,8 @@ static char *__ultoa(char *buf, u_long v
static int domount(EFI_DEVICE_PATH *device, EFI_BLOCK_IO *blkio, int quiet);
static void load(const char *fname);
-EFI_SYSTEM_TABLE *systab;
-EFI_HANDLE *image;
+static EFI_SYSTEM_TABLE *systab;
+static EFI_HANDLE *image;
static void
bcopy(const void *src, void *dst, size_t len)
Copied: projects/ifnet/sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu (from r281172, head/sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ifnet/sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu Mon Apr 6 22:19:51 2015 (r281173, copy of r281172, head/sys/boot/efi/boot1/fat-amd64.tmpl.bz2.uu)
@@ -0,0 +1,20 @@
+FAT template boot filesystem created by generate-fat.sh
+DO NOT EDIT
+$FreeBSD$
+begin 644 fat-amd64.tmpl.bz2
+M0EIH.3%!629362AK*D(`&I+____[ZZKJZ_^N_ZO^Z_Z_OJ[L`4`!7I0$#&$"
+M0$!$3&(<P`(;J*C:0E0E#30&AH`T````9#0```9````#)ZF0:,-3U/409,`)
+M@`"8`C3",````$R:8F at P`C`````"24U,D>I-DTU,)ZAZ0VA-!M0T'J`>H#"9
+M'I#0-H&HQI&0&3&FH>H>*`JHHU3V]1%/4/2``T#0`!H``#0`````#1H,@``6
+M'1&G'&@?$6[T#A)?X8$A160"20BO#")0J4TB1*4GXF$B4I,&>43+=_?K=#3*
+M6]<E0HE`UBF?(J%8BRF#?8OQ2'D)`)(EL2;F4.'R>R"ZNKJZI,9*68E8*E2Q
+M4J5*E3'(1830A"$(12A-"<(0A#]VD)H0A"$,>I0FA"$(0I\>P^=F5:M6K5JU
+M:DI3:64UN;[7%5B]Y-^\]@_K at B:N\/,5F%&H<\G#IXQXAEFC&D?![6%0'6MR
+MX1@@%FC"FD`M7,/SXFNG:2`'-0<-C$8^+$N.7M1B,^6)9,DV9,0A\OL<:C"L
+ML1V&,<\9YRB>XV#BG")'6NKRK^("UF2XO?_L!#29">MGDF$R3).!PX&%E,4C
+M''=(FL1.`_3?CN at -IB2PI3!FF\<8X.X at D,>CA90I)#M$XRPNDFJELL<3=1?8
+M2B7\5Z64,!7Z;EEBW-MXN-4IJ at W$462]-*\YCR,-B,5[W?=3&L/U>SX,WV#\
+M\B`:I"'0Z)5"$1B.E)(K[5I4RS`%R$>Y\D0NR*,;<9CZ:^V3P(I?D<D#!UC)
+D^M-HEE3SAN-8O0FQ$(`$(DF`?ZQ]'U2F_XNY(IPH2!0UE2$`
+`
+end
Copied: projects/ifnet/sys/boot/efi/boot1/fat-arm.tmpl.bz2.uu (from r281172, head/sys/boot/efi/boot1/fat-arm.tmpl.bz2.uu)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/ifnet/sys/boot/efi/boot1/fat-arm.tmpl.bz2.uu Mon Apr 6 22:19:51 2015 (r281173, copy of r281172, head/sys/boot/efi/boot1/fat-arm.tmpl.bz2.uu)
@@ -0,0 +1,26 @@
+FAT template boot filesystem created by generate-fat.sh
+DO NOT EDIT
+$FreeBSD$
+begin 644 fat-arm.tmpl.bz2
+M0EIH.3%!629365NH-?4`&T!_____ZZ[J[_ZN_ZO^J_Z[OJ_^J^J[^KZNKNNJ
+MZNKNZOJ^P`+\#$``0`&AD:, at TTTT-&C30#$R&FF1H:!B&)D&F@```-&AB::#
+M1HP0-,AD`T8F(TTP2JII&?^I5/]4`@TTT-&(T8FAB:&@T:8F(Q!@!`9,1DR9
+M`-,$:,FC)B&FC"8"#3"#(-,0`&AD:, at TTTT-&C30#$R&FF1H:!B&)D&F@```
+M-&AB::#1HP0-,AD`T8F(TTP*HI)D\DFDVC0AIIH]3(:-``80>HTTR!IH::#$
+M-`Q`:`/2:::&)IDP"/0$T:>IFD]$R8---3HUK2<PNK%<6\J]BA",-*(A%:0B
+M(B#G5%F8B$$(68C_:!`A#OL<HAB+JZ6UHRRU>*K9].C:!IWS-2UK9M<WC]W[
+M+]QW,9%V2,?<"ZEO9B("$,I.0ZFE66K/,<N6+8ITS$J3))F2I4HJ5*E2I74J
+M:$J5*E2I4JE5*I*I-2I4J5.;84I4J5*E2I6ZU4Q*E2I4J5+X<SOK,65E965D
+MT:($(0A"$(0A"$(0C>.3 at 8,&#!@P8(0A"$(0 at 0A"$(0[;_L-&C1HT:-&B+YP
+M,&#!@P8,$"$(0A"-?NW$*YY:V9IQ,:B93+AX^A7B),5HN_4JV=2\Y,:-+W'Q
+MKQKVU7KA+YR'.:*V#48N-"7<`%:TT4D`/;N;SZM9X,V(@!D'=P==+O)9*\H8
+MI8W<L9:.AU[N;G"QEHLZBWB/2B.SKCGRM):%ZK3-2U3ZV1;%MUZX:^?X_Y at N
+MM=0SN1R7Z\&PN,I8VVWKMS$1-X41%"V)-;+V9:MI5;.+M*TMZ]K7HQ-ALY1\
+M4LG)\#5/I7#7-D_1<KUPE\OW)<YEW=.GMJ%$MUF)TE9N)8[M[6LIEXF at H6?S
+MW%U89M5M+:LW6(\?7Z6I:U4F>IM*Q<2E)KFG;%M&U;INV]<)Q%^P'*<]T6R;
+M^7`P.+I+N(HA%=#(^Q0WVV0]=$2=5)>-XWKW7!95E7$<5QW)<IS6"PF at 7&+H
+M&<ETI.`9F48V7/E&??ROG%<9FU^Y#E.8W+GL%]#L7+U=^CY91Q\+`K'-WPF4
+M.2S[EM at S38.8YKG.@P6_83I,-<G1DPY84N-)VMWK,/!;AIJ&3E%&7B`0A,`&
+3'65I7J6`B^?^+N2*<*$@MU!KZ@``
+`
+end
Modified: projects/ifnet/sys/boot/efi/boot1/generate-fat.sh
==============================================================================
--- projects/ifnet/sys/boot/efi/boot1/generate-fat.sh Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/boot/efi/boot1/generate-fat.sh Mon Apr 6 22:19:51 2015 (r281173)
@@ -17,18 +17,20 @@ BOOT1_SIZE=128k
#
# Known filenames
-# amd64: BOOTx64.efi
-# arm64: BOOTaa64.efi
+# amd64: BOOTx64.efi
+# aarch64: BOOTaa64.efi
+# arm: BOOTarm.efi
#
-if [ -z "$1" ]; then
- echo "Usage: $0 filename"
+if [ -z "$2" ]; then
+ echo "Usage: $0 arch boot-filename"
exit 1
fi
-FILENAME=$1
+ARCH=$1
+FILENAME=$2
# Generate 800K FAT image
-OUTPUT_FILE=fat.tmpl
+OUTPUT_FILE=fat-${ARCH}.tmpl
dd if=/dev/zero of=$OUTPUT_FILE bs=512 count=$FAT_SIZE
DEVICE=`mdconfig -a -f $OUTPUT_FILE`
Modified: projects/ifnet/sys/boot/efi/loader/Makefile
==============================================================================
--- projects/ifnet/sys/boot/efi/loader/Makefile Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/boot/efi/loader/Makefile Mon Apr 6 22:19:51 2015 (r281173)
@@ -87,6 +87,8 @@ OBJDUMP?= objdump
EFI_TARGET= efi-app-x86_64
.elif ${MACHINE_CPUARCH} == "i386"
EFI_TARGET= efi-app-ia32
+.else
+EFI_TARGET= binary
.endif
loader.efi: loader.sym
@@ -94,7 +96,7 @@ loader.efi: loader.sym
${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \
exit 1; \
fi
- ${OBJCOPY} -j .text -j .sdata -j .data \
+ ${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \
-j .dynamic -j .dynsym -j .rel.dyn \
-j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \
--output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET}
Modified: projects/ifnet/sys/boot/efi/loader/bootinfo.c
==============================================================================
--- projects/ifnet/sys/boot/efi/loader/bootinfo.c Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/boot/efi/loader/bootinfo.c Mon Apr 6 22:19:51 2015 (r281173)
@@ -219,6 +219,9 @@ bi_copymodules(vm_offset_t addr)
if (fp->f_args)
MOD_ARGS(addr, fp->f_args, c);
v = fp->f_addr;
+#if defined(__arm__)
+ v -= __elfN(relocation_offset);
+#endif
MOD_ADDR(addr, v, c);
v = fp->f_size;
MOD_SIZE(addr, v, c);
@@ -332,6 +335,21 @@ bi_load(char *args, vm_offset_t *modulep
vm_offset_t dtbp;
int dtb_size;
#endif
+#if defined(__arm__)
+ vm_offset_t vaddr;
+ int i;
+ /*
+ * These metadata addreses must be converted for kernel after
+ * relocation.
+ */
+ uint32_t mdt[] = {
+ MODINFOMD_SSYM, MODINFOMD_ESYM, MODINFOMD_KERNEND,
+ MODINFOMD_ENVP,
+#if defined(LOADER_FDT_SUPPORT)
+ MODINFOMD_DTBP
+#endif
+ };
+#endif
howto = bi_getboothowto(args);
@@ -405,6 +423,22 @@ bi_load(char *args, vm_offset_t *modulep
md = file_findmetadata(kfp, MODINFOMD_KERNEND);
bcopy(&kernend, md->md_data, sizeof kernend);
+#if defined(__arm__)
+ *modulep -= __elfN(relocation_offset);
+
+ /* Do relocation fixup on metadata of each module. */
+ for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) {
+ for (i = 0; i < sizeof mdt / sizeof mdt[0]; i++) {
+ md = file_findmetadata(xp, mdt[i]);
+ if (md) {
+ bcopy(md->md_data, &vaddr, sizeof vaddr);
+ vaddr -= __elfN(relocation_offset);
+ bcopy(&vaddr, md->md_data, sizeof vaddr);
+ }
+ }
+ }
+#endif
+
/* Copy module list and metadata. */
(void)bi_copymodules(addr);
Modified: projects/ifnet/sys/boot/efi/loader/copy.c
==============================================================================
--- projects/ifnet/sys/boot/efi/loader/copy.c Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/boot/efi/loader/copy.c Mon Apr 6 22:19:51 2015 (r281173)
@@ -61,9 +61,21 @@ efi_copy_init(void)
}
staging_end = staging + STAGE_PAGES * 4096;
+#ifdef __arm__
+ /* Round the kernel load address to a 2MiB value */
+ staging = roundup2(staging, 2 * 1024 * 1024);
+#endif
+
return (0);
}
+void *
+efi_translate(vm_offset_t ptr)
+{
+
+ return ((void *)(ptr + stage_offset));
+}
+
ssize_t
efi_copyin(const void *src, vm_offset_t dest, const size_t len)
{
Modified: projects/ifnet/sys/dev/acpica/acpi.c
==============================================================================
--- projects/ifnet/sys/dev/acpica/acpi.c Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/dev/acpica/acpi.c Mon Apr 6 22:19:51 2015 (r281173)
@@ -1151,7 +1151,7 @@ acpi_sysres_alloc(device_t dev)
if (res != NULL) {
rman_manage_region(rm, rman_get_start(res), rman_get_end(res));
rle->res = res;
- } else
+ } else if (bootverbose)
device_printf(dev, "reservation of %lx, %lx (%d) failed\n",
rle->start, rle->count, rle->type);
}
Modified: projects/ifnet/sys/netinet6/ip6_forward.c
==============================================================================
--- projects/ifnet/sys/netinet6/ip6_forward.c Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/netinet6/ip6_forward.c Mon Apr 6 22:19:51 2015 (r281173)
@@ -537,22 +537,9 @@ again2:
if (!IN6_ARE_ADDR_EQUAL(&odst, &ip6->ip6_dst)) {
m->m_flags |= M_SKIP_FIREWALL;
/* If destination is now ourself drop to ip6_input(). */
- if (in6_localip(&ip6->ip6_dst)) {
+ if (in6_localip(&ip6->ip6_dst))
m->m_flags |= M_FASTFWD_OURS;
- if (m->m_pkthdr.rcvif == NULL)
- m->m_pkthdr.rcvif = V_loif;
- if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) {
- m->m_pkthdr.csum_flags |=
- CSUM_DATA_VALID_IPV6 | CSUM_PSEUDO_HDR;
- m->m_pkthdr.csum_data = 0xffff;
- }
-#ifdef SCTP
- if (m->m_pkthdr.csum_flags & CSUM_SCTP_IPV6)
- m->m_pkthdr.csum_flags |= CSUM_SCTP_VALID;
-#endif
- error = netisr_queue(NETISR_IPV6, m);
- goto out;
- } else
+ else
goto again; /* Redo the routing table lookup. */
}
Modified: projects/ifnet/sys/netinet6/ip6_mroute.c
==============================================================================
--- projects/ifnet/sys/netinet6/ip6_mroute.c Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/netinet6/ip6_mroute.c Mon Apr 6 22:19:51 2015 (r281173)
@@ -196,9 +196,34 @@ static struct mtx mfc6_mtx;
static u_char n6expire[MF6CTBLSIZ];
static struct mif6 mif6table[MAXMIFS];
-SYSCTL_OPAQUE(_net_inet6_ip6, OID_AUTO, mif6table, CTLFLAG_RD,
- &mif6table, sizeof(mif6table), "S,mif6[MAXMIFS]",
- "IPv6 Multicast Interfaces (struct mif6[MAXMIFS], netinet6/ip6_mroute.h)");
+static int
+sysctl_mif6table(SYSCTL_HANDLER_ARGS)
+{
+ struct mif6_sctl *out;
+ int error;
+
+ out = malloc(sizeof(struct mif6_sctl) * MAXMIFS, M_TEMP, M_WAITOK);
+ for (int i = 0; i < MAXMIFS; i++) {
+ out[i].m6_flags = mif6table[i].m6_flags;
+ out[i].m6_rate_limit = mif6table[i].m6_rate_limit;
+ out[i].m6_lcl_addr = mif6table[i].m6_lcl_addr;
+ if (mif6table[i].m6_ifp != NULL)
+ out[i].m6_ifp = mif6table[i].m6_ifp->if_index;
+ else
+ out[i].m6_ifp = 0;
+ out[i].m6_pkt_in = mif6table[i].m6_pkt_in;
+ out[i].m6_pkt_out = mif6table[i].m6_pkt_out;
+ out[i].m6_bytes_in = mif6table[i].m6_bytes_in;
+ out[i].m6_bytes_out = mif6table[i].m6_bytes_out;
+ }
+ error = SYSCTL_OUT(req, out, sizeof(struct mif6_sctl) * MAXMIFS);
+ free(out, M_TEMP);
+ return (error);
+}
+SYSCTL_PROC(_net_inet6_ip6, OID_AUTO, mif6table, CTLTYPE_OPAQUE | CTLFLAG_RD,
+ NULL, 0, sysctl_mif6table, "S,mif6_sctl[MAXMIFS]",
+ "IPv6 Multicast Interfaces (struct mif6_sctl[MAXMIFS], "
+ "netinet6/ip6_mroute.h)");
static struct mtx mif6_mtx;
#define MIF6_LOCK() mtx_lock(&mif6_mtx)
Modified: projects/ifnet/sys/netinet6/ip6_mroute.h
==============================================================================
--- projects/ifnet/sys/netinet6/ip6_mroute.h Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/netinet6/ip6_mroute.h Mon Apr 6 22:19:51 2015 (r281173)
@@ -194,6 +194,20 @@ struct sioc_mif_req6 {
u_quad_t obytes; /* Output byte count on mif */
};
+/*
+ * Structure to export 'struct mif6' to userland via sysctl.
+ */
+struct mif6_sctl {
+ u_char m6_flags; /* MIFF_ flags defined above */
+ u_int m6_rate_limit; /* max rate */
+ struct in6_addr m6_lcl_addr; /* local interface address */
+ uint32_t m6_ifp; /* interface index */
+ u_quad_t m6_pkt_in; /* # pkts in on interface */
+ u_quad_t m6_pkt_out; /* # pkts out on interface */
+ u_quad_t m6_bytes_in; /* # bytes in on interface */
+ u_quad_t m6_bytes_out; /* # bytes out on interface */
+};
+
#if defined(_KERNEL) || defined(KERNEL)
/*
* The kernel's multicast-interface structure.
Modified: projects/ifnet/sys/netpfil/pf/pf_norm.c
==============================================================================
--- projects/ifnet/sys/netpfil/pf/pf_norm.c Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/netpfil/pf/pf_norm.c Mon Apr 6 22:19:51 2015 (r281173)
@@ -1152,6 +1152,7 @@ pf_refragment6(struct ifnet *ifp, struct
for (t = m; m; m = t) {
t = m->m_nextpkt;
m->m_nextpkt = NULL;
+ m->m_flags |= M_SKIP_FIREWALL;
memset(&pd, 0, sizeof(pd));
pd.pf_mtag = pf_find_mtag(m);
if (error == 0)
Modified: projects/ifnet/sys/powerpc/powerpc/trap.c
==============================================================================
--- projects/ifnet/sys/powerpc/powerpc/trap.c Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/powerpc/powerpc/trap.c Mon Apr 6 22:19:51 2015 (r281173)
@@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$");
#define FAULTBUF_R1 1
#define FAULTBUF_R2 2
#define FAULTBUF_CR 3
-#define FAULTBUF_R13 6
+#define FAULTBUF_R13 4
static void trap_fatal(struct trapframe *frame);
static void printtrap(u_int vector, struct trapframe *frame, int isfatal,
Modified: projects/ifnet/sys/sys/param.h
==============================================================================
--- projects/ifnet/sys/sys/param.h Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/sys/param.h Mon Apr 6 22:19:51 2015 (r281173)
@@ -58,7 +58,7 @@
* in the range 5 to 9.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1100067 /* Master, propagated to newvers */
+#define __FreeBSD_version 1100068 /* Master, propagated to newvers */
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
Modified: projects/ifnet/sys/vm/uma_core.c
==============================================================================
--- projects/ifnet/sys/vm/uma_core.c Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/sys/vm/uma_core.c Mon Apr 6 22:19:51 2015 (r281173)
@@ -1822,7 +1822,7 @@ uma_startup(void *bootmem, int boot_page
#endif
args.name = "UMA Zones";
args.size = sizeof(struct uma_zone) +
- (sizeof(struct uma_cache) * (mp_maxid + 1));
+ (sizeof(struct uma_cache) * (mp_maxid));
args.ctor = zone_ctor;
args.dtor = zone_dtor;
args.uminit = zero_init;
Modified: projects/ifnet/usr.bin/netstat/mroute6.c
==============================================================================
--- projects/ifnet/usr.bin/netstat/mroute6.c Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/usr.bin/netstat/mroute6.c Mon Apr 6 22:19:51 2015 (r281173)
@@ -79,13 +79,11 @@ __FBSDID("$FreeBSD$");
#include <sys/time.h>
#include <net/if.h>
-#include <net/if_var.h>
#include <net/route.h>
#include <netinet/in.h>
#include <err.h>
-#include <nlist.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -98,20 +96,6 @@ __FBSDID("$FreeBSD$");
#include "netstat.h"
-/*
- * kvm(3) bindings for every needed symbol
- */
-static struct nlist mrl[] = {
-#define N_MF6CTABLE 0
- { .n_name = "_mf6ctable" },
-#define N_MIF6TABLE 1
- { .n_name = "_mif6table" },
-#define N_MRT6STAT 2
- { .n_name = "_mrt6stat" },
- { .n_name = NULL },
-};
-
-
#define WID_ORG (Wflag ? 39 : (numeric_addr ? 29 : 18)) /* width of origin column */
#define WID_GRP (Wflag ? 18 : (numeric_addr ? 16 : 18)) /* width of group column */
@@ -119,11 +103,10 @@ void
mroute6pr()
{
struct mf6c *mf6ctable[MF6CTBLSIZ], *mfcp;
- struct mif6 mif6table[MAXMIFS];
+ struct mif6_sctl mif6table[MAXMIFS];
struct mf6c mfc;
struct rtdetq rte, *rtep;
- struct mif6 *mifp;
- u_long mfcaddr, mifaddr;
+ struct mif6_sctl *mifp;
mifi_t mifi;
int i;
int banner_printed;
@@ -132,39 +115,26 @@ mroute6pr()
long int waitings;
size_t len;
- kresolve_list(mrl);
- mfcaddr = mrl[N_MF6CTABLE].n_value;
- mifaddr = mrl[N_MIF6TABLE].n_value;
-
- if (mfcaddr == 0 || mifaddr == 0) {
- fprintf(stderr, "No IPv6 MROUTING kernel support.\n");
+ if (live == 0)
return;
- }
len = sizeof(mif6table);
- if (live) {
- if (sysctlbyname("net.inet6.ip6.mif6table", mif6table, &len,
- NULL, 0) < 0) {
- xo_warn("sysctl: net.inet6.ip6.mif6table");
- return;
- }
- } else
- kread(mifaddr, (char *)mif6table, sizeof(mif6table));
+ if (sysctlbyname("net.inet6.ip6.mif6table", mif6table, &len, NULL, 0) <
+ 0) {
+ xo_warn("sysctl: net.inet6.ip6.mif6table");
+ return;
+ }
saved_numeric_addr = numeric_addr;
numeric_addr = 1;
banner_printed = 0;
for (mifi = 0, mifp = mif6table; mifi < MAXMIFS; ++mifi, ++mifp) {
- struct ifnet ifnet;
char ifname[IFNAMSIZ];
- if (mifp->m6_ifp == NULL)
+ if (mifp->m6_ifp == 0)
continue;
- /* XXX KVM */
- kread((u_long)mifp->m6_ifp, (char *)&ifnet, sizeof(ifnet));
-
maxmif = mifi;
if (!banner_printed) {
xo_open_list("multicast-interface");
@@ -177,7 +147,7 @@ mroute6pr()
xo_emit(" {:mif/%2u} {:rate-limit/%4d}",
mifi, mifp->m6_rate_limit);
xo_emit(" {:ifname/%5s}", (mifp->m6_flags & MIFF_REGISTER) ?
- "reg0" : if_indextoname(ifnet.if_index, ifname));
+ "reg0" : if_indextoname(mifp->m6_ifp, ifname));
xo_emit(" {:received-packets/%9ju} {:sent-packets/%9ju}\n",
(uintmax_t)mifp->m6_pkt_in,
@@ -190,14 +160,11 @@ mroute6pr()
xo_emit("\n{T:IPv6 Multicast Interface Table is empty}\n");
len = sizeof(mf6ctable);
- if (live) {
- if (sysctlbyname("net.inet6.ip6.mf6ctable", mf6ctable, &len,
- NULL, 0) < 0) {
- xo_warn("sysctl: net.inet6.ip6.mf6ctable");
- return;
- }
- } else
- kread(mfcaddr, (char *)mf6ctable, sizeof(mf6ctable));
+ if (sysctlbyname("net.inet6.ip6.mf6ctable", mf6ctable, &len, NULL, 0) <
+ 0) {
+ xo_warn("sysctl: net.inet6.ip6.mf6ctable");
+ return;
+ }
banner_printed = 0;
@@ -262,26 +229,14 @@ void
mrt6_stats()
{
struct mrt6stat mrtstat;
- u_long mstaddr;
size_t len = sizeof mrtstat;
- kresolve_list(mrl);
- mstaddr = mrl[N_MRT6STAT].n_value;
-
- if (mstaddr == 0) {
- fprintf(stderr, "No IPv6 MROUTING kernel support.\n");
+ if (sysctlbyname("net.inet6.ip6.mrt6stat", &mrtstat, &len, NULL, 0) <
+ 0) {
+ xo_warn("sysctl: net.inet6.ip6.mrt6stat");
return;
}
- if (live) {
- if (sysctlbyname("net.inet6.ip6.mrt6stat", &mrtstat, &len,
- NULL, 0) < 0) {
- xo_warn("sysctl: net.inet6.ip6.mrt6stat");
- return;
- }
- } else
- kread(mstaddr, (char *)&mrtstat, sizeof(mrtstat));
-
xo_open_container("multicast-statistics");
xo_emit("{T:IPv6 multicast forwarding}:\n");
Modified: projects/ifnet/usr.bin/netstat/netstat.1
==============================================================================
--- projects/ifnet/usr.bin/netstat/netstat.1 Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/usr.bin/netstat/netstat.1 Mon Apr 6 22:19:51 2015 (r281173)
@@ -28,7 +28,7 @@
.\" @(#)netstat.1 8.8 (Berkeley) 4/18/94
.\" $FreeBSD$
.\"
-.Dd February 21, 2015
+.Dd April 7, 2015
.Dt NETSTAT 1
.Os
.Sh NAME
@@ -92,8 +92,6 @@
.Op Fl -libxo
.Op Fl 46W
.Op Fl f Ar address_family
-.Op Fl M Ar core
-.Op Fl N Ar system
.It Nm Fl gs
.Op Fl -libxo
.Op Fl 46s
Modified: projects/ifnet/usr.sbin/acpi/acpiconf/acpiconf.c
==============================================================================
--- projects/ifnet/usr.sbin/acpi/acpiconf/acpiconf.c Mon Apr 6 22:12:18 2015 (r281172)
+++ projects/ifnet/usr.sbin/acpi/acpiconf/acpiconf.c Mon Apr 6 22:19:51 2015 (r281173)
@@ -136,16 +136,30 @@ acpi_battinfo(int num)
if (ioctl(acpifd, ACPIIO_BATT_GET_BATTINFO, &battio) == -1)
err(EX_IOERR, "get battery user info (%d) failed", num);
if (battio.battinfo.state != ACPI_BATT_STAT_NOT_PRESENT) {
- printf("State:\t\t\t");
- if (battio.battinfo.state == 0)
- printf("high ");
- if (battio.battinfo.state & ACPI_BATT_STAT_CRITICAL)
- printf("critical ");
- if (battio.battinfo.state & ACPI_BATT_STAT_DISCHARG)
- printf("discharging ");
- if (battio.battinfo.state & ACPI_BATT_STAT_CHARGING)
- printf("charging ");
- printf("\n");
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list