public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Grzegorz Bernacki" <gjb@semihalf.com>
To: devel@edk2.groups.io
Cc: leif@nuviainc.com, ardb+tianocore@kernel.org,
	Samer.El-Haj-Mahmoud@arm.com, sunny.Wang@arm.com,
	gjb@semihalf.com, upstream@semihalf.com, jiewen.yao@intel.com,
	jian.j.wang@intel.com, min.m.xu@intel.com, lersek@redhat.com
Subject: [edk2-platforms PATCH] Platform/RaspberryPi: Enable default Secure Boot variables initialization
Date: Wed, 26 May 2021 11:41:58 +0200	[thread overview]
Message-ID: <20210526094204.73600-2-gjb@semihalf.com> (raw)
In-Reply-To: <20210526094204.73600-1-gjb@semihalf.com>

This commit allows to initialize Secure Boot default key
and databases from data embedded in firmware binary.

Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
---
 Platform/RaspberryPi/RPi4/RPi4.dsc | 5 ++++-
 Platform/RaspberryPi/RPi4/RPi4.fdf | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4/RPi4.dsc
index d8c6fdd4bd..e99730f12b 100644
--- a/Platform/RaspberryPi/RPi4/RPi4.dsc
+++ b/Platform/RaspberryPi/RPi4/RPi4.dsc
@@ -164,7 +164,7 @@
 !if $(SECURE_BOOT_ENABLE) == TRUE
   TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
   AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf
-
+  SecBootVariableLib|SecurityPkg/Library/SecBootVariableLib/SecBootVariableLib.inf
   # re-use the UserPhysicalPresent() dummy implementation from the ovmf tree
   PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf
 !else
@@ -217,6 +217,7 @@
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
+  ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
 
 [LibraryClasses.common.UEFI_DRIVER]
@@ -612,6 +613,8 @@
       NULL|SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.inf
   }
   SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
+  SecurityPkg/SecEnrollDefaultKeysApp/SecEnrollDefaultKeysApp.inf
+  SecurityPkg/VariableAuthenticated/SecBootDefaultKeysDxe/SecBootDefaultKeysDxe.inf
 !else
   MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
 !endif
diff --git a/Platform/RaspberryPi/RPi4/RPi4.fdf b/Platform/RaspberryPi/RPi4/RPi4.fdf
index 1e13909a57..558824fbb3 100644
--- a/Platform/RaspberryPi/RPi4/RPi4.fdf
+++ b/Platform/RaspberryPi/RPi4/RPi4.fdf
@@ -189,7 +189,9 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
   INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
 !if $(SECURE_BOOT_ENABLE) == TRUE
+!include SecurityPkg/SecureBootDefaultKeys.fdf.inc
   INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
+  INF SecurityPkg/VariableAuthenticated/SecBootDefaultKeysDxe/SecBootDefaultKeysDxe.inf
 !endif
   INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
   INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
-- 
2.25.1


  reply	other threads:[~2021-05-26  9:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26  9:41 [PATCH 0/6] Secure Boot default keys Grzegorz Bernacki
2021-05-26  9:41 ` Grzegorz Bernacki [this message]
2021-05-26  9:41 ` [PATCH 1/6] SecurityPkg: Create library for setting Secure Boot variables Grzegorz Bernacki
2021-05-26  9:58   ` Sunny Wang
     [not found]   ` <1682957906E2CAD3.2072@groups.io>
2021-05-26 10:11     ` [edk2-devel] " Sunny Wang
2021-05-26 12:55   ` Yao, Jiewen
2021-05-26  9:42 ` [PATCH 2/6] SecurityPkg: Create include file for default key content Grzegorz Bernacki
2021-05-26  9:42 ` [PATCH 3/6] SecurityPkg: Add SecBootDefaultKeysDxe driver Grzegorz Bernacki
2021-05-26 12:56   ` Yao, Jiewen
2021-05-26  9:42 ` [PATCH 4/6] SecurityPkg: Add SecEnrollDefaultKeys application Grzegorz Bernacki
2021-05-26 12:50   ` Yao, Jiewen
2021-05-26  9:42 ` [PATCH 5/6] SecurityPkg: Add new modules to Security package Grzegorz Bernacki
2021-05-26  9:42 ` [PATCH 6/6] SecurityPkg: Add option to reset secure boot keys Grzegorz Bernacki
2021-05-26 11:49 ` [PATCH 0/6] Secure Boot default keys Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210526094204.73600-2-gjb@semihalf.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox