random: Make random_source definitions constWe can do so trivially, so make these tables read-only. No functionalchange intended.Reviewed by: cem, emasteMFC after: 2 weeksSponsored by: Storms
random: Make random_source definitions constWe can do so trivially, so make these tables read-only. No functionalchange intended.Reviewed by: cem, emasteMFC after: 2 weeksSponsored by: StormshieldSponsored by: Klara, Inc.Differential Revision: https://reviews.freebsd.org/D52003
show more ...
dev/psci: Use the correct SMCCC TRNG fieldThe TRNG service will return random data in x3. Use the correct fieldwhen filling the buffer in trng_read.This driver has not been in any release, so no
dev/psci: Use the correct SMCCC TRNG fieldThe TRNG service will return random data in x3. Use the correct fieldwhen filling the buffer in trng_read.This driver has not been in any release, so no security advisory isneeded.Reviewed by: bzSponsored by: Arm LtdDifferential Revision: https://reviews.freebsd.org/D50979
dev/psci: Check for functions before callingIn the SMCCC TRNG and Errata ABI drivers check if the versionfunctions are implemented before calling them. Without this the firmwaremay complain about
dev/psci: Check for functions before callingIn the SMCCC TRNG and Errata ABI drivers check if the versionfunctions are implemented before calling them. Without this the firmwaremay complain about an unimplemented function being called.Reported by: bzReviewed by: bzSponsored by: Arm LtdDifferential Revision: https://reviews.freebsd.org/D50978
dev/psci: Use an SMCCC return valueSwitch to the SMCCC not supported macro in smccc_arch_features. Thisshouldn't be a functional change as the value is identical to the PSCIvalue it replaces.Re
dev/psci: Use an SMCCC return valueSwitch to the SMCCC not supported macro in smccc_arch_features. Thisshouldn't be a functional change as the value is identical to the PSCIvalue it replaces.Reviewed by: bz, emasteSponsored by: Arm LtdDifferential Revision: https://reviews.freebsd.org/D50977
newbus: replace leftover device unit wildcardsReviewed by: imp, jhbApproved by: imp (mentor)Differential Revision: https://reviews.freebsd.org/D50913
psci: Support the arm64 Errata ABIAdd support for the Arm Errata Management Firmware Interface (ErrataABI) [1]. This provides an interface for the kernel to query the statusof an erratum workarou
psci: Support the arm64 Errata ABIAdd support for the Arm Errata Management Firmware Interface (ErrataABI) [1]. This provides an interface for the kernel to query the statusof an erratum workaround.Some errata may be mitigated depending on the other hardware in a SoC,e.g. Cortex-A78 erratum 2712571 is not affected in systems that usean Arm interconnect. As there may not be a way for the kernel to knowif this is the case then it would have to implement the workaroundeven when not needed.There are other cases where the needed workaround is implemented infirmware and if not implemented then the kernel may decide to not usea feature. In this case we can query the firmware before deciding ifwe should use a feature or now.There is a known issue with some firmware implementations of the ErrataABI that incorrectly returns a status indicating the erratum is fullymitigated by the firmware, however there is a kernel component needed,e.g. Neoverse-N1 erratum 1542419. To handle this case we tell thecaller there is some workaround implemented in the firmware and it candecide how to handle it. If this is fixed in a way we can detect we canadd a new erratum status value to indicate this.[1] https://developer.arm.com/documentation/den0100/latest/Sponsored by: Arm LtdDifferential Revision: https://reviews.freebsd.org/D48055
Replace calls to bus_generic_attach with bus_attach_childrenReviewed by: impDifferential Revision: https://reviews.freebsd.org/D47675
sys: Add an SMCCC Random Number Generator driverThe Arm True Random Number Generator Firmware Interface provides a wayto query the SMCCC firmware for up to 192 bits of entropy. Use it toprovide a
sys: Add an SMCCC Random Number Generator driverThe Arm True Random Number Generator Firmware Interface provides a wayto query the SMCCC firmware for up to 192 bits of entropy. Use it toprovide another source of randomness to the kernel.Reviewed by: cem, markmSponsored by: Arm LtdDifferential Revision: https://reviews.freebsd.org/D46989
dev/psci: Add SMCCC_MAKE_VERSIONThis will be used to create an integer with a given version. It canthen be used to check if the SMCCC version is late enough for a driver.Sponsored by: Arm Ltd
dev/psci: Make SMCCC into a real driverThis will be used by other drivers that manage SMCCC firmware servicesto use as an attachment point.Sponsored by: Arm LtdDifferential Revision: https://re
dev/psci: Make SMCCC into a real driverThis will be used by other drivers that manage SMCCC firmware servicesto use as an attachment point.Sponsored by: Arm LtdDifferential Revision: https://reviews.freebsd.org/D46988
sys: Use the new arm_smccc_invoke macrosSimplify the calls into the SMCCC firmware with the newarm_smccc_invoke* macros.Sponsored by: Arm LtdDifferential Revision: https://reviews.freebsd.org/D
sys: Use the new arm_smccc_invoke macrosSimplify the calls into the SMCCC firmware with the newarm_smccc_invoke* macros.Sponsored by: Arm LtdDifferential Revision: https://reviews.freebsd.org/D46987
dev/psci: Create macros to simplify calling SMCCCWhen calling into SMCCC functions we often only need a few arguments.As the current function needs all 8 possible arguments to be set theunused va
dev/psci: Create macros to simplify calling SMCCCWhen calling into SMCCC functions we often only need a few arguments.As the current function needs all 8 possible arguments to be set theunused values will be zero.Create a macro to pass in the used values, followed by enough zeros,then the result pointer.Sponsored by: Arm LtdDifferential Revision: https://reviews.freebsd.org/D46986
arm64: Support BTI checking in most of the kernelLLD has the -zbti-report=error argument to check if the BTI note ispresent when linking. To allow for this to be used when linking thekernel and m
arm64: Support BTI checking in most of the kernelLLD has the -zbti-report=error argument to check if the BTI note ispresent when linking. To allow for this to be used when linking thekernel and modules: - Add the BTI note to the remaining assembly files - Mark ptrauth.c as protected by BTI - Disable -zbti-report for vmm hypervisor switching code as it's not used there.The linux64 module doesn't build with the flag as it includes vdso codethat doesn't include the note.Reviewed by: imp, kib, emasteSponsored by: Arm LtdDifferential Revision: https://reviews.freebsd.org/D45466
dev/psci: Fix a function namedd a missing underscore to arm_smccc_1_2_* to fix the GCC build.Sponsored by: Arm Ltd
dev/psci: Check all compat stringsWhen searching for the PSCI FDT node we only check a few compat strings.Use the existing compat_data array to check all strings the driver mayattach to.Sponsor
dev/psci: Check all compat stringsWhen searching for the PSCI FDT node we only check a few compat strings.Use the existing compat_data array to check all strings the driver mayattach to.Sponsored by: Arm LtdDifferential Revision: https://reviews.freebsd.org/D44913
psci: split off psci_reboot from psci_shutdownPriority of psci_reboot set so that it is run after shutdown_panic isexecuted. This is to provide uniform experience with other platforms.MFC after
psci: split off psci_reboot from psci_shutdownPriority of psci_reboot set so that it is run after shutdown_panic isexecuted. This is to provide uniform experience with other platforms.MFC after: 3 weeks
psci: Add FDT node status checkConsider the PSCI missing if the FDT node status says it is not okay.Reviewed by: andrewObtained from: Juniper Networks, Inc.Differential Revision: https://review
psci: Add FDT node status checkConsider the PSCI missing if the FDT node status says it is not okay.Reviewed by: andrewObtained from: Juniper Networks, Inc.Differential Revision: https://reviews.freebsd.org/D43920
sys: Automated cleanup of cdefs and other formattingApply the following automated changes to try to eliminateno-longer-needed sys/cdefs.h includes as well as now-emptyblank lines in a row.Remov
sys: Automated cleanup of cdefs and other formattingApply the following automated changes to try to eliminateno-longer-needed sys/cdefs.h includes as well as now-emptyblank lines in a row.Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/Remove /\n+#if.*\n#endif.*\n+/Remove /^#if.*\n#endif.*\n/Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/Sponsored by: Netflix
Check SMCCC is ready before usingAdd asserts to check SMCCC has been initialised before callers try touse it.Reviewed by: emasteSponsored by: Arm LtdDifferential Revision: https://reviews.free
Check SMCCC is ready before usingAdd asserts to check SMCCC has been initialised before callers try touse it.Reviewed by: emasteSponsored by: Arm LtdDifferential Revision: https://reviews.freebsd.org/D41917
sys: Remove $FreeBSD$: one-line .c patternRemove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
sys: Remove $FreeBSD$: two-line .h patternRemove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
Add PSCI affinity info return valuesThese can be returned from the PSCI AFFINITY_INFO call. This is notmarked as optional so bhyve will need to implement it & can use thesemacros.Sponsored by:
Add PSCI affinity info return valuesThese can be returned from the PSCI AFFINITY_INFO call. This is notmarked as optional so bhyve will need to implement it & can use thesemacros.Sponsored by: Arm Ltd
Add a psci macro to build a version valueAdd PSCI_VER that takes a major and minor version and builds the valuereturned by the firmware. This will be used by bhyve.Sponsored by: Arm Ltd
Allow psci.h to be used by userspaceWrap parts of psci.h that aren't usable by userspace in _KERNEL checks.This allows it to be used to implement PSCI and SMCCC by bhyve inuserspace.Sponsored b
Allow psci.h to be used by userspaceWrap parts of psci.h that aren't usable by userspace in _KERNEL checks.This allows it to be used to implement PSCI and SMCCC by bhyve inuserspace.Sponsored by: Arm LtdSponsored by: Innovate UKSponsored by: The FreeBSD Foundation
arm_smcc_1_2_*: Don't trash SP and X19 if no return value structure.Jumping direct to ret was not restoring the saved value of x19 and wasalso not adjusting sp to discard the two saved registers.
arm_smcc_1_2_*: Don't trash SP and X19 if no return value structure.Jumping direct to ret was not restoring the saved value of x19 and wasalso not adjusting sp to discard the two saved registers.Reviewed by: andrewSponsored by: DARPADifferential Revision: https://reviews.freebsd.org/D37922
123