aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ps(1): Fix formatting of the "command" field for kernel threads.Mark Johnston2020-07-281-4/+7
| | | | | | | | | | | | | | | | | | When -H is specified, for kernel threads the command is formatted as "<proc name>/<td name>" and truncated to MAXCOMLEN. But each of the proc name and td name may be up to MAXCOMLEN bytes in length. Also handle the ki_moretdname field to ensure that the full thread name gets printed. This is already handled correctly when formatting for "-o tdname". Reported by: freqlabs Reviewed by: freqlabs MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25840 Notes: svn path=/head/; revision=363649
* Add a workaround for a bug when setting the Raspberry GIO config and stateAndrew Turner2020-07-281-0/+11
| | | | | | | | | | | | The Raspberry Pi GPIO config and state messages incorrectly return with the tag length set to 0. We then check this value to have the response flag set. Work around this by setting the response flag when setting the GPIO config or state and this value is zero. Sponsored by: Innovate UK Notes: svn path=/head/; revision=363647
* virtio: fix mips regression introduced by r357596Alfredo Dal'Ava Junior2020-07-281-23/+14
| | | | | | | | | | | | | | | | PowerPC support was fixed in r357596 by changing PCI bustag to BE as part of the solution, but this caused regression on mips. This change implements byte swapping of virtio PCI config area in the driver, leaving lower layer untouched. Submittnd by: Fernando Valle <fernando.valle@eldorado.org.br> Reported by: arichardson Reviewed by: alfredo, arichardson Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D25416 Notes: svn path=/head/; revision=363646
* Aadd Raspberry Pi firmware messages to manage GPIOsAndrew Turner2020-07-281-0/+55
| | | | | | | | | | Some GPIOs are managed by an external IO expaandder through the firmware. Add the message details for these. Sponsored by: Innovate UK Notes: svn path=/head/; revision=363645
* - Cleanups related to sparc64 removal.Yoshihiro Takahashi2020-07-2813-332/+5
| | | | | | | | | | - Remove remains of sparc64 files. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D25831 Notes: svn path=/head/; revision=363644
* Switch the bcm2835 cpufreq driver to use the firmware interfaceAndrew Turner2020-07-283-261/+265
| | | | | | | | | | | | | Use the new Raspberry Pi firmware driver in the cpufreq driver. It is intended all drivers that need to interact with the firmware will move to use the firmware driver, this is the first. Reviewed by: manu Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D25609 Notes: svn path=/head/; revision=363643
* Move the bcm2835 firmware driver earlier in the boot.Andrew Turner2020-07-281-2/+3
| | | | | | | | | | | | It will be needed by other eaarly drivers. While here make the dependency of the mailbox formal with MODULE_DEPEND. Reviewed by: manu Sponsored by: Innovate UK Notes: svn path=/head/; revision=363642
* Revert r363639 so I can use a more correct commit messageAndrew Turner2020-07-281-3/+2
| | | | Notes: svn path=/head/; revision=363641
* Move the bcm2835 mailbox driver earlier in the bootAndrew Turner2020-07-281-1/+2
| | | | | | | This will be needed before the firmware driver is loaded Notes: svn path=/head/; revision=363640
* Have the bcm2835 firmware driver depend on the mailbox driverAndrew Turner2020-07-281-2/+3
| | | | | | | | | | | The firmware driver uses the mailbox driver to communicate with the firmware. Make this a more formal dependency. Reviewed by: manu Sponsored by: Innovate UK Notes: svn path=/head/; revision=363639
* Fix ENA build when integrated into kernelMarcin Wojtas2020-07-281-0/+4
| | | | | | | | | | | | | | | | | Provide missing rules for ena_datapath.c and ena_netmap.c, which prevented the ENA driver from building. This issue was showing up only when building the driver statically into the kernel. PR: 248116 Submitted by: Artur Rojek <ar@semihalf.com> MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25796 Obtained from: Semihalf Sponsored by: Amazon, Inc. Notes: svn path=/head/; revision=363638
* Enable use of the regulator in the Broadcom SDHCI controllerAndrew Turner2020-07-281-1/+35
| | | | | | | | | | | | This will be needed before a future GPIO controller driver is added as the later enables regulators that leave the SDHCI controller disabled. Reviewed by: manu Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D25834 Notes: svn path=/head/; revision=363637
* Add an ACPI attachment for if_smcAndrew Turner2020-07-285-43/+108
| | | | | | | | | | This is needed by some of the Arm simulators as they implement a smc based network interface, but use ACPI rather than FDT. Sponsored by: Innovate UK Notes: svn path=/head/; revision=363636
* libpmc: Use known pmc_cpuid buffer sizeRyan Moeller2020-07-282-18/+8
| | | | | | | | | | | | | | | | | Use the existing PMC_CPUID_LEN to size pmc_cpuid in the kernel and various buffers for reading it in libpmc. This avoids some extra syscalls and malloc/frees. While in here, use strlcpy to copy a user-provided cpuid string instead of memcpy, to make sure we terminate the buffer. Reviewed by: mav MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25679 Notes: svn path=/head/; revision=363630
* makesyscalls.sh: improve the 'this is going away' messageKyle Evans2020-07-281-1/+2
| | | | | | | Reported by: Ronald Klop, rgrimes Notes: svn path=/head/; revision=363628
* ssh: Remove AES-CBC ciphers from default server and client listsEd Maste2020-07-283-12/+2
| | | | | | | | | | | | | | | | | | | | | A base system OpenSSH update in 2016 or so removed a number of ciphers from the default lists offered by the server/client, due to known weaknesses. This caused POLA issues for some users and prompted PR207679; the ciphers were restored to the default lists in r296634. When upstream removed these ciphers from the default server list, they moved them to the client-only default list. They were subsequently removed from the client default, in OpenSSH 7.9p1. The change has persisted long enough. Remove these extra ciphers from both the server and client default lists, in advance of FreeBSD 13. Reviewed by: markm, rgrimes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25833 Notes: svn path=/head/; revision=363627
* Add initial driver for ACPI Platform Error Interfaces.Alexander Motin2020-07-279-0/+788
| | | | | | | | | | | | | | | | | | | | | | | | | APEI allows platform to report different kinds of errors to OS in several ways. We've found that Supermicro X10/X11 motherboards report PCIe errors appearing on hot-unplug via this interface using NMI. Without respective driver it ended up in kernel panic without any additional information. This driver introduces support for the APEI Generic Hardware Error Source reporting via NMI, SCI or polling. It decodes the reported errors and either pass them to pci(4) for processing or just logs otherwise. Errors marked as fatal still end up in kernel panic, but some more informative. When somebody get to native PCIe AER support implementation both of the reporting mechanisms should get common error recovery code. Since in our case errors happen when the device is already gone, there is nothing to recover, so the code just clears the error statuses, practically ignoring the otherwise destructive NMIs in nicer way. MFC after: 2 weeks Relnotes: yes Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=363624
* cxgbe(4): Stop checking for failures from malloc(M_WAITOK).Mark Johnston2020-07-271-16/+0
| | | | | | | | | | | PR: 240545 Submitted by: Andrew Reiter <arr@watson.org> Reviewed by: np MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25767 Notes: svn path=/head/; revision=363623
* Restrict definition of CTL_P1003_1B_MAXID to the kernelAlan Somers2020-07-271-2/+2
| | | | | | | | | | | | | | This constant is only used to size an array within the kernel. There are probably no legitimate uses in userland. Worse, since the kernel's array could theoretically change size over time, any use of that symbol in userland wouldn't be forwards compatible to new kernel versions. Reviewed by: jhb MFC after: Never Differential Revision: https://reviews.freebsd.org/D25816 Notes: svn path=/head/; revision=363622
* sh(1): print a newline when ^D quits shPiotr Pawel Stefaniak2020-07-271-0/+4
| | | | | | | | | | | | | | I've always found this a little bit confusing: > sh $ ^D> sh $ ^D> Reviewed by: 0mp, jilles MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25813 Notes: svn path=/head/; revision=363621
* comm(1): Add EXAMPLES sectionFernando ApesteguĂ­a2020-07-271-4/+31
| | | | | | | | | | Add two very simple examples. Approved by: manpages (gbe@) Differential Revision: https://reviews.freebsd.org/D25344 Notes: svn path=/head/; revision=363620
* Trim some extraneous parentheses.John Baldwin2020-07-272-3/+3
| | | | | | | | Reported by: kib (do_trap_user) Sponsored by: DARPA Notes: svn path=/head/; revision=363619
* Set si_addr to dar for MMU and alignment faults.John Baldwin2020-07-271-4/+11
| | | | | | | | | Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25776 Notes: svn path=/head/; revision=363618
* Fix si_addr value for breakpoints in a delay slot.John Baldwin2020-07-271-1/+1
| | | | | | | | | | Reviewed by: kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25773 Notes: svn path=/head/; revision=363617
* Fix indentation.John Baldwin2020-07-272-2/+2
| | | | Notes: svn path=/head/; revision=363616
* Set si_trapno to the fault index from fsr.John Baldwin2020-07-271-3/+5
| | | | | | | | | Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25772 Notes: svn path=/head/; revision=363615
* Set si_trapno to the exception code from scause.John Baldwin2020-07-271-4/+8
| | | | | | | | | | Reviewed by: kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25770 Notes: svn path=/head/; revision=363614
* Don't include T_USER in si_trapno reported to userland.John Baldwin2020-07-271-1/+1
| | | | | | | | | | | | | | Signals are only reported for user traps, so T_USER is redundant. It is also a software convention and not included in the value reported by the hardware. Reviewed by: kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25769 Notes: svn path=/head/; revision=363613
* truncate(1): Add EXAMPLES sectionFernando ApesteguĂ­a2020-07-271-1/+38
| | | | | | | | | | Add four simple examples showing the use of -c, -r and -s Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D25774 Notes: svn path=/head/; revision=363611
* mpr(4), mps(4): Stop checking for failures from malloc(M_WAITOK).Mark Johnston2020-07-276-61/+0
| | | | | | | | | | | PR: 240545 Submitted by: Andrew Reiter <arr@watson.org> Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25766 Notes: svn path=/head/; revision=363608
* vm_page_free_invalid(): Relax the xbusy assertion.Mark Johnston2020-07-271-1/+6
| | | | | | | | | | | | | | vm_page_assert_xbusied() asserts that the busying thread is the current thread. For some uses of vm_page_free_invalid() (e.g., error handling in vnode_pager_generic_getpages_done()), this condition might not hold. Reported by: Jenkins via trasz Reviewed by: chs, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25828 Notes: svn path=/head/; revision=363607
* tree.3: Bump date after 363450 (WAVL)Mateusz Piotrowski2020-07-271-3/+4
| | | | | | | | | While here: - Address whitespace warnings. - Start sentences on a new line. Notes: svn path=/head/; revision=363599
* nologin.8: Improve wordingMateusz Piotrowski2020-07-271-1/+1
| | | | | | | | | | Reported by: yuripv Reviewed by: bcr, yuripv MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D25814 Notes: svn path=/head/; revision=363598
* actually enable gate control for allwinner's r-ccu ir clockAndriy Gapon2020-07-271-1/+1
| | | | | | | | | | | | The gate control bit offset was correctly specified, but AW_CLK_HAS_GATE flag was not set. Tested with (C)IR receiver on Orange Pi PC Plus. Reviewed by: manu MFC after: 1 week Notes: svn path=/head/; revision=363597
* Support the setting of additional AHCI controller parameters.Peter Grehan2020-07-272-119/+201
| | | | | | | | | | | | | | | | | | Allow the serial number, firmware revision, model number and nominal media rotation rate (nmrr) parameters to be set from the command line. Note that setting the nmrr value can be used to indicate the AHCI device is an SSD. Submitted by: Wanpeng Qian Reviewed by: jhb, grehan (#bhyve) Approved by: jhb, grehan MFC after: 3 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D24174 Notes: svn path=/head/; revision=363596
* makesyscalls.sh: spit out a deprecation notice to stderrKyle Evans2020-07-271-0/+2
| | | | | | | | | This has for a while been replaced by makesyscalls.lua in the stock FreeBSD build. Ensure downstreams get some notice that it'a going away if they're reliant on it, maybe. Notes: svn path=/head/; revision=363595
* iflib: fix LOR with bpf detachMatt Macy2020-07-271-0/+2
| | | | | | | | | | | Reported by: grehan@ Approved by: grehan@ MFC after: 1 week Sponsored by: Netgate Differential Revision: https://reviews.freebsd.org/D25530 Notes: svn path=/head/; revision=363590
* Fix the NFSv4 client so that it checks for support of TimeCreate beforeRick Macklem2020-07-261-2/+13
| | | | | | | | | | | | | trying to set it. r362490 added support for setting of the TimeCreate (va_birthtime) attribute, but it does so without checking to see if the server supports the attribute. This could result in NFSERR_ATTRNOTSUPP error replies to the Setattr operation. This patch adds code to check that the server supports TimeCreate before attempting to do a Setattr of it to avoid these error returns. Notes: svn path=/head/; revision=363587
* Fix the NFS server so that it sets va_birthtime.Rick Macklem2020-07-261-2/+6
| | | | | | | | | | | | | | | | | | | | r362490 marked that the NFSv4 attribute TimeCreate (va_birthtime) is supported, but it did not change the NFS server code to actually do it. As such, errors could occur when unrolling a tarball onto an NFSv4 mounted volume, since setting TimeCreate would fail with a NFSERR_ATTRNOTSUPP reply. This patch fixes the server so that it does TimeCreate and also makes sure that TimeCreate will not be set for a DS file for a pNFS server. A separate commit will add a check to the NFSv4 client for support of the TimeCreate attribute before attempting to set it, to avoid a problem when mounting a server that does not support the attribute. The failures will still occur for r362490 or later kernels that do not have this patch, since they indicate support for the attribute, but do not actually support the attribute. Notes: svn path=/head/; revision=363586
* gctl_get_geom: Skip validation of g_class.Xin LI2020-07-262-11/+6
| | | | | | | | | | | | | The caller from kernel is expected to provide an valid g_class pointer, instead of traversing the global g_class list, just use that pointer directly instead. Reviewed by: mav MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25811 Notes: svn path=/head/; revision=363585
* geom_map and geom_redboot: Remove unused ctlreq handler.Xin LI2020-07-262-26/+0
| | | | | | | | | | | | The two classes do not take any verbs and always gctl_error for all requests, so don't bother to provide a ctlreq handler. Reviewed by: mav MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25810 Notes: svn path=/head/; revision=363584
* Describe the value in the 're' column of vmstat(8) in terms of freebsd's vmIan Lepore2020-07-261-1/+1
| | | | | | | | | implementation. The old description was left over from the 4.4 BSD Lite import in 1994, and was a bit misleading (not all arches use simulated reference bits, some implement reference tracking in hardware). Notes: svn path=/head/; revision=363576
* Fix r363565Emmanuel Vadot2020-07-261-0/+2
| | | | | | | lockdep.h needs sys/lock.h for LOCK_CLASS Notes: svn path=/head/; revision=363575
* riscv: Include syscon_power device driver in GENERIC kernel configJessica Clarke2020-07-263-0/+92
| | | | | | | | | | | | | | | | | QEMU's RISC-V virt machine provides syscon-power and syscon-reset devices as the means by which to shutdown and reboot. We also need to ensure that we have attached the syscon_generic device before attaching any syscon_power devices, and so we introduce a new riscv_syscon device akin to aw_syscon added in r327936. Currently the SiFive test finisher is used as the specific implementation of such a syscon device. Reviewed by: br, brooks (mentor), jhb (mentor) Approved by: br, brooks (mentor), jhb (mentor) Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D25725 Notes: svn path=/head/; revision=363574
* Add syscon power and reset control device driverJessica Clarke2020-07-262-0/+199
| | | | | | | | | | | | | | | | | | | | This device driver supports both syscon-power and syscon-reset devices, as specified in [1] and [2]. These provide a very simple interface for power and reset control, and among other things are used by QEMU's virt machine on RISC-V. A separate commit will enable this on RISC-V, as that requires adding a RISC-V-specific riscv_syscon akin to r327936's aw_syscon. [1] https://www.kernel.org/doc/Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt [2] https://www.kernel.org/doc/Documentation/devicetree/bindings/power/reset/syscon-reboot.txt Reviewed by: brooks (mentor), jhb (mentor) Approved by: brooks (mentor), jhb (mentor) Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D25724 Notes: svn path=/head/; revision=363573
* loader: Avoid -Wpointer-to-int cast warnings for Arm and RISC-VJessica Clarke2020-07-262-2/+2
| | | | | | | | | | | | | | | | | On RISC-V, Clang warns with: cast to smaller integer type 'unsigned int' from 'void (*)(void *)' Instead, use %p as the standard format specifier for printing pointers. Whilst Arm's pointer size is the same as unsigned, it's still cleaner to use the right thing there too. Reviewed by: brooks (mentor), emaste Approved by: brooks (mentor), emaste Differential Revision: https://reviews.freebsd.org/D25718 Notes: svn path=/head/; revision=363572
* Add Goldfish RTC device driver for RISC-VJessica Clarke2020-07-263-0/+185
| | | | | | | | | | | | | | | | This device was originally used as part of the goldfish virtual hardware platform used for emulating Android on QEMU, but is now also used as the RTC for the RISC-V virt machine in QEMU. It provides a simple 64-bit nanosecond timer exposed via a pair of memory-mapped 32-bit registers, although only with 1s granularity. Reviewed by: brooks (mentor), jhb (mentor), kp Approved by: brooks (mentor), jhb (mentor), kp Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D25717 Notes: svn path=/head/; revision=363571
* Remove commented-out lines describing the old never-implemented -t option.Ian Lepore2020-07-261-4/+1
| | | | | | | | | | | In 2018, r338094 removed the commented-out code for supporting the -t command line option which had been present since the BSD 4.4 Lite import, but was never implemented for freebsd. This does the same for the man page. Notes: svn path=/head/; revision=363569
* Revert r363564Emmanuel Vadot2020-07-261-1/+0
| | | | | | | linux/sizes.h doesn't exists in base ... sorry. Notes: svn path=/head/; revision=363567
* linuxkpi: Add taint* definesEmmanuel Vadot2020-07-261-0/+3
| | | | | | | | | | | This isn't used for us but allow us to port drivers more easily. Reviewed by: hselasky Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25703 Notes: svn path=/head/; revision=363566