From patchwork Thu Dec 7 13:34:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kalyan-nagabhirava X-Patchwork-Id: 120974 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp8365760qgn; Thu, 7 Dec 2017 05:36:32 -0800 (PST) X-Google-Smtp-Source: AGs4zMYT5jAIuXhUhyA4u47TVckMMSbOrALzp1XVffrMLNRLO5UWO0tMsavh5ZC63tj88tlXvUzo X-Received: by 10.99.117.67 with SMTP id f3mr13989783pgn.27.1512653792399; Thu, 07 Dec 2017 05:36:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512653792; cv=none; d=google.com; s=arc-20160816; b=wmHJSj+VcqvT+LsYZqlLUcPx7pSD31ci8UoaebMX4QfuwCq1zQ0C+AdroGC8omVfH7 07bQoERyxZLfPTEnxL2mWBStfaACiOX8Jq1EKDl1Q+r0/k58rMZS+gdqieGOd7LOzWVH lhQtP9Dsfw+WyIWZhxvivfnICedlGJyXTwLczR3x2w0j7A+qqvXz1BThPso7ev7iJP9q U0SaysgSlrqU8yRYJFDs+D2co8poz811QjL2w2v4KE+WDLuBLpN1ftPfbNHZstIZfP34 O4J8qf7w44i1ddjE6du6QHjJ62MDlryVfkwNjOoZ0qvlbixCH5TNmLLc11ze2ESAETFE L7gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=POT3Si1X6Hh0BMDFe+SAP9odEkZXZ8o1/XDjDRxZna8=; b=If7P/kLP/5+OamJD7bilxHaWcGbMbT0yHn1ailNIfbXwiMx6E7iAZFvpT1OlksAj72 Q1dYkyZJHZ8tINThwn3nDNPk7VQ6MpEZs2/swIcpfes1g3snaj+RsyFjno/q/7Qf4b5j G7qWMTzmAzp5m39OQsEfsYpVCZlibrXRBtM/W4iAHpwdcwl6UXqH25DmneBQnanSknZO fpWLlCErRTrxotXVz4oSsaQ0ToCrC7ze/niHF7PfnkpjuL+SjhpNWU5PGYa889vukD61 Ew0sBbqBLfJ7YQ9xjYnsRxTu+to/pZe49l1E+5UGpQJnIrCcbulkmNnlaCZh1UGTf2SQ 7xbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=fU2GYYx3; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id y5si3716703pgb.681.2017.12.07.05.36.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Dec 2017 05:36:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=fU2GYYx3; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 5948221B0285B; Thu, 7 Dec 2017 05:31:58 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c05::241; helo=mail-pg0-x241.google.com; envelope-from=kalyankumar.nagabhirava@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DBABD21B02856 for ; Thu, 7 Dec 2017 05:31:56 -0800 (PST) Received: by mail-pg0-x241.google.com with SMTP id q20so4494262pgv.2 for ; Thu, 07 Dec 2017 05:36:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=gnzf50twniQyPvCE6f/z13tkVajaQI8kXp4VnrlA/qY=; b=fU2GYYx3ao/VQ01vwzMFivu80kHE/eF9vNSDoCYMTi5Ugb7zH2HjgYKFt3BKITaFUG +udAnnbWNHawS48V19T8R5G4lv6L2xTfqQCh+hzPkzO23wFQ28WhOytoLLOneCU/kPYZ 6HpdTlH59c/9fPGhhOp0XYxp8UoaH19eX31JI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=gnzf50twniQyPvCE6f/z13tkVajaQI8kXp4VnrlA/qY=; b=B+XqaTOZtn4bO0Uuce2zS5dAVW0ydbLKLBer6im9rB98Ulth0WoBQX8WM4NSLImEIk zou8Xsb35hT/uklu7nD5GspFIecNZWoAAUb8p+Dqf1SK/8mhv8h9JdREV9gEo4bTFEJJ bquJZHZK3v91yPc5KHUqqCOFRfC2xjO5Jw4dhJRbmia1QL3LSIeugQth8rleU3CzuBMN 3/A7U95892hGI8Kcq7yOVTbdhTQaeostlAq2yBj2A7iCbP+RWlJXdl4oj44lLvArll3c woGMMR8IB/ySsgvLhHbHSrAKufYFbbvsUKM6EM2Oc5af3kiZyIGKdjx0UJ1bLRtznC44 qXDg== X-Gm-Message-State: AKGB3mKuaKUcXA0aIfR3Y3pmS9n/vLaZA/MC+sV3u+qrHqopfnZ2H/0r EB6+xEqcXQaoYWd/hksb1PxS1lUKIZA= X-Received: by 10.159.202.150 with SMTP id p22mr4451012plo.128.1512653789246; Thu, 07 Dec 2017 05:36:29 -0800 (PST) Received: from localhost.localdomain ([220.225.120.129]) by smtp.gmail.com with ESMTPSA id o70sm10477059pfk.79.2017.12.07.05.36.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Dec 2017 05:36:27 -0800 (PST) From: kalyan-nagabhirava To: edk2-devel@lists.01.org Date: Thu, 7 Dec 2017 19:04:23 +0530 Message-Id: <20171207133424.24674-3-kalyankumar.nagabhirava@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171207133424.24674-1-kalyankumar.nagabhirava@linaro.org> References: <20171207133424.24674-1-kalyankumar.nagabhirava@linaro.org> Subject: [edk2] [PATCH v2 2/3] EmbeddedPkg: secureboot application using RdkBootManagerLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: kalyan-nagabhirava --- EmbeddedPkg/Application/SecureBoot/SecureBoot.inf | 57 ++++++++++++++++++++ EmbeddedPkg/Application/SecureBoot/SecureBoot.c | 30 +++++++++++ 2 files changed, 87 insertions(+) -- 2.15.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/EmbeddedPkg/Application/SecureBoot/SecureBoot.inf b/EmbeddedPkg/Application/SecureBoot/SecureBoot.inf new file mode 100644 index 000000000000..90d1ee677f6a --- /dev/null +++ b/EmbeddedPkg/Application/SecureBoot/SecureBoot.inf @@ -0,0 +1,57 @@ +# +# Copyright (c) 2016-2017, Linaro Limited. All rights reserved. +# Copyright (c) 2016-2017, comcast . All rights reserved. +# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# + +################################################################################ +# +# Defines Section - statements that will be processed to create a Makefile. +# +################################################################################ + +[Defines] + INF_VERSION = 0x00010006 + BASE_NAME = RdkSecureLoader + FILE_GUID = b2c7930f-07ef-4305-ac4e-1ce2085a7031 + MODULE_TYPE = UEFI_APPLICATION + VERSION_STRING = 1.0 + ENTRY_POINT = SecureBootEntryPoint + +[Sources] + SecureBoot.c + +[Packages] + ArmPkg/ArmPkg.dec + ArmPlatformPkg/ArmPlatformPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + ShellPkg/ShellPkg.dec + SecurityPkg/SecurityPkg.dec + CryptoPkg/CryptoPkg.dec + NetworkPkg/NetworkPkg.dec + EmbeddedPkg/Library/RdkBootManagerLib/RdkBootManagerLib.dec + +[Guids] + gEfiCertX509Guid + gEfiCertPkcs7Guid + gEfiCustomModeEnableGuid + gEfiImageSecurityDatabaseGuid + gFdtTableGuid + gRdkGlobalVariableGuid + +[LibraryClasses] + RdkBootManagerLib + UefiApplicationEntryPoint + +[Protocols] + gEfiBlockIoProtocolGuid + gEfiDevicePathToTextProtocolGuid diff --git a/EmbeddedPkg/Application/SecureBoot/SecureBoot.c b/EmbeddedPkg/Application/SecureBoot/SecureBoot.c new file mode 100644 index 000000000000..51ac75835fd0 --- /dev/null +++ b/EmbeddedPkg/Application/SecureBoot/SecureBoot.c @@ -0,0 +1,30 @@ +/* +# Copyright (c) 2016-2017, Linaro Limited. All rights reserved. +# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# + */ +#include + +EFI_STATUS +EFIAPI +SecureBootEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + EFI_STATUS Status; + + Status = RdkSecureBoot ( + ImageHandle, + SystemTable->BootServices + ); + + return Status; +}