aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* OCF: Add a typedef for session identifiersConrad Meyer2018-07-1312-26/+41
| | | | | | | | | | No functional change. This should ease the transition from an integer session identifier model to an opaque pointer model. Notes: svn path=/head/; revision=336269
* Re-unbreak smartpqi(4) GCC buildConrad Meyer2018-07-134-18/+0
| | | | | | | | | | | Like r333085, remove redundant declarations. Redundant declarations were re-introduced in r336201. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=336268
* lockmgr: tidy up slock/sunlock similar to other locksMateusz Guzik2018-07-131-29/+22
| | | | Notes: svn path=/head/; revision=336267
* Define ADR subtype of ACPI type for a device path.Warner Losh2018-07-131-0/+3
| | | | Notes: svn path=/head/; revision=336264
* Use the existing MSR_BIOS_SIGN on AMD.Mark Johnston2018-07-132-3/+2
| | | | | | | | Reported by: kib Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=336263
* Fix machdep_boot.cWarner Losh2018-07-131-7/+4
| | | | | | | | A last minute change made this no longer compile. Pass the right arg and eliminate now-unused variables from the code. Notes: svn path=/head/; revision=336262
* Catch up to the inflate renaming.Warner Losh2018-07-131-1/+1
| | | | Notes: svn path=/head/; revision=336261
* Close down the TCP connection to a pNFS DS when it is disabled.Rick Macklem2018-07-131-1/+37
| | | | | | | | | | | | | So long as the TCP connection to a pNFS DS isn't shared with other DSs, it can be closed down when the DS is being disabled in the pNFS client. This causes any RPCs in progress to fail. This patch only affects the NFSv4.1 pNFS client when errors occur while doing I/O on a DS. MFC after: 2 weeks Notes: svn path=/head/; revision=336260
* Enable UART support for Xilinx Ultrascale+ SoCsMarcin Wojtas2018-07-134-0/+5
| | | | | | | | | | | Xilinx Ultrascale+ are based on Cortex-A53 and use existing UART driver (uart_dev_cdnc). Enable it in arm64 GENERIC config. Submitted by: Michal Stanek <mst@semihalf.com> Obtained from: Semihalf Notes: svn path=/head/; revision=336259
* Use the name added in r336257.Mark Johnston2018-07-131-2/+2
| | | | | | | | MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=336258
* Define the MSR used to fetch the current microcode patch level on AMD.Mark Johnston2018-07-131-0/+1
| | | | | | | | | | It is defined in the AMD family 17h register reference. MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=336257
* Fix glitched indentation (and rewrap as needed due to deeper indent).Ian Lepore2018-07-131-3/+4
| | | | | | | | | No functional changes. Reported by: rpokala@ Notes: svn path=/head/; revision=336256
* g_eli_key_cmp is used only in the kernel, so only define it in theWarner Losh2018-07-131-2/+1
| | | | | | | kernel. Notes: svn path=/head/; revision=336255
* Use if rather than case for a simple boolean. gcc thinks blks isWarner Losh2018-07-131-5/+4
| | | | | | | | undefined sometimes with the case, but enc is always 0 or 1, so and if / else is better anyway. Notes: svn path=/head/; revision=336254
* Add missing include of sys/boot.hWarner Losh2018-07-131-0/+1
| | | | Notes: svn path=/head/; revision=336253
* Extend loader(8) geli support to all architectures and all disk-like devices.Ian Lepore2018-07-1324-591/+771
| | | | | | | | | | | | | | | | | | | | | | | | | | This moves the bulk of the geli support from lib386/biosdisk.c into a new geli/gelidev.c which implements a devsw-type device whose dv_strategy() function handles geli decryption. Support for all arches comes from moving the taste-and-attach code to the devopen() function in libsa. After opening any DEVT_DISK device, devopen() calls the new function geli_probe_and_attach(), which will "attach" the geli code to the open_file struct by creating a geli_devdesc instance to replace the disk_devdesc instance in the open_file. That routes all IO for the device through the geli code. A new public geli_add_key() function is added, to allow arch/vendor-specific code to add keys obtained from custom hardware or other sources. With these changes, geli support will be compiled into all variations of loader(8) on all arches because the default is WITH_LOADER_GELI. Relnotes: yes Sponsored by: Microchip Technology Inc Differential Revision: https://reviews.freebsd.org/D15743 Notes: svn path=/head/; revision=336252
* Use C99 initializers for instances of struct apic_enumerator.Mark Johnston2018-07-133-15/+15
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=336251
* There's two files in the sys tree named inflate.c, in additionWarner Losh2018-07-134-3/+2
| | | | | | | | | | | | | | to it being a common name elsewhere. Rename the old kzip one to subr_inflate.c. This actually fixes the build issues on sparc64 that my inclusion of .PATH ${SYSDIR}/kern created in r336244, so also revert the broken workaround I committed in r336249. This slipped passed me because apparently, I never did a clean build. Notes: svn path=/head/; revision=336250
* Fix sparc64 buildsWarner Losh2018-07-131-0/+1
| | | | | | | | | gcc is complaining about struct infate being defined in a parameter list. It's inclear how long this has been broken, but the fix is simple enough. Notes: svn path=/head/; revision=336249
* Invalidate the mapping before updating its physical address.Alan Cox2018-07-131-26/+30
| | | | | | | | | | | | | | | | | | | Doing so ensures that all threads sharing the pmap have a consistent view of the mapping. This fixes the problem described in the commit log message for r329254 without the overhead of an extra fault in the common case. (Once the riscv pmap_enter() implementation is similarly modified, the workaround added in r329254 can be removed, reducing the overhead of CoW faults.) See also r335784 for amd64. The mips implementation of pmap_enter() already reused the PV entry from the old mapping. Reviewed by: kib, markj MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D16199 Notes: svn path=/head/; revision=336248
* Transition to boot_env_to_howto and boot_howto_to_env in the bootWarner Losh2018-07-137-55/+12
| | | | | | | | | | loader. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D16205 Notes: svn path=/head/; revision=336247
* Eliminate boot loader copies of boot arg parsing.Warner Losh2018-07-134-230/+11
| | | | | | | | | | | Eliminate 4 of the copies of the arg parsing in /boot/laoder by using boot_parse_cmdline. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D16205 Notes: svn path=/head/; revision=336246
* Use boot_parse_* to parse command line args and retire cut-n-pasteWarner Losh2018-07-137-257/+14
| | | | | | | | | | code that was substantially identical. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D16205 Notes: svn path=/head/; revision=336245
* Create helper functions for parsing boot args.Warner Losh2018-07-137-60/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | boot_parse_arg to parse a single arg boot_parse_cmdline to parse a command line string boot_parse_args to parse all the args in a vector boot_howto_to_env Convert howto bits to env vars boot_env_to_howto Return howto mask mased on what's set in the environment. All these routines return an int that's the bitmask of the args translated to RB_* flags. As a special case, the 'S' flag sets the comconsole_speed env var. Any arg that looks like a=b will set the env key 'a' to value 'b'. If =b is omitted, 'a' is set to '1'. This should help us reduce the number of redundant copies of these routines in the tree. It should also give a more uniform experience between platforms. Also, invent a new flag RB_PROBE that's set when 'P' is parsed. On x86 + BIOS, this means 'probe for the keyboard, and if it's not there set both RB_MULTIPLE and RB_SERIAL (which means show the output on both video and serial consoles, but make serial primary). Others it may be some similar concept of probing, but it's loader dependent what, exactly, it means. These routines are suitable for /boot/loader and/or the kernel, though they may not be suitable for the tightly hand-rolled-for-space environments like boot2. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D16205 Notes: svn path=/head/; revision=336244
* Make generated scripts executable.Ian Lepore2018-07-131-0/+7
| | | | Notes: svn path=/head/; revision=336243
* More little fixes... fix a function name typo (eps vs esp), and cope withIan Lepore2018-07-131-2/+5
| | | | | | | | newer versions of gpart that show mbr efi partition types with the name 'efi' rather than as '!239'. Notes: svn path=/head/; revision=336242
* Revert r336240, which contained unrelated changes accidentally committed.Ian Lepore2018-07-132-15/+5
| | | | Notes: svn path=/head/; revision=336241
* More little fixes... fix a function name typo (eps vs esp), and cope withIan Lepore2018-07-132-5/+15
| | | | | | | | newer versions of gpart that show mbr efi partition types with the name 'efi' rather than as '!239'. Notes: svn path=/head/; revision=336240
* Change the pNFS client so that it does not report an NFSERR_STALE fromRick Macklem2018-07-131-3/+5
| | | | | | | | | | | | | | | | | | | | | an I/O attempt on a DS to the server via LayoutReturn. The current FreeBSD client can generate these errors for an operational DS while doing a recovery of a mirror after a mirrored DS has been repaired. I am not sure why these errors occur, but my best current guess is a race between the Layout Recall issued by the kernel code run from pnfsdscopymr(8) and a Read operation on the DS for the file bing copied. The errrors are not fatal, since the client falls back on doing I/O through the MDS, which can do the I/O successfully as a proxy. (The fact that the MDS can do this indicates that the file does still exist on the functioning DS.) This patch only affects behaviour of the pNFS client and only when using Flexible File layouts. MFC after: 2 weeks Notes: svn path=/head/; revision=336239
* Round down the location of execpathp to slightly improve copyout speed.Brooks Davis2018-07-131-0/+1
| | | | | | | | | | | In practice, this moves the padding from below the canary to above execpathp has no impact on stack consumption. Submitted by: Wuyang-Chung (via github pull request #159) MFC after: 1 week Notes: svn path=/head/; revision=336238
* geom_gate: enable resizeMikolaj Golub2018-07-131-2/+2
| | | | | | | | | Reviewed By: pjd Approved By: pjd Differential Revision: https://reviews.freebsd.org/D11531 Notes: svn path=/head/; revision=336237
* Detect and handle invalid number of FATsXin LI2018-07-131-0/+4
| | | | | | | | | | | If the number of FATs field in the boot sector is zero, give an appropriate error code. Obtained from: Android https://android.googlesource.com/platform/external/fsck_msdos/+/6c29bbe8d58e6fe8755935a04166ecf82ff31f47%5E%21/ MFC after: 2 weeks Notes: svn path=/head/; revision=336236
* fd: stop passing M_ZERO to uma_zallocMateusz Guzik2018-07-121-1/+2
| | | | | | | | | The optimisation seen with malloc cannot be used here as zone sizes are now known at compilation. Thus bzero by hand to get the optimisation instead. Notes: svn path=/head/; revision=336232
* uma: whack main zone counter update in the slow path, freeing sideMateusz Guzik2018-07-121-8/+0
| | | | | | | See r333052. Notes: svn path=/head/; revision=336231
* sx: remove the spurious macro value difference vs rwlocksMateusz Guzik2018-07-121-2/+2
| | | | | | | No functional changes. Notes: svn path=/head/; revision=336230
* Modify the NFSv4.1 pNFS client to use separate TCP connections for DSs.Rick Macklem2018-07-122-19/+25
| | | | | | | | | | | | | | | | | | | | | Without this patch, the NFSv4.1 pNFS client shared a single TCP connection for all DSs that resided on the same machine. This made disabling one of the DSs impossible. Although unlikely, it is possible that the storage subsystem has failed in such a way that the storage for one DS on a machine is no longer functioning correctly, but the storage used by another DS on the same machine is still ok. For this case, it would be nice if a system can fail one of the DSs without failing them all. This patch changes the default behaviour to use separate TCP connections for each DS even if they reside on the same machine. I do not believe that this will be a problem for extant pNFS servers, but a sysctl can be set to restore the old behaviour if this change causes a problem for an extant pNFS server. This patch only affects the NFSv4.1 pNFS client. MFC after: 2 weeks Notes: svn path=/head/; revision=336229
* Pull in r336008 from upstream clang trunk:Dimitry Andric2018-07-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Request init/fini array on FreeBSD 12 and later Summary: It seems a bad idea to change the default in the middle of a release branch due to possible changes in global ctor / dtor ordering between .ctors and .init_array. With FreeBSD 11.0's release imminent lets change the default now for FreeBSD 12 (the current development stream) and later. FreeBSD rtld has supported .init_array / .fini_array for many years. As of Jan 1 2017 all supported FreeBSD releases and branches will have support. Reviewers: dim, brooks, arichardson Reviewed By: dim, brooks, arichardson Subscribers: bsdjhb, krytarowski, emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D24867 Requested by: jhb MFC after: 3 days Notes: svn path=/head/; revision=336227
* Pass the right sizes to malloc() and realloc().Mark Johnston2018-07-121-2/+2
| | | | | | | | | Reported by: scan-build, via Mark Millard MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D16180 Notes: svn path=/head/; revision=336226
* Add PCI IDs for AMD X370 AHCI and XHCI.Mark Johnston2018-07-122-2/+4
| | | | | | | | | Submitted by: Greg V <greg@unrelenting.technology> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D15398 Notes: svn path=/head/; revision=336225
* pf: Fix typo in r336221Kristof Provost2018-07-121-1/+1
| | | | | | | Reported by: olivier@ Notes: svn path=/head/; revision=336224
* ixl(4): Set baudrate on link up using proper link_speed variableEric Joyner2018-07-122-2/+2
| | | | | | | | | | And remove old, now-completely unused link_speed variable. Reported by: Jacob Keller <jacob.e.keller@intel.com> MFC after: 1 month Notes: svn path=/head/; revision=336223
* Wee fix: $dev is passed in to the function with the /dev prefix already inIan Lepore2018-07-121-2/+2
| | | | | | | place, don't add it. Notes: svn path=/head/; revision=336222
* pf: Increate default state table sizeKristof Provost2018-07-121-3/+3
| | | | | | | | | | | | | | | | | | | | | The typical system now has a lot more memory than when pf was new, and is also expected to handle more connections. Increase the default size of the state table. Note that users can overrule this using 'set limit states' in pf.conf. From OpenBSD: The year is 2018. Mercury, Bowie, Cash, Motorola and DEC all left us. Just pf still has a default state table limit of 10000. Had! Now it's a tiny little bit more, 100k. lead guitar: me ok chorus: phessler theo claudio benno background school girl laughing: bob Obtained from: OpenBSD Notes: svn path=/head/; revision=336221
* Fix an obvious 'is odd' check.Warner Losh2018-07-121-1/+1
| | | | | | | | | | | | | len % 1 is always true. Fix StrHexToBytes to do a proper odd length check. This was only called by DevPathFromTextGenericPath, ConvertFromTextVendor and DevPathFromTextMAC, which we've not had a need to actually use just yet. Submitted by: David Binderman PR: 229718 Notes: svn path=/head/; revision=336220
* Use correct size when we are allocating array for skipto index.Andrey V. Elsukov2018-07-121-4/+2
| | | | | | | | | | | Also, there is no need to use M_ZERO for idxmap_back. It will be re-filled just after allocation in update_skipto_cache(). PR: 229665 MFC after: 1 week Notes: svn path=/head/; revision=336219
* kern_environment: Give the static environment a chance to disable MD envKyle Evans2018-07-123-9/+37
| | | | | | | | | | | | | | | | | | | | | | This variable has been given the name "loader_env.disabled" as it's the primary way most people will have an MD environment. This restores the previously-default behavior of ignoring the loader(8) environment, which may be useful for vendor distributions or other scenarios where inheriting the loader environment may be considered a security issue or potentially breaking of a more locked-down environment. As the change to config(5) indicates, disabling the loader environment should not be a choice made lightly since it may provide ACPI hints and other useful things that the system can rely on to boot. An UPDATING entry has been added to mention an upgrade path for those that may have relied on the previous behavior. Discussed with: bde Relnotes: yes (maybe) Notes: svn path=/head/; revision=336217
* Actually build and install the spigen.4 manpage.Ian Lepore2018-07-111-0/+1
| | | | Notes: svn path=/head/; revision=336216
* Ignore the cookie verifier for NFSv4.1 when the cookie is 0.Rick Macklem2018-07-111-4/+2
| | | | | | | | | | | | | | | | RFC5661 states that the cookie verifier should be 0 when the cookie is 0. However, the wording is somewhat unclear and a recent discussion on the nfsv4@ietf.org mailing list indicated that the NFSv4 server should ignore the cookie verifier's value when the dirctory offset cookie is 0. This patch deletes the check for this that would return NFSERR_BAD_COOKIE when the verifier was not 0. This was found during testing of the ESXi client against the NFSv4.1 server. Reported by: daniel@ftml.net (via packet trace) MFC after: 2 weeks Notes: svn path=/head/; revision=336215
* Add various spi devices to NOTES. Add some required options for buildingIan Lepore2018-07-112-3/+10
| | | | | | | the cqspi and n25q drivers. Notes: svn path=/head/; revision=336214
* Small refactor of install-bootWarner Losh2018-07-111-36/+40
| | | | | | | | Use newfs_msdos to create the filesystem for the partition requested and use loader.efi instead of boot1.efi. Notes: svn path=/head/; revision=336213