From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 11 11:15:45 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 06E043BB for ; Fri, 11 Jan 2013 11:15:45 +0000 (UTC) (envelope-from cheunghonyu@gmail.com) Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) by mx1.freebsd.org (Postfix) with ESMTP id E285B3F9 for ; Fri, 11 Jan 2013 11:15:44 +0000 (UTC) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1TtcaO-0001tb-G3 for freebsd-hackers@freebsd.org; Fri, 11 Jan 2013 03:15:44 -0800 Date: Fri, 11 Jan 2013 03:15:44 -0800 (PST) From: zeissoctopus To: freebsd-hackers@freebsd.org Message-ID: <1357902944481-5776597.post@n5.nabble.com> Subject: dirty hack asmc for Macbook 3,1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2013 11:15:45 -0000 Dear All, My dirty hack just works but not perfect. --- /usr/src/sys/dev/asmc/asmcvar.h.original 2013-01-11 09:36:53.000000000 +0000 +++ /usr/src/sys/dev/asmc/asmcvar.h 2013-01-11 10:21:02.000000000 +0000 @@ -141,10 +141,22 @@ #define ASMC_MB_TEMPDESCS { "Enclosure Bottomside", \ "Northbridge Point 1", \ "Northbridge Point 2", "Heatsink 1", \ "Heatsink 2", "Memory Bank A", } +#define ASMC_MB31_TEMPS { "TB0T", "TN0P", "Th0H", "Th1H", \ + "TM0P", NULL } + +#define ASMC_MB31_TEMPNAMES { "enclosure", "northbridge1", \ + "heatsink1", "heatsink2", \ + "memory", } + +#define ASMC_MB31_TEMPDESCS { "Enclosure Bottomside", \ + "Northbridge Point 1", \ + "Heatsink 1", "Heatsink2", \ + "Memory Bank A", } + #define ASMC_MBP_TEMPS { "TB0T", "Th0H", "Th1H", "Tm0P", \ "TG0H", "TG0P", "TG0T", NULL } #define ASMC_MBP_TEMPNAMES { "enclosure", "heatsink1", \ "heatsink2", "memory", "graphics", \ --- /usr/src/sys/dev/asmc/asmc.c.original 2013-01-11 05:26:22.000000000 +0000 +++ /usr/src/sys/dev/asmc/asmc.c 2013-01-11 09:51:01.000000000 +0000 @@ -153,10 +153,16 @@ "MacBook2,1", "Apple SMC MacBook Core 2 Duo", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, NULL, NULL, NULL, ASMC_MB_TEMPS, ASMC_MB_TEMPNAMES, ASMC_MB_TEMPDESCS }, + { + "MacBook3,1", "Apple SMC MacBook Core 2 Duo", + ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, NULL, NULL, NULL, + ASMC_MB31_TEMPS, ASMC_MB31_TEMPNAMES, ASMC_MB31_TEMPDESCS + }, + { "MacBookPro1,1", "Apple SMC MacBook Pro Core Duo (15-inch)", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, ASMC_MBP_TEMPS, ASMC_MBP_TEMPNAMES, ASMC_MBP_TEMPDESCS }, The output of this new asmc on Macbook 3,1 : dev.asmc.0.%desc: Apple SMC MacBook Core 2 Duo 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: 4535 dev.asmc.0.fan.0.safespeed: 0 dev.asmc.0.fan.0.minspeed: 1800 dev.asmc.0.fan.0.maxspeed: 6200 dev.asmc.0.fan.0.targetspeed: 4525 dev.asmc.0.temp.enclosure: 28 dev.asmc.0.temp.northbridge1: 52 dev.asmc.0.temp.heatsink1: 57 dev.asmc.0.temp.heatsink2: 55 dev.asmc.0.temp.memory: 51 dev.asmc.0.sms.x: -20 dev.asmc.0.sms.y: 45 dev.asmc.0.sms.z: 264 Regards, zeissoctopus -- View this message in context: http://freebsd.1045724.n5.nabble.com/dirty-hack-asmc-for-Macbook-3-1-tp5776597.html Sent from the freebsd-hackers mailing list archive at Nabble.com.