From nobody Fri Jan 06 19:13:41 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NpY0P5S0Wz2pF6t; Fri, 6 Jan 2023 19:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NpY0P4yVCz3RDV; Fri, 6 Jan 2023 19:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673032421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ssxaKV9sMxVBNOIuO7XYhFrTESJ/pi615GAM3Hltqb0=; b=tgsTlujiU/Mli8rOG6rfmjwqnRR7+WcnMpE4FoF6cb7DGSXuTa5FkA6PSEGSEGXRRVsfsI IO0R02acCK+LT7Hf95qv6lyWkn29z3FhuCMExMzAATYEFWS/Q2JOInf09o3w9x3Mgxp5fi 0c/AELZEbeaNsut4KaA5EZDDehyWDbK2FSVpL/cZtR/ZbJGuJk8T8OHzSTFLlB0XsqyqOD +kCPUfQUdw/jGbBlInOS93Qxc6xtl/30ZmvJQqvAH/zWF8CG2qo8GtoLGhIlDHIk7Slejw m+P5BFrq2aJLVLb2j77ZtVGPzxcluIy692WttYWw9yzvnTLsSBszQ8HkF+WN8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673032421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ssxaKV9sMxVBNOIuO7XYhFrTESJ/pi615GAM3Hltqb0=; b=M1SOcabt1vR2hEsXiGsDiO38u8oIPhpt94JGT8niHALgoFAEdreSiMvQLcD/Jd37+Qrnzh AGBikNL2YQRVwi2UONngar4rBqvyWvxeOV35CME9DsEgM2XHBcbfcFwNCLXY+4UDGwm+U4 3Eim2Upez5u+xI1fr9cmT8iaVLDF/karExK96OprJr6vmE36mqkOV/rpmFfpMx8QfTLN6t GfVndqrah8sBafvClPrMHr+BqdjmqbFO4uJi5pewN0Whz+/Ud2Z5BAY62it6Rbatp9G8ez lzVtDeaWGVH09N3ZV6U5ly0NGiYJDZrLQAUVu8dUuT/9dM0WUlOvOR7UmbVmGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673032421; a=rsa-sha256; cv=none; b=L/y6JWxWwKGSB+fsrUS1umIKQJbl9FSh1q1kQIVY1SvNkw96gBkqwDEpBSxeRAnI9Nubk2 qxNYRYiKvEsUCKbenDv7Cw/ZFH1Qe2UCH/+rcwRq1wH9pFkw689hm6dSmjew0QuCaZDENw kqfGGK9IkIHkxTjk0onWUKUbmt03uwawJw80QYL4lmpoq3qhbetJh//00ZUfVZjlUdxUZx /9a2wg7u0iKdMWInCdUOR2oz01/EhHUNeDAlvid/hb0sAVD/43vvxFc1YxV4GBerCw4klt F0/Ct9YvCWcemtN1BxQNIw7aPwj9z3gkoJAuk23f9gLKqxFF99ouGyVgvPyRQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NpY0P411FzhNS; Fri, 6 Jan 2023 19:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 306JDfI6009622; Fri, 6 Jan 2023 19:13:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 306JDfFN009621; Fri, 6 Jan 2023 19:13:41 GMT (envelope-from git) Date: Fri, 6 Jan 2023 19:13:41 GMT Message-Id: <202301061913.306JDfFN009621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Gmelin Subject: git: 638937d46664 - main - asmc: Add support for MacBook5,5 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grembo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 638937d466648a9e5733225aef62eeae02db4f03 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grembo (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=638937d466648a9e5733225aef62eeae02db4f03 commit 638937d466648a9e5733225aef62eeae02db4f03 Author: Michael Gmelin AuthorDate: 2022-12-29 15:59:08 +0000 Commit: Michael Gmelin CommitDate: 2023-01-06 19:11:56 +0000 asmc: Add support for MacBook5,5 This is a slightly refined version of a patch[0] by FreeBSD Forums user "tmcclean". [0]https://forums.freebsd.org/threads/success-installing-freebsd-13-0-on-macbook-pro-5-5.80458/ Reviewed by: adrian, emaste, imp Differential Revision: https://reviews.freebsd.org/D37900 MFC after: 1 month --- sys/dev/asmc/asmc.c | 14 ++++++++++---- sys/dev/asmc/asmcvar.h | 31 ++++++++++++++++++++++++++++--- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index cd35c35cd9ce..bec0054e2dd7 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -223,7 +223,13 @@ static const struct asmc_model asmc_models[] = { { "MacBookPro5,1", "Apple SMC MacBook Pro Core 2 Duo (2008/2009)", ASMC_SMS_FUNCS, ASMC_FAN_FUNCS, ASMC_LIGHT_FUNCS, - ASMC_MBP5_TEMPS, ASMC_MBP5_TEMPNAMES, ASMC_MBP5_TEMPDESCS + ASMC_MBP51_TEMPS, ASMC_MBP51_TEMPNAMES, ASMC_MBP51_TEMPDESCS + }, + + { + "MacBookPro5,5", "Apple SMC MacBook Pro Core 2 Duo (Mid 2009)", + ASMC_SMS_FUNCS, ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS, + ASMC_MBP55_TEMPS, ASMC_MBP55_TEMPNAMES, ASMC_MBP55_TEMPDESCS }, { @@ -1397,10 +1403,10 @@ asmc_sms_printintr(device_t dev, uint8_t type) case ASMC_ALSL_INT2A: /* * This suppresses console and log messages for the ambient - * light sensor for the only model known to generate this - * interrupt. + * light sensor for models known to generate this interrupt. */ - if (strcmp(sc->sc_model->smc_model, "MacBookPro6,2") == 0) + if (strcmp(sc->sc_model->smc_model, "MacBookPro5,5") == 0 || + strcmp(sc->sc_model->smc_model, "MacBookPro6,2") == 0) break; /* FALLTHROUGH */ default: diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h index 769903701a99..a594710f1cbe 100644 --- a/sys/dev/asmc/asmcvar.h +++ b/sys/dev/asmc/asmcvar.h @@ -209,13 +209,13 @@ struct asmc_softc { "Unknown", "Unknown", \ "Wireless Module", } -#define ASMC_MBP5_TEMPS { "TB0T", "TB1T", "TB2T", "TB3T", "TC0D", \ +#define ASMC_MBP51_TEMPS { "TB0T", "TB1T", "TB2T", "TB3T", "TC0D", \ "TC0F", "TC0P", "TG0D", "TG0F", "TG0H", \ "TG0P", "TG0T", "TG1H", "TN0D", "TN0P", \ "TTF0", "Th2H", "Tm0P", "Ts0P", "Ts0S", \ NULL } -#define ASMC_MBP5_TEMPNAMES { "enclosure_bottom_0", "enclosure_bottom_1", \ +#define ASMC_MBP51_TEMPNAMES { "enclosure_bottom_0", "enclosure_bottom_1", \ "enclosure_bottom_2", "enclosure_bottom_3", \ "cpu_diode", "cpu", \ "cpu_pin", "gpu_diode", \ @@ -226,7 +226,7 @@ struct asmc_softc { "heatsink_2", "memory_controller", \ "pci_express_slot_pin", "pci_express_slot_unk" } -#define ASMC_MBP5_TEMPDESCS { "Enclosure Bottom 0", "Enclosure Bottom 1", \ +#define ASMC_MBP51_TEMPDESCS { "Enclosure Bottom 0", "Enclosure Bottom 1", \ "Enclosure Bottom 2", "Enclosure Bottom 3", \ "CPU Diode", "CPU ???", \ "CPU Pin", "GPU Diode", \ @@ -264,6 +264,31 @@ struct asmc_softc { "Heat Sink 2", "Memory Controller", \ "Palm Rest", "Memory Proximity" } +#define ASMC_MBP55_TEMPS { "TB0T", "TB1T", \ + "TB2T", "TB3T", \ + "TC0D", "TC0P", \ + "TN0D", "TN0P", \ + "TTF0", \ + "Th0H", "Th1H", "ThFH", \ + "Ts0P", "Ts0S", \ + NULL } + +#define ASMC_MBP55_TEMPNAMES { "enclosure_bottom_0", "enclosure_bottom_1", \ + "enclosure_bottom_2", "enclosure_bottom_3", \ + "cpu_diode", "cpu_pin", \ + "northbridge_diode", "northbridge_pin", \ + "unknown", \ + "heatsink_0", "heatsink_1", "heatsink_2", \ + "pci_express_slot_pin", "pci_express_slot_unk" } + +#define ASMC_MBP55_TEMPDESCS { "Enclosure Bottom 0", "Enclosure Bottom 1", \ + "Enclosure Bottom 2", "Enclosure Bottom 3", \ + "CPU Diode", "CPU Pin", \ + "Northbridge Diode", "Northbridge Pin", \ + "Unknown", \ + "Heatsink 0", "Heatsink 1", "Heatsink 2", \ + "PCI Express Slot Pin", "PCI Express Slot (unk)" } + #define ASMC_MBP81_TEMPS { "TB0T", "TB1T", "TB2T", "TC0C", "TC0D", \ "TC0E", "TC0F", "TC0P", "TC1C", "TC2C", \ "TCFC", "TCGC", "TCSA", "TM0S", "TMBS", \