Re: svn commit: r323063 - head/sys/boot/efi/boot1
On Tue, Sep 5, 2017 at 9:33 PM, Warner Loshwrote: > On Mon, Sep 4, 2017 at 11:51 PM, Jia-Shiun Li wrote: > >> Seems to cause armv6 crossbuild to fail. >> But did armv6 use efi anyway? >> > > Yea, this is just a command line flag. Will fix. Not sure why x86 doesn't > suffer from this, but it's a wchar_t size difference I'm sure. > amd64 has -fshort-wchar when compiling boot1.c. aarch64 has it too but armv6 doesn't. Looks it's missing from sys/boot/efi/Makefile.inc. from build log, amd64: --- boot1.o --- cc -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/personal/freebsd/fbsdsrc/tmp -B/usr/obj/personal/freebsd/fbsdsrc/tmp/usr/bin -O2 -pipe -DSKEIN_LOOP=111 -I. -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../include -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../include/amd64 -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../../contrib/dev/acpica/include -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../.. -DEFI_UFS_BOOT -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../zfs/ -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../../cddl/boot/zfs/ -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../../crypto/skein -DEFI_ZFS_BOOT -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../common -fPIC -ffreestanding -Wformat -mno-mmx -mno-sse -mno-avx -msoft-float -fshort-wchar -mno-red-zone -mno-aes -g -MD -MF.depend.boot1.o -MTboot1.o -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -c /personal/freebsd/fbsdsrc/sys/boot/efi/boot1/boot1.c -o boot1.o armv6: --- boot1.o --- cc -target armv6-gnueabihf-freebsd12.0 --sysroot=/usr/obj/arm.armv6/personal/freebsd/fbsdsrc/tmp -B/usr/obj/arm.armv6/personal/freebsd/fbsdsrc/tmp/usr/bin -O -pipe -DSKEIN_LOOP=111 -I. -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../include -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../include/arm -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../../contrib/dev/acpica/include -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../.. -DEFI_UFS_BOOT -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../zfs/ -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../../cddl/boot/zfs/ -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../../crypto/skein -DEFI_ZFS_BOOT -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../common -ffreestanding -Wformat -msoft-float -fPIC -g -MD -MF.depend.boot1.o -MTboot1.o -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -mno-movt -mfpu=none -Qunused-arguments -c /personal/freebsd/fbsdsrc/sys/boot/efi/boot1/boot1.c -o boot1.o aarch64: --- boot1.o --- cc -target aarch64-unknown-freebsd12.0 --sysroot=/usr/obj/arm64.aarch64/personal/freebsd/fbsdsrc/tmp -B/usr/obj/arm64.aarch64/personal/freebsd/fbsdsrc/tmp/usr/bin -O2 -pipe -DSKEIN_LOOP=111 -I. -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../include -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../include/arm64 -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../../contrib/dev/acpica/include -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../.. -DEFI_UFS_BOOT -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../zfs/ -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../../cddl/boot/zfs/ -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../../crypto/skein -DEFI_ZFS_BOOT -I/personal/freebsd/fbsdsrc/sys/boot/efi/boot1/../../common -mgeneral-regs-only -ffreestanding -Wformat -fshort-wchar -fPIC -g -MD -MF.depend.boot1.o -MTboot1.o -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -c /personal/freebsd/fbsdsrc/sys/boot/efi/boot1/boot1.c -o boot1.o -Jia-Shiun ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r323206 - in head/sys: cddl/dev/dtrace/mips cddl/dev/fbt/mips mips/conf modules/dtrace modules/dtrace/dtraceall
Author: lidl Date: Wed Sep 6 03:19:52 2017 New Revision: 323206 URL: https://svnweb.freebsd.org/changeset/base/323206 Log: Enable dtrace support for mips64 and the ERL kernel config Turn on the required options in the ERL config file, and ensure that the fbt module is listed as a dependency for mips in the modules/dtrace/dtraceall/dtraceall.c file. PR: 220346 Reviewed by: gnn, markj MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D12227 Modified: head/sys/cddl/dev/dtrace/mips/dtrace_asm.S head/sys/cddl/dev/dtrace/mips/dtrace_subr.c head/sys/cddl/dev/fbt/mips/fbt_isa.c head/sys/mips/conf/ERL head/sys/modules/dtrace/Makefile head/sys/modules/dtrace/dtraceall/Makefile head/sys/modules/dtrace/dtraceall/dtraceall.c Modified: head/sys/cddl/dev/dtrace/mips/dtrace_asm.S == --- head/sys/cddl/dev/dtrace/mips/dtrace_asm.S Wed Sep 6 02:07:44 2017 (r323205) +++ head/sys/cddl/dev/dtrace/mips/dtrace_asm.S Wed Sep 6 03:19:52 2017 (r323206) @@ -37,8 +37,6 @@ #include #include -#include "assym.s" - .setnoreorder # Noreorder is default style! /* Modified: head/sys/cddl/dev/dtrace/mips/dtrace_subr.c == --- head/sys/cddl/dev/dtrace/mips/dtrace_subr.c Wed Sep 6 02:07:44 2017 (r323205) +++ head/sys/cddl/dev/dtrace/mips/dtrace_subr.c Wed Sep 6 03:19:52 2017 (r323206) @@ -50,6 +50,8 @@ extern int (*dtrace_invop_jump_addr)(struct trapframe extern dtrace_id_t dtrace_probeid_error; int dtrace_invop(uintptr_t, struct trapframe *, uintptr_t); +void dtrace_invop_init(void); +void dtrace_invop_uninit(void); typedef struct dtrace_invop_hdlr { int (*dtih_func)(uintptr_t, struct trapframe *, uintptr_t); Modified: head/sys/cddl/dev/fbt/mips/fbt_isa.c == --- head/sys/cddl/dev/fbt/mips/fbt_isa.cWed Sep 6 02:07:44 2017 (r323205) +++ head/sys/cddl/dev/fbt/mips/fbt_isa.cWed Sep 6 03:19:52 2017 (r323206) @@ -82,7 +82,6 @@ fbt_provide_module_function(linker_file_t lf, int symi linker_symval_t *symval, void *opaque) { fbt_probe_t *fbt, *retfbt; - uint32_t *target, *start; uint32_t *instr, *limit; const char *name; char *modname; Modified: head/sys/mips/conf/ERL == --- head/sys/mips/conf/ERL Wed Sep 6 02:07:44 2017(r323205) +++ head/sys/mips/conf/ERL Wed Sep 6 03:19:52 2017(r323206) @@ -86,14 +86,15 @@ options PRINTF_BUFR_SIZE=128# Prevent printf output optionsHWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) optionsAUDIT # Security event auditing optionsMAC # TrustedBSD MAC Framework -#options KDTRACE_FRAME # Ensure frames are compiled in -#options KDTRACE_HOOKS # Kernel DTrace hooks -optionsINCLUDE_CONFIG_FILE # Include this file in kernel +optionsKDTRACE_FRAME # Ensure frames are compiled in +optionsKDTRACE_HOOKS # Kernel DTrace hooks +optionsDDB_CTF # Kernel ELF linker loads CTF data +optionsINCLUDE_CONFIG_FILE # Include this file in kernel optionsTMPFS # Temporary file system # Debugging for use in -current #options KDB # Enable kernel debugger support. -#options DDB # Support DDB. +optionsDDB # Support DDB. #options GDB # Support remote GDB. #options DEADLKRES # Enable the deadlock resolver #options INVARIANTS # Enable calls of extra sanity checking Modified: head/sys/modules/dtrace/Makefile == --- head/sys/modules/dtrace/MakefileWed Sep 6 02:07:44 2017 (r323205) +++ head/sys/modules/dtrace/MakefileWed Sep 6 03:19:52 2017 (r323206) @@ -22,11 +22,14 @@ SUBDIR+=systrace_linux32 .if ${MACHINE_CPUARCH} == "powerpc" SUBDIR+= fbt fasttrap .endif -.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" +.if ${MACHINE_CPUARCH} == "amd64" || \ +${MACHINE_ARCH} == "mips64" || \ +${MACHINE_ARCH} == "powerpc64" SUBDIR+= systrace_freebsd32 .endif .if ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "arm" || \ +${MACHINE_CPUARCH} == "mips" || \ ${MACHINE_CPUARCH} == "riscv" SUBDIR+= fbt .endif Modified: head/sys/modules/dtrace/dtraceall/Makefile == ---
svn commit: r323200 - head
Author: rlibby Date: Wed Sep 6 01:55:40 2017 New Revision: 323200 URL: https://svnweb.freebsd.org/changeset/base/323200 Log: Makefile.inc1: bump elf tool chain version check after PR 215350 fix This causes builds to use the in-tree libdwarf with the bug fix instead of the host library. Reviewed by: bdrewery, emaste, markj Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D12239 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Sep 6 01:38:01 2017(r323199) +++ head/Makefile.inc1 Wed Sep 6 01:55:40 2017(r323200) @@ -1786,7 +1786,8 @@ update: .PHONY # ELF Tool Chain libraries are needed for ELF tools and dtrace tools. # r296685 fix cross-endian objcopy -.if ${BOOTSTRAPPING} < 1100102 +# r310724 fixed PR 215350, a crash in libdwarf with objects built by GCC 6.2. +.if ${BOOTSTRAPPING} < 1200020 _elftoolchain_libs= lib/libelf lib/libdwarf .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r323197 - head/tools/tools/nanobsd/embedded
On Tue, Sep 5, 2017 at 3:17 PM, Nick Hibmawrote: > Author: n_hibma > Date: Tue Sep 5 21:17:20 2017 > New Revision: 323197 > URL: https://svnweb.freebsd.org/changeset/base/323197 > > Log: > Bugfix: Don't treat NANO_IMAGES as a direcotory. > > This was probably accidentally broken in r295377 . > s/probably/definitely/ Pointy Hat to: imp ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r323197 - head/tools/tools/nanobsd/embedded
Author: n_hibma Date: Tue Sep 5 21:17:20 2017 New Revision: 323197 URL: https://svnweb.freebsd.org/changeset/base/323197 Log: Bugfix: Don't treat NANO_IMAGES as a direcotory. This was probably accidentally broken in r295377 . Submitted by: Igor Serikov MFC after:2 weeks Modified: head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/embedded/common == --- head/tools/tools/nanobsd/embedded/commonTue Sep 5 21:00:33 2017 (r323196) +++ head/tools/tools/nanobsd/embedded/commonTue Sep 5 21:17:20 2017 (r323197) @@ -106,8 +106,6 @@ mkdir -p ${NANO_OBJ} NANO_OBJ=$(realpath ${NANO_OBJ}) mkdir -p ${NANO_LOG} NANO_LOG=$(realpath ${NANO_LOG}) -mkdir -p ${NANO_IMAGES} -NANO_IMAGES=$(realpath ${NANO_IMAGES}) mkdir -p ${NANO_WORLDDIR} NANO_WORLDDIR=$(realpath ${NANO_WORLDDIR}) mkdir -p ${NANO_DISKIMGDIR} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r323196 - head/sys/dev/amdsmn
Author: cem Date: Tue Sep 5 21:00:33 2017 New Revision: 323196 URL: https://svnweb.freebsd.org/changeset/base/323196 Log: amdsmn(4): Do not probe not matching hostbridges Similar to r323195, but for amdsmn(4) driver (which borrowed some design). Ignore hostbs that do not match our PCI device id criteria. Sponsored by: Dell EMC Isilon Modified: head/sys/dev/amdsmn/amdsmn.c Modified: head/sys/dev/amdsmn/amdsmn.c == --- head/sys/dev/amdsmn/amdsmn.cTue Sep 5 20:35:25 2017 (r323195) +++ head/sys/dev/amdsmn/amdsmn.cTue Sep 5 21:00:33 2017 (r323196) @@ -90,24 +90,29 @@ static devclass_t amdsmn_devclass; DRIVER_MODULE(amdsmn, hostb, amdsmn_driver, amdsmn_devclass, NULL, NULL); MODULE_VERSION(amdsmn, 1); -static void -amdsmn_identify(driver_t *driver, device_t parent) +static bool +amdsmn_match(device_t parent) { - device_t child; uint32_t devid; size_t i; - /* Make sure we're not being doubly invoked. */ - if (device_find_child(parent, "amdsmn", -1) != NULL) - return; - devid = pci_get_devid(parent); for (i = 0; i < nitems(amdsmn_ids); i++) if (amdsmn_ids[i].device_id == devid) - break; + return (true); + return (false); +} - if (i >= nitems(amdsmn_ids)) +static void +amdsmn_identify(driver_t *driver, device_t parent) +{ + device_t child; + + /* Make sure we're not being doubly invoked. */ + if (device_find_child(parent, "amdsmn", -1) != NULL) return; + if (!amdsmn_match(parent)) + return; child = device_add_child(parent, "amdsmn", -1); if (child == NULL) @@ -120,6 +125,8 @@ amdsmn_probe(device_t dev) uint32_t family; if (resource_disabled("amdsmn", 0)) + return (ENXIO); + if (!amdsmn_match(device_get_parent(dev))) return (ENXIO); family = CPUID_TO_FAMILY(cpu_id); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r323195 - head/sys/dev/amdtemp
Author: cem Date: Tue Sep 5 20:35:25 2017 New Revision: 323195 URL: https://svnweb.freebsd.org/changeset/base/323195 Log: amdtemp(4): Do not probe not matching hostbridges Some systems have hostbs that do not match our PCI device id criteria. Detect and ignore these devices in probe. PR: 218264 Sponsored by: Dell EMC Isilon Modified: head/sys/dev/amdtemp/amdtemp.c Modified: head/sys/dev/amdtemp/amdtemp.c == --- head/sys/dev/amdtemp/amdtemp.c Tue Sep 5 19:40:04 2017 (r323194) +++ head/sys/dev/amdtemp/amdtemp.c Tue Sep 5 20:35:25 2017 (r323195) @@ -207,6 +207,8 @@ amdtemp_probe(device_t dev) if (resource_disabled("amdtemp", 0)) return (ENXIO); + if (!amdtemp_match(device_get_parent(dev))) + return (ENXIO); family = CPUID_TO_FAMILY(cpu_id); model = CPUID_TO_MODEL(cpu_id); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r323194 - head/sys/cddl/compat/opensolaris/sys
Author: asomers Date: Tue Sep 5 19:40:04 2017 New Revision: 323194 URL: https://svnweb.freebsd.org/changeset/base/323194 Log: Fix remounting ZFS filesystem with "zfs mount" "zfs mount -o" passes a list of mount options directly to nmount(2) after sanity checking them. In particular, zfs(8) will refuse to mount an already existing file system unless "remount" is specified in the option list. However, the "remount" option only exists in Illumos. FreeBSD's equivalent is "update". PR: 221985 Reviewed by: avg MFC after:3 weeks Sponsored by: Spectra Logic Corp Differential Revision:https://reviews.freebsd.org/D12233 Modified: head/sys/cddl/compat/opensolaris/sys/mntent.h Modified: head/sys/cddl/compat/opensolaris/sys/mntent.h == --- head/sys/cddl/compat/opensolaris/sys/mntent.h Tue Sep 5 19:28:35 2017(r323193) +++ head/sys/cddl/compat/opensolaris/sys/mntent.h Tue Sep 5 19:40:04 2017(r323194) @@ -46,7 +46,7 @@ #defineMNTOPT_NODEVICES"nodevices" /* Device-special disallowed */ #defineMNTOPT_SETUID "setuid"/* Set uid allowed */ #defineMNTOPT_NOSETUID "nosetuid" /* Set uid not allowed */ -#defineMNTOPT_REMOUNT "remount" /* Change mount options */ +#defineMNTOPT_REMOUNT "update"/* Change mount options */ #defineMNTOPT_ATIME"atime" /* update atime for files */ #defineMNTOPT_NOATIME "noatime" /* do not update atime for files */ #defineMNTOPT_XATTR"xattr" /* enable extended attributes */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r323193 - head/cddl/compat/opensolaris/misc
Author: asomers Date: Tue Sep 5 19:28:35 2017 New Revision: 323193 URL: https://svnweb.freebsd.org/changeset/base/323193 Log: Honor all options of "zfs mount -o" The existing code in zmount incorrectly parses the comma-delimited option string. The result is that nmount only honors the last option. AFAICT the parsing has been broken ever since ZFS's initial import in change 168404. PR: 222078 Reviewed by: avg MFC after:3 weeks Sponsored by: Spectra Logic Corp Differential Revision:https://reviews.freebsd.org/D12232 Modified: head/cddl/compat/opensolaris/misc/zmount.c Modified: head/cddl/compat/opensolaris/misc/zmount.c == --- head/cddl/compat/opensolaris/misc/zmount.c Tue Sep 5 19:04:07 2017 (r323192) +++ head/cddl/compat/opensolaris/misc/zmount.c Tue Sep 5 19:28:35 2017 (r323193) @@ -74,7 +74,7 @@ zmount(const char *spec, const char *dir, int mflag, c char *dataptr, int datalen, char *optptr, int optlen) { struct iovec *iov; - char *optstr, *os, *p; + char *optstr, *os, *p, *tofree; int iovlen, rv; assert(spec != NULL); @@ -87,7 +87,7 @@ zmount(const char *spec, const char *dir, int mflag, c assert(optptr != NULL); assert(optlen > 0); - optstr = strdup(optptr); + tofree = optstr = strdup(optptr); assert(optstr != NULL); iov = NULL; @@ -98,11 +98,9 @@ zmount(const char *spec, const char *dir, int mflag, c build_iovec(, , "fspath", __DECONST(char *, dir), (size_t)-1); build_iovec(, , "from", __DECONST(char *, spec), (size_t)-1); - for (p = optstr; p != NULL; strsep(, ",/ ")) { - if (*p != '\0') - build_iovec(, , p, NULL, (size_t)-1); - } + while ((p = strsep(, ",/")) != NULL) + build_iovec(, , p, NULL, (size_t)-1); rv = nmount(iov, iovlen, 0); - free(optstr); + free(tofree); return (rv); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r323192 - head/contrib/binutils/opcodes
Author: rlibby Date: Tue Sep 5 19:04:07 2017 New Revision: 323192 URL: https://svnweb.freebsd.org/changeset/base/323192 Log: gnu binutils: FSGSBASE assembly/disassembly Enable the in-tree binutils to assemble and disassemble amd64 FSGSBASE instructions (rdfsbase, rdgsbase, wrfsbase, wrgsbase), used in the base system since r322763. This gives one last gasp for in-tree gcc, and provides a small enhancement for in-tree binutils objdump. Reviewed by: dim, kib Approved by: markj (mentor) Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D1 Modified: head/contrib/binutils/opcodes/i386-dis.c head/contrib/binutils/opcodes/i386-opc.h head/contrib/binutils/opcodes/i386-opc.tbl head/contrib/binutils/opcodes/i386-tbl.h Modified: head/contrib/binutils/opcodes/i386-dis.c == --- head/contrib/binutils/opcodes/i386-dis.cTue Sep 5 18:13:11 2017 (r323191) +++ head/contrib/binutils/opcodes/i386-dis.cTue Sep 5 19:04:07 2017 (r323192) @@ -1302,7 +1302,7 @@ static const unsigned char twobyte_uses_REPZ_prefix[25 /* 70 */ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1, /* 7f */ /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */ /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */ - /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */ + /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0, /* af */ /* b0 */ 0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0, /* bf */ /* c0 */ 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */ /* d0 */ 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* df */ @@ -1793,10 +1793,10 @@ static const struct dis386 grps[][8] = { }, /* GRP15 */ { -{ "fxsave",{ Ev } }, -{ "fxrstor", { Ev } }, -{ "ldmxcsr", { Ev } }, -{ "stmxcsr", { Ev } }, +{ "fxsave",{ { OP_0fae, v_mode } } }, +{ "fxrstor", { { OP_0fae, v_mode } } }, +{ "ldmxcsr", { { OP_0fae, v_mode } } }, +{ "stmxcsr", { { OP_0fae, v_mode } } }, { "xsave", { Ev } }, { "xrstor",{ { OP_0fae, v_mode } } }, { "xsaveopt", { { OP_0fae, v_mode } } }, @@ -5997,19 +5997,34 @@ OP_0fae (int bytemode, int sizeflag) { if (modrm.mod == 3) { - if (modrm.reg == 7) - strcpy (obuf + strlen (obuf) - sizeof ("clflush") + 1, "sfence"); - else if (modrm.reg == 6) - strcpy (obuf + strlen (obuf) - sizeof ("xsaveopt") + 1, "mfence"); - else if (modrm.reg == 5) - strcpy (obuf + strlen (obuf) - sizeof ("xrstor") + 1, "lfence"); - - if (modrm.reg < 5 || modrm.rm != 0) + if (modrm.reg >= 5 && modrm.reg <= 7 && modrm.rm == 0) { - BadOp (); /* bad sfence, mfence, or lfence */ + if (modrm.reg == 7) + strcpy (obuf + strlen (obuf) - sizeof ("clflush") + 1, "sfence"); + else if (modrm.reg == 6) + strcpy (obuf + strlen (obuf) - sizeof ("xsaveopt") + 1, "mfence"); + else if (modrm.reg == 5) + strcpy (obuf + strlen (obuf) - sizeof ("xrstor") + 1, "lfence"); + bytemode = 0; + } + else if (modrm.reg <= 3 && (prefixes & PREFIX_REPZ) != 0) + { + if (modrm.reg == 0) + strcpy (obuf + strlen (obuf) - sizeof ("fxsave") + 1, "rdfsbase"); + else if (modrm.reg == 1) + strcpy (obuf + strlen (obuf) - sizeof ("fxrstor") + 1, "rdgsbase"); + else if (modrm.reg == 2) + strcpy (obuf + strlen (obuf) - sizeof ("ldmxcsr") + 1, "wrfsbase"); + else if (modrm.reg == 3) + strcpy (obuf + strlen (obuf) - sizeof ("stmxcsr") + 1, "wrgsbase"); + used_prefixes |= PREFIX_REPZ; + bytemode = dq_mode; + } + else + { + BadOp (); return; } - bytemode = 0; } OP_E (bytemode, sizeflag); Modified: head/contrib/binutils/opcodes/i386-opc.h == --- head/contrib/binutils/opcodes/i386-opc.hTue Sep 5 18:13:11 2017 (r323191) +++ head/contrib/binutils/opcodes/i386-opc.hTue Sep 5 19:04:07 2017 (r323192) @@ -81,6 +81,7 @@ typedef struct template #define CpuPCLMUL 0x1000 /* Carry-less Multiplication extensions */ #define CpuRdRnd0x2000 /* Intel Random Number Generator extensions */ #define CpuSMAP 0x4000 /* Intel Supervisor Mode Access Prevention */ +#define CpuFSGSBase 0x8000 /* Read/write fs/gs segment base registers */ /* SSE4.1/4.2 Instructions required */ #define CpuSSE4 (CpuSSE4_1|CpuSSE4_2) @@ -89,7 +90,8 @@ typedef struct template #define CpuUnknownFlags (Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686 \ |CpuP4|CpuSledgehammer|CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuVMX \ |Cpu3dnow|Cpu3dnowA|CpuK6|CpuPadLock|CpuSVME|CpuSSSE3|CpuSSE4_1 \ -
svn commit: r323185 - in head: share/man/man4 sys/conf sys/dev/amdtemp
Author: cem Date: Tue Sep 5 15:19:14 2017 New Revision: 323185 URL: https://svnweb.freebsd.org/changeset/base/323185 Log: amdtemp(4): Add support for Family 17h temperature sensor The sensor value is formatted similarly to previous models (same bitfield sizes, same units), but must be read off of the internal System Management Network (SMN) from the System Management Unit (SMU) co-processor. PR: 218264 Reported and tested by: Nils Beyer Reviewed by: avg (no +1), mjoras, truckman Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D12217 Modified: head/share/man/man4/amdtemp.4 head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/dev/amdtemp/amdtemp.c Modified: head/share/man/man4/amdtemp.4 == --- head/share/man/man4/amdtemp.4 Tue Sep 5 15:13:41 2017 (r323184) +++ head/share/man/man4/amdtemp.4 Tue Sep 5 15:19:14 2017 (r323185) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 31, 2017 +.Dd September 5, 2017 .Dt AMDTEMP 4 .Os .Sh NAME @@ -53,7 +53,7 @@ The driver provides support for the on-die digital thermal sensor present in .Tn AMD -Family 0Fh, 10h, 11h, 12h, 14h, 15h, and 16h processors. +Family 0Fh, 10h, 11h, 12h, 14h, 15h, 16h, and 17h processors. .Pp For Family 0Fh processors, the .Nm @@ -64,8 +64,8 @@ The driver also creates in the corresponding CPU device's sysctl tree, displaying the maximum temperature of the two sensors located in each CPU core. .Pp -For Family 10h, 11h, 12h, 14h, 15h, and 16h processors, the driver reports each -package's temperature through a sysctl node, named +For Family 10h, 11h, 12h, 14h, 15h, 16h, and 17h processors, the driver reports +each package's temperature through a sysctl node, named .Va dev.amdtemp.%d.core0.sensor0 . The driver also creates .Va dev.cpu.%d.temperature Modified: head/sys/conf/files.amd64 == --- head/sys/conf/files.amd64 Tue Sep 5 15:13:41 2017(r323184) +++ head/sys/conf/files.amd64 Tue Sep 5 15:19:14 2017(r323185) @@ -198,7 +198,7 @@ dev/agp/agp_amd64.c optionalagp dev/agp/agp_i810.c optionalagp dev/agp/agp_via.c optionalagp dev/amdsbwd/amdsbwd.c optionalamdsbwd -dev/amdsmn/amdsmn.coptionalamdsmn +dev/amdsmn/amdsmn.coptionalamdsmn | amdtemp dev/amdtemp/amdtemp.c optionalamdtemp dev/arcmsr/arcmsr.coptionalarcmsr pci dev/asmc/asmc.coptionalasmc isa Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Tue Sep 5 15:13:41 2017(r323184) +++ head/sys/conf/files.i386Tue Sep 5 15:19:14 2017(r323185) @@ -152,7 +152,7 @@ dev/agp/agp_sis.c optional agp dev/agp/agp_via.c optional agp dev/aic/aic_isa.c optional aic isa dev/amdsbwd/amdsbwd.c optional amdsbwd -dev/amdsmn/amdsmn.coptional amdsmn +dev/amdsmn/amdsmn.coptional amdsmn | amdtemp dev/amdtemp/amdtemp.c optional amdtemp dev/arcmsr/arcmsr.coptional arcmsr pci dev/asmc/asmc.coptional asmc isa Modified: head/sys/dev/amdtemp/amdtemp.c == --- head/sys/dev/amdtemp/amdtemp.c Tue Sep 5 15:13:41 2017 (r323184) +++ head/sys/dev/amdtemp/amdtemp.c Tue Sep 5 15:19:14 2017 (r323185) @@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + typedef enum { CORE0_SENSOR0, CORE0_SENSOR1, @@ -59,7 +61,6 @@ typedef enum { } amdsensor_t; struct amdtemp_softc { - device_tsc_dev; int sc_ncores; int sc_ntemps; int sc_flags; @@ -70,6 +71,7 @@ struct amdtemp_softc { int32_t (*sc_gettemp)(device_t, amdsensor_t); struct sysctl_oid *sc_sysctl_cpu[MAXCPU]; struct intr_config_hook sc_ich; + device_tsc_smn; }; #defineVENDORID_AMD0x1022 @@ -82,6 +84,7 @@ struct amdtemp_softc { #defineDEVICEID_AMD_MISC16 0x1533 #defineDEVICEID_AMD_MISC16_M30H0x1583 #defineDEVICEID_AMD_MISC17 0x141d +#defineDEVICEID_AMD_HOSTB17H 0x1450 static struct amdtemp_product { uint16_tamdtemp_vendorid; @@ -96,6 +99,7 @@ static struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_MISC16 }, { VENDORID_AMD, DEVICEID_AMD_MISC16_M30H }, { VENDORID_AMD, DEVICEID_AMD_MISC17 }, + { VENDORID_AMD, DEVICEID_AMD_HOSTB17H }, { 0, 0 } }; @@ -105,6
svn commit: r323184 - in head: share/man/man4 sys/amd64/conf sys/boot/forth sys/conf sys/dev/amdsmn sys/modules sys/modules/amdsmn
Author: cem Date: Tue Sep 5 15:13:41 2017 New Revision: 323184 URL: https://svnweb.freebsd.org/changeset/base/323184 Log: Add smn(4) driver for AMD System Management Network AMD Family 17h CPUs have an internal network used to communicate between the host CPU and the PSP and SMU coprocessors. It exposes a simple 32-bit register space. Reviewed by: avg (no +1), mjoras, truckman Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D12217 Added: head/share/man/man4/amdsmn.4 (contents, props changed) head/sys/dev/amdsmn/ head/sys/dev/amdsmn/amdsmn.c (contents, props changed) head/sys/dev/amdsmn/amdsmn.h (contents, props changed) head/sys/modules/amdsmn/ head/sys/modules/amdsmn/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/amd64/conf/NOTES head/sys/boot/forth/loader.conf head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/modules/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileTue Sep 5 14:32:56 2017 (r323183) +++ head/share/man/man4/MakefileTue Sep 5 15:13:41 2017 (r323184) @@ -46,6 +46,7 @@ MAN= aac.4 \ amdpm.4 \ ${_amdsbwd.4} \ ${_amdsmb.4} \ + ${_amdsmn.4} \ ${_amdtemp.4} \ ${_bxe.4} \ amr.4 \ @@ -769,6 +770,7 @@ _attimer.4= attimer.4 _aibs.4= aibs.4 _amdsbwd.4=amdsbwd.4 _amdsmb.4= amdsmb.4 +_amdsmn.4= amdsmn.4 _amdtemp.4=amdtemp.4 _asmc.4= asmc.4 _bxe.4=bxe.4 Added: head/share/man/man4/amdsmn.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/amdsmn.4Tue Sep 5 15:13:41 2017 (r323184) @@ -0,0 +1,64 @@ +.\"- +.\" Copyright (c) 2017 Conrad Meyer+.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd September 5, 2017 +.Dt AMDSMN 4 +.Os +.Sh NAME +.Nm amdsmn +.Nd device driver for +.Tn AMD +processor System Management Network +.Sh SYNOPSIS +To compile this driver into the kernel, place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device amdsmn" +.Ed +.Pp +Alternatively, to load the driver as a module at boot time, place the +following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +amdsmn_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for resources on the System Management Network bus +in +.Tn AMD +Family 17h processors. +.Sh SEE ALSO +.Xr loader 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 12.0 . +.Sh AUTHORS +.An Conrad Meyer Aq Mt c...@freebsd.org Modified: head/sys/amd64/conf/NOTES == --- head/sys/amd64/conf/NOTES Tue Sep 5 14:32:56 2017(r323183) +++ head/sys/amd64/conf/NOTES Tue Sep 5 15:13:41 2017(r323184) @@ -589,6 +589,11 @@ device cpuctl optionsENABLE_ALART# Control alarm on Intel intpm driver # +# AMD System Management Network (SMN) +# +device amdsmn + +# # Number of initial kernel page table pages used for early bootstrap. # This number should include enough pages to map the kernel and any # modules or other data loaded with the kernel by the loader. Each Modified: head/sys/boot/forth/loader.conf == --- head/sys/boot/forth/loader.conf Tue Sep 5
svn commit: r323183 - head/sys/kern
Author: trasz Date: Tue Sep 5 14:32:56 2017 New Revision: 323183 URL: https://svnweb.freebsd.org/changeset/base/323183 Log: Make root_mount_rel(9) ignore NULL arguments, like it used to before r313351. It would be better to fix API consumers to not pass NULL there - most of them, such as gmirror, already contain the neccessary checks - but this is easier and much less error-prone. One known user-visible result is that it fixes panic on a failed "graid label". PR: 221846 MFC after:2 weeks Sponsored by: DARPA, AFRL Modified: head/sys/kern/vfs_mountroot.c Modified: head/sys/kern/vfs_mountroot.c == --- head/sys/kern/vfs_mountroot.c Tue Sep 5 13:55:14 2017 (r323182) +++ head/sys/kern/vfs_mountroot.c Tue Sep 5 14:32:56 2017 (r323183) @@ -183,7 +183,8 @@ void root_mount_rel(struct root_hold_token *h) { - KASSERT(h != NULL, ("%s: NULL token", __func__)); + if (h == NULL) + return; mtx_lock(_holds_mtx); LIST_REMOVE(h, list); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r323063 - head/sys/boot/efi/boot1
On Mon, Sep 4, 2017 at 11:51 PM, Jia-Shiun Liwrote: > Seems to cause armv6 crossbuild to fail. > But did armv6 use efi anyway? > > > jsli@jsli-e5:/tmp/src # uname -a > FreeBSD jsli-e5 12.0-CURRENT FreeBSD 12.0-CURRENT #59 r323150: Mon Sep 4 > 11:30:09 CST 2017 jsli@jsli-e5:/usr/obj/usr/src/sys/GENERIC-NODEBUG > amd64 > jsli@jsli-e5:/tmp/src # svnversion > 323170 > jsli@jsli-e5:/tmp/src # time nice +20 env MAKEOBJDIRPREFIX=/tmp/obj make > -sj12 TARGET_ARCH=armv6 KERNCONF=RPI2 -DNO_CLEAN buildworld buildkernel > ... > ... > ... > /tmp/src/sys/boot/efi/boot1/boot1.c:474:32: error: format specifies type > 'wchar_t *' (aka 'unsigned int *') but the argume > nt has type 'CHAR16 *' (aka 'unsigned short *') [-Werror,-Wformat] > printf(" Load Path: %S\n", text); > ~~ ^~~~ > /tmp/src/sys/boot/efi/boot1/boot1.c:485:35: error: format specifies type > 'wchar_t *' (aka 'unsigned int *') but the argume > nt has type 'CHAR16 *' (aka 'unsigned short *') [-Werror,-Wformat] > printf(" Load Device: %S\n", text); > ~~ ^~~~ > Yea, this is just a command line flag. Will fix. Not sure why x86 doesn't suffer from this, but it's a wchar_t size difference I'm sure. Warner > On Fri, Sep 1, 2017 at 1:32 AM, Warner Losh wrote: > >> Author: imp >> Date: Thu Aug 31 17:32:14 2017 >> New Revision: 323063 >> URL: https://svnweb.freebsd.org/changeset/base/323063 >> >> Log: >> boot1.efi: print more info about where boot1.efi is loaded from >> >> Print the device that boot1.efi was loaded from. Print the path as >> well (since it isn't included in DeviceHandle). Move block where we do >> this earlier so all the block handle code is now together. >> >> Sponsored by: Netflix >> >> Modified: >> head/sys/boot/efi/boot1/boot1.c >> >> Modified: head/sys/boot/efi/boot1/boot1.c >> >> == >> --- head/sys/boot/efi/boot1/boot1.c Thu Aug 31 17:32:09 2017 >> (r323062) >> +++ head/sys/boot/efi/boot1/boot1.c Thu Aug 31 17:32:14 2017 >> (r323063) >> @@ -344,6 +344,7 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) >> EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl = NULL; >> SIMPLE_TEXT_OUTPUT_INTERFACE *conout = NULL; >> UINTN i, max_dim, best_mode, cols, rows, hsize, nhandles; >> + CHAR16 *text; >> >> /* Basic initialization*/ >> ST = Xsystab; >> @@ -387,6 +388,27 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE >> *Xsystab) >> } >> putchar('\n'); >> >> + /* Determine the devpath of our image so we can prefer it. */ >> + status = BS->HandleProtocol(IH, , (VOID**)); >> + imgpath = NULL; >> + if (status == EFI_SUCCESS) { >> + text = efi_devpath_name(img->FilePath); >> + printf(" Load Path: %S\n", text); >> + efi_free_devpath_name(text); >> + >> + status = BS->HandleProtocol(img->DeviceHandle, >> , >> + (void **)); >> + if (status != EFI_SUCCESS) { >> + DPRINTF("Failed to get image DevicePath (%lu)\n", >> + EFI_ERROR_CODE(status)); >> + } else { >> + text = efi_devpath_name(imgpath); >> + printf(" Load Device: %S\n", text); >> + efi_free_devpath_name(text); >> + } >> + >> + } >> + >> /* Get all the device handles */ >> hsize = (UINTN)NUM_HANDLES_INIT * sizeof(EFI_HANDLE); >> if ((status = BS->AllocatePool(EfiLoaderData, hsize, (void >> **))) >> @@ -421,24 +443,6 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE >> *Xsystab) >> nhandles = hsize / sizeof(*handles); >> printf(" Probing %zu block devices...", nhandles); >> DPRINTF("\n"); >> - >> - /* Determine the devpath of our image so we can prefer it. */ >> - status = BS->HandleProtocol(IH, , (VOID**)); >> - imgpath = NULL; >> - if (status == EFI_SUCCESS) { >> - status = BS->HandleProtocol(img->DeviceHandle, >> , >> - (void **)); >> - if (status != EFI_SUCCESS) >> - DPRINTF("Failed to get image DevicePath (%lu)\n", >> - EFI_ERROR_CODE(status)); >> -#ifdef EFI_DEBUG >> - { >> - CHAR16 *text = efi_devpath_name(imgpath); >> - DPRINTF("boot1 imagepath: %S\n", text); >> - efi_free_devpath_name(text); >> - } >> -#endif >> - } >> >> for (i = 0; i < nhandles; i++) >> probe_handle_status(handles[i], imgpath); >> ___ >> svn-src-head@freebsd.org mailing list >>
svn commit: r323178 - in head/release: amd64 i386 powerpc
Author: emaste Date: Tue Sep 5 12:57:45 2017 New Revision: 323178 URL: https://svnweb.freebsd.org/changeset/base/323178 Log: make-memstick.sh: use 'set -e' to abort if any step fails Also remove the now-redundant error handling that was only for makefs. This change applies arm64's r308171 to the other make-memstick.sh versions. Reviewed by: gjb MFC after:1 week Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D12195 Modified: head/release/amd64/make-memstick.sh head/release/i386/make-memstick.sh head/release/powerpc/make-memstick.sh Modified: head/release/amd64/make-memstick.sh == --- head/release/amd64/make-memstick.sh Tue Sep 5 07:46:45 2017 (r323177) +++ head/release/amd64/make-memstick.sh Tue Sep 5 12:57:45 2017 (r323178) @@ -10,6 +10,8 @@ # $FreeBSD$ # +set -e + PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH @@ -31,10 +33,6 @@ fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local makefs -B little -o label=FreeBSD_Install ${2}.part ${1} -if [ $? -ne 0 ]; then - echo "makefs failed" - exit 1 -fi rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local Modified: head/release/i386/make-memstick.sh == --- head/release/i386/make-memstick.sh Tue Sep 5 07:46:45 2017 (r323177) +++ head/release/i386/make-memstick.sh Tue Sep 5 12:57:45 2017 (r323178) @@ -10,6 +10,8 @@ # $FreeBSD$ # +set -e + PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH @@ -31,10 +33,6 @@ fi echo '/dev/ufs/FreeBSD_Install / ufs ro,noatime 1 1' > ${1}/etc/fstab echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local makefs -B little -o label=FreeBSD_Install ${2}.part ${1} -if [ $? -ne 0 ]; then - echo "makefs failed" - exit 1 -fi rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local Modified: head/release/powerpc/make-memstick.sh == --- head/release/powerpc/make-memstick.sh Tue Sep 5 07:46:45 2017 (r323177) +++ head/release/powerpc/make-memstick.sh Tue Sep 5 12:57:45 2017 (r323178) @@ -10,6 +10,8 @@ # $FreeBSD$ # +set -e + PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH @@ -36,10 +38,6 @@ echo '/dev/da0s3 / ufs ro,noatime 1 1' > ${1}/etc/fsta echo 'root_rw_mount="NO"' > ${1}/etc/rc.conf.local rm -f ${tempfile} makefs -B big ${tempfile} ${1} -if [ $? -ne 0 ]; then - echo "makefs failed" - exit 1 -fi rm ${1}/etc/fstab rm ${1}/etc/rc.conf.local ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r323177 - in head: sys/compat/cloudabi sys/contrib/cloudabi usr.bin/truss
Author: ed Date: Tue Sep 5 07:46:45 2017 New Revision: 323177 URL: https://svnweb.freebsd.org/changeset/base/323177 Log: Merge pipes and socket pairs. Now that CloudABI's sockets API has been changed to be addressless and only connected socket instances are used (e.g., socket pairs), they have become fairly similar to pipes. The only differences on CloudABI is that socket pairs additionally support shutdown(), send() and recv(). To simplify the ABI, we've therefore decided to remove pipes as a separate file descriptor type and just let pipe() return a socket pair of type SOCK_STREAM. S_ISFIFO() and S_ISSOCK() are now defined identically. Modified: head/sys/compat/cloudabi/cloudabi_fd.c head/sys/compat/cloudabi/cloudabi_file.c head/sys/contrib/cloudabi/cloudabi_types_common.h head/usr.bin/truss/syscalls.c Modified: head/sys/compat/cloudabi/cloudabi_fd.c == --- head/sys/compat/cloudabi/cloudabi_fd.c Tue Sep 5 06:20:02 2017 (r323176) +++ head/sys/compat/cloudabi/cloudabi_fd.c Tue Sep 5 07:46:45 2017 (r323177) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); MAPPING(CLOUDABI_RIGHT_FILE_ALLOCATE, CAP_WRITE)\ MAPPING(CLOUDABI_RIGHT_FILE_CREATE_DIRECTORY, CAP_MKDIRAT) \ MAPPING(CLOUDABI_RIGHT_FILE_CREATE_FILE, CAP_CREATE)\ - MAPPING(CLOUDABI_RIGHT_FILE_CREATE_FIFO, CAP_MKFIFOAT) \ MAPPING(CLOUDABI_RIGHT_FILE_LINK_SOURCE, CAP_LINKAT_SOURCE) \ MAPPING(CLOUDABI_RIGHT_FILE_LINK_TARGET, CAP_LINKAT_TARGET) \ MAPPING(CLOUDABI_RIGHT_FILE_OPEN, CAP_LOOKUP) \ @@ -110,34 +109,21 @@ int cloudabi_sys_fd_create2(struct thread *td, struct cloudabi_sys_fd_create2_args *uap) { - struct filecaps fcaps1 = {}, fcaps2 = {}; int fds[2]; - int error; + int error, type; switch (uap->type) { - case CLOUDABI_FILETYPE_FIFO: - /* -* CloudABI pipes are unidirectional. Restrict rights on -* the pipe to simulate this. -*/ - cap_rights_init(_rights, CAP_EVENT, CAP_FCNTL, - CAP_FSTAT, CAP_READ); - fcaps1.fc_fcntls = CAP_FCNTL_SETFL; - cap_rights_init(_rights, CAP_EVENT, CAP_FCNTL, - CAP_FSTAT, CAP_WRITE); - fcaps2.fc_fcntls = CAP_FCNTL_SETFL; - error = kern_pipe(td, fds, 0, , ); - break; case CLOUDABI_FILETYPE_SOCKET_DGRAM: - error = kern_socketpair(td, AF_UNIX, SOCK_DGRAM, 0, fds); + type = SOCK_DGRAM; break; case CLOUDABI_FILETYPE_SOCKET_STREAM: - error = kern_socketpair(td, AF_UNIX, SOCK_STREAM, 0, fds); + type = SOCK_STREAM; break; default: return (EINVAL); } + error = kern_socketpair(td, AF_UNIX, type, 0, fds); if (error == 0) { td->td_retval[0] = fds[0]; td->td_retval[1] = fds[1]; @@ -214,11 +200,11 @@ cloudabi_convert_filetype(const struct file *fp) switch (fp->f_type) { case DTYPE_FIFO: - return (CLOUDABI_FILETYPE_FIFO); + return (CLOUDABI_FILETYPE_SOCKET_STREAM); case DTYPE_KQUEUE: return (CLOUDABI_FILETYPE_POLL); case DTYPE_PIPE: - return (CLOUDABI_FILETYPE_FIFO); + return (CLOUDABI_FILETYPE_SOCKET_STREAM); case DTYPE_PROCDESC: return (CLOUDABI_FILETYPE_PROCESS); case DTYPE_SHM: @@ -243,7 +229,7 @@ cloudabi_convert_filetype(const struct file *fp) case VDIR: return (CLOUDABI_FILETYPE_DIRECTORY); case VFIFO: - return (CLOUDABI_FILETYPE_FIFO); + return (CLOUDABI_FILETYPE_SOCKET_STREAM); case VLNK: return (CLOUDABI_FILETYPE_SYMBOLIC_LINK); case VREG: @@ -286,7 +272,6 @@ cloudabi_remove_conflicting_rights(cloudabi_filetype_t CLOUDABI_RIGHT_FD_SYNC | CLOUDABI_RIGHT_FILE_ADVISE | CLOUDABI_RIGHT_FILE_CREATE_DIRECTORY | CLOUDABI_RIGHT_FILE_CREATE_FILE | - CLOUDABI_RIGHT_FILE_CREATE_FIFO | CLOUDABI_RIGHT_FILE_LINK_SOURCE | CLOUDABI_RIGHT_FILE_LINK_TARGET | CLOUDABI_RIGHT_FILE_OPEN | @@ -312,7 +297,6 @@ cloudabi_remove_conflicting_rights(cloudabi_filetype_t CLOUDABI_RIGHT_FILE_ALLOCATE | CLOUDABI_RIGHT_FILE_CREATE_DIRECTORY | CLOUDABI_RIGHT_FILE_CREATE_FILE | - CLOUDABI_RIGHT_FILE_CREATE_FIFO | CLOUDABI_RIGHT_FILE_LINK_SOURCE |
svn commit: r323176 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Tue Sep 5 06:20:02 2017 New Revision: 323176 URL: https://svnweb.freebsd.org/changeset/base/323176 Log: hyperv/hn: Log RSS capabilities mask. This helps to detect when UDP hash types can be supported. MFC after:3 days Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D12177 Modified: head/sys/dev/hyperv/netvsc/hn_rndis.c Modified: head/sys/dev/hyperv/netvsc/hn_rndis.c == --- head/sys/dev/hyperv/netvsc/hn_rndis.c Tue Sep 5 06:05:48 2017 (r323175) +++ head/sys/dev/hyperv/netvsc/hn_rndis.c Tue Sep 5 06:20:02 2017 (r323176) @@ -497,6 +497,8 @@ hn_rndis_query_rsscaps(struct hn_softc *sc, int *rxr_c caps.ndis_caps); return (EOPNOTSUPP); } + if (bootverbose) + if_printf(sc->hn_ifp, "RSS caps %#x\n", caps.ndis_caps); /* Commit! */ sc->hn_rss_ind_size = indsz; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r323175 - head/sys/dev/hyperv/netvsc
Author: sephe Date: Tue Sep 5 06:05:48 2017 New Revision: 323175 URL: https://svnweb.freebsd.org/changeset/base/323175 Log: hyperv/hn: Implement SIOCGIFRSS{KEY,HASH}. The conditional compiling in the review request is removed, since these IOCTLs will be available in stable/10 and stable/11. Reviewed by: gallatin MFC after:1 week Sponsored by: Microsoft Differential Revision:https://reviews.freebsd.org/D12175 Modified: head/sys/dev/hyperv/netvsc/if_hn.c Modified: head/sys/dev/hyperv/netvsc/if_hn.c == --- head/sys/dev/hyperv/netvsc/if_hn.c Tue Sep 5 05:53:43 2017 (r323174) +++ head/sys/dev/hyperv/netvsc/if_hn.c Tue Sep 5 06:05:48 2017 (r323175) @@ -3316,6 +3316,8 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) struct ifreq *ifr = (struct ifreq *)data, ifr_vf; struct ifnet *vf_ifp; int mask, error = 0; + struct ifrsskey *ifrk; + struct ifrsshash *ifrh; switch (cmd) { case SIOCSIFMTU: @@ -3571,6 +3573,56 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } HN_UNLOCK(sc); error = ifmedia_ioctl(ifp, ifr, >hn_media, cmd); + break; + + case SIOCGIFRSSHASH: + ifrh = (struct ifrsshash *)data; + HN_LOCK(sc); + if (sc->hn_rx_ring_inuse == 1) { + HN_UNLOCK(sc); + ifrh->ifrh_func = RSS_FUNC_NONE; + ifrh->ifrh_types = 0; + break; + } + + if (sc->hn_rss_hash & NDIS_HASH_FUNCTION_TOEPLITZ) + ifrh->ifrh_func = RSS_FUNC_TOEPLITZ; + else + ifrh->ifrh_func = RSS_FUNC_PRIVATE; + + ifrh->ifrh_types = 0; + if (sc->hn_rss_hash & NDIS_HASH_IPV4) + ifrh->ifrh_types |= RSS_TYPE_IPV4; + if (sc->hn_rss_hash & NDIS_HASH_TCP_IPV4) + ifrh->ifrh_types |= RSS_TYPE_TCP_IPV4; + if (sc->hn_rss_hash & NDIS_HASH_IPV6) + ifrh->ifrh_types |= RSS_TYPE_IPV6; + if (sc->hn_rss_hash & NDIS_HASH_IPV6_EX) + ifrh->ifrh_types |= RSS_TYPE_IPV6_EX; + if (sc->hn_rss_hash & NDIS_HASH_TCP_IPV6) + ifrh->ifrh_types |= RSS_TYPE_TCP_IPV6; + if (sc->hn_rss_hash & NDIS_HASH_TCP_IPV6_EX) + ifrh->ifrh_types |= RSS_TYPE_TCP_IPV6_EX; + HN_UNLOCK(sc); + break; + + case SIOCGIFRSSKEY: + ifrk = (struct ifrsskey *)data; + HN_LOCK(sc); + if (sc->hn_rx_ring_inuse == 1) { + HN_UNLOCK(sc); + ifrk->ifrk_func = RSS_FUNC_NONE; + ifrk->ifrk_keylen = 0; + break; + } + if (sc->hn_rss_hash & NDIS_HASH_FUNCTION_TOEPLITZ) + ifrk->ifrk_func = RSS_FUNC_TOEPLITZ; + else + ifrk->ifrk_func = RSS_FUNC_PRIVATE; + ifrk->ifrk_keylen = NDIS_HASH_KEYSIZE_TOEPLITZ; + memcpy(ifrk->ifrk_key, sc->hn_rss.rss_key, + NDIS_HASH_KEYSIZE_TOEPLITZ); + HN_UNLOCK(sc); break; default: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"