aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Bring in EDK2 routines for printing and parsing device paths.Warner Losh2017-03-0912-2/+7672
| | | | | | | | | | | | | | | | | | | This commit implements the (mostly?) Linux compatible efidp_format_device_path and efidp_parse_device_path APIs. These are the only APIs exposed through this library. However, they are built on code from Tianocore's EDK2 MdePkg. They are brought in as new files here for reasons described in FreeBSD-update. Symbol versioning will be introduced to control what's exported from the EDK2 code. Some structural changes may be necessary when we move to sharing with sys/boot/efi. Sponsored by: Netflix Notes: svn path=/head/; revision=314926
* Share UCS2/UTF8 routines between boot loader and userland.Warner Losh2017-03-094-17/+20
| | | | | | | | | | Move the UCS2 to UTF8 routines over into sys/boot/efi and have libefivar grab them from there. Sponsored by: Netflix Notes: svn path=/head/; revision=314925
* sbin/devfs: clarify usageEnji Cooper2017-03-081-1/+3
| | | | | | | | | | | | | | | | | - Note existence of -m option. - Note that -s applies to rule keyword, only, by adding usage text specifically for the `rule` and `ruleset` keywords. Don't go into any further detail in usage(..) -- it's best that one reads the manpage to get a better idea of how things work as there are a number of different option-specific keywords and arguments, as well as some rule grammar. MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314924
* iwn: add promiscuous mode support.Andriy Voskoboinyk2017-03-083-22/+155
| | | | | | | Tested with Intel 6205, STA / MONITOR modes. Notes: svn path=/head/; revision=314923
* Fix compilation warning for powerpc64 by not using const keyword inHans Petter Selasky2017-03-081-2/+2
| | | | | | | | | | | | | return types: Type qualifiers ignored on function return type [-Wreturn-type] Reported by: andreast @ MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=314920
* Update the comment for the Wacom WACF00e to make it clear it's not anIan Lepore2017-03-081-2/+2
| | | | | | | | | accidental duplicate of WACF004. PR: 217306 Notes: svn path=/head/; revision=314919
* Add the pnp id for a Wacom 'WACF00e' tablet.Ian Lepore2017-03-082-0/+2
| | | | | | | | PR: 217306 Submitted by: large.hadron.collider@gmx.com Notes: svn path=/head/; revision=314918
* Handle fifo size differences between older and newer revs of pl011 hardware.Ian Lepore2017-03-081-10/+39
| | | | | | | | | | | | | | | | | | Starting with rev 5 (which is inexplicably indicated by a version number of '3' in the Peripheral ID register), the pl011 doubled the size of the rx and tx fifos, to 32 bytes, so read the ID register and set the size variables in the softc accordingly. An interesting wrinkle in this otherwise-simple concept is that the bcm2835 SoC, used in Raspberry Pi systems among others, has the rev 5 pl011 hardware, but somehow also has the older 16-byte fifos. We check the FDT data to see if the hardware is part of a bcm283x system and use the smaller size if so. Thanks to jchandra@ for pointing out that newer hardware has bigger fifos. Notes: svn path=/head/; revision=314917
* Fix permissions on /tmp when installing the runtime package.Glen Barber2017-03-081-0/+1
| | | | | | | | | | | Reported by: many Patch by: Kyle Evans PR: 217574 MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=314916
* Use the buildworld includes and defaults when building pkt-gen. This willSean Bruno2017-03-081-1/+0
| | | | | | | | | | | | | mean that you need a world built to reliably build pkg-gen but this keeps the build from failing when your source doesn't match your host running version, e.g. building 12 on 11. Submitted by: Matt Macy <mmacy@nextbsd.org> MFC after: 2 weeks Sponsored by: Limelight Networks Notes: svn path=/head/; revision=314915
* Release all previously allocated resources.Michal Meloun2017-03-081-2/+7
| | | | Notes: svn path=/head/; revision=314914
* MFV r314911: 7867 ARC space accounting leakAndriy Gapon2017-03-081-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@6de76ce2a90f54fecb0dba46dca08c99cef7aa08 https://github.com/illumos/illumos-gate/commit/6de76ce2a90f54fecb0dba46dca08c99cef7aa08 https://www.illumos.org/issues/7867 It seems that in the case where arc_hdr_free_pdata() sees HDR_L2_WRITING() we would fail to update the ARC space statistics. In the normal case those statistics are updated in arc_free_data_buf(). But in the arc_hdr_free_on_write() path we don't do that. Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com> Author: Andriy Gapon <avg@FreeBSD.org> MFC after: 10 days Notes: svn path=/head/; revision=314913
| * 7867 ARC space accounting leakAndriy Gapon2017-03-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@6de76ce2a90f54fecb0dba46dca08c99cef7aa08 https://github.com/illumos/illumos-gate/commit/6de76ce2a90f54fecb0dba46dca08c99cef7aa08 https://www.illumos.org/issues/7867 It seems that in the case where arc_hdr_free_pdata() sees HDR_L2_WRITING() we would fail to update the ARC space statistics. In the normal case those statistics are updated in arc_free_data_buf(). But in the arc_hdr_free_on_write() path we don't do that. Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com> Author: Andriy Gapon <avg@FreeBSD.org> Notes: svn path=/vendor-sys/illumos/dist/; revision=314911
* | MFV r314910: 7843 get_clones_stat() is suboptimal for lots of clonesAndriy Gapon2017-03-081-1/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@c5bde7273ef861a8dc54cfb9abe48d56062177da https://github.com/illumos/illumos-gate/commit/c5bde7273ef861a8dc54cfb9abe48d56062177da https://www.illumos.org/issues/7843 get_clones_stat() could be very slow if a snapshot has many (thousands) clones. Clone names are added to an nvlist that's created with NV_UNIQUE_NAME. So, each time a new name is appended to the list, the whole list is searched linearly to see if that name is not already in the list. That results in the quadratic complexity. That should be easy to fix as we know in advance that we should not get any duplicate names, so we can drop NV_UNIQUE_NAME when creating the list. Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com> Author: Andriy Gapon <avg@FreeBSD.org> MFC after: 1 week Sponsored by: ClusterHQ Notes: svn path=/head/; revision=314912
| * 7843 get_clones_stat() is suboptimal for lots of clonesAndriy Gapon2017-03-081-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@c5bde7273ef861a8dc54cfb9abe48d56062177da https://github.com/illumos/illumos-gate/commit/c5bde7273ef861a8dc54cfb9abe48d56062177da https://www.illumos.org/issues/7843 get_clones_stat() could be very slow if a snapshot has many (thousands) clones. Clone names are added to an nvlist that's created with NV_UNIQUE_NAME. So, each time a new name is appended to the list, the whole list is searched linearly to see if that name is not already in the list. That results in the quadratic complexity. That should be easy to fix as we know in advance that we should not get any duplicate names, so we can drop NV_UNIQUE_NAME when creating the list. Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com> Author: Andriy Gapon <avg@FreeBSD.org> Notes: svn path=/vendor-sys/illumos/dist/; revision=314910
* | When chunking large DIOCGDELETE, do it on stripe edge.Alexander Motin2017-03-081-1/+8
| | | | | | | | | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=314908
* | Unbreak ARMv6 world.Michal Meloun2017-03-081-0/+3
| | | | | | | | | | | | | | | | | | | | The new compiler_rt library imported with clang 4.0.0 have several fatal issues (non-functional __udivsi3 for example) with ARM specific instrict functions. As temporary workaround, until upstream solve these problems, disable all thumb[1][2] related feature. Notes: svn path=/head/; revision=314907
* | Add initial support for UNMAP granularity.Alexander Motin2017-03-081-13/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Report UNMAP granularity as stripesize/-offset if we have no other values to report there. Add new quirk DA_Q_STRICT_UNMAP for cases when target is too critical to misaligned UNMAP request, reporting errors instead of being suboptimal. Setting this quirk makes da periph to forcefully align all UNMAP requests to avoid those errors by the cost of some odd ranges not being UNMAP'ed. This makes UNMAP usable within VMware 6.x VMs, just now 100% efficient. MFC after: 2 weeks Notes: svn path=/head/; revision=314906
* | Cleanup the LinuxKPI slab implementation.Hans Petter Selasky2017-03-085-46/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Put large functions into linux_slab.c instead of declaring them static inline. Add support for more memory allocation wrappers like kmalloc_array() and __vmalloc(). Make sure either the M_WAITOK or the M_NOWAIT flag is set and mask away unused memory allocation flags before calling FreeBSD's malloc() routine. Move kmalloc_node() definition to slab.h where it belongs. Implement support for the SLAB_DESTROY_BY_RCU feature when creating a kmem_cache which basically means kmem_cache memory is freed using call_rcu(). MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=314905
* | Implement eth_zero_addr() in the LinuxKPI.Hans Petter Selasky2017-03-081-0/+6
| | | | | | | | | | | | | | | | MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=314904
* | Remove reference to GNU info hier(7)Baptiste Daroussin2017-03-081-3/+1
| | | | | | | | | | | | | | we have removed texinfo in FreeBSD 11.0 Notes: svn path=/head/; revision=314903
* | texinfo is gone in r276551 remove the related directoriesBaptiste Daroussin2017-03-082-2/+1
| | | | | | | | | | | | | | Reported by: jbeich Notes: svn path=/head/; revision=314902
* | Use LDFLAGS rather than CFLAGS when linking.Brooks Davis2017-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | Reviewed by: kan Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9882 Notes: svn path=/head/; revision=314901
* | Remove now unneded cast.Andrey V. Elsukov2017-03-081-2/+1
| | | | | | | | Notes: svn path=/head/; revision=314900
* | Match JETSON-TK1 FreeBSD specific DTS stub with r314854.Michal Meloun2017-03-081-1/+1
| | | | | | | | Notes: svn path=/head/; revision=314897
* | Remove extraneous arguments and options, which don't make sense forCy Schubert2017-03-081-4/+0
| | | | | | | | | | | | | | | | | | a file documented in volume 5. MFC after: 3 days Notes: svn path=/head/; revision=314896
* | Only install 900.tcpwrap if MK_INETD != "no" and MK_TCP_WRAPPERS != "no"Enji Cooper2017-03-081-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It relies on output from inetd that is triggered by MK_TCP_WRAPPERS=yes. We need to check for both knobs being set -- otherwise the script doesn't have much value. PR: 217577 Submitted by: Sergey <kpect@protonmail.com> (MK_TCP_WRAPPERS piece) MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314895
* | Fix a couple of typos and reword some sentences in bsd.README.John Baldwin2017-03-081-5/+5
| | | | | | | | | | | | | | | | | | Reviewed by: bdrewery MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9922 Notes: svn path=/head/; revision=314894
* | usr.bin/fortune: convert to OBJTOP/SRCTOP idiomsEnji Cooper2017-03-084-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use OBJTOP/SRCTOP-relative paths when looking for include files and strfile. - Add FORTUNES_OBJ and FORTUNES_SRC to abbreviate usr.bin/fortune pathing. This is being done to simplify make output/idioms. MFC after: 1 week Reviewed by: bdrewery Sponsored by: Dell EMC Isilon Differential Revision: D9916 Notes: svn path=/head/; revision=314893
* | Fix install due to incorrect placement of pwait dir in r314886.Cy Schubert2017-03-081-2/+2
| | | | | | | | | | | | | | | | | | Reported by: Shawn Webb <shawn.webb@hardenedbsd.org> MFC after: 2 weeks X-MFC with: r314886 Notes: svn path=/head/; revision=314892
* | loader.efi: finally fix the off-by-one bug in efi_verify_staging_size()Dexuan Cui2017-03-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | r314828(loader.efi: fix an off-by-one bug in efi_verify_staging_size()) doesn't really fix the bug and this patch adds the missing part. It's a shame that I didn't make everything correct at the very beginning... MFC after: 2 weeks Sponsored by: Microsoft Notes: svn path=/head/; revision=314891
* | Copy needed include files from EDK2. This is a minimal set gleenedWarner Losh2017-03-0837-0/+37542
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from the .depend files after the build: cp -r ../vendor/edk2/MdePkg/Include sys/contrib/edk2 cd lib/libefivar make pushd `make -V .OBJDIR` cat .depend*.o | grep sys/contrib | cut -d' ' -f 3 | sort -u | sed -e 's=/full/path/sys/contrib/edk2/==' > /tmp/xxx popd cd ../../sys/contrib/edk2 rm -rf Include for i in `cat /tmp/xxx`; do svn cp svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/$i $i done svn cp svn+ssh://repo.freebsd.org/base/vendor/edk2/dist/MdePkg/MdePkg.dec . The original EDK2 repo is ~265MB, the MdePkg is ~23MB, all MdePkg/Includes is ~7MB and this minimal set is ~1.3MB. Sponsored by: Netflix Notes: svn path=/head/; revision=314890
| * | Bring in snapshot of the MdePkg from Tianocore's EDK2 project at gitvendor/edk2/7babb4372e6a34cbbc54249b25056272a5a9924cWarner Losh2017-03-071977-0/+355088
| / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hash 7babb4372e6a34cbbc54249b25056272a5a9924c From 2017-Mar-03. EDK2 is Intel's BSD Licensed UEFI implementation. We'll be bringing in various routines from there rather than reimplementing them from scratch for libefivar and the EFI boot loader. The upstream repo has ^M ending on everything (sometimes multiple times!), so the following script was run prior to import so changes we have to do don't first include changing every line: % find . -type f | xargs -n 1 sed -I.BAK -e `printf "s/\r//g"` % find . -name \*.BAK | xargs rm Also, only the MdePkg was brought in (it's 17MB, while the entire repo is 250MB). It's almost completely certain nothing else will be used, but if it is, it can be brough in along side MdePkg in the future. Obtained from: https://github.com/tianocore/edk2.git Notes: svn path=/vendor/edk2/; revision=314879 svn path=/vendor/edk2/7babb4372e6a34cbbc54249b25056272a5a9924c/; revision=314881; tag=vendor/edk2/7babb4372e6a34cbbc54249b25056272a5a9924c
* | Avoid dereferencing unintialized elements in the error path.Warner Losh2017-03-072-3/+8
| | | | | | | | | | | | | | | | | | | | | | Some drives sometimes have errors for things like setting the number of queue entries in the submission queue. The error paths taken for these drives ensure a panic dereferencing uninialized data. Sponsored by: Netflix Notes: svn path=/head/; revision=314889
* | cwd10 takes the low 32-bits and cwd11 takes the upper 32-bits of theWarner Losh2017-03-071-1/+2
| | | | | | | | | | | | | | | | | | | | lba. Rather than do a cast to uint64_t, which clang warns might be unaligned, do the stores 32-bits at a time. Sponsored by: Netflix Notes: svn path=/head/; revision=314888
* | Add and use a MMC_DECLARE_BRIDGE macro for declaring mmc(4) bridgesMarius Strobl2017-03-0715-28/+21
| | | | | | | | | | | | | | | | | | | | as kernel drivers and their dependency onto mmc(4); this allows for incrementing the mmc(4) module version but also for entire omission of these bridge declarations for mmccam(4) in a single place, i. e. in dev/mmc/bridge.h. Notes: svn path=/head/; revision=314887
* | pwait: Add a -t flag to specify a timeout before exiting, and tests.Bryan Drewery2017-03-078-11/+350
| | | | | | | | | | | | | | | | | | | | | | The exit status will be 124, as the timeout(1) utility uses. Reviewed by: jilles MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D9697 Notes: svn path=/head/; revision=314886
* | Fix booting with >4GB RAM on PowerMac G5 hardwareJustin Hibbits2017-03-071-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | === From Nathan Whitehorn: Open Firmware runs in virtual mode on the Powermac G5. This runs inside the kernel page table, which preserves all address translations made by OF before the kernel starts; as a result, the kernel address space is a strict superset of OF's. Where this explodes is if OF uses an unmapped SLB entry. The SLB fault handler runs in real mode and refers to the PCPU pointer in SPRG0, which blows up the kernel. Having a value of SPRG0 that works for the kernel is less fatal than preserving OF's value in this case. === The result of this is seemingly random panics from NULL dereferences, or hangs immediately upon boot. By not restoring SPRG0 for Open Firmware entry the kernel PCPU pointer is preserved and SLB faults are successful, resulting in a stable kernel. PR: 205458 Reported by: several (over bugzilla, lists, IRC) Reviewed by: andreast Tested by: many (various forms) MFC after: 2 weeks Notes: svn path=/head/; revision=314885
* | Make multi-namespace nvme drives more robust.Warner Losh2017-03-073-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix assumptions about name spaces in NVME driver. First, it assumes cdata.nn is the number of configured devices. However, it is the number of supported name spaces. Second, it assumes that there will never be more than 16 name spaces supported, but a certain drive I'm testing reports 1024. It assumes that name spaces are a tightly packed namespace, but the standard seems to indicate otherwise. Finally, it assumes that an error would be generated when quearying an unconfigured namespace. Instead, it succeeds but the identify data is all zeros. Fix these by limiting the number of name spaces we probe to 16. Remove aborting when we find one in error. When the size of the name space is zero, ignore it. This is admittedly a bandaide. The long term fix will be to participate in the enumeration and name space change protocols definfed in the NVNe standard. Sponsored by: Netflix Notes: svn path=/head/; revision=314884
* | ufsread: Use appropriate UFS_MAXNAMLEN constantConrad Meyer2017-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | A follow-up to r313475. Submitted by: Gaurav Gangalwar <Gaurav.Gangalwar at emc.com> Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314882
* | Add support for constant pointer constructs to READ_ONCE() in theHans Petter Selasky2017-03-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | LinuxKPI. When the type of the argument is constant the temporary variable cannot be assigned after the barrier. Instead assign the temporary variable by initialization. MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=314878
* | lpr(1): small bounds check with reallocarray(3).Pedro F. Giffuni2017-03-071-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | While here plug a memory leak upon error and postpose a multiplication until after reallocation has succeded. Hinted partially by: OpenBSD Reviewed by: gad MFC after: 2 weeks Notes: svn path=/head/; revision=314877
* | m_mbuftouio() doesn't modify the mbuf.Gleb Smirnoff2017-03-072-2/+2
| | | | | | | | Notes: svn path=/head/; revision=314876
* | Catch up with Clang 4.0.0.Jung-uk Kim2017-03-072-3/+7
| | | | | | | | Notes: svn path=/head/; revision=314875
* | Add bsd.man.mk references for MAN under bsd.lib.mk and bsd.prog.mkEnji Cooper2017-03-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The latter set of manpages directly consume bsd.man.mk, so the bsd.man.mk behavior should be the source of truth for underlying behavior, whereas the other manpage fragment descriptions should document how they tweak the variable behavior, if at all (bsd.prog.mk does tweak the default value, as noted in its description) MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314872
* | Fix LINKS example in bsd.prog.mkEnji Cooper2017-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | LINKS appends DESTDIR -- don't suggest double-append in example. MFC after: 1 week Reported by: rgrimes (D9918) Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314871
* | Add mechanism to unload CAM periph drivers.Alexander Motin2017-03-073-18/+73
| | | | | | | | | | | | | | | | For now it allows to unload CTL kernel module if there are no target-capable SIMs in CAM. As next step full teardown of CAM targets can be implemented. Notes: svn path=/head/; revision=314870
* | Alphabetically sort variablesEnji Cooper2017-03-071-84/+84
| | | | | | | | | | | | | | | | | | | | | | The only content change is minor rewording around CLEANDIRS/CLEANFILES to accomodate sorting order. MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314869
* | Linux semop system call return EINVAL in case when the invalid nsopsDmitry Chagin2017-03-071-0/+2
| | | | | | | | | | | | | | | | | | or semid values specified. MFC after: 1 month Notes: svn path=/head/; revision=314868
* | Linux kernel does not export to the user space ipc_perm.mode valuesDmitry Chagin2017-03-071-1/+2
| | | | | | | | | | | | | | | | | | other than S_IRWXUGO (0777). MFC after: 1 month Notes: svn path=/head/; revision=314867