From nobody Mon Apr 29 17:30:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+77781+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+77781+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1626265858; cv=none; d=zohomail.com; s=zohoarc; b=G9gfa0L4Xznmrq8JkIGlNmKS/m/wS7DNWW77zV9ZChLBQV/JvOEPCKTd3qGdP9HYR7BybicBfVMiwyR9v9kSK9Lkur1RzscjA3NHfhjznCUU94ooG0PyHTknipXLJqIlsjvpie7zfBbFTucqJPw8X/70+fSN5tM08/Y4u8Q1wWU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626265858; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=N/+tFruLF2V024zJBJbk1cBOQhCKzYkgEvZuMs7PP6o=; b=FY1uLUmznEef02k1sXQl87xD8rLBNP4VUSTRlBIvpQkvGDg4qdT7EkvM44oQtzBjIy7uwaPFzDDVq4KZNHI6RkLjU+KNq15OLfOJqcsC/AQ4GRqtDkZipeRNAH0A+66yhRiwt3X47uAAH4RmcgjaSIzRGTXcwVmdEExvjj51hRQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+77781+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1626265858678626.8783896295054; Wed, 14 Jul 2021 05:30:58 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id YS1iYY1788612xPpmMdBwo6h; Wed, 14 Jul 2021 05:30:58 -0700 X-Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by mx.groups.io with SMTP id smtpd.web10.6101.1626265857538552484 for ; Wed, 14 Jul 2021 05:30:57 -0700 X-Received: by mail-lj1-f171.google.com with SMTP id 141so3139356ljj.2 for ; Wed, 14 Jul 2021 05:30:57 -0700 (PDT) X-Gm-Message-State: pZCLLTTl87kficoDa84QY1Aox1787277AA= X-Google-Smtp-Source: ABdhPJw7NNW5m8tv8XIfjM9gnLQIDOgEPdKA5kZr7tXFALOj02YIm7NQ/1cF+w36ej+gg5HBiT7ONw== X-Received: by 2002:a2e:6a07:: with SMTP id f7mr9044642ljc.506.1626265855665; Wed, 14 Jul 2021 05:30:55 -0700 (PDT) X-Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id d24sm155525lfa.243.2021.07.14.05.30.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 05:30:55 -0700 (PDT) From: "Grzegorz Bernacki" To: devel@edk2.groups.io Cc: leif@nuviainc.com, ardb+tianocore@kernel.org, Samer.El-Haj-Mahmoud@arm.com, sunny.Wang@arm.com, mw@semihalf.com, upstream@semihalf.com, jiewen.yao@intel.com, jian.j.wang@intel.com, min.m.xu@intel.com, lersek@redhat.com, sami.mujawar@arm.com, afish@apple.com, ray.ni@intel.com, jordan.l.justen@intel.com, rebecca@bsdio.com, grehan@freebsd.org, thomas.abraham@arm.com, chasel.chiu@intel.com, nathaniel.l.desimone@intel.com, gaoliming@byosoft.com.cn, eric.dong@intel.com, michael.d.kinney@intel.com, zailiang.sun@intel.com, yi.qian@intel.com, graeme@nuviainc.com, rad@semihalf.com, pete@akeo.ie, Grzegorz Bernacki , Sunny Wang Subject: [edk2-devel] [edk2-platforms PATCH v6 1/4] Intel Platforms: add SecureBootVariableLib class resolution Date: Wed, 14 Jul 2021 14:30:42 +0200 Message-Id: <20210714123045.1340940-2-gjb@semihalf.com> In-Reply-To: <20210714123045.1340940-1-gjb@semihalf.com> References: <20210714123045.1340940-1-gjb@semihalf.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,gjb@semihalf.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1626265858; bh=tyrVVwiYEVJdKncCfJ87IVlrvtBR0uG15VWx1NG/GVY=; h=Cc:Date:From:Reply-To:Subject:To; b=Ox6lpyAF3q517B+J5LslRYzPygRbwDftCwjlXcicaiq50+ZLa4JhkHp8DuweDA4lR8q He1fOnr0iQtyH9C/7U4g2BcKrUo4jSyXfdWIzhzYrT2oNAUI5l0/XdSSzBXqHpj4xB4CQ meDwxgBDjc2wFjzJibT9oLDeDaHxs5DTcoE= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1626265859001100005 Content-Type: text/plain; charset="utf-8" The edk2 patch SecurityPkg: Create library for setting Secure Boot variables. removes generic functions from SecureBootConfigDxe and places them into SecureBootVariableLib. This patch adds SecureBootVariableLib mapping for each Intel platform which uses SecureBootConfigDxe. Signed-off-by: Grzegorz Bernacki Reviewed-by: Sunny Wang Reviewed-by: Liming Gao --- Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc | 2 ++ Platform/Intel/QuarkPlatformPkg/Quark.dsc | 2 ++ Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 2 ++ Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 2 ++ 4 files changed, 8 insertions(+) diff --git a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc b/= Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc index b154f9615d..c3d05fc913 100644 --- a/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc +++ b/Platform/Intel/MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc @@ -139,6 +139,8 @@ =20 !if gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable =3D=3D TRUE AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf + SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBo= otVariableLib.inf + SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariablePro= visionLib/SecureBootVariableProvisionLib.inf !endif =20 SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf diff --git a/Platform/Intel/QuarkPlatformPkg/Quark.dsc b/Platform/Intel/Qua= rkPlatformPkg/Quark.dsc index cc1eba4df4..bc6f552ce0 100644 --- a/Platform/Intel/QuarkPlatformPkg/Quark.dsc +++ b/Platform/Intel/QuarkPlatformPkg/Quark.dsc @@ -175,6 +175,8 @@ !if $(SECURE_BOOT_ENABLE) PlatformSecureLib|QuarkPlatformPkg/Library/PlatformSecureLib/PlatformSec= ureLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf + SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBo= otVariableLib.inf + SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariablePro= visionLib/SecureBootVariableProvisionLib.inf !else AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf !endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Platfor= m/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc index d15da40819..48c3c5bc60 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc @@ -227,6 +227,8 @@ !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecu= reLibNull.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf + SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBo= otVariableLib.inf + SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariablePro= visionLib/SecureBootVariableProvisionLib.inf !else AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf !endif diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Platform= /Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc index 4a5548b80e..4bb540b63a 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc @@ -229,6 +229,8 @@ !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecu= reLibNull.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf + SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBo= otVariableLib.inf + SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariablePro= visionLib/SecureBootVariableProvisionLib.inf !else AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf !endif --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#77781): https://edk2.groups.io/g/devel/message/77781 Mute This Topic: https://groups.io/mt/84200241/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 17:30:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+77782+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+77782+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1626265861; cv=none; d=zohomail.com; s=zohoarc; b=eUtbsT1Ys/VRLe3VL+UhqqqLMqQ+ggk7/AbT/wOvg6S8656OapATtefBDrbmqDTsYuBkOWON/1qpdgVMquzINs+FNxEog9eqk/zB0ghVOOCSApv7bMKFJaNW468g7mOTsacQm3ZJzSF9/U911siM5hM1Ok8mfxyibGapjyiVkMg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626265861; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=cR0+k1cv/cBpHcEd7BZxYGRC/0NXbsmAOnoYgiS90Ng=; b=UK+Iv9svqoLY59KbP3RHroyNdY0r4vRpGWui3TlXLzInqIo2/wrlsaEFsdqI5MS+B8+cIFDeZNerHvsyMVOCC7dC+dH8Xwm6QXzdGfZeHe8HMZUgP8f2WkNlw03cLuLzXyfO//QsBEcaedyeoxyMDzhR16KaYBLLRuoq5LqoG/o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+77782+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1626265861253665.1793600417077; Wed, 14 Jul 2021 05:31:01 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id oX4bYY1788612xja3iG17kJa; Wed, 14 Jul 2021 05:31:00 -0700 X-Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) by mx.groups.io with SMTP id smtpd.web11.5973.1626265859990057797 for ; Wed, 14 Jul 2021 05:31:00 -0700 X-Received: by mail-lj1-f181.google.com with SMTP id y7so2702839ljm.1 for ; Wed, 14 Jul 2021 05:30:59 -0700 (PDT) X-Gm-Message-State: wm2x7TUPu8UsgWHDVKKIqS0Yx1787277AA= X-Google-Smtp-Source: ABdhPJya7H4QExc3eozSQKdMikjFWNA9NaUTxVa7MFRJRHKlK4AP5eUnK6lqhGfl9v/Xc/fcl7nbpg== X-Received: by 2002:a2e:94cf:: with SMTP id r15mr8989855ljh.362.1626265858128; Wed, 14 Jul 2021 05:30:58 -0700 (PDT) X-Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id d24sm155525lfa.243.2021.07.14.05.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 05:30:57 -0700 (PDT) From: "Grzegorz Bernacki" To: devel@edk2.groups.io Cc: leif@nuviainc.com, ardb+tianocore@kernel.org, Samer.El-Haj-Mahmoud@arm.com, sunny.Wang@arm.com, mw@semihalf.com, upstream@semihalf.com, jiewen.yao@intel.com, jian.j.wang@intel.com, min.m.xu@intel.com, lersek@redhat.com, sami.mujawar@arm.com, afish@apple.com, ray.ni@intel.com, jordan.l.justen@intel.com, rebecca@bsdio.com, grehan@freebsd.org, thomas.abraham@arm.com, chasel.chiu@intel.com, nathaniel.l.desimone@intel.com, gaoliming@byosoft.com.cn, eric.dong@intel.com, michael.d.kinney@intel.com, zailiang.sun@intel.com, yi.qian@intel.com, graeme@nuviainc.com, rad@semihalf.com, pete@akeo.ie, Grzegorz Bernacki Subject: [edk2-devel] [edk2-platforms PATCH v6 2/4] ARM Silicon and Platforms: add SecureBootVariableLib class resolution Date: Wed, 14 Jul 2021 14:30:43 +0200 Message-Id: <20210714123045.1340940-3-gjb@semihalf.com> In-Reply-To: <20210714123045.1340940-1-gjb@semihalf.com> References: <20210714123045.1340940-1-gjb@semihalf.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,gjb@semihalf.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1626265860; bh=2nowkbZN4n7hJAGnjKdT2q1RR7h8k7VO1aClmZCM9ro=; h=Cc:Date:From:Reply-To:Subject:To; b=L8Sx6RDfW6snkfkXSQRKj3JyjMtJ8ATpKvArk5jLjGxJ+Yv9uz8qJVCwPkqOTlnlEdY nQSdhV4CBSFYrWd5C/hlTcZQJp8lJntciLNhG3+kzbLkEI6dYDpNvq2osQ1Kj7gjP2ihI 8hrO+FB30NvjMnq2xUgxJnAE8E0pQY2rdQI= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1626265863480100002 Content-Type: text/plain; charset="utf-8" The edk2 patch SecurityPkg: Create library for setting Secure Boot variables. removes generic functions from SecureBootConfigDxe and places them into SecureBootVariableLib. This patch adds SecureBootVariableLib mapping for each ARM platform which uses SecureBootConfigDxe. Signed-off-by: Grzegorz Bernacki Reviewed-by: Graeme Gregory #SbsaQemu Reviewed by: Sami Mujawar #ArmVExpress --- Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 2 ++ Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 2 ++ Platform/RaspberryPi/RPi3/RPi3.dsc | 2 ++ Platform/RaspberryPi/RPi4/RPi4.dsc | 2 ++ Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 5 +++++ 5 files changed, 13 insertions(+) diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VE= xpressPkg/ArmVExpress.dsc.inc index fee7cfcc2d..d6f31ecda4 100644 --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc @@ -129,6 +129,8 @@ !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf + SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBo= otVariableLib.inf + SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariablePro= visionLib/SecureBootVariableProvisionLib.inf =20 # re-use the UserPhysicalPresent() dummy implementation from the ovmf tr= ee PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/S= bsaQemu.dsc index 11ce361cdb..063a45b3ce 100644 --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc @@ -156,6 +156,8 @@ DEFINE NETWORK_HTTP_BOOT_ENABLE =3D FALSE # TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf + SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBo= otVariableLib.inf + SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariablePro= visionLib/SecureBootVariableProvisionLib.inf =20 # re-use the UserPhysicalPresent() dummy implementation from the ovmf tr= ee PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc b/Platform/RaspberryPi/RPi3= /RPi3.dsc index 53825bcf62..a47069cc39 100644 --- a/Platform/RaspberryPi/RPi3/RPi3.dsc +++ b/Platform/RaspberryPi/RPi3/RPi3.dsc @@ -167,6 +167,8 @@ =20 # re-use the UserPhysicalPresent() dummy implementation from the ovmf tr= ee PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf + SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBo= otVariableLib.inf + SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariablePro= visionLib/SecureBootVariableProvisionLib.inf !else TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4= /RPi4.dsc index fd73c4d14b..79e2571d62 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.dsc +++ b/Platform/RaspberryPi/RPi4/RPi4.dsc @@ -164,6 +164,8 @@ !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf + SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBo= otVariableLib.inf + SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariablePro= visionLib/SecureBootVariableProvisionLib.inf =20 # re-use the UserPhysicalPresent() dummy implementation from the ovmf tr= ee PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/So= cionext/DeveloperBox/DeveloperBox.dsc index 88454c1f90..9af262a2d1 100644 --- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc @@ -52,6 +52,11 @@ =20 MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibN= ull.inf =20 +!if $(SECURE_BOOT_ENABLE) =3D=3D TRUE + SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBo= otVariableLib.inf + SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariablePro= visionLib/SecureBootVariableProvisionLib.inf +!endif + [LibraryClasses.common.SEC] PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#77782): https://edk2.groups.io/g/devel/message/77782 Mute This Topic: https://groups.io/mt/84200242/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 17:30:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+77783+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+77783+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1626265863; cv=none; d=zohomail.com; s=zohoarc; b=R6r7Ir5Q1i3L1YuEBfcgHSPv/prDOUYh1XXhZQhfox5pUmuI6LVdLBpHHHJrjaXI5QhcR/Z0EDW/xtHAl7Shn8efoO33MQvBEexC7fNP61p1yzUfuPtfF19OLCrQvg1qfA0xfmYq4ZbbovMH2+J9/Uow4MuCRhKv+UnpSaWg5eA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626265863; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=6HYTjyYn/36WnQA6XNaGMOT6YxAL9tfnCHTlqLxn0vU=; b=AQCU3jYp7mPxKAWhlSFJ7ruZbLxE13vBTwrrndF5R5d8O/r9U128uE772/bUjw1D/f6B7q667eX8trdltE+pGUzL1euM5wC2sz5BxKw432cQznPvFB4vRrEk20aX10wnPH0ntRLzsy8eXL+lONRJTSZKjHMab9S+9f6E56Q1z1s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+77783+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1626265863818978.2850425341635; Wed, 14 Jul 2021 05:31:03 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Wmq4YY1788612xHtTjTyEJxM; Wed, 14 Jul 2021 05:31:03 -0700 X-Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by mx.groups.io with SMTP id smtpd.web12.6067.1626265862585238373 for ; Wed, 14 Jul 2021 05:31:02 -0700 X-Received: by mail-lf1-f41.google.com with SMTP id t17so3374121lfq.0 for ; Wed, 14 Jul 2021 05:31:02 -0700 (PDT) X-Gm-Message-State: 8RiY6OAsMy1q5zsQT6zUPOAjx1787277AA= X-Google-Smtp-Source: ABdhPJyXhyAf92m7spMSTkXulgX2vifQjHws/sJP5oEVBTBeSYUnlU9GpAlP8BtxzvXS8LYw82BhFg== X-Received: by 2002:ac2:43a6:: with SMTP id t6mr6704258lfl.194.1626265860723; Wed, 14 Jul 2021 05:31:00 -0700 (PDT) X-Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id d24sm155525lfa.243.2021.07.14.05.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 05:31:00 -0700 (PDT) From: "Grzegorz Bernacki" To: devel@edk2.groups.io Cc: leif@nuviainc.com, ardb+tianocore@kernel.org, Samer.El-Haj-Mahmoud@arm.com, sunny.Wang@arm.com, mw@semihalf.com, upstream@semihalf.com, jiewen.yao@intel.com, jian.j.wang@intel.com, min.m.xu@intel.com, lersek@redhat.com, sami.mujawar@arm.com, afish@apple.com, ray.ni@intel.com, jordan.l.justen@intel.com, rebecca@bsdio.com, grehan@freebsd.org, thomas.abraham@arm.com, chasel.chiu@intel.com, nathaniel.l.desimone@intel.com, gaoliming@byosoft.com.cn, eric.dong@intel.com, michael.d.kinney@intel.com, zailiang.sun@intel.com, yi.qian@intel.com, graeme@nuviainc.com, rad@semihalf.com, pete@akeo.ie, Grzegorz Bernacki , Abner Chang , Daniel Schaefer Subject: [edk2-devel] [edk2-platforms PATCH v6 3/4] RISC-V Platforms: add SecureBootVariableLib class resolution Date: Wed, 14 Jul 2021 14:30:44 +0200 Message-Id: <20210714123045.1340940-4-gjb@semihalf.com> In-Reply-To: <20210714123045.1340940-1-gjb@semihalf.com> References: <20210714123045.1340940-1-gjb@semihalf.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,gjb@semihalf.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1626265863; bh=448+oEBZX17z7cQF1/PMTqF2Iyy5unFS8q/k5ebGqk4=; h=Cc:Date:From:Reply-To:Subject:To; b=r8SFhhNhh3c6hGfgo1My8Wu2lknVWsXnQ/aZsB0EUPot0nuqHjzGHj9eFmYEZ+suacb kxE3ZDATey6Q2cZfSxpMMJmgFAODj03oKqIzngXK73L6Ng51Hl0QZtVh2B09eTTCexDxE nBvBtzITanEg4rCyDXSwgasScXB0hSNgM5s= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1626265865779100002 Content-Type: text/plain; charset="utf-8" The edk2 patch SecurityPkg: Create library for setting Secure Boot variables. removes generic functions from SecureBootConfigDxe and places them into SecureBootVariableLib. This patch adds SecureBootVariableLib mapping for each RICS-V platform which uses SecureBootConfigDxe. Signed-off-by: Grzegorz Bernacki Reviewed-by: Abner Chang Reviewed-by: Daniel Schaefer --- Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc | 2 ++ Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc b/P= latform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc index b91823ceeb..c8efa35029 100644 --- a/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc +++ b/Platform/SiFive/U5SeriesPkg/FreedomU500VC707Board/U500.dsc @@ -122,6 +122,8 @@ OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf + SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBo= otVariableLib.inf + SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariablePro= visionLib/SecureBootVariableProvisionLib.inf !else TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf diff --git a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U5= 40.dsc b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.d= sc index 0eafe29880..a5ffa79dd0 100644 --- a/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc +++ b/Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc @@ -122,6 +122,8 @@ OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasure= mentLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf + SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBo= otVariableLib.inf + SecureBootVariableProvisionLib|SecurityPkg/Library/SecureBootVariablePro= visionLib/SecureBootVariableProvisionLib.inf !else TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurem= entLibNull.inf AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#77783): https://edk2.groups.io/g/devel/message/77783 Mute This Topic: https://groups.io/mt/84200243/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 17:30:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+77784+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+77784+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1626265866; cv=none; d=zohomail.com; s=zohoarc; b=dHqo7cwQBu7t74aJ3LWO40qH0ihd7reDssnbLbUKTvtdSPwxuPTKOy17wxwKujBb75CQMbbEJy8ODHVdXOurEaHXgHDDd56K4SdEabJQGZFIePw4B6D8G4aS1GVXG2ElKqaL1wrLAVXmP3jF5MnBar+0sNlxbEaiRFayXZGyqzA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1626265866; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=ZCDDh9YPonjxdI4iIG/wGooWAGYWlEA5hTjh+NpEYgM=; b=LW4Qwx5Hvs8HTtKiDly5bGJlUPrz7FMqheWX1F1Hn05z3qWjP06WZCUVKkJeqB4WBIR00a0Ue5eBA8fN2l52OjMn/AVvNZzl+v0T6XxdOzCtxGVl3Yjvp80TYRSLzvOfMqQmq/GIiyWSNOCKACzkP35PIqF8S5DiClCtHwU8FhI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+77784+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1626265866182278.15463965714355; Wed, 14 Jul 2021 05:31:06 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id YEHVYY1788612xJqsS5CaXlI; Wed, 14 Jul 2021 05:31:05 -0700 X-Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by mx.groups.io with SMTP id smtpd.web10.6107.1626265865090176907 for ; Wed, 14 Jul 2021 05:31:05 -0700 X-Received: by mail-lj1-f171.google.com with SMTP id h4so1856791ljo.6 for ; Wed, 14 Jul 2021 05:31:04 -0700 (PDT) X-Gm-Message-State: cHF77KQghzOJc1qf7hCnGhZax1787277AA= X-Google-Smtp-Source: ABdhPJwkybahAl0+4iPQKWckEcLfJeS3nck8DjcW0yvfs83QqnTLQqf0Iwro8ATwsS0HxaFXQH1shA== X-Received: by 2002:a2e:390f:: with SMTP id g15mr8847150lja.44.1626265863233; Wed, 14 Jul 2021 05:31:03 -0700 (PDT) X-Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id d24sm155525lfa.243.2021.07.14.05.31.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 05:31:02 -0700 (PDT) From: "Grzegorz Bernacki" To: devel@edk2.groups.io Cc: leif@nuviainc.com, ardb+tianocore@kernel.org, Samer.El-Haj-Mahmoud@arm.com, sunny.Wang@arm.com, mw@semihalf.com, upstream@semihalf.com, jiewen.yao@intel.com, jian.j.wang@intel.com, min.m.xu@intel.com, lersek@redhat.com, sami.mujawar@arm.com, afish@apple.com, ray.ni@intel.com, jordan.l.justen@intel.com, rebecca@bsdio.com, grehan@freebsd.org, thomas.abraham@arm.com, chasel.chiu@intel.com, nathaniel.l.desimone@intel.com, gaoliming@byosoft.com.cn, eric.dong@intel.com, michael.d.kinney@intel.com, zailiang.sun@intel.com, yi.qian@intel.com, graeme@nuviainc.com, rad@semihalf.com, pete@akeo.ie, Grzegorz Bernacki , Sunny Wang Subject: [edk2-devel] [edk2-platforms PATCH v6 4/4] Platform/RaspberryPi: Enable default Secure Boot variables initialization Date: Wed, 14 Jul 2021 14:30:45 +0200 Message-Id: <20210714123045.1340940-5-gjb@semihalf.com> In-Reply-To: <20210714123045.1340940-1-gjb@semihalf.com> References: <20210714123045.1340940-1-gjb@semihalf.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,gjb@semihalf.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1626265865; bh=PhcOuOcPte6Z22sAT87jCU3Lfwb9DipEMVy6Lp2A6pk=; h=Cc:Date:From:Reply-To:Subject:To; b=CszmIMZDwtwLllTH7QC2Lj+9Q7SAylbdrpUy+FRW3+YPyia210dAc7rM2y8KkRqPEm7 3lVxci/jbFSADjl921CjRw9PciXrsoGC4/MjFUKQsy8BGrPSiQm0P0idmyJPJxHnHm+dG Q5JKqltfVyGPgNsdHHO4xkQGe8a2bUWIO/c= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1626265867173100005 Content-Type: text/plain; charset="utf-8" This commit allows to initialize Secure Boot default key and databases from data embedded in firmware binary. Signed-off-by: Grzegorz Bernacki Reviewed-by: Sunny Wang Reviewed-by: Pete Batard Tested-by: Pete Batard on Raspberry Pi 4 --- Platform/RaspberryPi/RPi4/RPi4.dsc | 2 ++ Platform/RaspberryPi/RPi4/RPi4.fdf | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4= /RPi4.dsc index 79e2571d62..218411b70c 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.dsc +++ b/Platform/RaspberryPi/RPi4/RPi4.dsc @@ -622,6 +622,8 @@ NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificatio= nLib.inf } SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDx= e.inf + SecurityPkg/EnrollFromDefaultKeysApp/EnrollFromDefaultKeysApp.inf + SecurityPkg/VariableAuthenticated/SecureBootDefaultKeysDxe/SecureBootDef= aultKeysDxe.inf !else MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf !endif diff --git a/Platform/RaspberryPi/RPi4/RPi4.fdf b/Platform/RaspberryPi/RPi4= /RPi4.fdf index 1e13909a57..8508065a77 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.fdf +++ b/Platform/RaspberryPi/RPi4/RPi4.fdf @@ -189,7 +189,9 @@ READ_LOCK_STATUS =3D TRUE INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.i= nf INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE +!include ArmPlatformPkg/SecureBootDefaultKeys.fdf.inc INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConf= igDxe.inf + INF SecurityPkg/VariableAuthenticated/SecureBootDefaultKeysDxe/SecureBoo= tDefaultKeysDxe.inf !endif INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRu= ntimeDxe.inf INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#77784): https://edk2.groups.io/g/devel/message/77784 Mute This Topic: https://groups.io/mt/84200245/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-