# DF-1325 — VERDICT

**REPRODUCED at the function level** (impact: `dos`).

## Mechanism

Identical to DF-1323 but in fiji_smumgr.c. fiji_thermal_setup_fan_table() computes t_diff1/t_diff2 from VBIOS at :2173-2176 and divides at :2181-2182 without zero check. duty100==0 guard exists at :2165.

## Why not live-reproduced on the QEMU guest

AMD Fiji GPU absent from QEMU guest; module loads only on matching HW. Triggered by VBIOS at adapter init, not by user syscall.

## Recommended fix

After computing t_diff1/t_diff2, check 'if (t_diff1 == 0 || t_diff2 == 0)' and clear PHM_PlatformCaps_MicrocodeFanControl + return 0.

## Kernel references (confirmed during verification)

- sys/dev/drm/amd/powerplay/smumgr/fiji_smumgr.c:2173-2176
- sys/dev/drm/amd/powerplay/smumgr/fiji_smumgr.c:2181-2182

## Build/run

- Build harness: `cc -O2 -Wall -o trigger trigger.c`
- Run harness: `./trigger`
- Apply fix: `cd /usr/src && patch -p1 < fix.diff`
- Build single-fix kernel: `make -j6 nativekernel KERNCONF=X86_64_GENERIC`
  (validated — see `fix_build.log`; all 15 fixes compile cleanly in one batched
  build, rc=0).

## Tested kernels

- baseline: `DragonFly 6.5-DEVELOPMENT #0: Thu Jul  2 06:02:54 UTC 2026     root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64`
- patched : `DragonFly 6.5-DEVELOPMENT #1: Mon Jul 20 21:51:01 UTC 2026     root@dfbsd:/usr/obj/usr/src/sys/X86_64_GENERIC  x86_64`
