From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by mx.groups.io with SMTP id smtpd.web09.57766.1622553175275366063 for ; Tue, 01 Jun 2021 06:12:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=VhR4LgxT; spf=none, err=SPF record not found (domain: semihalf.com, ip: 209.85.208.179, mailfrom: gjb@semihalf.com) Received: by mail-lj1-f179.google.com with SMTP id e2so19161947ljk.4 for ; Tue, 01 Jun 2021 06:12:55 -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=zHI6ladbkiI9bUorasTj3k5EPrGMBir5M1C/FCJ90U8=; b=VhR4LgxTJXSl9BjlIm2JWqTJ5vmAAuuSAr8nLVStyjE32NJd3pWWv/cQx/3jjqm1MM Me0uA9nndG5j96juyEFhmREXjNDgVFU4OadEhLywZzNEr+/iWw0Ceg5oNvwcmskzIivx iWi2VF0NWGLXr8YrnndwX/K9I6QN2ho3O7sLWt/rBcASb33KH7MqPH8Abi67YEG2s0+Y SmMq7YchNvNseSa4+7sXhxlFuLEZIsxzLICUpRIwf/pB6AjXi9sJ5fv5wTHU1Ega/xAX bDdc+MCyD+l7nCTK2OQQxd51VXvi9ca1VJIjMOgkxk7GndFAVEPfDKksFx/QN2uem+Y2 w7tQ== 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=zHI6ladbkiI9bUorasTj3k5EPrGMBir5M1C/FCJ90U8=; b=rqAaTsZMR2jwMqQ58ZWe2Rf3MXjhT8mgteIBQUrWA64MrQ8ArFR+Gc/fXTrWUeXZam fUGpAvh03ol/bu2amEqRfZ8za/YyhD3OyHhZ+9i0rAWgMF5yy6DlVkU4go2P2oYRlncO cqAKubMV6gcO/gjoVJBY9cC67ZcbSFUTazq/EGy8i5fCQmaifLjjwhVVqCrTaeErIqsD hrcrZyuMqUDluxGeBow/ryWsc56vNOrk6H3QaAc99bkLK/QAi00vaFZC9BOsRJl8aXJe tGTp0/3kENwYnbfULPTkmSwPp1V5PshLHUTzS8kmux/bjmD4qqgFLypyI87NjW9IfIAL towA== X-Gm-Message-State: AOAM533BBR4ByuZkXps1H24xZkMqZNxPK4LYzPE7rk8uhQNcENprn5Oe OuzXZOwfHBRLm0uvv1FlVhrgMGIWn/5I0nY3 X-Google-Smtp-Source: ABdhPJw87p7d/5cFE1B/b792KajhEJd3BBIBTmuvGmdkf0aV+Cw4xNOTBnvfYtrD+0QdopGWPaK02g== X-Received: by 2002:a2e:740f:: with SMTP id p15mr11086377ljc.122.1622553173047; Tue, 01 Jun 2021 06:12:53 -0700 (PDT) Return-Path: Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id y5sm1681460lfa.148.2021.06.01.06.12.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jun 2021 06:12:52 -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, Grzegorz Bernacki Subject: [edk2-platforms PATCH v2] Platform/RaspberryPi: Enable default Secure Boot variables initialization Date: Tue, 1 Jun 2021 15:12:23 +0200 Message-Id: <20210601131229.630611-2-gjb@semihalf.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210601131229.630611-1-gjb@semihalf.com> References: <20210601131229.630611-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..1fb4df0b81 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 - + SecureBootVariableLib|SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.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/EnrollFromDefaultKeysApp/EnrollFromDefaultKeysApp.inf + SecurityPkg/VariableAuthenticated/SecureBootDefaultKeysDxe/SecureBootDefaultKeysDxe.inf !else MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf !endif diff --git a/Platform/RaspberryPi/RPi4/RPi4.fdf b/Platform/RaspberryPi/RPi4/RPi4.fdf index 1e13909a57..0e43d24c7a 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/SecureBootDefaultKeysDxe/SecureBootDefaultKeysDxe.inf !endif INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf -- 2.25.1