DragonFlyBSD/src 1c84c5cshare/man/man4 sdhci.4

sdhci.4: Mention all tunables and sysctls, and other updates.

- Mention sdhci_acpi attaching controllers via ACPI.
- Be more technically correct on what kinds of cards it can support.
- Add some definitely working chips to list of actually tested devices.
- Mention fastest supported speeds: 50MHz HighSpeed, and DDR52 only on eMMC.
DeltaFile
+22-3share/man/man4/sdhci.4
+22-31 files

DragonFlyBSD/src ab8a932sys/dev/disk/sdhci sdhci_acpi.c

sdhci: Recognize AMD eMMC controller IDs AMDI0040 and AMDI0041.

Tested-with: IGEL M350C Thin Client (Ryzen R1505G SoC) using AMDI0040 ID.
DeltaFile
+5-0sys/dev/disk/sdhci/sdhci_acpi.c
+5-01 files

DragonFlyBSD/src 03cb7cesys/sys cdefs.h

<sys/cdefs.h>: Copy attributes for strong/weak references.

GCC 9 and later take issue with mismatched attributes between aliased
functions. At the same time, the 'copy' attribute was added to copy
the attributes for these cases.

Change __{strong,weak}_reference() to use it. Fixes GCC 12.5's
-Wmissing-attribute warnings.

This is based on a patch by Scott Parlane <scott at parlanenz.com>, which
was based on the change made in linux for the same issue.
DeltaFile
+10-3sys/sys/cdefs.h
+10-31 files

DragonFlyBSD/src 99f0646gnu/usr.bin/gdb/kgdb trgt.c

refactor: remove dead i386/ILP32 code from kernel, userland, and tests (2)

* Put the platform fall-through test in kgdb back in, just removing
  the i386 part.
DeltaFile
+4-0gnu/usr.bin/gdb/kgdb/trgt.c
+4-01 files

DragonFlyBSD/src 404aa64lib/libefivar efi-osdep.h, sbin/disklabel32 disklabel.c

refactor: remove dead i386/ILP32 code from kernel, userland, and tests

DragonFly is x86_64-only. Remove permanently dead #ifdef __i386__,
userland tools, and regression tests. The code is never compiled.
DeltaFile
+0-31sys/dev/misc/ppc/ppc.c
+0-27sbin/disklabel32/disklabel.c
+0-21sys/dev/misc/dcons/dcons_os.c
+0-18sys/dev/netif/sf/if_sfreg.h
+0-8tools/regression/lib/libm/test-lrint.c
+1-7lib/libefivar/efi-osdep.h
+1-1127 files not shown
+1-15013 files

DragonFlyBSD/src 5ab6a11sys/dev/raid/dpt dpt_scsi.c, sys/dev/sound unit.c

refactor: remove large #if 0 dead code blocks

Remove 3200+ lines of permanently dead code guarded by #if 0 across
kernel, drivers, VFS, and userland. Several blocks have author comments
explicitly requesting removal. Code can be inspected in git history.
DeltaFile
+0-845sys/dev/raid/dpt/dpt_scsi.c
+0-302sys/vfs/fuse/fuse_io.c
+0-227sys/vfs/hammer/hammer_btree.c
+0-173sys/platform/pc64/x86_64/npx.c
+0-172sys/platform/vkernel64/x86_64/npx.c
+0-164sys/dev/sound/unit.c
+0-1,88311 files not shown
+0-3,27417 files

DragonFlyBSD/src 8872584etc/defaults uuids

feat: etc/defaults/uuids: expand GPT partition type UUID database

Add comprehensive UUID-to-name mappings for:
- Plan 9, Haiku BFS, QNX6, Minix
- MidnightBSD (boot, data, swap, UFS, vinum, ZFS)
- HP-UX, Solaris/illumos (full set)
- Linux arch-specific root/usr partitions (x86, x86-64, ARM,
  AArch64, RISC-V, PPC, LoongArch, s390, Alpha, ARC, PA-RISC, MIPS)
- Linux /home, /srv, /var, /boot, dm-crypt, LUKS
- Ceph (OSD, journals, blocks, WAL, LUKS variants)
- Fuchsia, ChromeOS, Container Linux/CoreOS
- Android (common types)
- Apple APFS Preboot/Recovery
- VMware, ONIE, Atari TOS, OS/2 ArcaOS, AmigaOS/Emu68
- VeraCrypt, SPDK, barebox, U-Boot, SoftRAID
- Sony PlayStation 4 (Orbis OS) - all 13 partition types
- Generic: Intel Fast Flash, Sony Boot, Lenovo Boot, PowerPC PReP

Also fix VMware "Diagostic" typo and normalize NetBSD Swap case.
DeltaFile
+236-20etc/defaults/uuids
+236-201 files

DragonFlyBSD/src fa57f06sys/config LINT64

LINT64: Add apple_fw.
DeltaFile
+3-0sys/config/LINT64
+3-01 files

DragonFlyBSD/src 77a1380sys/dev/apple/fw apple_fw.c

kernel/apple_fw: Declare local vars at function start.
DeltaFile
+1-1sys/dev/apple/fw/apple_fw.c
+1-11 files

DragonFlyBSD/src f06a5a2sys/dev/apple/fw apple_fw.h, sys/dev/apple/smc debug.h smc.h

kernel/apple_{fw,smc}: Fix include guard comments.
DeltaFile
+1-1sys/dev/apple/fw/apple_fw.h
+1-1sys/dev/apple/smc/debug.h
+1-1sys/dev/apple/smc/smc.h
+3-33 files

DragonFlyBSD/src 3e5efcbsys/platform/pc64 Makefile.inc

kernel: Really hook apple_fw and apple_smc into the build.
DeltaFile
+1-1sys/platform/pc64/Makefile.inc
+1-11 files

DragonFlyBSD/src 059c494sys/dev/apple/smc smc_sysctl.c

kernel/apple_smc: Fix the build with APPLE_SMC_DEBUG.
DeltaFile
+1-1sys/dev/apple/smc/smc_sysctl.c
+1-11 files

DragonFlyBSD/src ea0f283lib/libc/sys kldunload.2, sbin/kldunload kldunload.8

kldunload.2, kldunload.8: Document the EPERM return by security level
DeltaFile
+9-1sbin/kldunload/kldunload.8
+6-2lib/libc/sys/kldunload.2
+15-32 files

DragonFlyBSD/src b1d1770lib/libc/sys kldload.2

kldload.2: Document the behavior of 'file' argument

Also document another case of EPERM return.
DeltaFile
+15-2lib/libc/sys/kldload.2
+15-21 files

DragonFlyBSD/src 6138279lib/libc/sys kldstat.2, sys/sys linker.h

kldstat.2: Fix wrong comment for kld_file_stat.version field
DeltaFile
+2-2lib/libc/sys/kldstat.2
+1-1sys/sys/linker.h
+3-32 files

DragonFlyBSD/src 73e6225sbin/kldload kldload.8 kldload.c

kldload(8): Warn when a module exists in current dir but not loaded

When a bare filename is specified, kldload(8) only searches it in the
paths defined by 'kern.module_path' kenv/sysctl.  When the same module
exists in the current directory, it will not be loaded.  This can cause
surprise and confusion.

To not change the behavior as well as keep consistent with FreeBSD, emit
a warning in this case.  The FreeBSD implementation looks unnecessarily
complex, so I chose to do it in another way.

In addition, improve the verbose message to also print the actual module
path.

Sync the man page with FreeBSD's.
DeltaFile
+51-6sbin/kldload/kldload.8
+30-6sbin/kldload/kldload.c
+81-122 files

DragonFlyBSD/src 5dbc2f6sys/bus/u4b usb_device.h usb_transfer.h, sys/bus/u4b/uvc uvc_v4l2.c

u4b/uvc: Group UVC-related prototypes to help future sync

* Move three prototypes from usbdi.h to usb_device.h, because their
  implementations are in usb_device.c.
* Group the prototypes for UVC together, so it helps sync the other
  parts with FreeBSD.
DeltaFile
+5-1sys/bus/u4b/usb_device.h
+2-1sys/bus/u4b/usb_transfer.h
+0-3sys/bus/u4b/usbdi.h
+1-0sys/bus/u4b/uvc/uvc_v4l2.c
+8-54 files

DragonFlyBSD/src ebdd7desys/bus/u4b/uvc uvc_ctrls.c uvc_drv.c, sys/netproto/802_11 ieee80211_dragonfly.h

Define FreeBSD's _SAFE queue macros to be _MUTABLE

No need to reimplement it.  Our equivalents are called _MUTABLE since
it's a better name.
DeltaFile
+1-7sys/bus/u4b/uvc/uvc_ctrls.c
+1-7sys/bus/u4b/uvc/uvc_drv.c
+2-3sys/netproto/802_11/ieee80211_dragonfly.h
+4-173 files

DragonFlyBSD/src 147cec4sys/kern subr_log.c

kern: Fix logclose() to call callout_terminate() to avoid memory leak
DeltaFile
+1-1sys/kern/subr_log.c
+1-11 files

DragonFlyBSD/src a5bc467sys/bus/u4b/controller ohci_pci.c ehci_pci.c, sys/dev/pccard/pccbb pccbb.c

kern: Fix device_delete_child() to detach parent first

When detaching device trees parent devices must be detached prior to
detaching its children. This is because parent devices can have
pointers to the child devices in their softcs which are not
invalidated by device_delete_child(). This can cause use after free
issues and panic().

Obtained-from: FreeBSD (commit: d3bf5efc1ff19b102b176512a66110ec84ac982d)
DeltaFile
+3-15sys/dev/pccard/pccbb/pccbb.c
+5-3sys/kern/subr_bus.c
+0-6sys/bus/u4b/controller/ohci_pci.c
+0-6sys/bus/u4b/controller/ehci_pci.c
+0-6sys/bus/u4b/controller/uhci_pci.c
+0-6sys/bus/u4b/controller/xhci_pci.c
+8-421 files not shown
+9-457 files

DragonFlyBSD/src e00d227sys/bus/u4b usbdevs, sys/bus/u4b/quirk usb_quirk.c usb_quirk.h

u4b: Sync usbdevs and quirs with FreeBSD

* Keep a few our additions in usbdevs and usb_quirk.h.
* Fix usb_quirk_str[] to include new quirks added for uvc(4).
* Remove a few duplicate from usbdevs.
* Fix serial/u3g.c and serial/uftdi.c to use the new product defines.
DeltaFile
+471-416sys/bus/u4b/quirk/usb_quirk.c
+600-109sys/bus/u4b/usbdevs
+13-9sys/bus/u4b/quirk/usb_quirk.h
+9-9sys/bus/u4b/serial/uftdi.c
+6-6sys/bus/u4b/serial/u3g.c
+1,099-5495 files

DragonFlyBSD/src 01f0d53sys/bus/cam cam_xpt.c cam_xpt_sim.h, sys/bus/u4b/storage umass.c

cam: Fix xpt_bus_register()/xpt_bus_deregister() to return errno

xpt_bus_register and xpt_bus_deregister returns a hybrid error that's
neither a cam_status, nor an errno, but a mix of both.  Update
xpt_bus_register and xpt_bus_deregister to return an errno. The vast
majority of current users compare against zero, which can also be
spelled CAM_SUCCESS. Nobody uses CAM_FAILURE, so remove that symbol
to prevent comfusion (nothing returns it either).

Where the return value is saved, ensure that the variable 'error' is
used to store an errno and 'status' is used to store a cam_status where
it makes the code clearer (usually just in functions that already mix
and match). Where the return value isn't used at all, avoid storing it
at all.

Obtained-from: FreeBSD (commit 30f8afd0270e0bb70e1e0df1cf8de7a841797a30)
DeltaFile
+8-7sys/bus/cam/cam_xpt.c
+6-3sys/bus/u4b/storage/umass.c
+4-4sys/dev/virtual/vmware/pvscsi/pvscsi.c
+2-2sys/bus/cam/cam_xpt_sim.h
+1-1sys/dev/disk/ahci/ahci_cam.c
+1-1sys/dev/disk/nata/atapi-cam.c
+22-182 files not shown
+23-208 files

DragonFlyBSD/src 67bbc7fsys/bus/u4b/storage umass.c

u4b/umass: Fix umass_cam_attach_sim() to correctly free sc_sim

However, this doesn't fix any real bug, because our xpt_bus_register()
will never fail.
DeltaFile
+1-0sys/bus/u4b/storage/umass.c
+1-01 files

DragonFlyBSD/src c085529sys/bus/u4b usb_busdma.c usb_busdma.h

u4b: Sync usb_busdma.[ch] with FreeBSD
DeltaFile
+37-32sys/bus/u4b/usb_busdma.c
+6-7sys/bus/u4b/usb_busdma.h
+43-392 files

DragonFlyBSD/src 3502d4dsys/bus/cam cam_periph.c, sys/bus/cam/scsi scsi_da.c

cam: Fix strncmp() comparison length for "umass"
DeltaFile
+1-1sys/bus/cam/scsi/scsi_da.c
+1-1sys/bus/cam/cam_periph.c
+2-22 files

DragonFlyBSD/src 78a2f6esys/bus/cam cam_sim.c

cam: Fix cam_sim_alloc() to avoid a potential memory leak

When both 'lock' and 'queue' were passed as NULL, the internally
allocated 'queue' would become leaked memory.

Simply assert 'lock' cannot be NULL to fix the bug.
DeltaFile
+2-3sys/bus/cam/cam_sim.c
+2-31 files

DragonFlyBSD/src 31ee334sys/bus/u4b/storage umass.c

u4b/umass: Sync with FreeBSD

FreeBSD's change in commit 7520b88860d7a79432e12ffcc47056844518bb62
(usb(4): Automagically apply all quirks for USB mass storage devices)
is deliberately ignored, because that function is buggy and has been
disabled by default in commit d41600e59c3f13419066e9dd771a03328c44624f
(usb: Make autoquirk code optional and opt out).
DeltaFile
+161-205sys/bus/u4b/storage/umass.c
+161-2051 files

DragonFlyBSD/src e80e744sys/bus/cam cam_xpt.c

cam: Fix variable typos "busses_*" -> "buses_*"
DeltaFile
+10-10sys/bus/cam/cam_xpt.c
+10-101 files

DragonFlyBSD/src ca9debdsys/dev/drm drm_dragonfly.c linux_irq.c, sys/dev/drm/amd/amdgpu amdgpu_drv.c

feat: drm: split probe/attach lifecycle and fix radeon VBIOS ROM BAR

Restructure i915/radeon/amdgpu to split PCI probe from drm_attach so
the pdev lifecycle is valid for the entire driver lifetime.

Add ROM BAR fallback in radeon_bios when vga_pci_alloc_resource fails,
fixing VBIOS read on Apple EFI machines where the legacy ROM resource
is not mapped.
DeltaFile
+65-25sys/dev/drm/amd/amdgpu/amdgpu_drv.c
+65-19sys/dev/drm/radeon/radeon_drv.c
+52-20sys/dev/drm/i915/i915_pci.c
+41-13sys/dev/drm/radeon/radeon_bios.c
+22-0sys/dev/drm/drm_dragonfly.c
+9-1sys/dev/drm/linux_irq.c
+254-781 files not shown
+254-807 files

DragonFlyBSD/src 95be320sys/dev/acpica acpi_cpu_pstate.c

fix: cpu_pst: add hw.acpi.cpu.pst.ppc tunable to override ACPI _PPC

Apple EFI sets _PPC (CPLT) to the most restrictive P-state, locking
non-macOS systems to 800 MHz.  Add ppc tunable matching the existing
pdl pattern so the override can be set from loader.conf.
DeltaFile
+24-0sys/dev/acpica/acpi_cpu_pstate.c
+24-01 files