From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by mx.groups.io with SMTP id smtpd.web12.5223.1622022158509051952 for ; Wed, 26 May 2021 02:42:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=i5i+5Ofr; spf=none, err=SPF record not found (domain: semihalf.com, ip: 209.85.167.46, mailfrom: gjb@semihalf.com) Received: by mail-lf1-f46.google.com with SMTP id r5so1578636lfr.5 for ; Wed, 26 May 2021 02:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pJIt8wncDqVdxO5ftf09ICe4TqvKTaGUUEJNSxNe0F8=; b=i5i+5OfrZbv3ar7vjLltEnexxxmaIHFeuhrPL2BL5PEiA5X8rqyALKHmXsPlkhQcm8 zCvm+YEs8hPPYB4iCm1aWryk+mr2CCCUXHbHgGB95NOkP38m23tVGAVWdCyi7WpLUmRO YOJRUZaPuaImJMniLlC843Sr8t3nlIY1B+mifbEaGlubkRvWxl1ssLT38S/39rVLFJNt 4+Uk6dls2dC4HdA1Pu1D7iIyjQcgVJlxbnGdp+mboqRq/sLStbkBivMR1vhhGid4jXhe wxtgjO+ff6VVZtHDyCTdI0rrnbVlIHD+4jwDpBHQjj1b8og6f7TW+9W7W6DaPAUYu4ou BAAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pJIt8wncDqVdxO5ftf09ICe4TqvKTaGUUEJNSxNe0F8=; b=bvT0c0/UcS/gVcPPU6eslvFLb9r18V912mre2g0aMsbvRlC5ESj6WclpURaSwKvJAK om93kFG4rGjb6b9OLfsWh5+ho3V0I0+uiyAwsmN8ujYLaJtGIjVYkiDYZljLz69qHKgb +27wJp7OX6hV1YTBg/B4h6yMtEJ45YIYIYo8WoZSa8zzV+Y/Z92NtaRlVOKl8dChmM8I xcCuQPFQhcF7F7rOGin038mUgVESHGFLfT8gUq/LlHsCNkNWCZjVXPaFkLBvHq2ihVn/ InLZszfQwAj87J4zWmnz4zGElGhAVsjdQD9WfpTQwv3TSxdaQDSBxfgZYAFsgEGhvrBk O5Hg== X-Gm-Message-State: AOAM530jue4/UlKIcQ/gkAW0u+iCm+clRndXY3pnhW/nLDvaUS+tcVrr oRLau3gfT04iRiF50s8rSss7/79+ZYzRk1cTX0Y= X-Google-Smtp-Source: ABdhPJyqQe/gO2P/fje0p1Mrl0O1ykGzFF2YZWLUaFwT8v3p/GTzFxxppe+CYN5zwBegAE7/C84OVw== X-Received: by 2002:a19:ee17:: with SMTP id g23mr1503562lfb.438.1622022156364; Wed, 26 May 2021 02:42:36 -0700 (PDT) Return-Path: Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id y19sm2380268ljy.32.2021.05.26.02.42.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 May 2021 02:42:35 -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, 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 Message-Id: <20210526094204.73600-2-gjb@semihalf.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210526094204.73600-1-gjb@semihalf.com> References: <20210526094204.73600-1-gjb@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This commit allows to initialize Secure Boot default key and databases from data embedded in firmware binary. Signed-off-by: Grzegorz Bernacki --- 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