From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by mx.groups.io with SMTP id smtpd.web08.5143.1625056488353720782 for ; Wed, 30 Jun 2021 05:34:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=B5lMDgY6; spf=none, err=SPF record not found (domain: semihalf.com, ip: 209.85.167.48, mailfrom: gjb@semihalf.com) Received: by mail-lf1-f48.google.com with SMTP id a15so4791659lfr.6 for ; Wed, 30 Jun 2021 05:34:48 -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=s1xn85z65yS1r5V1lyXO887g0RS7ewMqwV53chWdJKs=; b=B5lMDgY6dIL8Gtqq6Vhglp9BdN8/43uDwlwy1dQbTspkTdKp3uOEzQVajJr8KLnGzh ibCJaDYpqyWyKlvg3kL2yLIrpwFgMpDp5m6OgVO+omhhv8BmImtUhYXgZaRpMQH6ZcO1 WlHzw4CFDy7nAid+q+o7f7YUURUdKOv/9duLiiiczkTlZ/Zc+sRfgyzNnYuma1faMWkA Gqy59u8LBe9hS63hvOCrIAa9BED64iZTqh/ao3xlHzW0TVWWL9GYm3NNYj2mIJx5F21N Ml3w1WGscCa3pNSG2Z2QiAdynCGwfGPFyObKxAwmBBE+WnXw/d/7Fyw3LhUYAwjKnb2w /KgA== 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=s1xn85z65yS1r5V1lyXO887g0RS7ewMqwV53chWdJKs=; b=C5McpqdxSYCp+l9VPDjx4eGiEjx3cyg+CAP3XE6Xevcie+zBFZ7loZOMxy4XNrTQ45 eRRviWoWIgiwfnFR4LHZeSnbrrT7+x+hUPrt+IglnXVdrZgb3gEH6X5/jL6LarGARmNp pC0Y8H7SRcjLkw11qpyqEAqx8h64B44A1iMGl2unDwcxkB8RuD2Vsomz5DRskYIN6pJW 4WpkvhiSQ1lRTbyAeRX5+RurQywGcpo257kPDqA25Gjj6TWIgOqZ0eAXXZPKOkL+z24+ or5td7Agp4dyIRV7+s4epHOtxqNHKAv006XKMcGq7l1nCN+GkoplelJmGk4pHGd/S1xJ cKrA== X-Gm-Message-State: AOAM533j0fSVctTJ0I/REvL4DZ2wzwwZAC77yRohu8DUD1MrD892g2Oz MA+t5p6P3z53I9l+E6D5DI9xFoYYoaYgDhPm X-Google-Smtp-Source: ABdhPJyaaJfzj7KpRVeW6U+EuIqdnxCO5JiLvwwqElPXp3Xx98DJ6z5NqytViik8p4ebq0eQ7WpA4Q== X-Received: by 2002:a05:6512:138a:: with SMTP id p10mr27232045lfa.505.1625056486475; Wed, 30 Jun 2021 05:34:46 -0700 (PDT) Return-Path: Received: from gilgamesh.lab.semihalf.net ([83.142.187.85]) by smtp.gmail.com with ESMTPSA id d29sm1285624lfv.20.2021.06.30.05.34.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jun 2021 05:34:46 -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-platforms PATCH v4 12/12] Platform/RaspberryPi: Enable default Secure Boot variables initialization Date: Wed, 30 Jun 2021 14:34:12 +0200 Message-Id: <20210630123412.996158-13-gjb@semihalf.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210630123412.996158-1-gjb@semihalf.com> References: <20210630123412.996158-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 Reviewed-by: Sunny Wang Reviewed-by: Pete Batard Tested-by: Pete Batard on Raspberry Pi 4 --- Platform/RaspberryPi/RPi4/RPi4.dsc | 3 +++ Platform/RaspberryPi/RPi4/RPi4.fdf | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4/RPi4.dsc index d38fee8fb8..54bb282ff2 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.dsc +++ b/Platform/RaspberryPi/RPi4/RPi4.dsc @@ -218,6 +218,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] @@ -621,6 +622,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..8508065a77 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 ArmPlatformPkg/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