From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by mx.groups.io with SMTP id smtpd.web10.1391.1599847998869675585 for ; Fri, 11 Sep 2020 11:13:19 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=bKGzUHvx; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.128.65, mailfrom: pete@akeo.ie) Received: by mail-wm1-f65.google.com with SMTP id q9so5233524wmj.2 for ; Fri, 11 Sep 2020 11:13:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=onaJetjraG6aR253jy5ot3bYoukJJqZsIDazTP9/4xU=; b=bKGzUHvx4Wd4Q7l7JvsIf5ODZda6PWci2IYOC4sn2ECp4wMjuRdkr2CWpexWEUrI4O K/6opIwxWqN/K5/5DHxfKyDrAxlUYhNE9NKhIEd1Ug4z0MVgX+demhbhBiTnMfJIj0oj RJCMrFyuggFtJFs5EoJ8KuPU/Nbvbs1WMe8nn4PxKGu7muMG7Obs5gScw6qGBPmObtP0 BUk1Q1aN7yfxfwtCXcLxdIniY9MlYv9j6HiVQ5nDU3Lk4JtB//WN3bfnpN+Ig9sItUnz 8jhcC/YLCwF+FPSn52Gd7q20uSXynJQP2lJwNSobmWE6Luu3WBQwlFHyvtDFy71Liqzg NrIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=onaJetjraG6aR253jy5ot3bYoukJJqZsIDazTP9/4xU=; b=L+cNHEOOEvlm3SuyW4FVse/uhkkuKGsPhh6a263zBzX75d3u8xT3nQrAxO31p9F1xL N7rhJA3B60RgBGiHKzCf4/61EZuBdIicFCnaQlfXNUIMmmozpI71YJZh2FFdu2natydT nUjED8MvZos+IJbCF0MlOcczm9hBJ+InKhjQixldCN+EkdSb075lVPIPxkhzstTLGi4w xbqX8FGGvRX+pSuODMP1IbwUQqEQlkI677tFRaZz99QruYMx73egg0LD8JMMCWl4hz4s 2eokg+MjwIwsPejBSm+glOvTViR/A2tVRQXBpnzWlQ3jsxmQ7ZjTGRdG0bVPauPl/WRk OPSw== X-Gm-Message-State: AOAM531ehuWRUlkMIBR8dkhq3FigtOSievwidxXRaYw08IPz5Ufhj1of L2mrwqPqjDh2yD84cvA2jScaug== X-Google-Smtp-Source: ABdhPJzyUOpx0fOpJBpGuou2DTbHl0lERMxmDb7V0htmSSATyfbFgtha6hFDuHndQBxq9h77hKMuXw== X-Received: by 2002:a1c:27c2:: with SMTP id n185mr3551604wmn.78.1599847997117; Fri, 11 Sep 2020 11:13:17 -0700 (PDT) Return-Path: Received: from [10.0.0.122] ([84.203.46.13]) by smtp.googlemail.com with ESMTPSA id y1sm5759123wmi.36.2020.09.11.11.13.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Sep 2020 11:13:16 -0700 (PDT) Subject: Re: [PATCH] Platform/RaspberryPi4: Correct thermal offset To: Jeremy Linton , devel@edk2.groups.io Cc: leif@nuviainc.com, awarkentin@vmware.com, ard.biesheuvel@arm.com References: <20200909231100.213015-1-jeremy.linton@arm.com> From: "Pete Batard" Message-ID: <45629083-0365-609b-a777-71062a15f0dd@akeo.ie> Date: Fri, 11 Sep 2020 19:13:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200909231100.213015-1-jeremy.linton@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit It might be worth sourcing public documentation, if you have any, indicating where these numeric values ultimately come from (the offset for absolute zero is easy to figure out, but the rest, not so much). Apart from that: On 2020.09.10 00:11, Jeremy Linton wrote: > The current mainline DT indicates that the thermal offset > on the rpi is 410040 rather than the 419949 being used. > This means our temp calculation is offset nearly 10C higher > when running in ACPI mode vs DT. > > Signed-off-by: Jeremy Linton > --- > Platform/RaspberryPi/AcpiTables/Dsdt.asl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Platform/RaspberryPi/AcpiTables/Dsdt.asl b/Platform/RaspberryPi/AcpiTables/Dsdt.asl > index 2b9e8211cf..d116f965e1 100644 > --- a/Platform/RaspberryPi/AcpiTables/Dsdt.asl > +++ b/Platform/RaspberryPi/AcpiTables/Dsdt.asl > @@ -269,7 +269,7 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "RPIFDN", "RPI", 2) > Field (TEMS, DWordAcc, NoLock, Preserve) { > > TMPS, 32 > > } > > - return (((419949 - ((TMPS & 0x3ff) * 487)) / 100) + 2732); > > + return (((410040 - ((TMPS & 0x3ff) * 487)) / 100) + 2732); > > } > > Method (_SCP, 3) { } // receive cooling policy from OS > > > Reviewed-by: Pete Batard