aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
...
* mmc: Use bus_topo_lock and taskqueue_bus while adding/removing child devicesJohn Baldwin2025-04-293-25/+25
| | | | | | | | | | | | | Some drivers held regular mutexes across some new-bus calls; instead depend on bus_topo_lock to protect the relevant softc members. This also fixes the bus_topo_lock to be explicit in these drivers rather than relying on the implicit Giant from taskqueue_swi_giant. It avoids calling sleepable routines like device_probe_and_attach from an swi context. Differential Revision: https://reviews.freebsd.org/D49270 (cherry picked from commit c0bed9bd0bda2ca9239f5913cd2d5c1bd5d29bfa)
* pcib: Use taskqueue_bus for hot-plug events instead of a private taskqueueJohn Baldwin2025-04-291-18/+16
| | | | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D49269 (cherry picked from commit b23314ecb99cedef1090bdaa486fbd25aa5a9558)
* pci: Don't cache the count of MSI/MSI-X messages before allocationJohn Baldwin2025-04-296-59/+45
| | | | | | | | | | | | | | | | | | A device can in theory change the read-only fields in the MSI/MSI-X control registers that indicate the maximum number of supported registers in response to changing other device registers. For example, certain Intel networking VFs change the number of messages as a result of changes in the PCI_IOV_ADD_VF callback. To support this, always read the current value of the relevant control register in the *_count and *_alloc methods. Once messages have been allocated, the control register value remains cached. Reported by: Krzysztof Galazka <krzysztof.galazka@intel.com> Reviewed by: Krzysztof Galazka <krzysztof.galazka@intel.com>, erj Differential Revision: https://reviews.freebsd.org/D48890 (cherry picked from commit 346020138a0fd20085ebc285f090df38d7d18527)
* pci: Cosmetic cleanups to MSI/MSI-X routinesJohn Baldwin2025-04-292-31/+36
| | | | | | | | | | | | | | | - Use unsigned integers for various variables. The count argument to the alloc method as well as the IRQ values used with the pcib_if.m methods should also be unsigned eventually. - Use mallocarray to allocate arrays - Use bool in a few places Reviewed by: Krzysztof Galazka <krzysztof.galazka@intel.com> Differential Revision: https://reviews.freebsd.org/D48889 (cherry picked from commit a3835cceb0882494628d5d075f99a86bd3464672)
* pci_host_generic: Use SYS_RES_MEMORY for the parent of I/O resource rangesJohn Baldwin2025-04-291-13/+8
| | | | | | | | | | | When a SYS_RES_IOPORT resource crosses a pci_host_generic bridge, it is translated into a memory access for an associated range, so use SYS_RES_MEMORY for the resource allocated from the parent. Tested by: markj Differential Revision: https://reviews.freebsd.org/D44207 (cherry picked from commit c19f1ad1c252f434146c7210155d805b2ed0ff95)
* pci: avoid accidental clobbering of regs on some fdt platformsKyle Evans2025-04-294-5/+20
| | | | | | | | | | | | Most pci controllers will just have a single reg for the config space, but others (e.g., on Apple Silicon) may have more following that to describe, e.g., controller port space. Bump the "ranges" rid space up to avoid overriding these other memory resources. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D43921 (cherry picked from commit b313229969cc56a057dfea28506784fd5468c6f3)
* pci: propagate vpd read errorRyan Libby2025-04-291-3/+3
| | | | | | | | | | | | | | On read error, we would return -1, but not handle it, causing a zero size malloc of value, and then we wouldd unconditionally write value[-1 + 1] = '\0'. This should be harmless in terms of buffer overflow because we should get a minimum non-zero size allocation from malloc, but it also effectively swallowed the error. Reported by: GCC -Wstringop-overflow Reviewed by: kib, se Differential Revision: https://reviews.freebsd.org/D45895 (cherry picked from commit 39bda097c03780e26e6a25ff59a3e8e77c77563f)
* bnxt_en: Thor2 Ring counters not incrementing during trafficSreekanth Reddy2025-04-271-1/+4
| | | | | | | | | | The ctx_hw_stats_ext DMA address was not correctly passed to the firmware during the HWRM_STAT_CTX_ALLOC allocation, causing stats to not populate for Thor2. Passing the correct DMA length resolved the issue MFC-After: 3 days Differential-Revision: https://reviews.freebsd.org/D49732 (cherry picked from commit fec0e2064818f991867c9851a837012ea31774da)
* bnxt_en: Unhandled async event type 76Sreekanth Reddy2025-04-271-6/+6
| | | | | | | | | | The completion event type 76 is not supported by the driver. Instead of flooding the dmesg with "Unknown event type" messages when this event occurs, move the print under debug level. MFC-After: 3 days Differential-Revision: https://reviews.freebsd.org/D49731 (cherry picked from commit 6450d937955fcd1ab9034c49d53306e882c4a281)
* bnxt_en: Thor2 Specific Doorbell related changesSreekanth Reddy2025-04-273-32/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doorbell offset : For Thor controllers doorbell offset was always hardcoded to 0x10000 for PF devices where as for Thor2 controllers doorbell offset will be legacy_l2_db_size_kb value provided by firmware through hwrm_func_qcfg command. CQ Toggle & Epoch bits support : In order to handle out of order doorbell handling as part of Dropped Doorbell Recovery, HW expects two changes in the driver in data path. - First change is the epoch bit changes while updating the producer indexes of Tx. This epoch bit is toggled by the driver, each time the queue is wrapped for that specific doorbell. - The second change is to add a toggle bit pair to each ARM type doorbell. This includes the CQ_ARMALL, CQ_ARMSE, CQ_ARMENA doorbells. The toggle bit pair in context is incremented by the chip each time a new NQE completion is generated by the chip. To keep the driver in-sync, the toggle bit pair will be passed in the NQE to the host completion. This will be the toggle bit pair value that the host must use to setup the next NQE operation. The driver will pass that latest toggle bit pair value into the ARM type doorbells it generates to the chip. The doorbell clients will compare the toggle bit pair in each doorbell with the value in context. If the values match, the doorbell will be honored. If the values do not match, the doorbell will be discarded. MFC-After: 3 days Differential-Revision: https://reviews.freebsd.org/D49730 (cherry picked from commit 39c0b8b7994b0d339bffb0b17291c4a2b14cae3a)
* bnxt_en: 400G speed supportSreekanth Reddy2025-04-273-135/+441
| | | | | | | | Added 400G speed module support. MFC-After: 3 days Differential-Revision: https://reviews.freebsd.org/D49729 (cherry picked from commit dac78335c42dce2ce9daf5856539510a42d7d8cd)
* if_bnxt: add support for RX completion record type V3Sreekanth Reddy2025-04-272-0/+5
| | | | | | | | | Added support for RX V3 completion record types- CMPL_BASE_TYPE_RX_TPA_START_V3 and CMPL_BASE_TYPE_RX_L2_V3. MFC-After: 3 days Differential-Revision: https://reviews.freebsd.org/D49728 (cherry picked from commit 526d74f6ca55c7a4b9c0c745d13e94c7a7bb6e0b)
* bnxt_en: Add backing store V2 supportSreekanth Reddy2025-04-273-18/+153
| | | | | | | | | | Add backing store V2 support. Thor2 controllers supports only the V2 support. MFC-After: 3 days Reviewed-by: Warner Losh <imp@FreeBSD.org> Differential-Revision: https://reviews.freebsd.org/D49727 (cherry picked from commit d5ce906da7c55085f93fce096ebb8bc44a3cffe5)
* bnxt_en: Update HSI headerSreekanth Reddy2025-04-272-169/+2082
| | | | | | | | Update HSI header to support Thor2 controllers. MFC-After: 3 days Differential-Revision: https://reviews.freebsd.org/D49726 (cherry picked from commit bb90baed6c275495b03adc5569346a59fce2a3c8)
* bnxt_en: Add 5760X (Thor2) PCI IDs supportSreekanth Reddy2025-04-275-60/+93
| | | | | | | | | | Add Thor2 PCI IDs. Reviewed-by: Warner Losh <imp@FreeBSD.org> Reviewed-by: Sumit Saxena <sumit.saxena@broadcom.com> MFC-After: 3 days Differential-Revision: https://reviews.freebsd.org/D49725 (cherry picked from commit 26bd37da01cff2b2024f3f63b9ca318bf3a01669)
* iflib(4): Replace admin taskqueue group with per-interface taskqueuesKrzysztof Galazka2025-04-272-7/+5
| | | | | | | | | | | | | | | | | Using one taskqueue group with single thread to execute all admin tasks may lead to unexpected timeouts when long running task (e.g. handling a reset after FW update) for one interface prevents tasks from other interfaces being executed. Taskqueue group API doesn't let to dynamically add threads, and pre-allocating thread for each CPU as it's done for traffic queues would be a waste of resources on systems with small number of interfaces. Replace global taskqueue group for admin tasks with taskqueue allocated for each interface to allow independent execution. Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com> Reviewed by: imp, jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1336 (cherry picked from commit 3ad01642fe9e241124553f2f18fd365ffea5d20b)
* /sys/dev/bnxt: Enable NPAR support on BCM57504Vinícius Ferrão2025-04-272-0/+5
| | | | | | | | | This commit enables NPAR support for Broadcom 57504 10/25GbE NICs Signed-off-by: Vinícius Ferrão <vinicius@ferrao.net.br> Reviewed by: imp,ssaxena,nightquick@proton.me Pull Request: https://github.com/freebsd/freebsd-src/pull/1306 (cherry picked from commit 0bff716674418ec9f8c48131fb34cafc0af671e8)
* pci: Add hw.pci.intx_reroute sysctl/tunableColin Percival2025-04-261-1/+6
| | | | | | | | | | | | | | | | | | | | | INTRng can leak resources when INTx interrupts are re-routed, which is typically harmless but can be fatal when devices are (repeatedly) hot plugged into PCI buses on INTRng systems. Re-routing INTx interrupts is nonetheless still necessary on some systems, and identifying whether the re-routing should be enabled or disabled seems to be nontrivial. Add a hw.pci.intx_reroute sysctl/tunable so systems which don't want legacy PCI interrupt re-routing can turn it off. This is probably not the best fix but it's something which can be safely included in FreeBSD 14.3. Co-Authored-by: jhb Reviewed by: bz, jhb MFC after: 3 days Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D49849 (cherry picked from commit 2187ec93ada1c7399f2f3537920f6277bec4a0ef)
* wg: Improve wg_peer_alloc() to simplify the callingAaron LI2025-04-261-16/+26
| | | | | | | | | | | | | | Move the necessary extra logics (i.e., noise_remote_enable() and TAILQ_INSERT_TAIL()) from wg_ioctl_set() to wg_peer_alloc(), and thus make it easier to be called. Actually, the updated version is more asymmetric to wg_peer_destroy() and thus less likely to be misused. Meanwhile, rename it to wg_peer_create() to look more consistent with wg_peer_destroy(). Reviewed by: aly_aaronly.me (diff), markj Obtained from: DragonflyBSD 902964ab24ba (with some changes) (cherry picked from commit 7121e9414f294d116caeadd07ebd969136d3a631)
* cxgbe(4): Add two new transceiver types.Navdeep Parhar2025-04-222-1/+9
| | | | | | | | | Future firmwares will report these types to the driver. These transceivers work already but are misidentified as a different type. Sponsored by: Chelsio Communications (cherry picked from commit c22b297062e1440676973a8aa89cbad1571e22f9)
* cxgbe(4): Perform Conventional Reset instead of FLR on the device.Navdeep Parhar2025-04-221-18/+117
| | | | | | | | | | | | | | | | | | The driver uses bus_reset_child on its parent to reset itself but that performs an FLR whereas the hardware needs a Conventional Reset[1] for full re-initialization. Add routines that perform conventional hot reset and use them instead. The available reset mechanisms are: * PCIe secondary bus reset (default) * PCIe link bounce hw.cxgbe.reset_method can be used to override the default. The internal PL_RST is also available but is for testing only. [1] 6.6.1 in PCI Express® Base Specification 5.0 version 1.0 Sponsored by: Chelsio Communications (cherry picked from commit 011e3d0b8b90a4330f14b2cb7da45ed7b805ed10)
* cxgbe(4): Block most access to the hardware as soon as the adapter stops.Navdeep Parhar2025-04-225-30/+32
| | | | | | | | | | | | | | | Add a new hw_all_ok() routine and use it to avoid hardware access in the public control interfaces (ifnet ioctls, ifmedia calls, etc.). Continue to use hw_off_limits() in the private ioctls/sysctls and other debug code. Retire adapter_stopped() as it's of no use by itself. This fixes problems where ifnet slow-path operations would enter a synch_op just before set_adapter_hwstatus(false) and touch the hardware when it's not safe to do so. Sponsored by: Chelsio Communications (cherry picked from commit e19d84979a183deb37ce6d7e385c3ccf02a3c8c7)
* cxgbe(4): Use correct priority in begin_synchronized_op.Navdeep Parhar2025-04-221-10/+4
| | | | | | | | | It was always set to PCATCH because the driver tested (INTR_OK) instead of (flags & INTR_OK). Fit a WITNESS_WARN in a single line while here. Sponsored by: Chelsio Communications (cherry picked from commit 04bf43505bae1bb20d315a44e977d97aed3e5733)
* cxgbe(4): Remove some unused PCI routines and associated headers.Navdeep Parhar2025-04-222-30/+0
| | | | | | Sponsored by: Chelsio Communications (cherry picked from commit 9d76f6d042feecf16775a200ee79c4e50fc533ba)
* cxgb(4): Use routines from pci(9) instead of hand rolled equivalents.Navdeep Parhar2025-04-221-50/+5
| | | | | | | | There is no need to include private PCI headers in the driver. Sponsored by: Chelsio Communications (cherry picked from commit 762d32354a18517c28933ddc29f9d3d855e450b1)
* cxgbe(4): Remove smt_idx from the L2 table entry structure.Navdeep Parhar2025-04-222-5/+2
| | | | | | | | | An L2 table entry isn't associated with a particular SMT (Source MAC Table) entry. Sponsored by: Chelsio Communications (cherry picked from commit f79fba05a016d53e054d6f587213889c3e31b4db)
* cxgbe(4): Make sure suspend/resume works in recovery mode.Navdeep Parhar2025-04-222-0/+12
| | | | | | | | | | | | | | The driver does minimal initialization in this mode and suspend/resume should ignore resources that aren't setup. This is for debug only. kenv hw.cxgbe.sos="1" kldload if_cxgbe devctl suspend t6nex0 devctl resume t6nex0 Sponsored by: Chelsio Communications (cherry picked from commit f4ab14044c1de35b1aefad5449bddc5a1272f8d9)
* gve: Add feature to change TX/RX ring sizeVee Agarwal2025-04-185-6/+210
| | | | | | | | | | | | | | | | | | | This change introduces new sysctl handlers that allow the user to change RX/TX ring sizes. As before, the default ring sizes will come from the device (usually 1024). We also get the max/min limits from the device. In the case min values are not provided we have statically defined constants for the min values. Additionally, if the modify ring option is not enabled on the device, changing ring sizes via sysctl will not be possible. When changing ring sizes, the interface turns down momentarily while allocating/freeing resources as necessary. Signed-off-by: Vee Agarwal <veethebee@google.com> Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D49428 (cherry picked from commit 22fe926a62b7bca771d46502dd6a8c202f25b5be)
* gve: Add feature to adjust RX/TX queue countsVee Agarwal2025-04-186-39/+189
| | | | | | | | | | | | | | | This change introduces new sysctl handlers that allow the user to change RX/TX queue counts. As before, the default queue counts will be the max value the device can support. When chaning queue counts, the interface turns down momentarily while allocating/freeing resources as necessary. Signed-off-by: Vee Agarwal <veethebee@google.com> Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D49427 (cherry picked from commit e0464f74d5579e1538ce741b0a15e6604dbc53c4)
* gve: Allocate qpl per ring at ring allocation timeVee Agarwal2025-04-187-132/+114
| | | | | | | | | | | | | | | | Every tx and rx ring has its own queue-page-list (QPL) that serves as the bounce buffer. Previously we were allocating QPLs for all queues before the queues themselves were allocated and later associating a QPL with a queue. This is avoidable complexity: it is much more natural for each queue to allocate and free its own QPL. Signed-off-by: Vee Agarwal <veethebee@google.com> Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D49426 (cherry picked from commit f8ed8382daf4b9a97056b1dba4fe4e5cb4f7485c)
* pci: Make PCIe Eject timeout configurableColin Percival2025-04-161-5/+16
| | | | | | | | | | | | | | | | | PCIe mandates a 5 second delay between when the "Attention Button" is pressed and when the associated device is detached; this is to allow for the button to be pressed a second time to cancel the ejection. On some systems this 5 second delay may not be desireable; so introduce a hw.pci.pcie_hp_detach_timeout sysctl (which can also be set as a loader tunable) which specifies the timeout in milliseconds (default 5000). If set to zero, the device is detached immediately. Reviewed by: jhb MFC after: 2 weeks Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D49585 (cherry picked from commit 9be42ee6c9c741052bdc49f13bc953bf88a24423)
* mlx5en: Use connector type instead of cable type for media detectionAriel Ehrenberg2025-04-162-54/+57
| | | | (cherry picked from commit 89e0e3814e8ca205db7523f6ce6c63cebe4bfb0d)
* hyperv/storvsc: Avoid conditional asserts in storvsc_xferbuf_prepare()Mark Johnston2025-04-151-2/+0
| | | | | | | | | | | | | | | whu@ cannot reproduce the assertion failure which led to these ifdefs being added in the first place, and since they appear wrong, i.e., the assertions ought to apply to all platforms, let's remove them. This reverts commits 0af5a0cd2788efce9f444f4f781357d317bb0bb1 and 6f7b1310b6fe36f9bb653d3e97bc257adced3a2b. PR: 285681 Tested by: whu MFC after: 2 weeks (cherry picked from commit 54a3920dc9b3b5a47cdaaa3132b4fcf1c448a737)
* hyperv/storvsc: Fix busdma constraintsMark Johnston2025-04-151-1/+6
| | | | | | | | | | | | | | | | - The BUS_DMA_KEEP_PG_OFFSET flag is needed, since storvsc_xferbuf_prepare() assumes that only the first segment may have a non-zero offset, and that all following segments are page-sized and -aligned. - storvsc_xferbuf_prepare() handles 64-bit bus addresses, so avoid unneeded bouncing on i386. PR: 285681 Reported by: dim Tested by: dim, whu MFC after: 2 weeks (cherry picked from commit a319ba694538a38429115aaaf1d4b3946ea3a8b5)
* acpi_pci: Add quirk for DELAY-after-EJ0Colin Percival2025-04-142-0/+5
| | | | | | | | | | | | | | | | | | | | | | | On some EC2 instances, there is a race between removing a device from the system and making the PCI bus stop reporting the presence of the device. As a result, a PCI BUS_RESCAN performed immediately after the _EJ0 method returns "sees" the device which is being ejected, which then causes problems later (e.g. we won't recognize a new device being plugged into that slot because we never knew it was vacant). On other operating systems the bus is synchronously marked as needing to be rescanned but the rescan does not occur until O(1) seconds later. Create a new ACPI_Q_DELAY_BEFORE_EJECT_RESCAN quirk and set it in EC2 AMIs, and add a 10 ms DELAY between _EJ0 and BUS_RESCAN when tht quirk is set. Reviewed by: jhb MFC after: 1 month Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D49252 (cherry picked from commit 55c3348ed78fb1d0891e8bb51a8948f95da3560b)
* efirt: add a tunable to disable printing faults during EFIRT callsKonstantin Belousov2025-04-091-1/+10
| | | | | | PR: 285797 (cherry picked from commit fd748c7d5b7aefbeda604403f203637b12ae89df)
* acpi: Pass the correct device to acpi_pcib_oscAndrew Turner2025-04-081-1/+1
| | | | | | | | | | | | | Fix a copy-and-paste error in acpi_pcib_request_feature where the child device was passed into acpi_pcib_osc rather than the pcib device. Reviewed by: garga, jhb Fixes: ba1904937d9a ("acpica: Extract _OSC parsing to a common file") Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D48285 (cherry picked from commit b714eacb790551f35de03831b88ad7b7e1502102)
* smbios: style(9): smbios_cksum()Olivier Certner2025-04-081-8/+7
| | | | | | | | | | Reduce some variables' lifecycle. Remove useless casts. Remove superfluous braces. Add some consts. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation (cherry picked from commit ef446a8065ac0228a5da15f233cd2f964e4d7433)
* smbios: Harden decoding of the BCD revisionOlivier Certner2025-04-081-5/+7
| | | | | | | | | | bcd2bin() must not be called with a value greater or equal to LIBKERN_LEN_BCD2BIN. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation (cherry picked from commit 516e24e57987d184cce70e7f31443653aa1a5e63)
* smbios: Carefully print wrong entry point signature on identifyOlivier Certner2025-04-081-12/+29
| | | | | | | | | | | | | | Using printf() with '%s' can lead to arbitrary long printing (although, usually, a NUL byte should appear quite quickly) and trying to print unprintable characters. Instead, print in hexadecimal the exact bytes that are compared to the expected signature. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation (cherry picked from commit bb04712e37723d112b2fad28af4b035ef35a25be)
* smbios: Print an error on unexpected entry point length on identifyOlivier Certner2025-04-081-2/+7
| | | | | | | | | This helps figuring out quickly why no SMBIOS device appears in this case. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation (cherry picked from commit fdf08ac1e9f9baac4fcf4af8f3bf7a34d3ea0009)
* smbios: Apply the v2.1's length fixup only on a 32-bit entry pointOlivier Certner2025-04-081-8/+7
| | | | | | | | | | | | | | | | | Only allow the length tolerance (0x1e instead of 0x1f) for a 32-bit entry point, as there was no 64-bit entry point in the erroneous SMBIOS v2.1 standard and assigning the length with 0x1f does not make sense in this case. While here, fix accessing the major/minor versions via 'eps' even in the 64-bit entry point case (not causing any practical problem thus far as the entry point length is greater than any SMBIOS revisions in existence, so the comparison guarding the fixup would not pass). MFC after: 2 weeks Sponsored by: The FreeBSD Foundation (cherry picked from commit f6cbd6b6d2ccd672e4807128ce0d07db333d4335)
* smbios: Print an error on memory map failure on identifyOlivier Certner2025-04-081-1/+3
| | | | | | | | | Consistently with what the probe and attach methods are doing. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation (cherry picked from commit 3907feff7ab732b918ba3f5993e7a6718fffea14)
* smbios: Unmap memory on error on identifyOlivier Certner2025-04-081-41/+41
| | | | | | | | | | | | While here, de-indent most of the code by simply bailing out if 'addr' is still 0 after the various detection methods have been tried. Reviewed by: emaste, imp MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49180 (cherry picked from commit 67d510f0c07afd89e51e337e5abec47f4483ecd9)
* smbios: On attach, print the entry point version and revisionOlivier Certner2025-04-081-4/+12
| | | | | | | | | | | | | | Additionally, on verbose boot, print the entry point revision as a diagnostic/debugging help. PR: 284460 Reviewed by: markj, imp (both older version) MFC after: 2 weeks Event: February src bug-busting session Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49179 (cherry picked from commit e421a6615dc257b71ac5255336dddf5c99cd12aa)
* smbios: Search for v3 (64-bit) entry point first on BIOS bootOlivier Certner2025-04-081-2/+8
| | | | | | | | | | | | | | | | | | | | | | When booted from BIOS (i.e., not EFI), also search for a 64-bit version of the SMBIOS Entry Point. This allows us to detect and report the proper SMBIOS version with BIOSes that only provide the v3 table, as happens on Hetzner virtual machines. For machines that provide both, leverage the v3 table in priority consistently with the EFI case. PR: 284460 Reviewed by: markj, imp (both older version) MFC after: 2 weeks Relnotes: yes Event: February src bug-busting session Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49179 (cherry picked from commit bc7f6508363c5cf4544044e00bbaf71de8f0168d)
* smbios: style(9): sizeof(): No space before the parenthesisOlivier Certner2025-04-081-3/+3
| | | | | | | | | No functional change. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation (cherry picked from commit 69cf9e9a451df3b0bff92f879365f604811e394b)
* smbios: handle smbios3 for arm64Andrew Gallatin2025-04-082-58/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | Get smbios working on arm64 where it seems to be exclusively smbios version 3.x The "interesting" thing here is that the smbios table seems to be RAM in the EFI runtime services table. This makes it owned by "ram0", and not io memory. That prevents bus_alloc_resource() from being able to claim it, since ram0 already owns it. According to jhb, this is how things are supposed to work. Eg, bus_alloc_resource() is meant to be used with IO memory, not physical memory. Following his suggestion, I converted the driver to simply use pmap_mapbios(). This is a prerequisite for getting IPMI to attach via the SSIF attachment on arm64 servers, where all IPMI that I've seen uses SSIF. Note that this change is based on initial work by Allan Jude in https://reviews.freebsd.org/D28739. Reviewed by: imp Sponsored by: Netflix, Ampere Computing LLC (D28739) Differential Revision: https://reviews.freebsd.org/D42592 (cherry picked from commit ba0e4d7971e05ee64281a4fc49a2fb408c8ad816)
* mlx5en: sync channel close with the rq completion processingKonstantin Belousov2025-04-073-0/+17
| | | | (cherry picked from commit f0adc907fc7d3eebfc692fd5f4987c97e61b103d)
* sound: Fix regression in pcm/feeder_mixer.cChristos Margiolis2025-04-061-2/+4
| | | | | | | | | | | | This call was meant to be the default case in the first place, but somehow missed this. Reported by: glebius Fixes: 4021fa32d92d ("sound: Simplify pcm/feeder_mixer.c") MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit b6420b5ea5bcdeb859a2b3357e5dbaafe7aaff88)