[edk2] [PATCH v1 3/4] edk2-platforms:comcast: RDK secure boot Application

2018-01-07 Thread kalyan-nagabhirava
Application will get file path of   PK key and KEK key using rdk.conf file, 
once keys are
Available, application will enable secure boot and validates the signed kernel 
Image.

Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: kalyan-nagabhirava <kalyankumar.nagabhir...@linaro.org>
---
 Platform/Comcast/Application/SecureBoot/SecureBoot.inf | 57 

 Platform/Comcast/Application/SecureBoot/SecureBoot.c   | 30 +++
 2 files changed, 87 insertions(+)

diff --git a/Platform/Comcast/Application/SecureBoot/SecureBoot.inf 
b/Platform/Comcast/Application/SecureBoot/SecureBoot.inf
new file mode 100644
index ..e7a3bb3afbb6
--- /dev/null
+++ b/Platform/Comcast/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
+  Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec
+
+[Guids]
+  gEfiCertX509Guid
+  gEfiCertPkcs7Guid
+  gEfiCustomModeEnableGuid
+  gEfiImageSecurityDatabaseGuid
+  gFdtTableGuid
+  gRdkGlobalVariableGuid
+
+[LibraryClasses]
+  RdkBootManagerLib
+  UefiApplicationEntryPoint
+
+[Protocols]
+  gEfiBlockIoProtocolGuid
+  gEfiDevicePathToTextProtocolGuid
diff --git a/Platform/Comcast/Application/SecureBoot/SecureBoot.c 
b/Platform/Comcast/Application/SecureBoot/SecureBoot.c
new file mode 100644
index ..51ac75835fd0
--- /dev/null
+++ b/Platform/Comcast/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_HANDLEImageHandle,
+  IN EFI_SYSTEM_TABLE  *SystemTable
+  )
+{
+  EFI_STATUS Status;
+
+  Status = RdkSecureBoot (
+ImageHandle,
+SystemTable->BootServices
+  );
+
+  return Status;
+}
-- 
2.15.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v1 4/4] edk2-platforms:comcast: RDK DRI Application

2018-01-07 Thread kalyan-nagabhirava
Application will Download platform code Image (kernel + DTB+ rootfs) and writes
into Flash partition.

Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: kalyan-nagabhirava <kalyankumar.nagabhir...@linaro.org>
---
 Platform/Comcast/Application/Dri/Dri.inf | 56 
+++
 Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.inf | 57 

 Platform/Comcast/Application/Dri/Dri.c   | 26 +
 Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.c   | 32 +++
 4 files changed, 171 insertions(+)

diff --git a/Platform/Comcast/Application/Dri/Dri.inf 
b/Platform/Comcast/Application/Dri/Dri.inf
new file mode 100644
index ..0f603ff989dc
--- /dev/null
+++ b/Platform/Comcast/Application/Dri/Dri.inf
@@ -0,0 +1,56 @@
+#
+#  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   = RdkDriLoader
+  FILE_GUID   = 081ba18a-d71e-40a7-99a9-cdb86463966d
+  MODULE_TYPE = UEFI_APPLICATION
+  VERSION_STRING  = 1.0
+  ENTRY_POINT = DriEntryPoint
+
+[Sources]
+  Dri.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
+  Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec
+
+[Guids]
+  gEfiCertX509Guid
+  gEfiCertPkcs7Guid
+  gEfiCustomModeEnableGuid
+  gEfiImageSecurityDatabaseGuid
+  gFdtTableGuid
+
+[LibraryClasses]
+  RdkBootManagerLib
+  UefiApplicationEntryPoint
+
+[Protocols]
+  gEfiBlockIoProtocolGuid
+  gEfiDevicePathToTextProtocolGuid
diff --git a/Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.inf 
b/Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.inf
new file mode 100644
index ..4c795584f448
--- /dev/null
+++ b/Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.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   = RdkDriSecureLoader
+  FILE_GUID   = dd52d1d7-0de2-4552-98e0-8dbee458a502
+  MODULE_TYPE = UEFI_APPLICATION
+  VERSION_STRING  = 1.0
+  ENTRY_POINT = DriSecureBootEntryPoint
+
+[Sources]
+  DriSecureBoot.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
+  Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec
+
+[Guids]
+  gEfiCertX509Guid
+  gEfiCertPkcs7Guid
+  gEfiCustomModeEnableGuid
+  gEfiImageSecurityDatabaseGuid
+  gFdtTableGuid
+
+[LibraryClasses]
+  RdkBootManagerLib
+  UefiApplicationEntryPoint
+
+[Protocols]
+  gEfiBlockIoProtocolGuid
+  gEfiDevicePathToTextProtocolGuid
+  gEfiDevicePathFromTextProtocolGuid
diff --git a/Platform/Comcast/Application/Dri/Dri.c 
b/Platform/Comcast/Application/Dri/Dri.c
new file mode 100644
index ..affbac08b602
--- /dev/null
+++ b/Platform/Comcast/Application/Dri/Dri.c
@@ -0,0 +1,26 @@
+/*
+#  Copyright (c) 2016-2017, Linaro Limited. All rights reserved.
+#
+#  This program and the accompanying materials
+# 

[edk2] [PATCH v1 2/4] edk2-platforms:comcast: RDK boot manger Library implementation

2018-01-07 Thread kalyan-nagabhirava
Implemented features related to secure boot and DRI (downloading the image and 
storing on flash),
library has utility of   file read and write operations for fat and raw flash 
partition, it reads file path
and load the file content using configuration file.

Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: kalyan-nagabhirava <kalyankumar.nagabhir...@linaro.org>
---
 Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec   |  50 ++
 Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.inf   |  79 
+++
 Platform/Comcast/Library/RdkBootManagerLib/Include/DiskIo.h|  20 +
 Platform/Comcast/Library/RdkBootManagerLib/Include/HttpBoot.h  |   7 +
 Platform/Comcast/Library/RdkBootManagerLib/Include/List.h  |  52 ++
 Platform/Comcast/Library/RdkBootManagerLib/Include/RdkBootManagerLib.h |  31 ++
 Platform/Comcast/Library/RdkBootManagerLib/Include/RdkFile.h   |  20 +
 Platform/Comcast/Library/RdkBootManagerLib/Include/SecureBoot.h|  40 ++
 Platform/Comcast/Library/RdkBootManagerLib/DiskIo.c| 358 
++
 Platform/Comcast/Library/RdkBootManagerLib/HttpBoot.c  | 323 
+
 Platform/Comcast/Library/RdkBootManagerLib/RdkFile.c   | 345 
+
 Platform/Comcast/Library/RdkBootManagerLib/SecureBoot.c| 506 

 12 files changed, 1831 insertions(+)

diff --git a/Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec 
b/Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec
new file mode 100644
index ..3f3635592325
--- /dev/null
+++ b/Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec
@@ -0,0 +1,50 @@
+#
+#  Copyright (c) 2014-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.
+#
+
+[Defines]
+  DEC_SPECIFICATION  = 0x00010019
+  PACKAGE_NAME   = RdkPkg
+  PACKAGE_GUID   = 2f1f2d5e-d9e1-4aa1-8eb9-fed94682e140
+  PACKAGE_VERSION= 0.1
+
+
+#
+# Include Section - list of Include Paths that are provided by this package.
+#   Comments are used for Keywords and Module Types.
+#
+# Supported Module Types:
+#  BASE SEC PEI_CORE PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER 
DXE_SMM_DRIVER DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION
+#
+
+[Includes.common]
+  Include# Root include for the package
+
+[Guids.common]
+  gRdkTokenSpaceGuid=  { 0x408c1892, 0xf11a, 0x40c7, { 0xaa, 0x5f, 
0x0d, 0x16, 0xc8, 0xb2, 0x52, 0x59 } }
+  gRdkGlobalVariableGuid=  { 0xc3253c90, 0xa24f, 0x4599, { 0xa6, 0x64, 
0x1f, 0x88, 0x13, 0x77, 0x8f, 0xc9 } }
+
+[PcdsFixedAtBuild.common]
+  # Rdk Library
+  gRdkTokenSpaceGuid.PcdRdkSystemPartitionName|""|VOID*|0x0203
+  gRdkTokenSpaceGuid.PcdRdkConfFileName|""|VOID*|0x0204
+  gRdkTokenSpaceGuid.PcdRdkCmdLineArgs|""|VOID*|0x0213
+  gRdkTokenSpaceGuid.PcdRdkConfFileDevicePath|L""|VOID*|0x0214
+  gRdkTokenSpaceGuid.PcdDtbAvailable|FALSE|BOOLEAN|0x00300014
+
+  # GUID of RdkSecureBootLoader
+  gRdkTokenSpaceGuid.PcdRdkSecureBootFile|{ 0x0f, 0x93, 0xc7, 0xb2, 0xef, 
0x07, 0x05, 0x43, 0xac, 0x4e, 0x1c, 0xe2, 0x08, 0x5a, 0x70, 0x31 
}|VOID*|0x0100
+
+  # GUID of RdkDri
+  gRdkTokenSpaceGuid.PcdRdkDriFile|{ 0x8a, 0xa1, 0x1b, 0x08, 0x1e, 0xd7, 0xa7, 
0x40, 0x99, 0xa9, 0xcd, 0xb8, 0x64, 0x63, 0x96, 0x6d }|VOID*|0x1000
+
+  # GUID of RdkDriSecureBootLoader
+  gRdkTokenSpaceGuid.PcdRdkDriSecureBootFile|{ 0xd7, 0xd1, 0x52, 0xdd, 0xe2, 
0x0d, 0x52, 0x45, 0x98, 0xe0, 0x8d, 0xbe, 0xe4, 0x58, 0xa5, 0x02 
}|VOID*|0x0010
diff --git a/Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.inf 
b/Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.inf
new file mode 100644
index ..ecd9f578a580
--- /dev/null
+++ b/Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.inf
@@ -0,0 +1,79 @@
+#
+#  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 b

[edk2] [PATCH v1 0/4] edk2-platforms:Comcast:Rdk Qemu platform for RDK UEFI applications

2018-01-07 Thread kalyan-nagabhirava
Linaro and RDK are  working on standardizing the boot process for RDK  STB 
boxes using Uefi.
we implmented couple of RDK UEFI apllications(secure boot and DRI ) which are  
tested on
RDK qemu platform.

kalyan-nagabhirava (4):
  edk2-platforms: created Rdk Qemu platform for RDK UEFI applications
  edk2-platforms:comcast: RDK boot manger Library implementation
  edk2-platforms:comcast: RDK secure boot Application
  edk2-platforms:comcast: RDK DRI Application

 Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec   |  50 ++
 Platform/Comcast/RDKQemu/RDKQemu.dsc   | 431 
+
 Platform/Comcast/RDKQemu/RDKQemu.fdf   | 128 
+
 Platform/Comcast/Application/Dri/Dri.inf   |  56 
+++
 Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.inf   |  57 
+++
 Platform/Comcast/Application/SecureBoot/SecureBoot.inf |  57 
+++
 Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.inf   |  79 
+++
 Platform/Comcast/Library/RdkBootManagerLib/Include/DiskIo.h|  20 +
 Platform/Comcast/Library/RdkBootManagerLib/Include/HttpBoot.h  |   7 +
 Platform/Comcast/Library/RdkBootManagerLib/Include/List.h  |  52 ++
 Platform/Comcast/Library/RdkBootManagerLib/Include/RdkBootManagerLib.h |  31 ++
 Platform/Comcast/Library/RdkBootManagerLib/Include/RdkFile.h   |  20 +
 Platform/Comcast/Library/RdkBootManagerLib/Include/SecureBoot.h|  40 ++
 Platform/Comcast/Application/Dri/Dri.c |  26 +
 Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.c |  32 ++
 Platform/Comcast/Application/SecureBoot/SecureBoot.c   |  30 ++
 Platform/Comcast/Library/RdkBootManagerLib/DiskIo.c| 358 
++
 Platform/Comcast/Library/RdkBootManagerLib/HttpBoot.c  | 323 
+
 Platform/Comcast/Library/RdkBootManagerLib/RdkFile.c   | 345 
+
 Platform/Comcast/Library/RdkBootManagerLib/SecureBoot.c| 506 

 Platform/Comcast/RDKQemu/README|  77 
+++
 21 files changed, 2725 insertions(+)
 create mode 100644 
Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec
 create mode 100644 Platform/Comcast/RDKQemu/RDKQemu.dsc
 create mode 100644 Platform/Comcast/RDKQemu/RDKQemu.fdf
 create mode 100644 Platform/Comcast/Application/Dri/Dri.inf
 create mode 100644 Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.inf
 create mode 100644 Platform/Comcast/Application/SecureBoot/SecureBoot.inf
 create mode 100644 
Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.inf
 create mode 100644 Platform/Comcast/Library/RdkBootManagerLib/Include/DiskIo.h
 create mode 100644 
Platform/Comcast/Library/RdkBootManagerLib/Include/HttpBoot.h
 create mode 100644 Platform/Comcast/Library/RdkBootManagerLib/Include/List.h
 create mode 100644 
Platform/Comcast/Library/RdkBootManagerLib/Include/RdkBootManagerLib.h
 create mode 100644 Platform/Comcast/Library/RdkBootManagerLib/Include/RdkFile.h
 create mode 100644 
Platform/Comcast/Library/RdkBootManagerLib/Include/SecureBoot.h
 create mode 100644 Platform/Comcast/Application/Dri/Dri.c
 create mode 100644 Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.c
 create mode 100644 Platform/Comcast/Application/SecureBoot/SecureBoot.c
 create mode 100644 Platform/Comcast/Library/RdkBootManagerLib/DiskIo.c
 create mode 100644 Platform/Comcast/Library/RdkBootManagerLib/HttpBoot.c
 create mode 100644 Platform/Comcast/Library/RdkBootManagerLib/RdkFile.c
 create mode 100644 Platform/Comcast/Library/RdkBootManagerLib/SecureBoot.c
 create mode 100644 Platform/Comcast/RDKQemu/README

-- 
2.15.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v1 1/4] edk2-platforms: created Rdk Qemu platform for RDK UEFI applications

2018-01-07 Thread kalyan-nagabhirava
Linaro and RDK are  working on standardizing the boot process for RDK  STB 
boxes using Uefi.
we implmented couple of RDK UEFI apllications(secure boot and DRI ) which are  
tested on
RDK qemu platform

Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: kalyan-nagabhirava <kalyankumar.nagabhir...@linaro.org>
---
 Platform/Comcast/RDKQemu/RDKQemu.dsc | 431 
 Platform/Comcast/RDKQemu/RDKQemu.fdf | 128 ++
 Platform/Comcast/RDKQemu/README  |  77 
 3 files changed, 636 insertions(+)

diff --git a/Platform/Comcast/RDKQemu/RDKQemu.dsc 
b/Platform/Comcast/RDKQemu/RDKQemu.dsc
new file mode 100644
index ..dec16c67e3e2
--- /dev/null
+++ b/Platform/Comcast/RDKQemu/RDKQemu.dsc
@@ -0,0 +1,431 @@
+#
+#  Copyright (c) 2011-2015, ARM Limited. All rights reserved.
+#  Copyright (c) 2014, Linaro Limited. All rights reserved.
+#  Copyright (c) 2015 - 2016, Intel Corporation. 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]
+  PLATFORM_NAME  = RdkQemu
+  PLATFORM_GUID  = 2D89EF13-B604-4550-B080-5E2E5E382854
+  PLATFORM_VERSION   = 0.1
+  DSC_SPECIFICATION  = 0x00010005
+  OUTPUT_DIRECTORY   = Build/RDK-$(ARCH)
+  SUPPORTED_ARCHITECTURES= AARCH64|ARM
+  BUILD_TARGETS  = DEBUG|RELEASE
+  SKUID_IDENTIFIER   = DEFAULT
+  FLASH_DEFINITION   = Platform/Comcast/RDKQemu/RDKQemu.fdf
+
+  #
+  # Defines for default states.  These can be changed on the command line.
+  # -D FLAG=VALUE
+  #
+  DEFINE SECURE_BOOT_ENABLE  = FALSE
+  DEFINE HTTP_BOOT_ENABLE= FALSE
+
+!include ArmVirtPkg/ArmVirt.dsc.inc
+
+[LibraryClasses.common]
+  ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
+  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
+
+  # Virtio Support
+  VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
+  
VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
+  QemuFwCfgLib|ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
+  QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf
+
+  
ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf
+
+  TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
+  NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf
+
+  CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
+  BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
+  
PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+  
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
+  QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
+  FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
+  
PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+  PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
+  
PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
+  
RdkBootManagerLib|Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.inf
+!if $(HTTP_BOOT_ENABLE) == TRUE
+  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
+!endif
+
+[LibraryClasses.common.PEIM]
+  
ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf
+
+[LibraryClasses.common.UEFI_DRIVER]
+  UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
+
+
+#
+# Pcd Section - list of all EDK II PCD Entries defined by this Platform
+#
+
+
+[PcdsFeatureFlag.common]
+  gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE
+  gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE
+
+  ## If TRUE, Graphics Output Protocol will be installed on virtual handle 
created by ConsplitterDxe.
+  #  It could be set FALSE to save size.
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
+
+[PcdsFixedAtBuild.common]
+  gArmPlatformTokenSpaceGuid.PcdCoreCount|1
+

[edk2] [PATCH v1 1/1] edk2-platforms: created Rdk Qemu platform for RDK UEFI applications

2018-01-05 Thread kalyan-nagabhirava
Linaro and RDK are  working on standardizing the boot process for RDK  STB 
boxes using Uefi.
we implmented couple of RDK UEFI apllications(secure boot and DRI ) which are  
tested on
RDK qemu platform.

Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: kalyan-nagabhirava <kalyankumar.nagabhir...@linaro.org>
---
 Platform/Comcast/RDKQemu/RDKQemu.dsc | 431 
 Platform/Comcast/RDKQemu/RDKQemu.fdf | 128 ++
 Platform/Comcast/RDKQemu/README  |  77 
 3 files changed, 636 insertions(+)

diff --git a/Platform/Comcast/RDKQemu/RDKQemu.dsc 
b/Platform/Comcast/RDKQemu/RDKQemu.dsc
new file mode 100644
index ..ce8081081359
--- /dev/null
+++ b/Platform/Comcast/RDKQemu/RDKQemu.dsc
@@ -0,0 +1,431 @@
+#
+#  Copyright (c) 2011-2015, ARM Limited. All rights reserved.
+#  Copyright (c) 2014, Linaro Limited. All rights reserved.
+#  Copyright (c) 2015 - 2016, Intel Corporation. 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]
+  PLATFORM_NAME  = RdkQemu
+  PLATFORM_GUID  = 2D89EF13-B604-4550-B080-5E2E5E382854
+  PLATFORM_VERSION   = 0.1
+  DSC_SPECIFICATION  = 0x00010005
+  OUTPUT_DIRECTORY   = Build/RDK-$(ARCH)
+  SUPPORTED_ARCHITECTURES= AARCH64|ARM
+  BUILD_TARGETS  = DEBUG|RELEASE
+  SKUID_IDENTIFIER   = DEFAULT
+  FLASH_DEFINITION   = Platform/Comcast/RDKQemu/RDKQemu.fdf
+
+  #
+  # Defines for default states.  These can be changed on the command line.
+  # -D FLAG=VALUE
+  #
+  DEFINE SECURE_BOOT_ENABLE  = FALSE
+  DEFINE HTTP_BOOT_ENABLE= FALSE
+
+!include ArmVirtPkg/ArmVirt.dsc.inc
+
+[LibraryClasses.common]
+  ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
+  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
+
+  # Virtio Support
+  VirtioLib|OvmfPkg/Library/VirtioLib/VirtioLib.inf
+  
VirtioMmioDeviceLib|OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf
+  QemuFwCfgLib|ArmVirtPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
+  QemuFwCfgS3Lib|OvmfPkg/Library/QemuFwCfgS3Lib/BaseQemuFwCfgS3LibNull.inf
+
+  
ArmPlatformLib|ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.inf
+
+  TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
+  NorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf
+
+  CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
+  BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
+  
PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+  
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
+  QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
+  FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
+  
PciPcdProducerLib|ArmVirtPkg/Library/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf
+  PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
+  
PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
+  RdkBootManagerLib|EmbeddedPkg/Library/RdkBootManagerLib/RdkBootManagerLib.inf
+!if $(HTTP_BOOT_ENABLE) == TRUE
+  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
+!endif
+
+[LibraryClasses.common.PEIM]
+  
ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf
+
+[LibraryClasses.common.UEFI_DRIVER]
+  UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
+
+
+#
+# Pcd Section - list of all EDK II PCD Entries defined by this Platform
+#
+
+
+[PcdsFeatureFlag.common]
+  gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderPciTranslation|TRUE
+  gUefiOvmfPkgTokenSpaceGuid.PcdQemuBootOrderMmioTranslation|TRUE
+
+  ## If TRUE, Graphics Output Protocol will be installed on virtual handle 
created by ConsplitterDxe.
+  #  It could be set FALSE to save size.
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
+  gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
+
+[PcdsFixedAtBuild.common]
+  gArmPlatformTokenSpaceGuid.PcdCoreCount|1
+!if $(ARCH) == AARCH64
+  gArmTokenSpa

[edk2] [PATCH v1 0/1] edk2-platforms, creating RDK qemu platform

2018-01-05 Thread kalyan-nagabhirava
Linaro and RDK are  working on standardizing the boot process for RDK  STB 
boxes using Uefi.
we implmented couple of RDK UEFI apllications(secure boot and DRI ) which are  
tested on
RDK qemu platform.

Cc: Ard Biesheuvel <ard.biesheu...@linaro.org>

kalyan-nagabhirava (1):
  edk2-platforms: created Rdk Qemu platform for RDK UEFI applications

 Platform/Comcast/RDKQemu/RDKQemu.dsc | 431 
 Platform/Comcast/RDKQemu/RDKQemu.fdf | 128 ++
 Platform/Comcast/RDKQemu/README  |  77 
 3 files changed, 636 insertions(+)
 create mode 100644 Platform/Comcast/RDKQemu/RDKQemu.dsc
 create mode 100644 Platform/Comcast/RDKQemu/RDKQemu.fdf
 create mode 100644 Platform/Comcast/RDKQemu/README

-- 
2.15.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 0/3] Adding secure boot and HTTP image download features for Linux based platform

2017-12-08 Thread Kalyan Nagabhirava
+lief

On 7 December 2017 at 19:55, Kalyan Nagabhirava <
kalyankumar.nagabhir...@linaro.org> wrote:

> yes Ard,
> but this is not platform sepecfic only application code, leif has given
> comments on this application , addressed his comments
> and send the patch.
>
> On 7 December 2017 at 19:36, Ard Biesheuvel <ard.biesheu...@linaro.org>
> wrote:
>
>> On 7 December 2017 at 13:34, kalyan-nagabhirava
>> <kalyankumar.nagabhir...@linaro.org> wrote:
>> > Linaro and RDK are  working on standardizing the boot process for RDK
>> STB boxes using Uefi.
>> > Added applications are reference implementation of RDK STB boot process
>> on Arm platforms
>> >
>>
>> Please don't add this to EmbeddedPkg. I thought we agreed to put this
>> in edk2-platforms/Platform/Comcast?
>>
>> > kalyan-nagabhirava (3):
>> >   [edk2 EmbeddedPkg]:Implementation of secure boot and HTTP Image
>> > download
>> >   EmbeddedPkg: secureboot application using RdkBootManagerLib
>> >   EmbeddedPkg: Httpimage downlaod application
>> >
>> >  EmbeddedPkg/Library/RdkBootManagerLib/RdkBootManagerLib.dec   |
>> 52 ++
>> >  EmbeddedPkg/Application/Dri/Dri.inf   |
>> 56 ++
>> >  EmbeddedPkg/Application/SecureBoot/SecureBoot.inf |
>> 57 ++
>> >  EmbeddedPkg/Library/RdkBootManagerLib/RdkBootManagerLib.inf   |
>> 81 +++
>> >  EmbeddedPkg/Library/RdkBootManagerLib/Include/DiskIo.h|
>> 20 +
>> >  EmbeddedPkg/Library/RdkBootManagerLib/Include/HttpBoot.h  |
>>  7 +
>> >  EmbeddedPkg/Library/RdkBootManagerLib/Include/List.h  |
>> 52 ++
>> >  EmbeddedPkg/Library/RdkBootManagerLib/Include/RdkBootManagerLib.h |
>> 31 ++
>> >  EmbeddedPkg/Library/RdkBootManagerLib/Include/RdkFile.h   |
>> 20 +
>> >  EmbeddedPkg/Library/RdkBootManagerLib/Include/SecureBoot.h|
>> 40 ++
>> >  EmbeddedPkg/Application/Dri/Dri.c |
>> 26 +
>> >  EmbeddedPkg/Application/SecureBoot/SecureBoot.c   |
>> 30 +
>> >  EmbeddedPkg/Library/RdkBootManagerLib/DiskIo.c|
>> 536 ++
>> >  EmbeddedPkg/Library/RdkBootManagerLib/HttpBoot.c  |
>> 315 +++
>> >  EmbeddedPkg/Library/RdkBootManagerLib/RdkFile.c   |
>> 259 +
>> >  EmbeddedPkg/Library/RdkBootManagerLib/SecureBoot.c|
>> 577 
>> >  16 files changed, 2159 insertions(+)
>> >  create mode 100644 EmbeddedPkg/Library/RdkBootMan
>> agerLib/RdkBootManagerLib.dec
>> >  create mode 100644 EmbeddedPkg/Application/Dri/Dri.inf
>> >  create mode 100644 EmbeddedPkg/Application/SecureBoot/SecureBoot.inf
>> >  create mode 100644 EmbeddedPkg/Library/RdkBootMan
>> agerLib/RdkBootManagerLib.inf
>> >  create mode 100644 EmbeddedPkg/Library/RdkBootMan
>> agerLib/Include/DiskIo.h
>> >  create mode 100644 EmbeddedPkg/Library/RdkBootMan
>> agerLib/Include/HttpBoot.h
>> >  create mode 100644 EmbeddedPkg/Library/RdkBootMan
>> agerLib/Include/List.h
>> >  create mode 100644 EmbeddedPkg/Library/RdkBootMan
>> agerLib/Include/RdkBootManagerLib.h
>> >  create mode 100644 EmbeddedPkg/Library/RdkBootMan
>> agerLib/Include/RdkFile.h
>> >  create mode 100644 EmbeddedPkg/Library/RdkBootMan
>> agerLib/Include/SecureBoot.h
>> >  create mode 100644 EmbeddedPkg/Application/Dri/Dri.c
>> >  create mode 100644 EmbeddedPkg/Application/SecureBoot/SecureBoot.c
>> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/DiskIo.c
>> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/HttpBoot.c
>> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/RdkFile.c
>> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/SecureBoot.c
>> >
>> > --
>> > 2.15.0
>> >
>> > ___
>> > edk2-devel mailing list
>> > edk2-devel@lists.01.org
>> > https://lists.01.org/mailman/listinfo/edk2-devel
>>
>
>
>
> --
> regards,
> kalyan.
>



-- 
regards,
kalyan.
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 0/3] Adding secure boot and HTTP image download features for Linux based platform

2017-12-07 Thread Kalyan Nagabhirava
yes Ard,
but this is not platform sepecfic only application code, leif has given
comments on this application , addressed his comments
and send the patch.

On 7 December 2017 at 19:36, Ard Biesheuvel <ard.biesheu...@linaro.org>
wrote:

> On 7 December 2017 at 13:34, kalyan-nagabhirava
> <kalyankumar.nagabhir...@linaro.org> wrote:
> > Linaro and RDK are  working on standardizing the boot process for RDK
> STB boxes using Uefi.
> > Added applications are reference implementation of RDK STB boot process
> on Arm platforms
> >
>
> Please don't add this to EmbeddedPkg. I thought we agreed to put this
> in edk2-platforms/Platform/Comcast?
>
> > kalyan-nagabhirava (3):
> >   [edk2 EmbeddedPkg]:Implementation of secure boot and HTTP Image
> > download
> >   EmbeddedPkg: secureboot application using RdkBootManagerLib
> >   EmbeddedPkg: Httpimage downlaod application
> >
> >  EmbeddedPkg/Library/RdkBootManagerLib/RdkBootManagerLib.dec   |
> 52 ++
> >  EmbeddedPkg/Application/Dri/Dri.inf   |
> 56 ++
> >  EmbeddedPkg/Application/SecureBoot/SecureBoot.inf |
> 57 ++
> >  EmbeddedPkg/Library/RdkBootManagerLib/RdkBootManagerLib.inf   |
> 81 +++
> >  EmbeddedPkg/Library/RdkBootManagerLib/Include/DiskIo.h|
> 20 +
> >  EmbeddedPkg/Library/RdkBootManagerLib/Include/HttpBoot.h  |
>  7 +
> >  EmbeddedPkg/Library/RdkBootManagerLib/Include/List.h  |
> 52 ++
> >  EmbeddedPkg/Library/RdkBootManagerLib/Include/RdkBootManagerLib.h |
> 31 ++
> >  EmbeddedPkg/Library/RdkBootManagerLib/Include/RdkFile.h   |
> 20 +
> >  EmbeddedPkg/Library/RdkBootManagerLib/Include/SecureBoot.h|
> 40 ++
> >  EmbeddedPkg/Application/Dri/Dri.c |
> 26 +
> >  EmbeddedPkg/Application/SecureBoot/SecureBoot.c   |
> 30 +
> >  EmbeddedPkg/Library/RdkBootManagerLib/DiskIo.c|
> 536 ++
> >  EmbeddedPkg/Library/RdkBootManagerLib/HttpBoot.c  |
> 315 +++
> >  EmbeddedPkg/Library/RdkBootManagerLib/RdkFile.c   |
> 259 +
> >  EmbeddedPkg/Library/RdkBootManagerLib/SecureBoot.c|
> 577 
> >  16 files changed, 2159 insertions(+)
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/
> RdkBootManagerLib.dec
> >  create mode 100644 EmbeddedPkg/Application/Dri/Dri.inf
> >  create mode 100644 EmbeddedPkg/Application/SecureBoot/SecureBoot.inf
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/
> RdkBootManagerLib.inf
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/
> DiskIo.h
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/
> HttpBoot.h
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/List.h
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/
> RdkBootManagerLib.h
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/
> RdkFile.h
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/
> SecureBoot.h
> >  create mode 100644 EmbeddedPkg/Application/Dri/Dri.c
> >  create mode 100644 EmbeddedPkg/Application/SecureBoot/SecureBoot.c
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/DiskIo.c
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/HttpBoot.c
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/RdkFile.c
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/SecureBoot.c
> >
> > --
> > 2.15.0
> >
> > ___
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
>



-- 
regards,
kalyan.
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v2 2/3] EmbeddedPkg: secureboot application using RdkBootManagerLib

2017-12-07 Thread kalyan-nagabhirava
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: kalyan-nagabhirava <kalyankumar.nagabhir...@linaro.org>
---
 EmbeddedPkg/Application/SecureBoot/SecureBoot.inf | 57 
 EmbeddedPkg/Application/SecureBoot/SecureBoot.c   | 30 +++
 2 files changed, 87 insertions(+)

diff --git a/EmbeddedPkg/Application/SecureBoot/SecureBoot.inf 
b/EmbeddedPkg/Application/SecureBoot/SecureBoot.inf
new file mode 100644
index ..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 ..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_HANDLEImageHandle,
+  IN EFI_SYSTEM_TABLE  *SystemTable
+  )
+{
+  EFI_STATUS Status;
+
+  Status = RdkSecureBoot (
+ImageHandle,
+SystemTable->BootServices
+  );
+
+  return Status;
+}
-- 
2.15.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v2 3/3] EmbeddedPkg: Httpimage downlaod application

2017-12-07 Thread kalyan-nagabhirava
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: kalyan-nagabhirava <kalyankumar.nagabhir...@linaro.org>
---
 EmbeddedPkg/Application/Dri/Dri.inf | 56 
 EmbeddedPkg/Application/Dri/Dri.c   | 26 +
 2 files changed, 82 insertions(+)

diff --git a/EmbeddedPkg/Application/Dri/Dri.inf 
b/EmbeddedPkg/Application/Dri/Dri.inf
new file mode 100644
index ..d6f24b48a6b3
--- /dev/null
+++ b/EmbeddedPkg/Application/Dri/Dri.inf
@@ -0,0 +1,56 @@
+#
+#  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   = RdkDriLoader
+  FILE_GUID   = 081ba18a-d71e-40a7-99a9-cdb86463966d
+  MODULE_TYPE = UEFI_APPLICATION
+  VERSION_STRING  = 1.0
+  ENTRY_POINT = DriEntryPoint
+
+[Sources]
+  Dri.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
+
+[LibraryClasses]
+  RdkBootManagerLib
+  UefiApplicationEntryPoint
+
+[Protocols]
+  gEfiBlockIoProtocolGuid
+  gEfiDevicePathToTextProtocolGuid
diff --git a/EmbeddedPkg/Application/Dri/Dri.c 
b/EmbeddedPkg/Application/Dri/Dri.c
new file mode 100644
index ..affbac08b602
--- /dev/null
+++ b/EmbeddedPkg/Application/Dri/Dri.c
@@ -0,0 +1,26 @@
+/*
+#  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
+DriEntryPoint (
+  IN EFI_HANDLEImageHandle,
+  IN EFI_SYSTEM_TABLE  *SystemTable
+  )
+{
+  EFI_STATUS Status;
+
+  Status = RdkHttpBoot ();
+  return Status;
+}
-- 
2.15.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v2 0/3] Adding secure boot and HTTP image download features for Linux based platform

2017-12-07 Thread kalyan-nagabhirava
Linaro and RDK are  working on standardizing the boot process for RDK  STB 
boxes using Uefi.
Added applications are reference implementation of RDK STB boot process on Arm 
platforms

kalyan-nagabhirava (3):
  [edk2 EmbeddedPkg]:Implementation of secure boot and HTTP Image
download
  EmbeddedPkg: secureboot application using RdkBootManagerLib
  EmbeddedPkg: Httpimage downlaod application

 EmbeddedPkg/Library/RdkBootManagerLib/RdkBootManagerLib.dec   |  52 ++
 EmbeddedPkg/Application/Dri/Dri.inf   |  56 ++
 EmbeddedPkg/Application/SecureBoot/SecureBoot.inf |  57 ++
 EmbeddedPkg/Library/RdkBootManagerLib/RdkBootManagerLib.inf   |  81 +++
 EmbeddedPkg/Library/RdkBootManagerLib/Include/DiskIo.h|  20 +
 EmbeddedPkg/Library/RdkBootManagerLib/Include/HttpBoot.h  |   7 +
 EmbeddedPkg/Library/RdkBootManagerLib/Include/List.h  |  52 ++
 EmbeddedPkg/Library/RdkBootManagerLib/Include/RdkBootManagerLib.h |  31 ++
 EmbeddedPkg/Library/RdkBootManagerLib/Include/RdkFile.h   |  20 +
 EmbeddedPkg/Library/RdkBootManagerLib/Include/SecureBoot.h|  40 ++
 EmbeddedPkg/Application/Dri/Dri.c |  26 +
 EmbeddedPkg/Application/SecureBoot/SecureBoot.c   |  30 +
 EmbeddedPkg/Library/RdkBootManagerLib/DiskIo.c| 536 
++
 EmbeddedPkg/Library/RdkBootManagerLib/HttpBoot.c  | 315 
+++
 EmbeddedPkg/Library/RdkBootManagerLib/RdkFile.c   | 259 
+
 EmbeddedPkg/Library/RdkBootManagerLib/SecureBoot.c| 577 

 16 files changed, 2159 insertions(+)
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/RdkBootManagerLib.dec
 create mode 100644 EmbeddedPkg/Application/Dri/Dri.inf
 create mode 100644 EmbeddedPkg/Application/SecureBoot/SecureBoot.inf
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/RdkBootManagerLib.inf
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/DiskIo.h
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/HttpBoot.h
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/List.h
 create mode 100644 
EmbeddedPkg/Library/RdkBootManagerLib/Include/RdkBootManagerLib.h
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/RdkFile.h
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/SecureBoot.h
 create mode 100644 EmbeddedPkg/Application/Dri/Dri.c
 create mode 100644 EmbeddedPkg/Application/SecureBoot/SecureBoot.c
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/DiskIo.c
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/HttpBoot.c
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/RdkFile.c
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/SecureBoot.c

-- 
2.15.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] [edk2 EmbeddedPkg]:Adding secure boot and HTTP image download (Disaster recovery image) Applications for Linux based platforms

2017-12-04 Thread Kalyan Nagabhirava
sure Leif , we will address your review comments and send updated patches.

Regards,
kalyan.

On 4 December 2017 at 21:03, Leif Lindholm <leif.lindh...@linaro.org> wrote:

> Hi Kalyan,
>
> Am I right in assuming that since this is the output of your team, you
> have some time to look into reworking based on feedback (unlike the
> HiKey support)?
>
> A few high-level comments:
> 1) Please generate your patches with --stat=1000 --stat-graph-width=20
>as per https://github.com/tianocore/tianocore.github.io/wiki/
> Laszlo's-unkempt-git-guide-for-edk2-contributors-and-maintainers
> 2) I see at least 3 separate patches below:
>- Application/Dri
>- Application/DriSecureBoot
>- RdkBootManagerLib
> 3) List.h looks mostly to be reimplementing functionality that already
>exists in BaseLib.h.
>
> If you could address these three things and send out as a v2, then we
> would be in a much better position to review the contribution
> properly.
>
> Best Regards,
>
> Leif
>
> On Tue, Nov 28, 2017 at 12:57:58PM +0530, kalyan-nagabhirava wrote:
> > Linaro and RDK are  working on standardizing the boot process for RDK
> STB boxes using Uefi.
> > Added applications are reference implementation of RDK STB boot process
> on Arm platforms
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: kalyan-nagabhirava <kalyankumar.nagabhir...@linaro.org>
> > ---
> >  EmbeddedPkg/Application/Dri/Dri.c  |  26 +
> >  EmbeddedPkg/Application/Dri/Dri.inf|  56 ++
> >  .../Application/DriSecureBoot/DriSecureBoot.c  |  32 ++
> >  .../Application/DriSecureBoot/DriSecureBoot.inf|  57 ++
> >  EmbeddedPkg/Application/SecureBoot/SecureBoot.c|  30 ++
> >  EmbeddedPkg/Application/SecureBoot/SecureBoot.inf  |  57 ++
> >  EmbeddedPkg/Drivers/RdkDxe/RdkDxe.c|  97 
> >  EmbeddedPkg/Drivers/RdkDxe/RdkDxe.h|  14 +
> >  EmbeddedPkg/Drivers/RdkDxe/RdkDxe.inf  |  45 ++
> >  EmbeddedPkg/Library/RdkBootManagerLib/DiskIo.c | 536
> +++
> >  EmbeddedPkg/Library/RdkBootManagerLib/HttpBoot.c   | 315 +++
> >  .../Library/RdkBootManagerLib/Include/DiskIo.h |  20 +
> >  .../Library/RdkBootManagerLib/Include/HttpBoot.h   |   7 +
> >  .../Library/RdkBootManagerLib/Include/List.h   | 136 +
> >  .../RdkBootManagerLib/Include/RdkBootManagerLib.h  |  31 ++
> >  .../Library/RdkBootManagerLib/Include/RdkFile.h|  20 +
> >  .../Library/RdkBootManagerLib/Include/SecureBoot.h |  40 ++
> >  .../RdkBootManagerLib/RdkBootManagerLib.dec|  52 ++
> >  .../RdkBootManagerLib/RdkBootManagerLib.inf|  81 +++
> >  EmbeddedPkg/Library/RdkBootManagerLib/RdkFile.c| 259 +
> >  EmbeddedPkg/Library/RdkBootManagerLib/SecureBoot.c | 577
> +
> >  21 files changed, 2488 insertions(+)
> >  create mode 100644 EmbeddedPkg/Application/Dri/Dri.c
> >  create mode 100644 EmbeddedPkg/Application/Dri/Dri.inf
> >  create mode 100644 EmbeddedPkg/Application/
> DriSecureBoot/DriSecureBoot.c
> >  create mode 100644 EmbeddedPkg/Application/DriSecureBoot/DriSecureBoot.
> inf
> >  create mode 100644 EmbeddedPkg/Application/SecureBoot/SecureBoot.c
> >  create mode 100644 EmbeddedPkg/Application/SecureBoot/SecureBoot.inf
> >  create mode 100644 EmbeddedPkg/Drivers/RdkDxe/RdkDxe.c
> >  create mode 100644 EmbeddedPkg/Drivers/RdkDxe/RdkDxe.h
> >  create mode 100644 EmbeddedPkg/Drivers/RdkDxe/RdkDxe.inf
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/DiskIo.c
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/HttpBoot.c
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/
> DiskIo.h
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/
> HttpBoot.h
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/List.h
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/
> RdkBootManagerLib.h
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/
> RdkFile.h
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/
> SecureBoot.h
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/
> RdkBootManagerLib.dec
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/
> RdkBootManagerLib.inf
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/RdkFile.c
> >  create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/SecureBoot.c
>



-- 
regards,
kalyan.
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] [edk2-platforms]:Enabling Secure boot feature support on hikey platfrom

2017-11-28 Thread Kalyan Nagabhirava
Hi Leif,

haojian zhuang from linaro  has shared below openplatformPkg repo  (branch
is hikey-wip) for Hikey platform to support USB host :

https://github.com/jlinton/OpenPlatformPkg

Regards,
kalyan.

On 28 November 2017 at 18:07, Leif Lindholm <leif.lindh...@linaro.org>
wrote:

> On Tue, Nov 28, 2017 at 01:05:35PM +0530, Kalyan Nagabhirava wrote:
> > HI Leif,
> > we didn't implemented enabling USB host and  Secure boot support  on
> Hikey
> > , we just took the code from openplatfrompkg (hikey branch)
>
> There is no hikey branch in OpenPlatformPkg.
> If you are referring to some sort of fork somewhere, then please point
> it out explicitly.
>
> >  , we have implemented secureboot and DRI -disaster recovery image (HTTP
> > image download) application
> > and tested on HIkey platform , so for that purpose we are trying to
> > upstream the hikey code.
> >
> > but hikey platform code  looks in bad shape (as per ard and your
> comments)
> > ,so  we are planning to upstream
> > only our application code which is independent of platform.
>
> I understand, but I cannot merge new code which is not used by any
> upstream platform. If you do not have the time and bandwidth to clean
> up these drivers, can you ask whoever looks after that fork to
> upstream their platform support?
>
> Best Regards,
>
> Leif
>



-- 
regards,
kalyan.
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] [edk2-platforms]:Enabling Secure boot feature support on hikey platfrom

2017-11-27 Thread Kalyan Nagabhirava
HI Leif,
we didn't implemented enabling USB host and  Secure boot support  on Hikey
, we just took the code from openplatfrompkg (hikey branch)
 , we have implemented secureboot and DRI -disaster recovery image (HTTP
image download) application
and tested on HIkey platform , so for that purpose we are trying to
upstream the hikey code.

but hikey platform code  looks in bad shape (as per ard and your comments)
,so  we are planning to upstream
only our application code which is independent of platform.

Regards,
kalyan.


On 27 November 2017 at 22:27, Leif Lindholm <leif.lindh...@linaro.org>
wrote:

> On Mon, Nov 27, 2017 at 02:02:32PM +0100, Laszlo Ersek wrote:
> > On 11/26/17 16:22, Leif Lindholm wrote:
> > > (Adding Laszlo to cc based on a single comment I make below.)
> > >
> > > On Tue, Nov 21, 2017 at 04:23:36PM +0530, kalyan-nagabhirava wrote:
> >
> > >>  [Guids.common]
> > >>gHiKeyTokenSpaceGuid  =  { 0x91148425, 0xcdd2, 0x4830, {
> 0x8b, 0xd0, 0xc6, 0x1c, 0x6d, 0xea, 0x36, 0x21 } }
> > >> +  gHwTokenSpaceGuid =  { 0x, 0x74c5, 0x4043, {
> 0xb4, 0x17, 0xa3, 0x22, 0x38, 0x14, 0xce, 0x76 } }
> > >
> > > This very much looks like a not properly generated GUID.
> > > GUIDs must always be generated using an RFC4122-compliant algorithm.
> > > I generally recommend using
> > > https://www.guidgenerator.com/online-guid-generator.aspx.
> >
> > I just run "uuidgen" in a terminal window.
>
> Yeah, I just prefer pointing to someone that does not require
> installing anything, or requires specific operating systems.
>
> > >> +EFI_STATUS
> > >> +EFIAPI
> > >> +FvbSetAttributes(
> > >> +  IN CONST  EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL  *This,
> > >> +  IN OUTEFI_FVB_ATTRIBUTES_2 *Attributes
> > >> +  )
> > >> +{
> > >> +  DEBUG ((DEBUG_BLKIO, "FvbSetAttributes(0x%X) is not
> supported\n",*Attributes));
> > >> +  return EFI_UNSUPPORTED;
> > >
> > > As per my (very) recent comment to Marcin, I do not believe returning
> > > EFI_UNSUPPORTED is a valid thing to do here. Which to me suggests the
> > > implementation of FvbGetAttributes is also incorrect.
> > >
> > > Laszlo - what's your take on this in conjunction with PI 1.6 section
> > > 3.4.2? OvmfPkg does something very similar in
> > > EmuVariableFvbRuntimeDxe/Fvb.c.
> >
> > I guess you are right. The particular OvmfPkg code that you mention is
> > likely also spec-breaking.
> >
> > FWIW, in the OVMF flash driver that actually uses pflash, namely
> >
> >   OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c
> >
> > the FvbSetVolumeAttributes() function appears both appropriate for the
> > spec and generic enough to copy elsewhere.
>
> Yes, that looks good, thanks!
>
> Marcin, Kalyan - please have a look at that implementation for
> inspiration.
>
> /
> Leif
>



-- 
regards,
kalyan.
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH] [edk2 EmbeddedPkg]:Adding secure boot and HTTP image download (Disaster recovery image) Applications for Linux based platforms

2017-11-27 Thread kalyan-nagabhirava
Linaro and RDK are  working on standardizing the boot process for RDK  STB 
boxes using Uefi.
Added applications are reference implementation of RDK STB boot process on Arm 
platforms

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: kalyan-nagabhirava <kalyankumar.nagabhir...@linaro.org>
---
 EmbeddedPkg/Application/Dri/Dri.c  |  26 +
 EmbeddedPkg/Application/Dri/Dri.inf|  56 ++
 .../Application/DriSecureBoot/DriSecureBoot.c  |  32 ++
 .../Application/DriSecureBoot/DriSecureBoot.inf|  57 ++
 EmbeddedPkg/Application/SecureBoot/SecureBoot.c|  30 ++
 EmbeddedPkg/Application/SecureBoot/SecureBoot.inf  |  57 ++
 EmbeddedPkg/Drivers/RdkDxe/RdkDxe.c|  97 
 EmbeddedPkg/Drivers/RdkDxe/RdkDxe.h|  14 +
 EmbeddedPkg/Drivers/RdkDxe/RdkDxe.inf  |  45 ++
 EmbeddedPkg/Library/RdkBootManagerLib/DiskIo.c | 536 +++
 EmbeddedPkg/Library/RdkBootManagerLib/HttpBoot.c   | 315 +++
 .../Library/RdkBootManagerLib/Include/DiskIo.h |  20 +
 .../Library/RdkBootManagerLib/Include/HttpBoot.h   |   7 +
 .../Library/RdkBootManagerLib/Include/List.h   | 136 +
 .../RdkBootManagerLib/Include/RdkBootManagerLib.h  |  31 ++
 .../Library/RdkBootManagerLib/Include/RdkFile.h|  20 +
 .../Library/RdkBootManagerLib/Include/SecureBoot.h |  40 ++
 .../RdkBootManagerLib/RdkBootManagerLib.dec|  52 ++
 .../RdkBootManagerLib/RdkBootManagerLib.inf|  81 +++
 EmbeddedPkg/Library/RdkBootManagerLib/RdkFile.c| 259 +
 EmbeddedPkg/Library/RdkBootManagerLib/SecureBoot.c | 577 +
 21 files changed, 2488 insertions(+)
 create mode 100644 EmbeddedPkg/Application/Dri/Dri.c
 create mode 100644 EmbeddedPkg/Application/Dri/Dri.inf
 create mode 100644 EmbeddedPkg/Application/DriSecureBoot/DriSecureBoot.c
 create mode 100644 EmbeddedPkg/Application/DriSecureBoot/DriSecureBoot.inf
 create mode 100644 EmbeddedPkg/Application/SecureBoot/SecureBoot.c
 create mode 100644 EmbeddedPkg/Application/SecureBoot/SecureBoot.inf
 create mode 100644 EmbeddedPkg/Drivers/RdkDxe/RdkDxe.c
 create mode 100644 EmbeddedPkg/Drivers/RdkDxe/RdkDxe.h
 create mode 100644 EmbeddedPkg/Drivers/RdkDxe/RdkDxe.inf
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/DiskIo.c
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/HttpBoot.c
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/DiskIo.h
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/HttpBoot.h
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/List.h
 create mode 100644 
EmbeddedPkg/Library/RdkBootManagerLib/Include/RdkBootManagerLib.h
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/RdkFile.h
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/Include/SecureBoot.h
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/RdkBootManagerLib.dec
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/RdkBootManagerLib.inf
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/RdkFile.c
 create mode 100644 EmbeddedPkg/Library/RdkBootManagerLib/SecureBoot.c

diff --git a/EmbeddedPkg/Application/Dri/Dri.c 
b/EmbeddedPkg/Application/Dri/Dri.c
new file mode 100644
index 00..affbac08b6
--- /dev/null
+++ b/EmbeddedPkg/Application/Dri/Dri.c
@@ -0,0 +1,26 @@
+/*
+#  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
+DriEntryPoint (
+  IN EFI_HANDLEImageHandle,
+  IN EFI_SYSTEM_TABLE  *SystemTable
+  )
+{
+  EFI_STATUS Status;
+
+  Status = RdkHttpBoot ();
+  return Status;
+}
diff --git a/EmbeddedPkg/Application/Dri/Dri.inf 
b/EmbeddedPkg/Application/Dri/Dri.inf
new file mode 100644
index 00..d6f24b48a6
--- /dev/null
+++ b/EmbeddedPkg/Application/Dri/Dri.inf
@@ -0,0 +1,56 @@
+#
+#  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.
+#
+
+
+#
+# De

[edk2] [PATCH] [edk2-platforms]:Enabling Secure boot feature support on hikey platfrom

2017-11-21 Thread kalyan-nagabhirava
Added required library packages related to secure boot  in hikey.dsc and 
Blockvariable driver[
from 96-board edk2 fork] to support the NV storage of the variables.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: kalyan-nagabhirava <kalyankumar.nagabhir...@linaro.org>
---
 Platform/Hisilicon/HiKey/HiKey.dec |  10 +
 Platform/Hisilicon/HiKey/HiKey.dsc |  56 ++-
 Platform/Hisilicon/HiKey/HiKey.fdf |  13 +-
 Platform/Hisilicon/HiKey/VarStore.fdf.inc  |  72 
 .../Drivers/BlockVariableDxe/BlockVariableDxe.c| 444 +
 .../Drivers/BlockVariableDxe/BlockVariableDxe.h|  51 +++
 .../Drivers/BlockVariableDxe/BlockVariableDxe.inf  |  65 +++
 7 files changed, 706 insertions(+), 5 deletions(-)
 create mode 100644 Platform/Hisilicon/HiKey/VarStore.fdf.inc
 create mode 100644 
Silicon/Hisilicon/Drivers/BlockVariableDxe/BlockVariableDxe.c
 create mode 100644 
Silicon/Hisilicon/Drivers/BlockVariableDxe/BlockVariableDxe.h
 create mode 100644 
Silicon/Hisilicon/Drivers/BlockVariableDxe/BlockVariableDxe.inf

diff --git a/Platform/Hisilicon/HiKey/HiKey.dec 
b/Platform/Hisilicon/HiKey/HiKey.dec
index 537138eb4..e27d70447 100644
--- a/Platform/Hisilicon/HiKey/HiKey.dec
+++ b/Platform/Hisilicon/HiKey/HiKey.dec
@@ -30,7 +30,17 @@
 
 [Guids.common]
   gHiKeyTokenSpaceGuid  =  { 0x91148425, 0xcdd2, 0x4830, { 0x8b, 0xd0, 
0xc6, 0x1c, 0x6d, 0xea, 0x36, 0x21 } }
+  gHwTokenSpaceGuid =  { 0x, 0x74c5, 0x4043, { 0xb4, 0x17, 
0xa3, 0x22, 0x38, 0x14, 0xce, 0x76 } }
 
 [PcdsFixedAtBuild.common]
   gHiKeyTokenSpaceGuid.PcdAndroidFastbootNvmDevicePath|L""|VOID*|0x0001
   gHiKeyTokenSpaceGuid.PcdArmFastbootFlashLimit|L""|VOID*|0x0002
+
+  # NV Block
+  gHwTokenSpaceGuid.PcdNvStorageVariableBlockLba|0|UINT32|0x0112
+  gHwTokenSpaceGuid.PcdNvStorageVariableBlockSize|0|UINT32|0x0100011
+  gHwTokenSpaceGuid.PcdNvStorageVariableBlockCount|0|UINT32|0x0100010
+  gHwTokenSpaceGuid.PcdNvStorageVariableBlockDevicePath|L""|VOID*|0x0113
+  
+  # UncachedAllocationLib
+  
gArmTokenSpaceGuid.PcdArmUncachedMemoryMask|0x8000|UINT64|0x0002
diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc 
b/Platform/Hisilicon/HiKey/HiKey.dsc
index 2e3b1c879..a7288b125 100644
--- a/Platform/Hisilicon/HiKey/HiKey.dsc
+++ b/Platform/Hisilicon/HiKey/HiKey.dsc
@@ -26,6 +26,8 @@
   SKUID_IDENTIFIER   = DEFAULT
   FLASH_DEFINITION   = Platform/Hisilicon/HiKey/HiKey.fdf
 
+  DEFINE SECURE_BOOT_ENABLE = FALSE
+
 [LibraryClasses.common]
 !if $(TARGET) == RELEASE
   DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
@@ -125,6 +127,18 @@
   # Add support for GCC stack protector
   NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
 
+!if $(SECURE_BOOT_ENABLE) == TRUE
+  IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
+  
TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
+  AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf
+  VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
+  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
+  PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf
+  BdsLib|ArmPkg/Library/BdsLib/BdsLib.inf
+  DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf
+!endif
+
 [LibraryClasses.common.SEC]
   PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
   
ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
@@ -160,6 +174,7 @@
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
   
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
   
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
 
 [BuildOptions]
   GCC:*_*_*_PLATFORM_FLAGS = -I$(WORKSPACE)/Silicon/Hisilicon/Hi6220/Include 
-I$(WORKSPACE)/Platform/Hisilicon/HiKey/Include
@@ -337,6 +352,29 @@
   gEmbeddedTokenSpaceGuid.PcdAndroidFastbootUsbVendorId|0x18d1
   gEmbeddedTokenSpaceGuid.PcdAndroidFastbootUsbProductId|0xd00d
 
+  # 
+  # NV Storage PCDs.
+  #
+  gHwTokenSpaceGuid.PcdNvStorageVariableBlockCount|0x1000
+  gHwTokenSpaceGuid.PcdNvStorageVariableBlockSize|0x0200
+  gHwTokenSpaceGuid.PcdNvStorageVariableBlockLba|0x6000
+  
gHwTokenSpaceGuid.PcdNvStorageVariableBlockDevicePath|L"VenHw(B549F005-4BD4-4020-A0CB-06F42BDA68C3)/HD(5,GPT,00354BCD-BBCB-4CB3-B5AE-CDEFCB5DAC43)"
+
+  #
+  # ARM Pcds
+  #
+  gArmTokenSpaceGuid.PcdArmUncachedMemoryMask|0x
+
+  # Increase storage space of UEFI variable to 2KB so that it can store root 
certificate
+  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x800
+
+!if $(SECURE_BOOT_ENABLE)

[edk2] [PATCH] [edk2-platforms]:resolving Hikey platform build error

2017-11-15 Thread kalyan-nagabhirava
"Instance of library class [CapsuleLib] is not found" build error is
 coming for Hikey platform, to resolve this issueadded CapsuleLib to
 "LibraryClasses.common" section

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: kalyan-nagabhirava <kalyankumar.nagabhir...@linaro.org>
---
 Platform/Hisilicon/HiKey/HiKey.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc 
b/Platform/Hisilicon/HiKey/HiKey.dsc
index 968e8acc0..2e3b1c879 100644
--- a/Platform/Hisilicon/HiKey/HiKey.dsc
+++ b/Platform/Hisilicon/HiKey/HiKey.dsc
@@ -61,6 +61,7 @@
   
SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
 
   FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
+  CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
   
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
   
PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
   BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
-- 
2.15.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] ShellLibConstructor is failing in Linuxloader application

2016-11-13 Thread Kalyan Nagabhirava
HI,

i am running linuxloader (ArmPkg/Application/LinuxLoader) application in
armQemu ( QEMU_EFI.fd on qemu-system-aarch64)
 but linuxloader is failing while initializing
shellLibs(ShellLibConstructor).
i included Shell lib(ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf)
in armVirtQemu.dsc, but still it is failing, any idea what is the issue?

regards,
kalyan.
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel