aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Rework pathconf handling for FIFOs.John Baldwin2017-12-1911-52/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the one hand, FIFOs should respect other variables not supported by the fifofs vnode operation (such as _PC_NAME_MAX, _PC_LINK_MAX, etc.). These values are fs-specific and must come from a fs-specific method. On the other hand, filesystems that support FIFOs are required to support _PC_PIPE_BUF on directory vnodes that can contain FIFOs. Given this latter requirement, once the fs-specific VOP_PATHCONF method supports _PC_PIPE_BUF for directories, it is also suitable for FIFOs permitting a single VOP_PATHCONF method to be used for both FIFOs and non-FIFOs. To that end, retire all of the FIFO-specific pathconf methods from filesystems and change FIFO-specific vnode operation switches to use the existing fs-specific VOP_PATHCONF method. For fifofs, set it's VOP_PATHCONF to VOP_PANIC since it should no longer be used. While here, move _PC_PIPE_BUF handling out of vop_stdpathconf() so that only filesystems supporting FIFOs will report a value. In addition, only report a valid _PC_PIPE_BUF for directories and FIFOs. Discussed with: bde Reviewed by: kib (part of a larger patch) MFC after: 1 month Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D12572 Notes: svn path=/head/; revision=327004
* Add log messages for unknown and unhandled phy typesStephen Hurd2017-12-191-1/+6
| | | | | | | | | | | | Previously, it silently only supported auto, instead, log a message indicating why only auto is supported. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Differential Revision: https://reviews.freebsd.org/D13358 Notes: svn path=/head/; revision=327003
* On Link up & down, update media typesStephen Hurd2017-12-191-0/+4
| | | | | | | | | | | It's possible to change the SFP module when link is down, which would change the available media types. This is part of D13358. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Notes: svn path=/head/; revision=327001
* Support short HWRM commandsStephen Hurd2017-12-194-1/+61
| | | | | | | | | | | | | New Stratus bnxt devices require support for short HWRM commands for VFs to function. Enable their use, but only use them if it's both supported and required... prefer the long HWRM commands when possible. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Differential Revision: https://reviews.freebsd.org/D13269?id=36180 Notes: svn path=/head/; revision=327000
* Don't populate NVRAM sysctls for VFsStephen Hurd2017-12-192-25/+34
| | | | | | | | | | Only the PF allows NVRAM interaction on bnxt devices. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Notes: svn path=/head/; revision=326999
* Update tmpfs link count handling for ino64.John Baldwin2017-12-193-6/+9
| | | | | | | | | | | | | Add a new TMPFS_LINK_MAX to use in place of LINK_MAX for link overflow checks and pathconf() reporting. Rather than storing a full 64-bit link count, just use a plain int and use INT_MAX as TMPFS_LINK_MAX. Discussed with: bde Reviewed by: kib (part of a larger patch) Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326998
* Honor NANDFS_LINK_MAX for post-ino64.John Baldwin2017-12-191-4/+4
| | | | | | | | | | This uses NANDFS_LINK_MAX instead of LINK_MAX for link overflow checks and the value reported by pathconf() / fpathconf(). Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326997
* Report INT_MAX for LINK_MAX for devfs' VOP_PATHCONF().John Baldwin2017-12-191-1/+1
| | | | | | | | | | devfs uses int's for link counts internally and already reports the the full link count via stat() post ino64. Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326996
* Use FUSE_LINK_MAX for LINK_MAX in fuse' VOP_PATHCONF().John Baldwin2017-12-191-1/+1
| | | | | | | | | | Should have included this in r326993. MFC after: 1 month Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326995
* Handle _PC_FILESIZEBITS and _PC_SYMLINK_MAX for devfs' VOP_PATHCONF().John Baldwin2017-12-191-0/+6
| | | | | | | | MFC after: 1 month Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326994
* Move NAME_MAX, LINK_MAX, and CHOWN_RESTRICTED out of vop_stdpathconf().John Baldwin2017-12-1910-15/+61
| | | | | | | | | | | | | | | | | | | Having all filesystems fall through to default values isn't always correct and these values can vary for different filesystem implementations. Most of these changes just use the existing default values with a few exceptions: - Don't report CHOWN_RESTRICTED for ZFS since it doesn't do the exact permissions check this claims for chown(). - Use NANDFS_NAME_LEN for NAME_MAX for nandfs. - Don't report a LINK_MAX of 0 on smbfs. Now fail with EINVAL to indicate hard links aren't supported. Requested by: bde (though perhaps not this exact implementation) Reviewed by: kib (earlier version) MFC after: 1 month Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326993
* embed_mfs: support embedding mfs into loaderEd Maste2017-12-191-9/+32
| | | | | | | | | | | | | | | | | | The script originally supported embedding an mfs into ELF files or any other type of file, because it searched for magic strings to mark the beginning and end of the embeddable section. It was later modified to read the section offset and length via readelf, which made it work for ELF only. Restore the ability to update arbitrary file types by using the readelf technique for ELF, and the magic string technique for all others (including PE/COFF files like loader.efi). Submitted by: Zakary Nafziger <worldofzak@gmail.com> MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12746 Notes: svn path=/head/; revision=326992
* Update NFS to handle larger link counts post ino64.John Baldwin2017-12-195-6/+8
| | | | | | | | | | | | | | | | - Define a NFS_LINK_MAX as UINT32_MAX to match the wire protocol. - Use NFS_LINK_MAX instead of LINK_MAX as the fallback value reported for a PATHCONF RPC by the NFS server. - Use NFS_LINK_MAX instead of LINK_MAX as the default value reported by the NFS client pathconf() if not overridden by the NFS server. - When reading the link count out of an RPC reply, read the full 32 bits instead of the lower 16 bits. Reviewed by: rmacklem (earlier version) Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326991
* Handle _PC_FILESIZEBITS and _PC_NO_TRUNC for smbfs' VOP_PATHCONF().John Baldwin2017-12-191-0/+9
| | | | | | | | MFC after: 1 month Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326990
* Support _PC_FILESIZEBITS in msdosfs' VOP_PATHCONF().John Baldwin2017-12-191-0/+3
| | | | | | | | MFC after: 1 month Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326989
* Add a custom VOP_PATHCONF method for fuse.John Baldwin2017-12-191-1/+21
| | | | | | | | | | | This method handles _PC_FILESIZEBITS, _PC_SYMLINK_MAX, and _PC_NO_TRUNC. For other values it defers to vop_stdpathconf(). MFC after: 1 month Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326988
* Adjust ZFS' link count handling for ino64.John Baldwin2017-12-193-11/+10
| | | | | | | | | | | | | | | | | | | - Define a ZFS_LINK_MAX as the ZFS version of LINK_MAX which is set to UINT64_MAX to match the on-disk format. - Enable the currently #if 0'd code to check for link overflows and return EMLINK. - Don't clamp the link count reported in stat() to LINK_MAX as that is still the 16-bit limit, but report the full link counts. Also, avoid possibly overflowing the reported link count to 0 when adjusting the link count to account for ".snapshot". - Update the LINK_MAX reported by pathconf() to report ZFS_LINK_MAX rather than LINK_MAX (but clamped to LONG_MAX for 32-bit systems). Reviewed by: avg (earlier version) Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326987
* Add a custom VOP_PATHCONF method for fdescfs.John Baldwin2017-12-193-5/+43
| | | | | | | | | | | | | | | The method handles NAME_MAX and LINK_MAX explicitly. For all other pathconf variables, the method passes the request down to the underlying file descriptor. This requires splitting a kern_fpathconf() syscallsubr routine out of sys_fpathconf(). Also, to avoid lock order reversals with vnode locks, the fdescfs vnode is unlocked around the call to kern_fpathconf(), but with the usecount of the vnode bumped. MFC after: 1 month Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=326986
* Add byte swapping in bnxt_cfg_async_cr() requestStephen Hurd2017-12-191-3/+3
| | | | | | | | | | | The firmware is always in little endian, use htole*() for all request fields larger than one byte. Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com> Sponsored by: Broadcom Limited Notes: svn path=/head/; revision=326985
* Update Matthew Macy contact infoStephen Hurd2017-12-1911-11/+11
| | | | | | | | | | Email address has changed, uses consistent name (Matthew, not Matt) Reported by: Matthew Macy <mmacy@mattmacy.io> Differential Revision: https://reviews.freebsd.org/D13537 Notes: svn path=/head/; revision=326984
* Avoid using bioq_* in gmirror.Mark Johnston2017-12-192-49/+58
| | | | | | | | | | | | | | | | gmirror does not perform any sorting of I/O requests, so the bioq API doesn't provide any advantages over plain TAILQs. The API also does not provide operations needed by an upcoming change. No functional change intended. The diff shrinks the geom_mirror.ko text and the gmirror softc slightly. Tested by: pho (part of a larger patch) MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=326983
* Document the semantics of atomic_thread_fence operations.Alan Cox2017-12-191-60/+116
| | | | | | | | | | | | | | | | | Add atomic_load_<type> and atomic_store_<type>, and explain why they exist. Define the synchronizes-with relationship and its effects. Reorder and revise some of the existing text. For example, more precisely describe when ordinary accesses are atomic. Reviewed by: jhb, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D13522 Notes: svn path=/head/; revision=326982
* The highest-order bit of the bootloader cookie is 1, with the result thatNathan Whitehorn2017-12-192-3/+3
| | | | | | | | | | | | | the 32-bit cookie can be sign-extended on its way out of the loader and through Open Firmware. If sign-extended, the in-kernel check of its value would fail on 64-bit systems, resulting in a mountroot prompt. Solve this by telling the kernel to ignore the high-order bits. PR: kern/224437 Submitted by: Gustavo Romero Notes: svn path=/head/; revision=326981
* Make __startkernel line up with KERNBASE, so that the math to compute theNathan Whitehorn2017-12-191-1/+1
| | | | | | | | | | | | | applied relocation offset in link_elf.c works as intended. We may want to revisit how that works in future, for example by having elf_reloc_self() actually store the numbers it is using rather than computing them later, but this fixes symbol lookup after r326203. Reported by: andreast@ Pointy hat to: me Notes: svn path=/head/; revision=326978
* mlx5en: Avoid SFENCe on x86Konstantin Belousov2017-12-191-2/+2
| | | | | | | | | | | | | | | | | | | The IA32 memory model guarantees that all writes are seen in the program order. Also, any access to the uncacheable memory flushes the store buffers. As the consequence, SFENCE instruction is (almost) never needed, in particular, it is not needed to ensure the correct order of updates as seen by a PCIe device. Use atomic_thread_fence_rel() instead of wb() to only emit compiler barriers on x86 there. Other architectures get the right barrier instruction as well. Reviewed by: hselasky Sponsored by: Mellanox Technologies MFC after: 1 week Notes: svn path=/head/; revision=326977
* Perform all accesses to uma_reclaim_needed using atomic(9) KPI.Konstantin Belousov2017-12-191-2/+2
| | | | | | | | | | Reviewed by: alc, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D13534 Notes: svn path=/head/; revision=326974
* Use atomic_load(9) to read ppsinfo sequence numbers.Konstantin Belousov2017-12-191-4/+4
| | | | | | | | | | | | | In this case volatile qualifiers enusre that a compiler does not optimize the accesses out. Reviewed by: alc, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D13534 Notes: svn path=/head/; revision=326973
* Add atomic_load(9) and atomic_store(9) operations.Konstantin Belousov2017-12-199-0/+89
| | | | | | | | | | | | | | | | | | | | | | | They provide relaxed-ordered atomic access semantic. Due to the FreeBSD memory model, the operations are syntaxical wrappers around the volatile accesses. The volatile qualifier is used to ensure that the access not optimized out and in turn depends on the volatile semantic as implemented by supported compilers. The motivation for adding the operation is to help people coming from other systems or knowing the C11/C++ standards where atomics have special type and require use of the special access operations. It is still the case that FreeBSD requires plain load and stores of aligned integer types to be atomic. Suggested by: jhb Reviewed by: alc, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D13534 Notes: svn path=/head/; revision=326971
* When doing a dump, the scheduler is normally not running, so thisWarner Losh2017-12-191-7/+14
| | | | | | | | | | | | | | | changed worked to capture dumps for me. However, the test for SCHEDULER_STOPPED() isn't right. We can also call the dump routine from ddb, in which case the scheduler is still running. This leads to an assertion panic that we're sleeping when we shouldn't. Instead, use the proper test for dumping or not. This brings us in line with other places that do special things while we're doing polled I/O like this. Noticed by: pho@ Differential Revision: https://reviews.freebsd.org/D13531 Notes: svn path=/head/; revision=326964
* No need to use relative paths like this here.Warner Losh2017-12-191-2/+2
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=326963
* Hoist btx include stuff to i386/Makefile.incWarner Losh2017-12-197-8/+2
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=326962
* Interact is always called with NULL. Simplify code a little byWarner Losh2017-12-1912-27/+19
| | | | | | | | | | | | removing this argument, and expanding when rc is NULL. This effectively completes the back out of custom scripts for tftp booted loaders from r269153 that was started in r292344 with the new path tricks that obsoleted it. Submitted by: Netflix Notes: svn path=/head/; revision=326961
* Simplify things a little. The RETURN macro isn't required. It's onlyWarner Losh2017-12-191-8/+2
| | | | | | | | | used once, inside an #ifdef where it would be defined to be return. Sponsored by: Netflix Notes: svn path=/head/; revision=326960
* arc lint: ignore /tests/ in chmodEitan Adler2017-12-191-1/+2
| | | | | | | | | | | | | | | shell scripts in scripts don't need to be chmod +x to work. In fact most are not. Of the tests I found from a simple search: 65 are chmod +x 84 are chmod -x simply disable the check for test shell scripts. Recommit requested by: cem, rgrimes Notes: svn path=/head/; revision=326959
* arclint: revert in prep for recommittingEitan Adler2017-12-191-3/+1
| | | | Notes: svn path=/head/; revision=326958
* lld: Don't write preemptible symbol values to the .got.Ed Maste2017-12-191-1/+1
| | | | | | | | | | | It is not necessary and matches what bfd and gold do. This was a regression from [LLVM] r315658. Obtained from: LLVM r321023 by Rafael EspĂ­ndola Notes: svn path=/head/; revision=326957
* Implement ACPI CPU support when Processor object is not presentConrad Meyer2017-12-191-35/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | By the ACPI standard (ACPI 5 chapter 8.4 Declaring Processors) Processors can be implemented in 2 distinct ways: * Through a Processor object type (which provides P_BLK) * Through a Device object type Prior to this change, the FreeBSD driver only supported the former. AMD Epyc / Poweredge systems we are testing both implement the latter only. Add the missing support. Because P_BLK is not defined in the device object case, C-states entering must be completely controlled via _CST methods rather than P_LVL2/3. John Baldwin points out that ACPI 6.0 formally deprecates the Processor keyword, so eventually processors will only be enumerated as Device objects. Submitted by: attilio Reviewed by: jhb, markj, Anton Rang <rang AT acm.org> Relnotes: maybe Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D13457 Notes: svn path=/head/; revision=326956
* Support more images (but still no geli)Warner Losh2017-12-191-17/+216
| | | | | | | | | | | | | | | | | Print a qemu line to a shell script to ease testing each image Start to support multiple architectures (still very green) Create /etc/rc that echos success and halts the system for better automation (also include halt) Create /etc/fstab on a per-boot type to test loader's passing root to kernel. This lets me run a test, connect to it with telnet and get either a timeout, or a report of success. Sponsored by: Netflix Notes: svn path=/head/; revision=326954
* Catch up to r325719 which makes the kern.proc.pid sysctl "work" for zombies.John Baldwin2017-12-181-1/+6
| | | | | | | | | | | | | | | | | | Some of the ptrace tests need to wait for a child process to become a zombie before preceding. The parent process polls the child process via the kern.proc.pid sysctl to wait for it to become a zombie. Previously the code polled until the sysctl failed with ESRCH. Now it will poll until either the sysctl fails with ESRCH (for compatiblity with older kernels) or returns a kinfo_proc structure with the ki_stat field set to SZOMB. Reported by: Jenkins Tested by: markj Discussed with: mjg MFC after: 1 week Notes: svn path=/head/; revision=326953
* Although we only have one quirk at the moment, guard against the dayWarner Losh2017-12-181-1/+1
| | | | | | | | | | we have more than one by checking the actual quirk bit before delaying the reset. Noticed by: rpokala@ Notes: svn path=/head/; revision=326940
* When we're disabling the nvme device, some drives have a controllerWarner Losh2017-12-183-18/+67
| | | | | | | | | | | | | | | | | | | | | | bug that requires 'hands off' for a period of time (2.3s) before we check the RDY bit. Sicne this is a very odd quirk for a very limited selection of drives, do this as a quirk. This prevented a successful reset of the card when the card wedged. Also, make sure that we comply with the advice from section 3.1.5 of the 1.3 spec says that transitioning CC.EN from 0 to 1 when CSTS.RDY is 1 or transitioning CC.EN from 1 to 0 when CSTS.RDY is 0 "has undefined results". Short circuit when EN == RDY == desired state. Finally, fail the reset if the disable fails. This will lead to a failed device, which is what we want. (note: nda device needs work for coping with a failed device). Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D13389 Notes: svn path=/head/; revision=326937
* Avoid CPU migration in dtrace_gethrtime() on x86.Mark Johnston2017-12-182-6/+12
| | | | | | | | | | | | | | dtrace_gethrtime() may be called outside of probe context, and in particular, from the DTRACEIOC_BUFSNAP handler. Disable interrupts rather than using sched_pin() to help ensure that we don't call any external functions when in probe context. PR: 218452 MFC after: 1 week Notes: svn path=/head/; revision=326935
* Also forgotten in the previous that removed the permanent double mappingBruce Evans2017-12-181-3/+7
| | | | | | | | | | | | | | | of low physical memory: Update the comment about leaving the permanent mapping in place. This also improves the wording of the comment. PTD 0 is still left alone because it is fairly important that it was unmapped earlier, and the comment now describes the unmapping of the other low PTDs that the code actually does. Reviewed by: kib Notes: svn path=/head/; revision=326933
* Remove the permanent double mapping of low physical memory and replaceBruce Evans2017-12-183-43/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it by a transient double mapping for the one instruction in ACPI wakeup where it is needed (and for many surrounding instructions in ACPI resume). Invalidate the TLB as soon as convenient after undoing the transient mapping. ACPI resume already has the strict ordering needed for this. This fixes the non-trapping of null pointers and other garbage pointers below NBPDR (except transiently). NBPDR is quite large (4MB, or 2MB for PAE). This fixes spurious traps at the first instruction in VM86 bioscalls. The traps are for transiently missing read permission in the first VM86 page (physical page 0) which was just written to at KERNBASE in the kernel. The mechanism is unknown (it is not simply PG_G). locore uses a similar but larger transient double mapping and needs it for 2 instructions instead of 1. Unmap the first PDE in it after the 2 instructions to detect most garbage pointers while bootstrapping. pmap_bootstrap() finishes the unmapping. Remove the avoidance of the double mapping for a recently fixed special case. ACPI resume could use this avoidance (made non-special) to avoid any problems with the transient double mapping, but no such problems are known. Update comments in locore. Many were for old versions of FreeBSD which tried to map low memory r/o except for special cases, or might have allowed access to low memory via physical offsets. Now all kernel maps are r/w, and removal of of the double map disallows use of physical offsets again. Notes: svn path=/head/; revision=326932
* Fix the undersupported option KERNLOAD, part 2: fix crashes in locoreBruce Evans2017-12-181-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when KERNLOAD is smaller than NBPDR (not the default) and PG_G is enabled (the default if the CPU supports it). This case has relatively minor problems with coherency of the permanent double mapping, but the fix in r167869 to improve coherency creates page tables with 3 different errors so never worked. The permanent double mapping is fundamentally broken and will be removed soon. It fundamentally breaks trapping for null pointers and requires complications to avoid cache coherency bugs. It is currently used for only a single instruction in ACPI resume, Many fixes VM86 and/or ACPI and/or the double map were attempted near r1200000. r167869 attempted to fix cache coherency bugs in an unusual case, but the bugs were unreachable because older errors in page tables caused a crash first. This commit just makes r167869 work as intended. Part 1 of these fixes fixed the other errors, but also stopped mapping the PDE for KERNBASE as a large page, so double mapping of this PDE only causes the same problems as when KERNLOAD is the default. Except for the problem of trapping null pointers, r167869 could be used to fix these problems, but it is inactive in usual cases. The only known other problem is that incoherent permissions for page 0 cause spurious traps in VM86 BIOS calls. Reviewed by: kib Notes: svn path=/head/; revision=326931
* newsyslog: Fix issues after r326616Baptiste Daroussin2017-12-181-1/+19
| | | | | | | | | | | | | | | | When building the command to execute for compression, newsyslog was modifying the generic arguments array instead of its own copy. Meaning on the second file to compress with the same arguments, the command line was not the one expected. Fix it by creating one copy of the arguments per execution and modifying that copy. While here, print the command line executed in verbose mode. Reported by: many Notes: svn path=/head/; revision=326930
* Fix the undersupported option KERNLOAD, part 1: fix crashes in locoreBruce Evans2017-12-182-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when KERNLOAD is not a multiple of NBPDR (not the default) and PSE is enabled (the default if the CPU supports it). Addresses in PDEs must be a multiple of NBPDR in the PSE case, but were not so in the crashing case. KERNLOAD defaults to NBPDR. NBPDR is 4 MB for !PAE and 2 MB for PAE. The default can be changed by editing i386/include/vmparam.h or using makeoptions. It can be changed to less than NBPDR to save real and virtual memory at a small cost in time, or to more than NBPDR to waste real and virtual memory. It must be larger than 1 MB and a multiple of PAGE_SIZE. When it is less than NBPDR, it is necessarily not a multiple of NBPDR. This case has much larger bugs which will be fixed in part 2. The fix is to only use PSE for physical addresses above <KERNLOAD rounded _up_ to an NBPDR boundary>. When the rounding is non-null, this leaves part of the kernel not using large pages. Rounding down would avoid this pessimization, but would break setting of PAT bits on i/o pages if it goes below 1MB. Since rounding down always goes below 1MB when KERNLOAD < NBPDR and the KERNLOAD > NBPDR case is not useful, never round down. Fix related style bugs (e.g., wrong literal values for NBPDR in comments). Reviewed by: kib Notes: svn path=/head/; revision=326929
* libficl is only ever used in a loader (never a boot) program. Move itWarner Losh2017-12-182-9/+10
| | | | | | | | | to loader.mk. Sponsored by: Netflix Notes: svn path=/head/; revision=326927
* Move loader help file definitions to being 100% inside of loader.mk.Warner Losh2017-12-1813-21/+8
| | | | | | | | | | | | HELP_FILES is a loader only thing, so move it to loader.mk. Only generate the help file if HELP_FILES is defined. Adjust Makefiles to new convention. Fix a few cases where ${.CURDIR}/ was missing resulting in missing bits from the help files. Sponsored by: Netflix Notes: svn path=/head/; revision=326926
* Do not attempt to refill the TX fifo if there is no data left to transfer.Ian Lepore2017-12-181-1/+1
| | | | | | | | | A comment in bcm_bsc_fill_tx_fifo() even lists sc_totlen > 0 as a precondition for calling the routine. I apparently forgot to make the code do what my comment said. Notes: svn path=/head/; revision=326925