# Mac Mini 3,1 - FreeBSD 9.1 - asmc.ko solution



## trev (Jul 1, 2013)

Hardware: Mac Mini 3,1
OS: FreeBSD 9.1-STABLE

By default, the only Mac Mini supported by the FreeBSD asmc.ko module is the original Mac Mini 1,1. The diffs below add the Mac Mini 3,1 from 2009.


```
[cmd]diff /usr/src/sys/dev/asmc/asmc.c asmc.c[/cmd]

208a209,217
>       /* The Mac Mini 3,1 has no SMS */
>       { 
>         "Macmini3,1", "Apple SMC Mac Mini 3,1",
>         NULL, NULL, NULL,
>         ASMC_FAN_FUNCS,
>         NULL, NULL, NULL,
>         ASMC_MM31_TEMPS, ASMC_MM31_TEMPNAMES, ASMC_MM31_TEMPDESCS
>       },
>
```


```
[cmd]diff /usr/src/sys/dev/asmc/asmcvar.h asmcvar.h[/cmd]

182a183,201
> #define ASMC_MM31_TEMPS       { "TC0D", "TC0H", \
>                                 "TC0P", "TH0P", \
>                                 "TN0D", "TN0P", \
>                                 "TW0P", NULL }
> 
> #define ASMC_MM31_TEMPNAMES   { "cpu0_die", "cpu0_heatsink", \
>                                 "cpu0_proximity", "hdd_bay", \
>                                 "northbridge_die", \
>                                 "northbridge_proximity", \
>                                 "wireless_module", }
> 
> #define ASMC_MM31_TEMPDESCS   { "CPU0 Die Core Temperature", \
>                                 "CPU0 Heatsink Temperature", \
>                                 "CPU0 Proximity Temperature", \
>                                 "HDD Bay Temperature", \
>                                 "Northbridge Die Core Temperature", \
>                                 "Northbridge Proximity Temperature", \
>                                 "Wireless Module Temperature", }
>
```

The patched asmc.ko module now reports:


```
[cmd]sysctl -a | grep dev.asmc.0[/cmd]

dev.asmc.0.%desc: Apple SMC Mac Mini 3,1
dev.asmc.0.%driver: asmc
dev.asmc.0.%location: handle=\_SB_.PCI0.LPCB.SMC_
dev.asmc.0.%pnpinfo: _HID=APP0001 _UID=0
dev.asmc.0.%parent: acpi0
dev.asmc.0.fan.0.speed: 1737
dev.asmc.0.fan.0.safespeed: 0
dev.asmc.0.fan.0.minspeed: 1500
dev.asmc.0.fan.0.maxspeed: 5500
dev.asmc.0.fan.0.targetspeed: 1731
dev.asmc.0.temp.cpu0_die: 59
dev.asmc.0.temp.cpu0_heatsink: 57
dev.asmc.0.temp.cpu0_proximity: 57
dev.asmc.0.temp.hdd_bay: 53
dev.asmc.0.temp.northbridge_die: 78
dev.asmc.0.temp.northbridge_proximity: 65
dev.asmc.0.temp.wireless_module: 64
```

It's worth noting that the safe fan speed is always zero because that smc key cannot be read. I haven't messed with the fan code because it applies across all models.

Enjoy!


----------

