From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.60894.1598900739318958903 for ; Mon, 31 Aug 2020 12:05:39 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ard.biesheuvel@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 85A2930E; Mon, 31 Aug 2020 12:05:38 -0700 (PDT) Received: from [192.168.1.205] (unknown [10.37.8.74]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 22B8A3F68F; Mon, 31 Aug 2020 12:05:35 -0700 (PDT) Subject: Re: [PATCH v4 5/6] Platform/RaspberryPi4: Allow the user to set Temp To: Pete Batard , Jeremy Linton , devel@edk2.groups.io Cc: Leif Lindholm , Andrei Warkentin , Samer El-Haj-Mahmoud References: <20200831172549.24079-1-jeremy.linton@arm.com> <20200831172549.24079-6-jeremy.linton@arm.com> From: "Ard Biesheuvel" Message-ID: <9d8404ea-cf5e-bd65-f1b8-96eefbbd3ece@arm.com> Date: Mon, 31 Aug 2020 22:05:32 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 8/31/20 8:57 PM, Pete Batard wrote: > One remark about using PcdSet32S ()=C2=A0 as opposed to PcdSet32 (), si= nce we=20 > just went through an exercise making sure that we switched to the secur= e=20 > version of these calls. >=20 > On 2020.08.31 18:25, Jeremy Linton wrote: >> Now that we have the ability to enable an AML fan object, >> allow the user to select the temperature at which the >> fan cycles on. >> >> Cc: Leif Lindholm >> Cc: Pete Batard >> Cc: Andrei Warkentin >> Cc: Ard Biesheuvel >> Cc: Samer El-Haj-Mahmoud >> Signed-off-by: Jeremy Linton >> --- >> =C2=A0 Platform/RaspberryPi/AcpiTables/SsdtThermal.asl=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 9 +++++---- >> =C2=A0 Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 | 11=20 >> ++++++++++- >> =C2=A0 Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf=C2=A0=C2=A0= =C2=A0 |=C2=A0 1 + >> =C2=A0 Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni |=C2=A0= 5 ++++- >> =C2=A0 Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr | 16=20 >> ++++++++++++++++ >> =C2=A0 Platform/RaspberryPi/Include/ConfigVars.h=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 4 ++= ++ >> =C2=A0 Platform/RaspberryPi/RPi3/RPi3.dsc=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 |=C2=A0 1 + >> =C2=A0 Platform/RaspberryPi/RPi4/RPi4.dsc=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 |=C2=A0 1 + >> =C2=A0 Platform/RaspberryPi/RaspberryPi.dec=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 |=C2=A0 1 + >> =C2=A0 9 files changed, 43 insertions(+), 6 deletions(-) >> >> diff --git a/Platform/RaspberryPi/AcpiTables/SsdtThermal.asl=20 >> b/Platform/RaspberryPi/AcpiTables/SsdtThermal.asl >> index ee028173e1..acfa4699bb 100644 >> --- a/Platform/RaspberryPi/AcpiTables/SsdtThermal.asl >> +++ b/Platform/RaspberryPi/AcpiTables/SsdtThermal.asl >> @@ -23,6 +23,7 @@ DefinitionBlock (__FILE__, "SSDT", 5, "RPIFDN",=20 >> "RPITHFAN", 2) >> =C2=A0=C2=A0=C2=A0 { >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 // Define a NameOp we will modify durin= g InstallTable >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Name (GIOP, 0x2) //08 47 49 4f 50 0a 02= (value must be >1) >> +=C2=A0=C2=A0=C2=A0 Name (FTMP, 0x2) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 // Describe a fan >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 PowerResource (PFAN, 0, 0) { >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 OperationRegion (GPIO, Syst= emMemory, GPIO_BASE_ADDRESS, 0x1000) >> @@ -68,9 +69,9 @@ DefinitionBlock (__FILE__, "SSDT", 5, "RPIFDN",=20 >> "RPITHFAN", 2) >> =C2=A0=C2=A0=C2=A0 // merge in an active cooling point. >> =C2=A0=C2=A0=C2=A0 Scope (\_SB_.EC00.TZ00) >> =C2=A0=C2=A0=C2=A0 { >> -=C2=A0=C2=A0=C2=A0 Method (_AC0) { Return (3332) }=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 // (60C) active cooling=20 >> trip point, >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 // if this is lower than=20 >> PSV then we >> -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 // prefer active cooling >> -=C2=A0=C2=A0=C2=A0 Name (_AL0, Package () { \_SB_.EC00.FAN0 }) // the= fan used for=20 >> AC0 above >> +=C2=A0=C2=A0=C2=A0 Method (_AC0) { Return ( (FTMP * 10) + 2732) } // = (60C) active=20 >> cooling trip point, >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 // if this is=20 >> lower than PSV then we >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 // prefer active=20 >> cooling >> +=C2=A0=C2=A0=C2=A0 Name (_AL0, Package () { \_SB_.EC00.FAN0 })=C2=A0=C2= =A0=C2=A0 // the fan used=20 >> for AC0 above >> =C2=A0=C2=A0=C2=A0 } >> =C2=A0 } >> diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c=20 >> b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c >> index d58cbbdfe7..e8f964a329 100644 >> --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c >> +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.c >> @@ -256,8 +256,16 @@ SetupVariables ( >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 PcdSet32 (PcdFanOnGpio, PcdGet32 (PcdFa= nOnGpio)); >> >> =C2=A0=C2=A0=C2=A0 } >> >> >> -=C2=A0 Size =3D sizeof(AssetTagVar); >> >> +=C2=A0 Size =3D sizeof (UINT32); >> >> +=C2=A0 Status =3D gRT->GetVariable (L"FanTemp", >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &gConfigDxeFormSetGuid, >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 NULL, &Size, &Var32); >> >> +=C2=A0 if (EFI_ERROR (Status)) { >> >> +=C2=A0=C2=A0=C2=A0 PcdSet32 (PcdFanTemp, PcdGet32 (PcdFanTemp)); >=20 >=20 > This should be replaced with: >=20 > +=C2=A0=C2=A0=C2=A0 Status =3D PcdSet32S (PcdFanTemp, PcdGet32 (PcdFanT= emp)); > +=C2=A0=C2=A0=C2=A0 ASSERT_EFI_ERROR (Status); >=20 Agreed. > Rather than re-spin this patch set yet again, and since the rest of the= =20 > series looks good, I'm hoping this change can be applied during=20 > integration. >=20 That should not be a problem. If nothing else comes up, I will merge=20 these tomorrow. >> >> +=C2=A0 } >> >> + >> >> >> +=C2=A0 Size =3D sizeof (AssetTagVar); >> >> =C2=A0=C2=A0=C2=A0 Status =3D gRT->GetVariable(L"AssetTag", >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 &gConfigDxeFormSetGuid, >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 NULL, &Size, AssetTagVar); >> >> @@ -697,6 +705,7 @@ VerifyUpdateTable( >> >> =C2=A0 STATIC AML_NAME_OP_REPLACE SsdtNameOpReplace[] =3D { >> >> =C2=A0=C2=A0=C2=A0 {"GIOP", PcdToken(PcdFanOnGpio)}, >> >> +=C2=A0 {"FTMP", PcdToken(PcdFanTemp)}, >> >> =C2=A0=C2=A0=C2=A0 {} >> >> =C2=A0 }; >> >> >> diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf=20 >> b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf >> index 321e402e65..544e3b3e10 100644 >> --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf >> +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxe.inf >> @@ -91,6 +91,7 @@ >> =C2=A0=C2=A0=C2=A0 gRaspberryPiTokenSpaceGuid.PcdRamMoreThan3GB >> >> =C2=A0=C2=A0=C2=A0 gRaspberryPiTokenSpaceGuid.PcdRamLimitTo3GB >> >> =C2=A0=C2=A0=C2=A0 gRaspberryPiTokenSpaceGuid.PcdFanOnGpio >> >> +=C2=A0 gRaspberryPiTokenSpaceGuid.PcdFanTemp >> >> >> =C2=A0 [Depex] >> >> =C2=A0=C2=A0=C2=A0 gPcdProtocolGuid AND gRaspberryPiFirmwareProtocolGu= id >> >> diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni=20 >> b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni >> index e2d1bb4b39..2afe8f32ae 100644 >> --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni >> +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni >> @@ -49,11 +49,14 @@ >> =C2=A0 #string STR_ADVANCED_SYSTAB_DT=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 #language en-US "Devicetree" >> >> >> =C2=A0 #string STR_ADVANCED_FANONGPIO_PROMPT #language en-US "ACPI fan= =20 >> control" >> >> -#string STR_ADVANCED_FANONGPIO_HELP=C2=A0=C2=A0 #language en-US "Cycl= e a fan=20 >> via GPIO if temp exceeds 60C" >> >> +#string STR_ADVANCED_FANONGPIO_HELP=C2=A0=C2=A0 #language en-US "Cycl= e a fan=20 >> via GPIO at given temperature" >> >> =C2=A0 #string STR_ADVANCED_FANONGPIO_OFF=C2=A0=C2=A0=C2=A0 #language = en-US "Disabled" >> >> =C2=A0 #string STR_ADVANCED_FANONGPIO_18=C2=A0=C2=A0=C2=A0=C2=A0 #lang= uage en-US "Fan=20 >> Shim/GPIO-18" >> >> =C2=A0 #string STR_ADVANCED_FANONGPIO_19=C2=A0=C2=A0=C2=A0=C2=A0 #lang= uage en-US "GPIO-19" >> >> >> +#string STR_ADVANCED_FANTEMP_PROMPT=C2=A0=C2=A0 #language en-US "ACPI= fan=20 >> temperature" >> >> +#string STR_ADVANCED_FANTEMP_HELP=C2=A0=C2=A0=C2=A0=C2=A0 #language e= n-US "Cycle a fan at C" >> >> + >> >> =C2=A0 #string STR_ADVANCED_ASSET_TAG_PROMPT #language en-US "Asset Ta= g" >> >> =C2=A0 #string STR_ADVANCED_ASSET_TAG_HELP=C2=A0=C2=A0 #language en-US= "Set the=20 >> system Asset Tag" >> >> >> diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr=20 >> b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr >> index 94332caab3..de5e43471a 100644 >> --- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr >> +++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.vfr >> @@ -51,6 +51,11 @@ formset >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 name=C2=A0 =3D FanOnGpio, >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 guid=C2=A0 =3D CONFIGDXE_FO= RM_SET_GUID; >> >> >> +=C2=A0=C2=A0=C2=A0 efivarstore ADVANCED_FANTEMP_VARSTORE_DATA, >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 attribute =3D EFI_VARIABLE_BOOTSERVICE= _ACCESS |=20 >> EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE, >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 name=C2=A0 =3D FanTemp, >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 guid=C2=A0 =3D CONFIGDXE_FORM_SET_GUID= ; >> >> + >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 efivarstore SYSTEM_TABLE_MODE_VARSTORE_= DATA, >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 attribute =3D EFI_VARIABLE_= BOOTSERVICE_ACCESS |=20 >> EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE, >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 name=C2=A0 =3D SystemTableM= ode, >> >> @@ -191,6 +196,17 @@ formset >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 option text =3D STRING_TOKEN(STR_ADVANCED_FANONGPIO_19= ),=20 >> value =3D 19, flags =3D 0; >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 end= oneof; >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 endif; >> >> + >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 grayoutif ideqval FanOnGpi= o.Enabled =3D=3D 0; >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 numeric varid = =3D FanTemp.Value, >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 prompt=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D STRING_TOKEN(STR_ADVAN= CED_FANTEMP_PROMPT), >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 help=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D STRING_TOKEN= (STR_ADVANCED_FANTEMP_HELP), >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 flags=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =3D DISPLAY_UINT_DEC = | NUMERIC_SIZE_4 |=20 >> INTERACTIVE | RESET_REQUIRED, >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 minimum =3D 50= , >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 maximum =3D 80, >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 default =3D 60, >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 endnumeric; >> >> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 endif; >> >> =C2=A0 #endif >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 string varid =3D= AssetTag.AssetTag, >> >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 prompt=C2=A0 =3D STRING_TOKEN(STR_ADVANCED_ASSET_TAG_PROMPT), >> >> diff --git a/Platform/RaspberryPi/Include/ConfigVars.h=20 >> b/Platform/RaspberryPi/Include/ConfigVars.h >> index 1a40469bfa..8094d4ef9a 100644 >> --- a/Platform/RaspberryPi/Include/ConfigVars.h >> +++ b/Platform/RaspberryPi/Include/ConfigVars.h >> @@ -73,6 +73,10 @@ typedef struct { >> =C2=A0 } ADVANCED_FAN_ON_GPIO_VARSTORE_DATA; >> >> >> =C2=A0 typedef struct { >> >> +=C2=A0 UINT32 Value; >> >> +} ADVANCED_FANTEMP_VARSTORE_DATA; >> >> + >> >> +typedef struct { >> >> =C2=A0 #define SYSTEM_TABLE_MODE_ACPI 0 >> >> =C2=A0 #define SYSTEM_TABLE_MODE_BOTH 1 >> >> =C2=A0 #define SYSTEM_TABLE_MODE_DT=C2=A0=C2=A0 2 >> >> diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc=20 >> b/Platform/RaspberryPi/RPi3/RPi3.dsc >> index cef8932ca2..484a46ffba 100644 >> --- a/Platform/RaspberryPi/RPi3/RPi3.dsc >> +++ b/Platform/RaspberryPi/RPi3/RPi3.dsc >> @@ -502,6 +502,7 @@ >> =C2=A0=C2=A0=C2=A0 # Enable a fan in the ACPI thermal zone on GPIO pin= # >> >> =C2=A0=C2=A0=C2=A0 # >> >> =20 >> gRaspberryPiTokenSpaceGuid.PcdFanOnGpio|L"FanOnGpio"|gConfigDxeFormSet= Guid|0x0|0=20 >> >> >> + =20 >> gRaspberryPiTokenSpaceGuid.PcdFanTemp|L"FanTemp"|gConfigDxeFormSetGuid= |0x0|0=20 >> >> >> >> =C2=A0=C2=A0=C2=A0 # >> >> =C2=A0=C2=A0=C2=A0 # Common UEFI ones. >> >> diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc=20 >> b/Platform/RaspberryPi/RPi4/RPi4.dsc >> index 9d0eaf10a1..823c9fc007 100644 >> --- a/Platform/RaspberryPi/RPi4/RPi4.dsc >> +++ b/Platform/RaspberryPi/RPi4/RPi4.dsc >> @@ -516,6 +516,7 @@ >> =C2=A0=C2=A0=C2=A0 # 19 - Enabled on pin 19 >> >> =C2=A0=C2=A0=C2=A0 # >> >> =20 >> gRaspberryPiTokenSpaceGuid.PcdFanOnGpio|L"FanOnGpio"|gConfigDxeFormSet= Guid|0x0|0=20 >> >> >> + =20 >> gRaspberryPiTokenSpaceGuid.PcdFanTemp|L"FanTemp"|gConfigDxeFormSetGuid= |0x0|60=20 >> >> >> >> =C2=A0=C2=A0=C2=A0 # >> >> =C2=A0=C2=A0=C2=A0 # Common UEFI ones. >> >> diff --git a/Platform/RaspberryPi/RaspberryPi.dec=20 >> b/Platform/RaspberryPi/RaspberryPi.dec >> index a73650f2c3..c64c61930e 100644 >> --- a/Platform/RaspberryPi/RaspberryPi.dec >> +++ b/Platform/RaspberryPi/RaspberryPi.dec >> @@ -67,3 +67,4 @@ >> =C2=A0=C2=A0=C2=A0 gRaspberryPiTokenSpaceGuid.PcdRamMoreThan3GB|0|UINT= 32|0x00000019 >> >> =C2=A0=C2=A0=C2=A0 gRaspberryPiTokenSpaceGuid.PcdRamLimitTo3GB|0|UINT3= 2|0x0000001A >> >> =C2=A0=C2=A0=C2=A0 gRaspberryPiTokenSpaceGuid.PcdFanOnGpio|0|UINT32|0x= 0000001C >> >> +=C2=A0 gRaspberryPiTokenSpaceGuid.PcdFanTemp|0|UINT32|0x0000001D >> >=20 > With the suggested change applied: > Reviewed-by: Pete Batard