Re: [edk2] [PATCH] MdeModulePkg/ResetUtilityLib: Fix GCC build failure

2018-02-12 Thread Zeng, Star
Reviewed-by: Star Zeng 

Thanks,
Star
-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ruiyu Ni
Sent: Tuesday, February 13, 2018 11:03 AM
To: edk2-devel@lists.01.org
Cc: Bi, Dandan 
Subject: [edk2] [PATCH] MdeModulePkg/ResetUtilityLib: Fix GCC build failure

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni 
Cc: Dandan Bi 
---
 MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c 
b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
index 90de94ca9b..da5fa7b094 100644
--- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
+++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
@@ -1,7 +1,7 @@
 /** @file
   This contains the business logic for the module-specific Reset Helper 
functions.
 
-  Copyright (c) 2017 Intel Corporation. All rights reserved.
+  Copyright (c) 2017 - 2018 Intel Corporation. All rights reserved.
   Copyright (c) 2016 Microsoft Corporation. All rights reserved.
 
   This program and the accompanying materials are licensed and made available 
under @@ -100,7 +100,7 @@ GetResetPlatformSpecificGuid (
   //
   if ((ResetDataStringSize < DataSize) && (DataSize - ResetDataStringSize) >= 
sizeof (GUID)) {
 ResetSubtypeGuid = (GUID *)((UINT8 *)ResetData + ResetDataStringSize);
-DEBUG ((DEBUG_VERBOSE, __FUNCTION__" - Detected reset subtype %g...\n", 
ResetSubtypeGuid));
+DEBUG ((DEBUG_VERBOSE, "%a - Detected reset subtype %g...\n", 
+ __FUNCTION__, ResetSubtypeGuid));
 return ResetSubtypeGuid;
   }
   return NULL;
--
2.16.1.windows.1

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


Re: [edk2] [PATCH] MdeModulePkg/UsbMass: Fix hot-plug USB CDROM can't be recognized

2018-02-12 Thread Zeng, Star
Reviewed-by: Star Zeng 

Thanks,
Star
-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ruiyu Ni
Sent: Tuesday, February 13, 2018 3:22 PM
To: edk2-devel@lists.01.org
Cc: Tian, Feng ; Zeng, Star 
Subject: [edk2] [PATCH] MdeModulePkg/UsbMass: Fix hot-plug USB CDROM can't be 
recognized

In below calling stack:
UsbBootIsUnitReady()
 UsbBootExecCmdWithRetry()
  UsbBootExecCmd()
UsbBootRequestSense()
When USB CDROM is hot-plugged, UsbBootRequestSense() retrieves sense key (6 = 
UnitAttention), additional sense code (29h = Power ON).
But it wrongly maps such sense data to Device Error status.
It causes UsbBootExecCmd() executed again.
In the second time call to UsbBootExecCmd(), UsbBootRequestSense() retrieves 
sense key (6 = UnitAttention), additional sense code (28h = media changed).

The above analysis explains why hot-plug USB CDROM cannot be recognized after 
below commit:
SHA1 a662afb5b023a187ef638d3cb0e0c313ad39a7fc
* MdeModulePkg/UsbStorage: Fix "map -r" cannot detect media change, which 
removes the media changed status check in UsbBootDetectMedia().

The proper fix to this problem is to map the ASC (additional sense code 29h) 
properly to success status so that no second call to
UsbBootExecCmd() is made.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni 
Cc: Star Zeng 
Cc: Feng Tian 
---
 MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c | 2 ++  
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c 
b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
index 613008bde7..12e68d2149 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
@@ -124,6 +124,8 @@ UsbBootRequestSense (
   Status = EFI_NOT_READY;
 } else if (SenseData.Asc == USB_BOOT_ASC_NO_MEDIA) {
   Status = EFI_NOT_READY;
+} else if (SenseData.Asc == USB_BOOT_ASC_POWER_ON) {
+  Status = EFI_SUCCESS;
 }
 break;
 
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h 
b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h
index 13a926035c..5ee50ac52a 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h
@@ -2,7 +2,7 @@
   Definition of the command set of USB Mass Storage Specification
   for Bootability, Revision 1.0.
 
-Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, 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 @@ -55,6 +55,7 @@ 
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define USB_BOOT_ASC_NOT_READY0x04
 #define USB_BOOT_ASC_NO_MEDIA 0x3A
 #define USB_BOOT_ASC_MEDIA_CHANGE 0x28
+#define USB_BOOT_ASC_POWER_ON 0x29
 
 //
 // Supported PDT codes, or Peripheral Device Type
--
2.16.1.windows.1

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


[edk2] [PATCH] MdeModulePkg/UsbMass: Fix hot-plug USB CDROM can't be recognized

2018-02-12 Thread Ruiyu Ni
In below calling stack:
UsbBootIsUnitReady()
 UsbBootExecCmdWithRetry()
  UsbBootExecCmd()
UsbBootRequestSense()
When USB CDROM is hot-plugged, UsbBootRequestSense() retrieves sense
key (6 = UnitAttention), additional sense code (29h = Power ON).
But it wrongly maps such sense data to Device Error status.
It causes UsbBootExecCmd() executed again.
In the second time call to UsbBootExecCmd(), UsbBootRequestSense()
retrieves sense key (6 = UnitAttention), additional sense code
(28h = media changed).

The above analysis explains why hot-plug USB CDROM cannot be
recognized after below commit:
SHA1 a662afb5b023a187ef638d3cb0e0c313ad39a7fc
* MdeModulePkg/UsbStorage: Fix "map -r" cannot detect media change,
which removes the media changed status check in UsbBootDetectMedia().

The proper fix to this problem is to map the ASC (additional sense
code 29h) properly to success status so that no second call to
UsbBootExecCmd() is made.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni 
Cc: Star Zeng 
Cc: Feng Tian 
---
 MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c | 2 ++
 MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c 
b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
index 613008bde7..12e68d2149 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c
@@ -124,6 +124,8 @@ UsbBootRequestSense (
   Status = EFI_NOT_READY;
 } else if (SenseData.Asc == USB_BOOT_ASC_NO_MEDIA) {
   Status = EFI_NOT_READY;
+} else if (SenseData.Asc == USB_BOOT_ASC_POWER_ON) {
+  Status = EFI_SUCCESS;
 }
 break;
 
diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h 
b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h
index 13a926035c..5ee50ac52a 100644
--- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h
+++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h
@@ -2,7 +2,7 @@
   Definition of the command set of USB Mass Storage Specification
   for Bootability, Revision 1.0.
 
-Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, 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
@@ -55,6 +55,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 #define USB_BOOT_ASC_NOT_READY0x04
 #define USB_BOOT_ASC_NO_MEDIA 0x3A
 #define USB_BOOT_ASC_MEDIA_CHANGE 0x28
+#define USB_BOOT_ASC_POWER_ON 0x29
 
 //
 // Supported PDT codes, or Peripheral Device Type
-- 
2.16.1.windows.1

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


[edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] SMBus Host driver.

2018-02-12 Thread zwei4
Add Apollo Lake SMBus host controller DXE driver.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: zwei4 
---
 .../BroxtonSiPkg/SouthCluster/Smbus/Dxe/PchSmbus.h | 358 +++
 .../SouthCluster/Smbus/Dxe/PchSmbusArp.c   | 673 +
 .../SouthCluster/Smbus/Dxe/PchSmbusDxe.inf |  63 ++
 .../SouthCluster/Smbus/Dxe/PchSmbusEntry.c | 155 +
 4 files changed, 1249 insertions(+)
 create mode 100644 
Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Smbus/Dxe/PchSmbus.h
 create mode 100644 
Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Smbus/Dxe/PchSmbusArp.c
 create mode 100644 
Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Smbus/Dxe/PchSmbusDxe.inf
 create mode 100644 
Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Smbus/Dxe/PchSmbusEntry.c

diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Smbus/Dxe/PchSmbus.h 
b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Smbus/Dxe/PchSmbus.h
new file mode 100644
index 0..5e226a80d
--- /dev/null
+++ b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Smbus/Dxe/PchSmbus.h
@@ -0,0 +1,358 @@
+/** @file
+  PCH SMBus Protocol.
+
+  Copyright (c) 2018, 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.
+
+**/
+#ifndef _DXE_PCH_SMBUS_H
+#define _DXE_PCH_SMBUS_H
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+//
+// Definitions
+//
+
+///
+/// Max number of SMBus devices (7 bit address yields 128 combinations but 21 
of those are reserved)
+///
+#define MAX_SMBUS_DEVICES 107
+#define MICROSECOND 10
+#define MILLISECOND (1000 * MICROSECOND)
+#define ONESECOND   (1000 * MILLISECOND)
+
+///
+/// Private Data Structures
+///
+typedef struct _SMBUS_NOTIFY_FUNCTION_LIST_NODE {
+  UINT32Signature;
+  LIST_ENTRYLink;
+  EFI_SMBUS_DEVICE_ADDRESS  SlaveAddress;
+  UINTN Data;
+  EFI_SMBUS_NOTIFY_FUNCTION NotifyFunction;
+} SMBUS_NOTIFY_FUNCTION_LIST_NODE;
+
+#define SMBUS_NOTIFY_FUNCTION_LIST_NODE_FROM_LINK(_node) \
+  CR ( \
+  _node, \
+  SMBUS_NOTIFY_FUNCTION_LIST_NODE, \
+  Link, \
+  PCH_SMBUS_PRIVATE_DATA_SIGNATURE \
+  )
+
+///
+/// Declare a local instance structure for this driver
+///
+typedef struct _SMBUS_INSTANCE {
+  UINTN Signature;
+  EFI_HANDLEHandle;
+
+  UINT32SmbusIoBase;
+  SMBUS_IO_READ SmbusIoRead;
+  SMBUS_IO_WRITESmbusIoWrite;
+  SMBUS_IO_DONE IoDone;
+
+  ///
+  /// Published interface
+  ///
+  EFI_SMBUS_HC_PROTOCOL SmbusController;
+
+  UINT8 DeviceMapEntries;
+  EFI_SMBUS_DEVICE_MAP  DeviceMap[MAX_SMBUS_DEVICES];
+
+  UINT8 PlatformNumRsvd;
+  CONST UINT8   *PlatformRsvdAddr;
+
+  LIST_ENTRYNotifyFunctionList;
+  EFI_EVENT NotificationEvent;
+
+} SMBUS_INSTANCE;
+
+//
+// Driver global data
+//
+SMBUS_INSTANCE  *mSmbusContext;
+
+//
+// Prototypes
+//
+
+/**
+  Execute an SMBUS operation
+
+  @param[in] This The protocol instance
+  @param[in] SlaveAddress The address of the SMBUS slave device
+  @param[in] Command  The SMBUS command
+  @param[in] OperationWhich SMBus protocol will be issued
+  @param[in] PecCheck If Packet Error Code Checking is to be used
+  @param[in, out] Length  Length of dta
+  @param[in, out] Buffer  Data buffer
+
+  @retval EFI_SUCCESS The SMBUS operation is successful
+  @retval Others  Something error occurred
+**/
+EFI_STATUS
+EFIAPI
+SmbusExecute (
+  IN  CONST EFI_SMBUS_HC_PROTOCOL   *This,
+  IN  EFI_SMBUS_DEVICE_ADDRESS  SlaveAddress,
+  IN  EFI_SMBUS_DEVICE_COMMAND  Command,
+  IN  EFI_SMBUS_OPERATION   Operation,
+  IN  BOOLEAN   PecCheck,
+  IN OUT  UINTN *Length,
+  IN OUT  VOID  *Buffer
+  );
+
+/**
+  SMBus DXE Module Entry Point.
+  
+  - Introduction
+The SMBus module is a DXE driver that provides a standard way to execute 
an SMBus command.
+
+  - @pre
+- @link SC_POLICY SC_POLICY_HOB @endlink
+  - This module uses the parameters in SmbusConfig for platform reserved 
(non ARP capable) addresses.
+
+  - @result
+The SMBus driver produces EFI_SMBUS_HC_PROTOCOL which is documented in the 
SMBus Host Controller
+Protocol Specification.
+
+  @param[in] ImageHandle  ImageHandle of this module
+  

Re: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017 2/2] Enable Turbo on CpuPower default configuration

2018-02-12 Thread Wei, David
Reviewed-by: zwei4 

Thanks,
David  Wei

Intel SSG/STO/UEFI BIOS 


-Original Message-
From: Rytkonen, Teemu S 
Sent: Tuesday, February 13, 2018 5:41 AM
To: edk2-devel@lists.01.org
Cc: Wei, David ; Loeppert, Anthony 

Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017 2/2] Enable Turbo on 
CpuPower default configuration

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: tsrytkon 
---
 .../Common/PlatformSettings/PlatformSetupDxe/CpuPower.vfi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/CpuPower.vfi
 
b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/CpuPower.vfi
index 9deea2534..0bedbc5fa 100644
--- 
a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/CpuPower.vfi
+++ 
b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/CpuPower.vfi
@@ -40,8 +40,8 @@ form formid = CPU_PWR_CONFIGURATION_FORM_ID,
   oneof varid  = Setup.TurboModeEnable,
 prompt = STRING_TOKEN(STR_PROCESSOR_TURBO_MODE),
 help = STRING_TOKEN(STR_PROCESSOR_TURBO_MODE_HELP),
-option text = STRING_TOKEN(STR_DISABLE),  value = 0, flags = MANUFACTURING 
|DEFAULT | RESET_REQUIRED;
-option text = STRING_TOKEN(STR_ENABLE),   value = 1, flags = 
RESET_REQUIRED;
+option text = STRING_TOKEN(STR_DISABLE),  value = 0, flags = 
RESET_REQUIRED;
+option text = STRING_TOKEN(STR_ENABLE),   value = 1, flags = MANUFACTURING 
|DEFAULT | RESET_REQUIRED;
   endoneof;
   endif;
 
-- 
2.15.1.windows.2

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


Re: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017 1/2] Add support for SueCreek LED Drivers

2018-02-12 Thread Wei, David
Reviewed-by: zwei4 

Thanks,
David  Wei

Intel SSG/STO/UEFI BIOS 

-Original Message-
From: Rytkonen, Teemu S 
Sent: Tuesday, February 13, 2018 5:32 AM
To: edk2-devel@lists.01.org
Cc: Wei, David ; Loeppert, Anthony 
; Rytkonen, Teemu S 
Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017 1/2] Add support for 
SueCreek LED Drivers

Adds support for two ACPI entries for PCA9956 LED drivers
for SueCreek DMIC board.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Teemu Rytkonen 
---
 .../AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl   |  3 +
 .../PlatformSsdt/SueCreek/SueCreek.asl | 10 ++--
 .../PlatformSsdt/SueCreek/SueCreekLeds.asl | 70 ++
 3 files changed, 77 insertions(+), 6 deletions(-)
 create mode 100644 
Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreekLeds.asl

diff --git 
a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl
 
b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl
index b86baf357..93e2592ba 100644
--- 
a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl
+++ 
b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl
@@ -36,12 +36,14 @@ DefinitionBlock (
   External(\_SB.GPO0.CWLE, IntObj)
   External(\_SB.GPO0.AVBL, IntObj)
   External(\_SB.PCI0.SDIO.PSTS, IntObj)
+  External(\SUCE, IntObj)
   External(HIDG, MethodObj)
   External(OSYS, IntObj)
   External(SBTD, IntObj)
   External(WCAS, IntObj)
   External(UCAS, IntObj)
   External(CROT, IntObj)
+
   External(TP7G)
   External(IPUD)
 
@@ -72,6 +74,7 @@ DefinitionBlock (
 
   include ("Fingerprint/Fingerprint_FPC.asl")
   include ("SueCreek/SueCreek.asl")
+  include ("SueCreek/SueCreekLeds.asl")
   include ("Sensors/GenericSpi3.asl")
 }
 
diff --git 
a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreek.asl
 
b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreek.asl
index 3baa88cc4..b9a3fa9ca 100644
--- 
a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreek.asl
+++ 
b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreek.asl
@@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 
 Scope (\_SB.PCI0.SPI1) {
   Device (TP0) {
-Name (_HID, "SUE1000")
+Name (_HID, "SUE1000")
 Name (_DDN, "SueCreek - SPI0, CS0")
 Name (_CRS, ResourceTemplate () {
   SpiSerialBus (
@@ -23,15 +23,13 @@ Scope (\_SB.PCI0.SPI1) {
 FourWireMode,   // Full duplex
 8,  // Bits per word is 8 (byte)
 ControllerInitiated,// Don't care
-960,// 9.6 MHz
-ClockPolarityHigh,  // SPI mode 3
-ClockPhaseSecond,   // SPI mode 3
+960,// 9.6 MHz
+ClockPolarityHigh,  // SPI mode 3
+ClockPhaseSecond,   // SPI mode 3
 "\\_SB.PCI0.SPI1",  // SPI host controller
 0   // Must be 0
   )
 })
-
-External(\SUCE, IntObj)
 Method (_STA, 0x0, NotSerialized) {
   If (LEqual (SUCE, 0)) {
 Return (0x0)
diff --git 
a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreekLeds.asl
 
b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreekLeds.asl
new file mode 100644
index 0..2fcc45742
--- /dev/null
+++ 
b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreekLeds.asl
@@ -0,0 +1,70 @@
+/** @file
+
+Copyright (c) 2017 Intel Corporation.
+
+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.
+
+**/
+
+Scope(\_SB.PCI0.I2C5) {
+  Device (LED0) {
+Name (_HID, "PCA9956")
+Name (_DDN, "SueCreekLed, CS0")
+Name (SBUF, ResourceTemplate () {
+  I2cSerialBus (
+0x0065,
+ControllerInitiated,
+40,
+AddressingMode7Bit,
+"\\_SB.PCI0.I2C5",
+0x00,
+ResourceConsumer,
+,
+)
+})
+Method (_CRS, 0, NotSerialized)
+{
+  Return (SBUF)
+}
+Method (_STA, 0x0, NotSerialized) {
+  If (LEqual (SUCE, 0)) {
+Return (0x0)
+  } else {
+Return (0xF)
+  }
+}
+  }
+  Device (LED1) {
+Name (_HID, "PCA9956")
+Name 

Re: [edk2] how do I use RamDiskDxe?

2018-02-12 Thread Wu, Hao A
> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Andrew Fish
> Sent: Tuesday, February 13, 2018 8:40 AM
> To: Rick Warner
> Cc: edk2-devel@lists.01.org
> Subject: Re: [edk2] how do I use RamDiskDxe?
> 
> 
> 
> > On Feb 12, 2018, at 1:07 PM, Rick Warner  wrote:
> >
> > Hi All,
> >
> > I'm trying to develop a tool for automated BIOS flashing from the EFI shell
> using IPMI serial over lan to drive it.  To accomplish this, my plan is to 
> use a
> network booted EFI shell with a tftp client and a ramdisk to download the 
> flash
> tools and ROM into as a workspace and then run the flash commands from that
> ram disk.
> >
> > I've been able to successfully build and boot an efi shell from the edk 2
> sources including the tftp client.  I've also been able to separately build 
> the
> RamDiskDxe driver from the MdeModulePkg. Loading the RamDiskDxe.efi
> driver file results in a successful message, but I do not get any usable ram 
> disk
> made available to me?
> >
> > How do I get a usable drive letter/name (ie blk0: or any other name) from 
> > the
> RamDiskDxe driver?
> >
> 
> Looks like when you load the RamDiskDxe it registers gEfiRamDiskProtocolGuid
> https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Protocol/Ra
> mDisk.h
>  mDisk.h> which notes this API was added in UEFI 2.6 so you can read up on it 
> in
> that version of the EFI Spec.
> 
> From a quick site read of the code it looks like the driver just produces a
> Protocol that lets you create a RAM disk and VRF (Setup Pages) that let you
> configure one. Seems like you still need to call it and give the raw disk 
> image.
> 



> > Once I've done that, will it be possible to include the RamDiskDxe driver as
> part of the network bootable efi shell image?  I assume I'll need to modify
> the .dsc file for the ShellPkg to include the MdeModulePkg pieces.
> >
> > If anyone has any other suggestions for this, I'm open to ideas. The only 
> > way
> I've been successful in network booting EFI shell is using just that file 
> directly.  I
> tried creating a dos filesystem image with the efi shell file in it just like 
> would
> work with a USB key, but that would not boot over the network stack. If there 
> is
> some way of creating a network bootable EFI shell filesystem image (similar to
> how Linux can network boot a separate vmlinuz kernel and initrd image)?
> >
> > Are there any docs that I've missed (I've tried looking in the user docs 
> > and on
> the wiki) regarding setting up RamDiskDxe?
> >
> 
> Traditionally network booting has involved loading a single file over the
> network (like an OS Loader) and that file uses the UEFI networking stack to
> download (TFTP read) more images (like the Kernel) from a location implied by
> the location used to download the single file (OS Loader).
> 

Hi,

For the RamDiskDxe part:

Just as the previous reply, the RamDiskDxe driver provides:
a). A protocol to (un)register a range of memory to a Ram disk
b). A setup page for user to create:
a raw Ram disk (no data on the created one) or,
from a selected file (the file will be the content in the Ram disk,
no file system though)

If you want to place the flash tools in the Ram disk and use it, I think
you also need to format the Ram disk and create file system on it first
(e.g. FAT).

Best Regards,
Hao Wu

> Thanks,
> 
> Andrew Fish
> 
> > Thanks!
> > Rick Warner
> > ___
> > edk2-devel mailing list
> > edk2-devel@lists.01.org 
> > https://lists.01.org/mailman/listinfo/edk2-devel
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH] MdeModulePkg/ResetUtilityLib: Fix GCC build failure

2018-02-12 Thread Ruiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni 
Cc: Dandan Bi 
---
 MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c 
b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
index 90de94ca9b..da5fa7b094 100644
--- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
+++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
@@ -1,7 +1,7 @@
 /** @file
   This contains the business logic for the module-specific Reset Helper 
functions.
 
-  Copyright (c) 2017 Intel Corporation. All rights reserved.
+  Copyright (c) 2017 - 2018 Intel Corporation. All rights reserved.
   Copyright (c) 2016 Microsoft Corporation. All rights reserved.
 
   This program and the accompanying materials are licensed and made available 
under
@@ -100,7 +100,7 @@ GetResetPlatformSpecificGuid (
   //
   if ((ResetDataStringSize < DataSize) && (DataSize - ResetDataStringSize) >= 
sizeof (GUID)) {
 ResetSubtypeGuid = (GUID *)((UINT8 *)ResetData + ResetDataStringSize);
-DEBUG ((DEBUG_VERBOSE, __FUNCTION__" - Detected reset subtype %g...\n", 
ResetSubtypeGuid));
+DEBUG ((DEBUG_VERBOSE, "%a - Detected reset subtype %g...\n", 
__FUNCTION__, ResetSubtypeGuid));
 return ResetSubtypeGuid;
   }
   return NULL;
-- 
2.16.1.windows.1

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


Re: [edk2] [PATCH] MdeModulePkg/BmpSupportLib: Refine type cast for pointer subtraction

2018-02-12 Thread Zeng, Star
Reviewed-by: Star Zeng 

Thanks,
Star
-Original Message-
From: Wu, Hao A 
Sent: Tuesday, February 13, 2018 10:28 AM
To: edk2-devel@lists.01.org
Cc: Wu, Hao A ; Kinney, Michael D 
; Sean Brogan ; Yao, 
Jiewen ; Zeng, Star ; Dong, Eric 
; Ni, Ruiyu 
Subject: [PATCH] MdeModulePkg/BmpSupportLib: Refine type cast for pointer 
subtraction

Since the pointer subtraction here is not performed by pointers to elements of 
the same array object. This might lead to potential issues, such behavior is 
undefined according to C11 standard.

Refine the pointer subtraction expressions by casting each pointer to UINTN 
first and then perform the subtraction.

Cc: Michael D Kinney 
Cc: Sean Brogan 
Cc: Jiewen Yao 
Cc: Star Zeng 
Cc: Eric Dong 
Cc: Ruiyu Ni 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu 
---
 MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c 
b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
index 2c95e91ecc..467cd6a58d 100644
--- a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
+++ b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
@@ -426,7 +426,7 @@ TranslateBmpToGopBlt (
 
 }
 
-ImageIndex = (UINTN)(Image - ImageHeader);
+ImageIndex = (UINTN)Image - (UINTN)ImageHeader;
 if ((ImageIndex % 4) != 0) {
   //
   // Bmp Image starts each row on a 32-bit boundary!
--
2.12.0.windows.1

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


Re: [edk2] [PATCH 4/4] ShellPkg: remove superfluous TimerLib resolution

2018-02-12 Thread Ni, Ruiyu

On 2/12/2018 9:45 PM, Laszlo Ersek wrote:

TimerLib had to be resolved in commit 5ab97a64b51c ("ShellPkg/bcfg: Add
Shell Spec 2.2 modification functionality", 2017-03-01) because:

- the BCFG command started making calls to UefiBootManagerLib
   (EfiBootManagerVariableToLoadOption(),
   EfiBootManagerLoadOptionToVariable(), EfiBootManagerFreeLoadOption()),

- and "MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf"
   depended on TimerLib.

Because TimerLib is platform-specific, but "ShellPkg/ShellPkg.dsc" is
meant to produce a UEFI shell binary that is platform-independent (see
"ShellBinPkg/ReadMe.txt"), we resolved TimerLib to
"BaseTimerLibNullTemplate.inf". (TimerLib functionality was never actually
needed on UefiBootManagerLib code paths that were exercised by the shell /
BCFG.)

Thanks to the last patch, UefiBootManagerLib no longer depends on
TimerLib, thus we can drop the TimerLib resolution entirely.

Cc: Jaben Carsey 
Cc: Ruiyu Ni 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
  ShellPkg/ShellPkg.dsc | 1 -
  1 file changed, 1 deletion(-)

diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc
index 29f537641285..1c923f585149 100644
--- a/ShellPkg/ShellPkg.dsc
+++ b/ShellPkg/ShellPkg.dsc
@@ -58,7 +58,6 @@ [LibraryClasses.common]
  
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf

HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-  TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf

PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf

DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf


Very great clean up.
Reviewed-by: Ruiyu Ni 

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


Re: [edk2] [PATCH 3/4] MdeModulePkg/UefiBootManagerLib: remove superfluous TimerLib dependency

2018-02-12 Thread Ni, Ruiyu

On 2/12/2018 9:45 PM, Laszlo Ersek wrote:

In commit 3a039a567a5f ("MdeModulePkg/UefiBootManagerLib: Remove the
useless perf codes", 2018-02-12), the BmWriteBootToOsPerformanceData()
function was removed. No TimerLib API calls are left, thus remove the
TimerLib class dependency from "InternalBm.h" and "UefiBootManagerLib.inf"
as well.

Cc: Eric Dong 
Cc: Jaben Carsey 
Cc: Ruiyu Ni 
Cc: Star Zeng 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
  MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf | 1 -
  MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h   | 1 -
  2 files changed, 2 deletions(-)

diff --git a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf 
b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
index 1adffd70d06a..8d5b89ea2970 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
+++ b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
@@ -52,7 +52,6 @@ [LibraryClasses]
PcdLib
BaseLib
UefiLib
-  TimerLib
DebugLib
PrintLib
BaseMemoryLib
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h 
b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
index ed0cd16ef322..25a1d522fe84 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
+++ b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
@@ -68,7 +68,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
  #include 
  #include 
  #include 
-#include 
  #include 
  #include 
  #include 


Thanks!
Reviewed-by: Ruiyu Ni 

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


[edk2] [PATCH] MdeModulePkg/BmpSupportLib: Refine type cast for pointer subtraction

2018-02-12 Thread Hao Wu
Since the pointer subtraction here is not performed by pointers to
elements of the same array object. This might lead to potential issues,
such behavior is undefined according to C11 standard.

Refine the pointer subtraction expressions by casting each pointer to
UINTN first and then perform the subtraction.

Cc: Michael D Kinney 
Cc: Sean Brogan 
Cc: Jiewen Yao 
Cc: Star Zeng 
Cc: Eric Dong 
Cc: Ruiyu Ni 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu 
---
 MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c 
b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
index 2c95e91ecc..467cd6a58d 100644
--- a/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
+++ b/MdeModulePkg/Library/BaseBmpSupportLib/BmpSupportLib.c
@@ -426,7 +426,7 @@ TranslateBmpToGopBlt (
 
 }
 
-ImageIndex = (UINTN)(Image - ImageHeader);
+ImageIndex = (UINTN)Image - (UINTN)ImageHeader;
 if ((ImageIndex % 4) != 0) {
   //
   // Bmp Image starts each row on a 32-bit boundary!
-- 
2.12.0.windows.1

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


Re: [edk2] [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime lib from common file

2018-02-12 Thread Guo Heyi
On Tue, Feb 13, 2018 at 12:59:50AM +, Haojian Zhuang wrote:
> On 02/13/2018 08:23 AM, Guo Heyi wrote:
> > Hi Haojian,
> > 
> > Dw8250SerialPortRuntimeLib actually depends on DW8250 hardware IP; if there
> > isn't such device on Hikey, then you can't use this library instance indeed.
> > 
> > But I think PeiDxeDebugLibReportStatusCode should be some common code, 
> > however
> > it depends on ReportStatusCodeLib and Status Code PEIM and Status code DXE
> > driver. Have you added them too?
> >
> If I leave PeiDxeDebugLibReportStatusCode and move Dw8250SerialPortRuntimeLib 
> out,
> I'll meet UEFI crash. It seems the debug lib is depended on serial port lib.
This is strange, because you should have your own SerialPortLib of your
platform, otherwise error will occur when you build your UEFI.

> 
> And I consider that Dw8250 serial port is only valid on D02. So I decide to 
> move them out.

I agree.

Regards,

Heyi

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


[edk2] [PATCH] MdePkg/BaseSafeIntLib: Fix VS IA32 NOOPT target build failure

2018-02-12 Thread Hao Wu
The commit resolve the VS IA32 NOOPT target build failure for modules
that use the BaseSafeIntLib.

More specifically, corresponding BaseLib APIs should be used when
performing shift & mulitiplication operations with signed/unsigned
64-bit operands.

Cc: Michael D Kinney 
Cc: Sean Brogan 
Cc: Jiewen Yao 
Cc: Liming Gao 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu 
---
 MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf |  3 +++
 MdePkg/Library/BaseSafeIntLib/SafeIntLib.c   | 13 +
 MdePkg/Library/BaseSafeIntLib/SafeIntLib32.c |  3 ++-
 MdePkg/Library/BaseSafeIntLib/SafeIntLibEbc.c|  3 ++-
 4 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf 
b/MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
index 20a83ed97b..8fbdafe748 100644
--- a/MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
+++ b/MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
@@ -56,3 +56,6 @@
 
 [Packages]
   MdePkg/MdePkg.dec
+
+[LibraryClasses]
+  BaseLib
diff --git a/MdePkg/Library/BaseSafeIntLib/SafeIntLib.c 
b/MdePkg/Library/BaseSafeIntLib/SafeIntLib.c
index d846160ba0..64b8bc4ad8 100644
--- a/MdePkg/Library/BaseSafeIntLib/SafeIntLib.c
+++ b/MdePkg/Library/BaseSafeIntLib/SafeIntLib.c
@@ -28,6 +28,7 @@
 
 #include 
 #include 
+#include 
 
 
 //
@@ -3373,8 +3374,8 @@ SafeUint64Mult (
   // b * c must be less than 2^32 or there would be bits in the high 64-bits
   // then there must be no overflow of the resulting values summed up.
   //
-  DwordA = (UINT32)(Multiplicand >> 32);
-  DwordC = (UINT32)(Multiplier >> 32);
+  DwordA = (UINT32)RShiftU64 (Multiplicand, 32);
+  DwordC = (UINT32)RShiftU64 (Multiplier, 32);
 
   //
   // common case -- if high dwords are both zero, no chance for overflow
@@ -3409,7 +3410,11 @@ SafeUint64Mult (
   // now sum them all up checking for overflow.
   // shifting is safe because we already checked for overflow above
   //
-  if (!RETURN_ERROR (SafeUint64Add (ProductBC << 32, ProductAD << 32, 
))) {
+  if (!RETURN_ERROR (SafeUint64Add (
+   LShiftU64 (ProductBC, 32),
+   LShiftU64 (ProductAD, 32),
+   
+   ))) {
 //
 // b * d
 //
@@ -4011,7 +4016,7 @@ SafeInt32Mult (
   OUT INT32  *Result
   )
 {
-  return SafeInt64ToInt32 (((INT64)Multiplicand) *((INT64)Multiplier), Result);
+  return SafeInt64ToInt32 (MultS64x64 ((INT64)Multiplicand, 
(INT64)Multiplier), Result);
 }
 
 /**
diff --git a/MdePkg/Library/BaseSafeIntLib/SafeIntLib32.c 
b/MdePkg/Library/BaseSafeIntLib/SafeIntLib32.c
index 18bfb9e413..b3b7b802a1 100644
--- a/MdePkg/Library/BaseSafeIntLib/SafeIntLib32.c
+++ b/MdePkg/Library/BaseSafeIntLib/SafeIntLib32.c
@@ -28,6 +28,7 @@
 
 #include 
 #include 
+#include 
 
 /**
   INT32 -> UINTN conversion
@@ -549,6 +550,6 @@ SafeIntnMult (
   OUT INTN  *Result
   )
 {
-  return SafeInt64ToIntn (((INT64)Multiplicand) *((INT64)Multiplier), Result);
+  return SafeInt64ToIntn (MultS64x64 ((INT64)Multiplicand, (INT64)Multiplier), 
Result);
 }
 
diff --git a/MdePkg/Library/BaseSafeIntLib/SafeIntLibEbc.c 
b/MdePkg/Library/BaseSafeIntLib/SafeIntLibEbc.c
index 4478957b7e..e810ba59ef 100644
--- a/MdePkg/Library/BaseSafeIntLib/SafeIntLibEbc.c
+++ b/MdePkg/Library/BaseSafeIntLib/SafeIntLibEbc.c
@@ -28,6 +28,7 @@
 
 #include 
 #include 
+#include 
 
 /**
   INT32 -> UINTN conversion
@@ -607,7 +608,7 @@ SafeIntnMult (
   )
 {
   if (sizeof (UINTN) == sizeof (UINT32)) {
-return SafeInt64ToIntn (((INT64)Multiplicand) *((INT64)Multiplier), 
Result);
+return SafeInt64ToIntn (MultS64x64 ((INT64)Multiplicand, 
(INT64)Multiplier), Result);
   }
   return SafeInt64Mult ((INT64)Multiplicand, (INT64)Multiplier, (INT64 
*)Result);
 }
-- 
2.12.0.windows.1

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


Re: [edk2] [PATCH v2 0/2] NetworkPkg: Support the platform to configure HTTPS CipherList.

2018-02-12 Thread Wu, Jiaxin
Thanks Laszlo.

If no other comments, I will commit this patch by the end of today.

Best Regards!
Jiaxin

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Laszlo Ersek
> Sent: Tuesday, February 13, 2018 3:56 AM
> To: Wu, Jiaxin ; edk2-devel@lists.01.org
> Cc: Ye, Ting ; Yao, Jiewen ; Fu,
> Siyuan ; Kinney, Michael D
> ; Zimmer, Vincent
> 
> Subject: Re: [edk2] [PATCH v2 0/2] NetworkPkg: Support the platform to
> configure HTTPS CipherList.
> 
> Hi Jiaxin,
> 
> On 02/11/18 04:21, Wu, Jiaxin wrote:
> > Hi Laszlo,
> >
> > Can you help to report one Bugzilla for the new feature request? It's better
> to describe the reason why we need support in Bugzilla.
> 
> I've filed . Thank
> you for the patches!
> 
> Laszlo
> 
> >
> >> -Original Message-
> >> From: Wu, Jiaxin
> >> Sent: Sunday, February 11, 2018 11:15 AM
> >> To: edk2-devel@lists.01.org
> >> Cc: Laszlo Ersek ; Kinney, Michael D
> >> ; Zimmer, Vincent
> >> ; Yao, Jiewen ; Ye,
> >> Ting ; Fu, Siyuan ; Wu, Jiaxin
> >> 
> >> Subject: [PATCH v2 0/2] NetworkPkg: Support the platform to configure
> >> HTTPS CipherList.
> >>
> >> V2:
> >> * Rename the file/variable name.
> >> * Refine the error handling returned from GetVariable.
> >>
> >> Cc: Laszlo Ersek 
> >> Cc: Kinney Michael D 
> >> Cc: Zimmer Vincent 
> >> Cc: Yao Jiewen 
> >> Cc: Ye Ting 
> >> Cc: Fu Siyuan 
> >> Contributed-under: TianoCore Contribution Agreement 1.0
> >> Signed-off-by: Wu Jiaxin 
> >>
> >> Jiaxin Wu (2):
> >>   NetworkPkg: Define one private variable for HTTPS to set Tls
> >> CipherList.
> >>   NetworkPkg: Read HttpTlsCipherList variable and configure it for HTTPS
> >> session.
> >>
> >>  NetworkPkg/HttpDxe/HttpDriver.h |  3 +-
> >>  NetworkPkg/HttpDxe/HttpDxe.inf  |  3 +-
> >>  NetworkPkg/HttpDxe/HttpsSupport.c   | 92
> >> -
> >>  NetworkPkg/Include/Guid/HttpTlsCipherList.h | 38 
> >>  NetworkPkg/NetworkPkg.dec   |  3 +
> >>  5 files changed, 136 insertions(+), 3 deletions(-)
> >>  create mode 100644 NetworkPkg/Include/Guid/HttpTlsCipherList.h
> >>
> >> --
> >> 1.9.5.msysgit.1
> >
> > ___
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> >
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime lib from common file

2018-02-12 Thread Haojian Zhuang
On 02/13/2018 08:23 AM, Guo Heyi wrote:
> Hi Haojian,
> 
> Dw8250SerialPortRuntimeLib actually depends on DW8250 hardware IP; if there
> isn't such device on Hikey, then you can't use this library instance indeed.
> 
> But I think PeiDxeDebugLibReportStatusCode should be some common code, however
> it depends on ReportStatusCodeLib and Status Code PEIM and Status code DXE
> driver. Have you added them too?
>
If I leave PeiDxeDebugLibReportStatusCode and move Dw8250SerialPortRuntimeLib 
out,
I'll meet UEFI crash. It seems the debug lib is depended on serial port lib.

And I consider that Dw8250 serial port is only valid on D02. So I decide to 
move them out.

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


Re: [edk2] [PATCH 3/4] MdeModulePkg/UefiBootManagerLib: remove superfluous TimerLib dependency

2018-02-12 Thread Zeng, Star
Reviewed-by: Star Zeng 


Thanks,
Star
-Original Message-
From: Laszlo Ersek [mailto:ler...@redhat.com] 
Sent: Monday, February 12, 2018 9:45 PM
To: edk2-devel-01 
Cc: Dong, Eric ; Carsey, Jaben ; 
Ni, Ruiyu ; Zeng, Star 
Subject: [PATCH 3/4] MdeModulePkg/UefiBootManagerLib: remove superfluous 
TimerLib dependency

In commit 3a039a567a5f ("MdeModulePkg/UefiBootManagerLib: Remove the useless 
perf codes", 2018-02-12), the BmWriteBootToOsPerformanceData() function was 
removed. No TimerLib API calls are left, thus remove the TimerLib class 
dependency from "InternalBm.h" and "UefiBootManagerLib.inf"
as well.

Cc: Eric Dong 
Cc: Jaben Carsey 
Cc: Ruiyu Ni 
Cc: Star Zeng 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf | 1 -
 MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h   | 1 -
 2 files changed, 2 deletions(-)

diff --git a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf 
b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
index 1adffd70d06a..8d5b89ea2970 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
+++ b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
@@ -52,7 +52,6 @@ [LibraryClasses]
   PcdLib
   BaseLib
   UefiLib
-  TimerLib
   DebugLib
   PrintLib
   BaseMemoryLib
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h 
b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
index ed0cd16ef322..25a1d522fe84 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
+++ b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
@@ -68,7 +68,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 #include 
 #include 
 #include  -#include   
#include   #include   
#include 
--
2.14.1.3.gb7cf6e02401b


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


Re: [edk2] how do I use RamDiskDxe?

2018-02-12 Thread Andrew Fish


> On Feb 12, 2018, at 1:07 PM, Rick Warner  wrote:
> 
> Hi All,
> 
> I'm trying to develop a tool for automated BIOS flashing from the EFI shell 
> using IPMI serial over lan to drive it.  To accomplish this, my plan is to 
> use a network booted EFI shell with a tftp client and a ramdisk to download 
> the flash tools and ROM into as a workspace and then run the flash commands 
> from that ram disk.
> 
> I've been able to successfully build and boot an efi shell from the edk 2 
> sources including the tftp client.  I've also been able to separately build 
> the RamDiskDxe driver from the MdeModulePkg. Loading the RamDiskDxe.efi 
> driver file results in a successful message, but I do not get any usable ram 
> disk made available to me?
> 
> How do I get a usable drive letter/name (ie blk0: or any other name) from the 
> RamDiskDxe driver?
> 

Looks like when you load the RamDiskDxe it registers gEfiRamDiskProtocolGuid 
https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Protocol/RamDisk.h 

 which notes this API was added in UEFI 2.6 so you can read up on it in that 
version of the EFI Spec. 

>From a quick site read of the code it looks like the driver just produces a 
>Protocol that lets you create a RAM disk and VRF (Setup Pages) that let you 
>configure one. Seems like you still need to call it and give the raw disk 
>image. 

> Once I've done that, will it be possible to include the RamDiskDxe driver as 
> part of the network bootable efi shell image?  I assume I'll need to modify 
> the .dsc file for the ShellPkg to include the MdeModulePkg pieces.
> 
> If anyone has any other suggestions for this, I'm open to ideas. The only way 
> I've been successful in network booting EFI shell is using just that file 
> directly.  I tried creating a dos filesystem image with the efi shell file in 
> it just like would work with a USB key, but that would not boot over the 
> network stack. If there is some way of creating a network bootable EFI shell 
> filesystem image (similar to how Linux can network boot a separate vmlinuz 
> kernel and initrd image)?
> 
> Are there any docs that I've missed (I've tried looking in the user docs and 
> on the wiki) regarding setting up RamDiskDxe?
> 

Traditionally network booting has involved loading a single file over the 
network (like an OS Loader) and that file uses the UEFI networking stack to 
download (TFTP read) more images (like the Kernel) from a location implied by 
the location used to download the single file (OS Loader).

Thanks,

Andrew Fish  

> Thanks!
> Rick Warner
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org 
> https://lists.01.org/mailman/listinfo/edk2-devel 
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime lib from common file

2018-02-12 Thread Guo Heyi
Hi Haojian,

Dw8250SerialPortRuntimeLib actually depends on DW8250 hardware IP; if there
isn't such device on Hikey, then you can't use this library instance indeed.

But I think PeiDxeDebugLibReportStatusCode should be some common code, however
it depends on ReportStatusCodeLib and Status Code PEIM and Status code DXE
driver. Have you added them too?

Heyi

On Sat, Feb 10, 2018 at 01:31:06AM +0800, Haojian Zhuang wrote:
> With the SerialPortLib and DebugLib, Dxe runtime driver can't
> be executed well on HiKey. Serial logs are missing.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Haojian Zhuang 
> ---
>  Platform/Hisilicon/D02/Pv660D02.dsc | 2 ++
>  Platform/Hisilicon/D03/D03.dsc  | 1 +
>  Platform/Hisilicon/D05/D05.dsc  | 1 +
>  Silicon/Hisilicon/Hisilicon.dsc.inc | 2 --
>  4 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Hisilicon/D02/Pv660D02.dsc 
> b/Platform/Hisilicon/D02/Pv660D02.dsc
> index 9e826ae..018e149 100644
> --- a/Platform/Hisilicon/D02/Pv660D02.dsc
> +++ b/Platform/Hisilicon/D02/Pv660D02.dsc
> @@ -80,6 +80,8 @@
>  
>  [LibraryClasses.common.DXE_RUNTIME_DRIVER]
>I2CLib|Silicon/Hisilicon/Library/I2CLib/I2CLibRuntime.inf
> +  
> SerialPortLib|Silicon/Hisilicon/Library/Dw8250SerialPortRuntimeLib/Dw8250SerialPortRuntimeLib.inf
> +  
> DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
>  
>  [BuildOptions]
>GCC:*_*_AARCH64_PLATFORM_FLAGS == 
> -I$(WORKSPACE)/Silicon/Hisilicon/Pv660/Include
> diff --git a/Platform/Hisilicon/D03/D03.dsc b/Platform/Hisilicon/D03/D03.dsc
> index c496306..b9bce66 100644
> --- a/Platform/Hisilicon/D03/D03.dsc
> +++ b/Platform/Hisilicon/D03/D03.dsc
> @@ -97,6 +97,7 @@
>  [LibraryClasses.common.DXE_RUNTIME_DRIVER]
>I2CLib|Silicon/Hisilicon/Library/I2CLib/I2CLibRuntime.inf
>
> SerialPortLib|Silicon/Hisilicon/Hi1610/Library/Uart/LpcSerialPortLib/LpcSerialPortLib.inf
> +  
> DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
>  
>  [BuildOptions]
>GCC:*_*_AARCH64_PLATFORM_FLAGS == 
> -I$(WORKSPACE)/Silicon/Hisilicon/Hi1610/Include
> diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc
> index 0792b08..dfee09b 100644
> --- a/Platform/Hisilicon/D05/D05.dsc
> +++ b/Platform/Hisilicon/D05/D05.dsc
> @@ -105,6 +105,7 @@
>  [LibraryClasses.common.DXE_RUNTIME_DRIVER]
>I2CLib|Silicon/Hisilicon/Library/I2CLib/I2CLibRuntime.inf
>
> SerialPortLib|ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf
> +  
> DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
>  
>  [BuildOptions]
>GCC:*_*_AARCH64_PLATFORM_FLAGS == 
> -I$(WORKSPACE)/Silicon/Hisilicon/Hi1616/Include
> diff --git a/Silicon/Hisilicon/Hisilicon.dsc.inc 
> b/Silicon/Hisilicon/Hisilicon.dsc.inc
> index 5766829..b5b9e7e 100644
> --- a/Silicon/Hisilicon/Hisilicon.dsc.inc
> +++ b/Silicon/Hisilicon/Hisilicon.dsc.inc
> @@ -208,8 +208,6 @@
>
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
>
> ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf
>CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf
> -  
> SerialPortLib|Silicon/Hisilicon/Library/Dw8250SerialPortRuntimeLib/Dw8250SerialPortRuntimeLib.inf
> -  
> DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
>  
>  [LibraryClasses.AARCH64]
>
> ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.inf
> -- 
> 2.7.4
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] Patch to fix EFIAPI definition

2018-02-12 Thread Andrew Fish


> On Feb 9, 2018, at 12:13 AM, Ruslan Nikolaev  wrote:
> 
> Sorry, I did not answer this question last time. It is basically may not be 
> very easy to change if you already have some assembly code which makes use of 
> a specific calling convention. Plus there may be benefits of using 
> register-based calls elsewhere.
> 
> I thought, since EFIAPI aims to define a specific calling convention 
> regardless of compilation flags, why not specify regparm(0) there as well. 
> 

Rusian,

The primary goal of EFIAPI is to make sure it produces the correct code with 
the set of compilers that are supported by the edk2 project: 
https://github.com/tianocore/edk2/blob/master/BaseTools/Conf/tools_def.template 


Thus it has the values that work correctly with the supported toolchains. It is 
very hard to support some conceptual toolchain if a version of that toolchain 
is not checked in as there is no way to test it. 

Thanks,

Andrew Fish


>On Friday, February 9, 2018 2:17 AM, Andrew Fish  wrote:
> 
> 
> 
> 
>> On Feb 8, 2018, at 11:12 PM, Ruslan Nikolaev  wrote:
>> 
>> Well, what I was implying is that if MdePkg (Ia32) headers are included in 
>> some UEFI program which itself is compiled with some custom register-based 
>> calling convention, current EFIAPI definition is insufficient.
>> Current definition with cdecl attribute merely forces caller stack clean-up 
>> in gcc/clang for Ia32
>> So, if I build with '-mrtd' option (a callee cleans up the stack) current 
>> EFIAPI definition will take care of it. However, if in addition to that I 
>> specify -mregparm=1,2,3 to pass some parameters in registers, cdecl will not 
>> take care of it.
>> EFIAPI for Ia32 wants all parameters in the stack. Therefore, it should be 
>> reasonable to specify regparm(0) as part of EFIAPI definition as well, so 
>> that regardless of mregparm parameter the compiler will generate correct 
>> code. 
>> 
> 
> Ruslan,
> 
> Thanks for the info. I guess I still have the question of if you are making 
> firmware why not solve this problem with compiler flags in the 1st place. 
> 
> Thanks,
> 
> Andrew Fish
> 
>> 
>> On Friday, February 9, 2018 1:59 AM, Andrew Fish  wrote:
>> 
>> 
>> 
>> 
>> On Feb 8, 2018, at 5:32 PM, Ruslan Nikolaev  wrote:
>> I submitted a bug report and a patch: 
>> https://bugzilla.tianocore.org/show_bug.cgi?id=870
>> It is very straight-forward. Can someone review it, and, hopefully, commit 
>> the change?
>> 
>> 
>> Ruslan,
>> Was there an example of how to code this? Sorry if I missed it, I'm getting 
>> a lot of email these days.
>> Also what is you usage model? Clang is very cross compiler friendly and you 
>> can specify a triple to support the ABI you need. To get EFI supported on 
>> macOS tools we ended up open sourcing a triple to support the EFIAPI. If you 
>> look in 
>> https://github.com/tianocore/edk2/blob/master/BaseTools/Conf/tools_def.template
>>  you will see that you can use Xcode to build EFIAPI if you pass -target 
>> x86_64-pc-win32-macho. 
>> I guess I'm asking the question if you really need to support multiple ABIs 
>> with clang? The best way to solve this in clang is to make it support 
>> EFIAPI. If you don't need multiple ABIs take a look at what we did with 
>> -target x86_64-pc-win32-macho, which tells clang to build EFIABI, but output 
>> a mach-O executable (we need the mach-O for our debugger). Basically with 
>> clang you could upstream what you need into the compiler you are using for 
>> other things...
>> Thanks,
>> Andrew Fish
>> 
>> - Ruslan
>> ___
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
>> 
>> 
>> 
>> 
>> 
>> ___
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
> 
> 
> 
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

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


[edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017 2/2] Enable Turbo on CpuPower default configuration

2018-02-12 Thread tsrytkon
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: tsrytkon 
---
 .../Common/PlatformSettings/PlatformSetupDxe/CpuPower.vfi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/CpuPower.vfi
 
b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/CpuPower.vfi
index 9deea2534..0bedbc5fa 100644
--- 
a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/CpuPower.vfi
+++ 
b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/CpuPower.vfi
@@ -40,8 +40,8 @@ form formid = CPU_PWR_CONFIGURATION_FORM_ID,
   oneof varid  = Setup.TurboModeEnable,
 prompt = STRING_TOKEN(STR_PROCESSOR_TURBO_MODE),
 help = STRING_TOKEN(STR_PROCESSOR_TURBO_MODE_HELP),
-option text = STRING_TOKEN(STR_DISABLE),  value = 0, flags = MANUFACTURING 
|DEFAULT | RESET_REQUIRED;
-option text = STRING_TOKEN(STR_ENABLE),   value = 1, flags = 
RESET_REQUIRED;
+option text = STRING_TOKEN(STR_DISABLE),  value = 0, flags = 
RESET_REQUIRED;
+option text = STRING_TOKEN(STR_ENABLE),   value = 1, flags = MANUFACTURING 
|DEFAULT | RESET_REQUIRED;
   endoneof;
   endif;
 
-- 
2.15.1.windows.2

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


[edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017 1/2] Add support for SueCreek LED Drivers

2018-02-12 Thread tsrytkon
Adds support for two ACPI entries for PCA9956 LED drivers
for SueCreek DMIC board.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Teemu Rytkonen 
---
 .../AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl   |  3 +
 .../PlatformSsdt/SueCreek/SueCreek.asl | 10 ++--
 .../PlatformSsdt/SueCreek/SueCreekLeds.asl | 70 ++
 3 files changed, 77 insertions(+), 6 deletions(-)
 create mode 100644 
Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreekLeds.asl

diff --git 
a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl
 
b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl
index b86baf357..93e2592ba 100644
--- 
a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl
+++ 
b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl
@@ -36,12 +36,14 @@ DefinitionBlock (
   External(\_SB.GPO0.CWLE, IntObj)
   External(\_SB.GPO0.AVBL, IntObj)
   External(\_SB.PCI0.SDIO.PSTS, IntObj)
+  External(\SUCE, IntObj)
   External(HIDG, MethodObj)
   External(OSYS, IntObj)
   External(SBTD, IntObj)
   External(WCAS, IntObj)
   External(UCAS, IntObj)
   External(CROT, IntObj)
+
   External(TP7G)
   External(IPUD)
 
@@ -72,6 +74,7 @@ DefinitionBlock (
 
   include ("Fingerprint/Fingerprint_FPC.asl")
   include ("SueCreek/SueCreek.asl")
+  include ("SueCreek/SueCreekLeds.asl")
   include ("Sensors/GenericSpi3.asl")
 }
 
diff --git 
a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreek.asl
 
b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreek.asl
index 3baa88cc4..b9a3fa9ca 100644
--- 
a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreek.asl
+++ 
b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreek.asl
@@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 
 Scope (\_SB.PCI0.SPI1) {
   Device (TP0) {
-Name (_HID, "SUE1000")
+Name (_HID, "SUE1000")
 Name (_DDN, "SueCreek - SPI0, CS0")
 Name (_CRS, ResourceTemplate () {
   SpiSerialBus (
@@ -23,15 +23,13 @@ Scope (\_SB.PCI0.SPI1) {
 FourWireMode,   // Full duplex
 8,  // Bits per word is 8 (byte)
 ControllerInitiated,// Don't care
-960,// 9.6 MHz
-ClockPolarityHigh,  // SPI mode 3
-ClockPhaseSecond,   // SPI mode 3
+960,// 9.6 MHz
+ClockPolarityHigh,  // SPI mode 3
+ClockPhaseSecond,   // SPI mode 3
 "\\_SB.PCI0.SPI1",  // SPI host controller
 0   // Must be 0
   )
 })
-
-External(\SUCE, IntObj)
 Method (_STA, 0x0, NotSerialized) {
   If (LEqual (SUCE, 0)) {
 Return (0x0)
diff --git 
a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreekLeds.asl
 
b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreekLeds.asl
new file mode 100644
index 0..2fcc45742
--- /dev/null
+++ 
b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreekLeds.asl
@@ -0,0 +1,70 @@
+/** @file
+
+Copyright (c) 2017 Intel Corporation.
+
+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.
+
+**/
+
+Scope(\_SB.PCI0.I2C5) {
+  Device (LED0) {
+Name (_HID, "PCA9956")
+Name (_DDN, "SueCreekLed, CS0")
+Name (SBUF, ResourceTemplate () {
+  I2cSerialBus (
+0x0065,
+ControllerInitiated,
+40,
+AddressingMode7Bit,
+"\\_SB.PCI0.I2C5",
+0x00,
+ResourceConsumer,
+,
+)
+})
+Method (_CRS, 0, NotSerialized)
+{
+  Return (SBUF)
+}
+Method (_STA, 0x0, NotSerialized) {
+  If (LEqual (SUCE, 0)) {
+Return (0x0)
+  } else {
+Return (0xF)
+  }
+}
+  }
+  Device (LED1) {
+Name (_HID, "PCA9956")
+Name (_DDN, "SueCreekLed, CS0")
+Name (SBUF, ResourceTemplate () {
+  I2cSerialBus (
+0x0069,
+ControllerInitiated,
+40,
+AddressingMode7Bit,
+"\\_SB.PCI0.I2C5",
+0x00,
+ResourceConsumer,
+,
+)
+})
+Method (_CRS, 0, NotSerialized)
+{
+  Return (SBUF)
+}
+Method (_STA, 0x0, NotSerialized) {
+  If (LEqual (SUCE, 0)) {
+Return (0x0)
+  } else {
+Return 

Re: [edk2] Poll: When to use OVMF and Nt32?

2018-02-12 Thread Richardson, Brian
Thomas:

I generally recommend NT32 when developing UEFI applications that don't have 
dependencies for any specific hardware design/architecture, and only rely on 
UEFI Boot Services.

OVMF is running on virtualized hardware, so it's better for the following 
scenarios...
* Testing boot to an operating system and/or UEFI Runtime services (supports 
call to Exit Boot Services)
* Testing applications that have a dependency on a specific hardware 
design/architecture

OVMF is also better for EDK II development under Linux, since NT32 only 
executes under Microsoft Windows environments.

Thanks ... br
---
Brian Richardson, Senior Technical Marketing Engineer, Intel Software
brian.richard...@intel.com -- @intel_brian (Twitter & WeChat)
https://software.intel.com/en-us/meet-the-developers/evangelists/team/brian-richardson
 

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Palmer, 
Thomas
Sent: Thursday, February 8, 2018 1:47 PM
To: edk2-devel@lists.01.org
Subject: [edk2] Poll: When to use OVMF and Nt32?


EDK2 community,

When developing/testing UEFI and you can easily choose between 
using OVMF and Nt32, which do you choose and why?  When is OVMF better/easier 
to use than Nt32 and vice versa?

I ask because I am giving an internal presentation to our newer 
employees.  I've used one over the other for personal reasons, but I'd like to 
hear your thoughts and learn something new.


Regards,

Thomas Palmer
Firmware Engineer
Enterprise Group
Industry Standard Servers

thomas.pal...@hpe.com
T +1 281 518 2564
Hewlett Packard Enterprise
11445 Compaq Center Drive West
Houston, TX 77070-1433
USA

[cid:image001.jpg@01D1CF0D.54B64190]

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


[edk2] how do I use RamDiskDxe?

2018-02-12 Thread Rick Warner

Hi All,

I'm trying to develop a tool for automated BIOS flashing from the EFI 
shell using IPMI serial over lan to drive it.  To accomplish this, my 
plan is to use a network booted EFI shell with a tftp client and a 
ramdisk to download the flash tools and ROM into as a workspace and then 
run the flash commands from that ram disk.


I've been able to successfully build and boot an efi shell from the edk 
2 sources including the tftp client.  I've also been able to separately 
build the RamDiskDxe driver from the MdeModulePkg. Loading the 
RamDiskDxe.efi driver file results in a successful message, but I do not 
get any usable ram disk made available to me?


How do I get a usable drive letter/name (ie blk0: or any other name) 
from the RamDiskDxe driver?


Once I've done that, will it be possible to include the RamDiskDxe 
driver as part of the network bootable efi shell image?  I assume I'll 
need to modify the .dsc file for the ShellPkg to include the 
MdeModulePkg pieces.


If anyone has any other suggestions for this, I'm open to ideas. The 
only way I've been successful in network booting EFI shell is using just 
that file directly.  I tried creating a dos filesystem image with the 
efi shell file in it just like would work with a USB key, but that would 
not boot over the network stack. If there is some way of creating a 
network bootable EFI shell filesystem image (similar to how Linux can 
network boot a separate vmlinuz kernel and initrd image)?


Are there any docs that I've missed (I've tried looking in the user docs 
and on the wiki) regarding setting up RamDiskDxe?


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


Re: [edk2] test message

2018-02-12 Thread Laszlo Ersek
On 02/07/18 17:17, Laszlo Ersek wrote:
> On 02/07/18 15:35, Laszlo Ersek wrote:
>> Hi All,
>>
>> my deepest apology for spamming the list with a test message. I have
>> been having problems sending emails to the list, both with
>> git-send-email (i.e. patches) and with Thunderbird (i.e. manually
>> written emails). Both kinds have been rejected with SPF (Sender
>> Policy Framework) error messages, blaming the Red Hat side mail
>> server configuration.
>>
>> I have a ticket open with the Red Hat Service Desk, and they're now
>> asking me to test-email the list using a third channel (the internal
>> RH webmail interface; so neither git-send-email nor Thunderbird from
>> my laptop). If this email gets through then it should help the
>> analysis I suppose (hope!); on the other hand it will also be spam
>> for subscribers, and annoy them. Sorry about that!
> 
> Replying in this thread to test further. If your MUA supports ignoring
> entire threads, I suggest that you ignore this thread. Again I apologize.

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


Re: [edk2] [PATCH v2 0/2] NetworkPkg: Support the platform to configure HTTPS CipherList.

2018-02-12 Thread Laszlo Ersek
Hi Jiaxin,

On 02/11/18 04:21, Wu, Jiaxin wrote:
> Hi Laszlo, 
> 
> Can you help to report one Bugzilla for the new feature request? It's better 
> to describe the reason why we need support in Bugzilla.

I've filed . Thank
you for the patches!

Laszlo

> 
>> -Original Message-
>> From: Wu, Jiaxin
>> Sent: Sunday, February 11, 2018 11:15 AM
>> To: edk2-devel@lists.01.org
>> Cc: Laszlo Ersek ; Kinney, Michael D
>> ; Zimmer, Vincent
>> ; Yao, Jiewen ; Ye,
>> Ting ; Fu, Siyuan ; Wu, Jiaxin
>> 
>> Subject: [PATCH v2 0/2] NetworkPkg: Support the platform to configure
>> HTTPS CipherList.
>>
>> V2:
>> * Rename the file/variable name.
>> * Refine the error handling returned from GetVariable.
>>
>> Cc: Laszlo Ersek 
>> Cc: Kinney Michael D 
>> Cc: Zimmer Vincent 
>> Cc: Yao Jiewen 
>> Cc: Ye Ting 
>> Cc: Fu Siyuan 
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Wu Jiaxin 
>>
>> Jiaxin Wu (2):
>>   NetworkPkg: Define one private variable for HTTPS to set Tls
>> CipherList.
>>   NetworkPkg: Read HttpTlsCipherList variable and configure it for HTTPS
>> session.
>>
>>  NetworkPkg/HttpDxe/HttpDriver.h |  3 +-
>>  NetworkPkg/HttpDxe/HttpDxe.inf  |  3 +-
>>  NetworkPkg/HttpDxe/HttpsSupport.c   | 92
>> -
>>  NetworkPkg/Include/Guid/HttpTlsCipherList.h | 38 
>>  NetworkPkg/NetworkPkg.dec   |  3 +
>>  5 files changed, 136 insertions(+), 3 deletions(-)
>>  create mode 100644 NetworkPkg/Include/Guid/HttpTlsCipherList.h
>>
>> --
>> 1.9.5.msysgit.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> 

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


Re: [edk2] [Patch 0/2] NetworkPkg: Support the platform to configure TLS CipherList.

2018-02-12 Thread Laszlo Ersek
On 02/11/18 03:33, Wu, Jiaxin wrote:
> Hi Laszlo,
> 
> Besides the compatibility consideration, we'd better *not* put
> CipherList and CaCertificate into one variable.

I didn't suggest to put them in the same variable -- I meant to put them
in separate variables, just the two variables should belong to the same
namespace GUID.

> In the future, we prefer to manage the CaCertificate with other cert
> configuration items together (e.g. HostPublicCert, HostPrivateCert,
> etc ) rather than the parameters like CipherList.  You know we can't
> save the host cert pairs as variable due to the security
> consideration.
> 
> So, case by case, let's keep current solution to define the variable
> named as "HttpTlsCipherList".

Sure, that works for me.

Thanks,
Laszlo


>> -Original Message-
>> From: Laszlo Ersek [mailto:ler...@redhat.com]
>> Sent: Friday, February 9, 2018 6:12 PM
>> To: Fu, Siyuan ; Wu, Jiaxin ;
>> edk2-devel@lists.01.org
>> Cc: Kinney, Michael D ; Zimmer, Vincent
>> ; Yao, Jiewen ; Ye,
>> Ting 
>> Subject: Re: [Patch 0/2] NetworkPkg: Support the platform to configure TLS
>> CipherList.
>>
>> On 02/09/18 06:22, Fu, Siyuan wrote:
>>> Hi, Jiaxin
>>>
>>> I think we can remove the "TlsCipherList.h" to another name like
>>> "HttpTlsCipherListVariable.h" to  highlight that the variable is only
>>> used for HTTP configuration. And also the variable name and GUID
>>> name.
>> If we are renaming gEfiTlsCaCertificateGuid, can we pick a generic term
>> as new name, something like "gHttpTlsVariableGuid"? And then put both
>> variables, the CA List and the Cipher List, in that (same) namespace GUID?
>>
>> It's not that we'll run out of GUIDs any time soon :) , but I think
>> these variables belong closely together.
>>
>> Thanks,
>> Laszlo
>>
 -Original Message-
 From: Wu, Jiaxin
 Sent: Friday, February 9, 2018 12:00 PM
 To: edk2-devel@lists.01.org
 Cc: Laszlo Ersek ; Kinney, Michael D
 ; Zimmer, Vincent
>> ;
 Yao, Jiewen ; Ye, Ting ; Fu,
 Siyuan ; Wu, Jiaxin 
 Subject: [Patch 0/2] NetworkPkg: Support the platform to configure TLS
 CipherList.

 Cc: Laszlo Ersek 
 Cc: Kinney Michael D 
 Cc: Zimmer Vincent 
 Cc: Yao Jiewen 
 Cc: Ye Ting 
 Cc: Fu Siyuan 
 Contributed-under: TianoCore Contribution Agreement 1.0
 Signed-off-by: Wu Jiaxin 

 Jiaxin Wu (2):
   NetworkPkg: Define one private variable for TLS CipherList
 configuration.
   NetworkPkg: Read TlsCipherList variable and configure it for HTTPS
 session.

  NetworkPkg/HttpDxe/HttpDriver.h |  3 +-
  NetworkPkg/HttpDxe/HttpDxe.inf  |  3 +-
  NetworkPkg/HttpDxe/HttpsSupport.c   | 92
 -
  NetworkPkg/Include/Guid/TlsCipherList.h | 38 ++
  NetworkPkg/NetworkPkg.dec   |  3 ++
  5 files changed, 136 insertions(+), 3 deletions(-)
  create mode 100644 NetworkPkg/Include/Guid/TlsCipherList.h

 --
 1.9.5.msysgit.1
>>>
> 

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


Re: [edk2] [PATCH] ShellPkg/[hex]edit: Fix wrongly use gST->ConIn as the console handle

2018-02-12 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey 

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Ruiyu Ni
> Sent: Monday, February 12, 2018 7:34 AM
> To: edk2-devel@lists.01.org
> Cc: Carsey, Jaben 
> Subject: [edk2] [PATCH] ShellPkg/[hex]edit: Fix wrongly use gST->ConIn as
> the console handle
> Importance: High
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ruiyu Ni 
> Cc: Jaben Carsey 
> ---
>  ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c   | 2
> +-
>  ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c |
> 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
> index a197f80a40..4eb998bf5f 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
> +++
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
> @@ -1497,7 +1497,7 @@ MainEditorInit (
>// Find mouse in System Table ConsoleInHandle
>//
>Status = gBS->HandleProtocol (
> -gST->ConIn,
> +gST->ConsoleInHandle,
>  ,
>  (VOID**)
>  );
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c
> index 065f8e95a7..2b096d7168 100644
> ---
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c
> +++
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c
> @@ -1682,7 +1682,7 @@ HMainEditorInit (
>// Find mouse in System Table ConsoleInHandle
>//
>Status = gBS->HandleProtocol (
> -gST->ConIn,
> +gST->ConsoleInHandle,
>  ,
>  (VOID**)
>  );
> --
> 2.16.1.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] ShellPkg/[hex]edit: use SimpleTextInEx to read console

2018-02-12 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey 

> -Original Message-
> From: Ni, Ruiyu
> Sent: Monday, February 12, 2018 7:34 AM
> To: edk2-devel@lists.01.org
> Cc: Felix ; Carsey, Jaben 
> Subject: [PATCH] ShellPkg/[hex]edit: use SimpleTextInEx to read console
> Importance: High
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=682
> 
> Edit and HexEdit commands assume that SimpleTxtIn translates
> Ctrl+ key combinations into Unicode control characters
> (0x1-0x1A).
> 
> Such translation does not seem to be required by the UEFI spec.
> Shell should not rely on implementation specific behavior.
> It should instead use SimpleTextInEx to read Ctrl+ key
> combinations.
> 
> The patch changes edit and hexedit to only consumes SimpleTextInEx.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ruiyu Ni 
> Reported-by: Felix 
> Cc: Felix 
> Cc: Jaben Carsey 
> ---
>  .../Edit/MainTextEditor.c  | 135 +-
>  .../Edit/TextEditorTypes.h |  21 ++-
>  .../UefiShellDebug1CommandsLib/EditInputBar.c  |  34 +++-
>  .../UefiShellDebug1CommandsLib/EditInputBar.h  |   6 +-
>  .../UefiShellDebug1CommandsLib/EditMenuBar.c   |  38 +++-
>  .../UefiShellDebug1CommandsLib/EditMenuBar.h   |   6 +-
>  .../HexEdit/HexEditorTypes.h   |  25 +--
>  .../HexEdit/MainHexEditor.c| 205 
> +
>  8 files changed, 309 insertions(+), 161 deletions(-)
> 
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
> index 14f51dff19..a197f80a40 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
> +++
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
> @@ -1,7 +1,7 @@
>  /** @file
>Implements editor interface functions.
> 
> -  Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved. 
> +  Copyright (c) 2005 - 2018, 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
> @@ -1362,7 +1362,9 @@ MainCommandDisplayHelp (
>  {
>INT32   CurrentLine;
>CHAR16  *InfoString;
> -  EFI_INPUT_KEY   Key;
> +  EFI_KEY_DATAKeyData;
> +  EFI_STATUS  Status;
> +  UINTN   EventIndex;
> 
>//
>// print helpInfo
> @@ -1371,14 +1373,39 @@ MainCommandDisplayHelp (
>  InfoString = HiiGetString(gShellDebug1HiiHandle,
> MainMenuHelpInfo[CurrentLine], NULL);
>  ShellPrintEx (0, CurrentLine+1, L"%E%s%N", InfoString);
>}
> -
> +
>//
>// scan for ctrl+w
>//
> -  do {
> -gST->ConIn->ReadKeyStroke (gST->ConIn, );
> -  } while(SCAN_CONTROL_W != Key.UnicodeChar);
> +  while (TRUE) {
> +Status = gBS->WaitForEvent (1, >WaitForKeyEx,
> );
> +if (EFI_ERROR (Status) || (EventIndex != 0)) {
> +  continue;
> +}
> +Status = MainEditor.TextInputEx->ReadKeyStrokeEx
> (MainEditor.TextInputEx, );
> +if (EFI_ERROR (Status)) {
> +  continue;
> +}
> 
> +if ((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) == 0) {
> +  //
> +  // For consoles that don't support shift state reporting,
> +  // CTRL+W is translated to L'W' - L'A' + 1.
> +  //
> +  if (KeyData.Key.UnicodeChar == L'W' - L'A' + 1) {
> +break;
> +  }
> +} else if (((KeyData.KeyState.KeyShiftState &
> (EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) != 0) &&
> +   ((KeyData.KeyState.KeyShiftState & ~(EFI_SHIFT_STATE_VALID |
> EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) == 0)) {
> +  //
> +  // For consoles that supports shift state reporting,
> +  // make sure that only CONTROL shift key is pressed.
> +  //
> +  if ((KeyData.Key.UnicodeChar == 'w') || (KeyData.Key.UnicodeChar ==
> 'W')) {
> +break;
> +  }
> +}
> +  }
>//
>// update screen with file buffer's info
>//
> @@ -1407,6 +1434,7 @@ EFI_EDITOR_GLOBAL_EDITOR  MainEditorConst =
> {
>  0
>},
>NULL,
> +  NULL,
>FALSE,
>NULL
>  };
> @@ -1452,6 +1480,19 @@ MainEditorInit (
>  &(MainEditor.ScreenSize.Row)
>  );
> 
> +  //
> +  // Find TextInEx in System Table ConsoleInHandle
> +  // Per UEFI Spec, TextInEx is required for a console capable platform.
> +  //
> +  Status = gBS->HandleProtocol (
> +  gST->ConsoleInHandle,
> +  ,
> +  (VOID**)
> +  );
> +  if (EFI_ERROR (Status)) {
> +return Status;
> +  }
> +
>//
>// Find mouse in System Table ConsoleInHandle
>//
> @@ -1521,7 +1562,7 @@ MainEditorInit 

Re: [edk2] [PATCH] ShellPkg/help: Fix "-?" may not show manual sometimes Shell core was enhanced to find the manual string in PE resource section. But the finding algorithm is too strict: If the manua

2018-02-12 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey 

> -Original Message-
> From: Ni, Ruiyu
> Sent: Sunday, February 11, 2018 7:18 AM
> To: edk2-devel@lists.01.org
> Cc: Carsey, Jaben 
> Subject: [PATCH] ShellPkg/help: Fix "-?" may not show manual sometimes
> Shell core was enhanced to find the manual string in PE resource section. But
> the finding algorithm is too strict: If the manual is written beginning with: 
> .TH
> command 0 "descripton of command"
> Importance: High
> 
> but user types "COMMAND.efi -?". The finding algorithm uses
> case-sensitive compare between "command" and "COMMAND" resulting
> in the manual cannot be found.
> 
> The patch fixes this issue by using existing ManFileFindTitleSection
> and ManFileFindSections which compare command case-insensitive.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ruiyu Ni 
> Cc: Jaben Carsey 
> ---
>  ShellPkg/Application/Shell/FileHandleWrappers.c |  52 -
>  ShellPkg/Application/Shell/ShellManParser.c | 275 
> ++--
>  2 files changed, 73 insertions(+), 254 deletions(-)
> 
> diff --git a/ShellPkg/Application/Shell/FileHandleWrappers.c
> b/ShellPkg/Application/Shell/FileHandleWrappers.c
> index 0a7a60294d..63aad69fe8 100644
> --- a/ShellPkg/Application/Shell/FileHandleWrappers.c
> +++ b/ShellPkg/Application/Shell/FileHandleWrappers.c
> @@ -3,7 +3,7 @@
>StdIn, StdOut, StdErr, etc...).
> 
>Copyright 2016 Dell Inc.
> -  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
> +  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
>(C) Copyright 2013 Hewlett-Packard Development Company, L.P.
>This program and the accompanying materials
>are licensed and made available under the terms and conditions of the BSD
> License
> @@ -1554,6 +1554,54 @@ FileInterfaceMemGetPosition(
>return (EFI_SUCCESS);
>  }
> 
> +/**
> +  File style interface for Mem (GetInfo).
> +
> +  @param  ThisProtocol instance pointer.
> +  @param  InformationType Type of information to return in Buffer.
> +  @param  BufferSize  On input size of buffer, on output amount of data 
> in
> buffer.
> +  @param  Buffer  The buffer to return data.
> +
> +  @retval EFI_SUCCESS  Data was returned.
> +  @retval EFI_UNSUPPORTInformationType is not supported.
> +  @retval EFI_NO_MEDIA The device has no media.
> +  @retval EFI_DEVICE_ERROR The device reported an error.
> +  @retval EFI_VOLUME_CORRUPTED The file system structures are
> corrupted.
> +  @retval EFI_WRITE_PROTECTED  The device is write protected.
> +  @retval EFI_ACCESS_DENIEDThe file was open for read only.
> +  @retval EFI_BUFFER_TOO_SMALL Buffer was too small; required size
> returned in BufferSize.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +FileInterfaceMemGetInfo(
> +  IN EFI_FILE_PROTOCOL*This,
> +  IN EFI_GUID *InformationType,
> +  IN OUT UINTN*BufferSize,
> +  OUT VOID*Buffer
> +  )
> +{
> +  EFI_FILE_INFO   *FileInfo;
> +
> +  if (CompareGuid (InformationType, )) {
> +if (*BufferSize < sizeof (EFI_FILE_INFO)) {
> +  *BufferSize = sizeof (EFI_FILE_INFO);
> +  return EFI_BUFFER_TOO_SMALL;
> +}
> +if (Buffer == NULL) {
> +  return EFI_INVALID_PARAMETER;
> +}
> +FileInfo = (EFI_FILE_INFO *)Buffer;
> +FileInfo->Size = sizeof (*FileInfo);
> +ZeroMem (FileInfo, sizeof (*FileInfo));
> +FileInfo->FileSize = ((EFI_FILE_PROTOCOL_MEM*)This)->FileSize;
> +FileInfo->PhysicalSize = FileInfo->FileSize;
> +return EFI_SUCCESS;
> +  }
> +
> +  return EFI_UNSUPPORTED;
> +}
> +
>  /**
>File style interface for Mem (Write).
> 
> @@ -1689,7 +1737,7 @@ CreateFileInterfaceMem(
>FileInterface->Close   = FileInterfaceMemClose;
>FileInterface->GetPosition = FileInterfaceMemGetPosition;
>FileInterface->SetPosition = FileInterfaceMemSetPosition;
> -  FileInterface->GetInfo = FileInterfaceNopGetInfo;
> +  FileInterface->GetInfo = FileInterfaceMemGetInfo;
>FileInterface->SetInfo = FileInterfaceNopSetInfo;
>FileInterface->Flush   = FileInterfaceNopGeneric;
>FileInterface->Delete  = FileInterfaceNopGeneric;
> diff --git a/ShellPkg/Application/Shell/ShellManParser.c
> b/ShellPkg/Application/Shell/ShellManParser.c
> index 7a290e16f6..975f3c22da 100644
> --- a/ShellPkg/Application/Shell/ShellManParser.c
> +++ b/ShellPkg/Application/Shell/ShellManParser.c
> @@ -1,7 +1,7 @@
>  /** @file
>Provides interface to shell MAN file parser.
> 
> -  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
> +  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
>Copyright 2015 Dell Inc.
>This program and the accompanying materials
>are licensed and made available under the terms and conditions of the BSD
> License
> @@ -205,138 

[edk2] [PATCH] ShellPkg/[hex]edit: Fix wrongly use gST->ConIn as the console handle

2018-02-12 Thread Ruiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni 
Cc: Jaben Carsey 
---
 ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c   | 2 +-
 ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
index a197f80a40..4eb998bf5f 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
@@ -1497,7 +1497,7 @@ MainEditorInit (
   // Find mouse in System Table ConsoleInHandle
   //
   Status = gBS->HandleProtocol (
-gST->ConIn,
+gST->ConsoleInHandle,
 ,
 (VOID**)
 );
diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c
index 065f8e95a7..2b096d7168 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c
@@ -1682,7 +1682,7 @@ HMainEditorInit (
   // Find mouse in System Table ConsoleInHandle
   //
   Status = gBS->HandleProtocol (
-gST->ConIn,
+gST->ConsoleInHandle,
 ,
 (VOID**)
 );
-- 
2.16.1.windows.1

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


[edk2] [PATCH] ShellPkg/[hex]edit: use SimpleTextInEx to read console

2018-02-12 Thread Ruiyu Ni
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=682

Edit and HexEdit commands assume that SimpleTxtIn translates
Ctrl+ key combinations into Unicode control characters
(0x1-0x1A).

Such translation does not seem to be required by the UEFI spec.
Shell should not rely on implementation specific behavior.
It should instead use SimpleTextInEx to read Ctrl+ key
combinations.

The patch changes edit and hexedit to only consumes SimpleTextInEx.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni 
Reported-by: Felix 
Cc: Felix 
Cc: Jaben Carsey 
---
 .../Edit/MainTextEditor.c  | 135 +-
 .../Edit/TextEditorTypes.h |  21 ++-
 .../UefiShellDebug1CommandsLib/EditInputBar.c  |  34 +++-
 .../UefiShellDebug1CommandsLib/EditInputBar.h  |   6 +-
 .../UefiShellDebug1CommandsLib/EditMenuBar.c   |  38 +++-
 .../UefiShellDebug1CommandsLib/EditMenuBar.h   |   6 +-
 .../HexEdit/HexEditorTypes.h   |  25 +--
 .../HexEdit/MainHexEditor.c| 205 +
 8 files changed, 309 insertions(+), 161 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
index 14f51dff19..a197f80a40 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
@@ -1,7 +1,7 @@
 /** @file
   Implements editor interface functions.
 
-  Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved. 
+  Copyright (c) 2005 - 2018, 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
@@ -1362,7 +1362,9 @@ MainCommandDisplayHelp (
 {
   INT32   CurrentLine;
   CHAR16  *InfoString;
-  EFI_INPUT_KEY   Key;
+  EFI_KEY_DATAKeyData;
+  EFI_STATUS  Status;
+  UINTN   EventIndex;
   
   //
   // print helpInfo  
@@ -1371,14 +1373,39 @@ MainCommandDisplayHelp (
 InfoString = HiiGetString(gShellDebug1HiiHandle, 
MainMenuHelpInfo[CurrentLine], NULL);
 ShellPrintEx (0, CurrentLine+1, L"%E%s%N", InfoString);
   }
-  
+
   //
   // scan for ctrl+w
   //
-  do {
-gST->ConIn->ReadKeyStroke (gST->ConIn, );
-  } while(SCAN_CONTROL_W != Key.UnicodeChar); 
+  while (TRUE) {
+Status = gBS->WaitForEvent (1, >WaitForKeyEx, 
);
+if (EFI_ERROR (Status) || (EventIndex != 0)) {
+  continue;
+}
+Status = MainEditor.TextInputEx->ReadKeyStrokeEx (MainEditor.TextInputEx, 
);
+if (EFI_ERROR (Status)) {
+  continue;
+}
 
+if ((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) == 0) {
+  //
+  // For consoles that don't support shift state reporting,
+  // CTRL+W is translated to L'W' - L'A' + 1.
+  //
+  if (KeyData.Key.UnicodeChar == L'W' - L'A' + 1) {
+break;
+  }
+} else if (((KeyData.KeyState.KeyShiftState & (EFI_LEFT_CONTROL_PRESSED | 
EFI_RIGHT_CONTROL_PRESSED)) != 0) &&
+   ((KeyData.KeyState.KeyShiftState & ~(EFI_SHIFT_STATE_VALID | 
EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) == 0)) {
+  //
+  // For consoles that supports shift state reporting,
+  // make sure that only CONTROL shift key is pressed.
+  //
+  if ((KeyData.Key.UnicodeChar == 'w') || (KeyData.Key.UnicodeChar == 
'W')) {
+break;
+  }
+}
+  }
   //
   // update screen with file buffer's info
   //
@@ -1407,6 +1434,7 @@ EFI_EDITOR_GLOBAL_EDITOR  MainEditorConst = {
 0
   },
   NULL,
+  NULL,
   FALSE,
   NULL
 };
@@ -1452,6 +1480,19 @@ MainEditorInit (
 &(MainEditor.ScreenSize.Row)
 );
 
+  //
+  // Find TextInEx in System Table ConsoleInHandle
+  // Per UEFI Spec, TextInEx is required for a console capable platform.
+  //
+  Status = gBS->HandleProtocol (
+  gST->ConsoleInHandle,
+  ,
+  (VOID**)
+  );
+  if (EFI_ERROR (Status)) {
+return Status;
+  }
+
   //
   // Find mouse in System Table ConsoleInHandle
   //
@@ -1521,7 +1562,7 @@ MainEditorInit (
 return EFI_LOAD_ERROR;
   }
 
-  InputBarInit ();
+  InputBarInit (MainEditor.TextInputEx);
 
   Status = FileBufferInit ();
   if (EFI_ERROR (Status)) {
@@ -1794,9 +1835,11 @@ MainEditorKeyInput (
   VOID
   )
 {
-  EFI_INPUT_KEY Key;
+  EFI_KEY_DATA  KeyData;
   EFI_STATUSStatus;
   EFI_SIMPLE_POINTER_STATE  MouseState;
+  UINTN EventIndex;
+  BOOLEAN   NoShiftState;
 
   do {
 
@@ -1831,46 +1874,52 @@ MainEditorKeyInput (
   }
 }
 
-Status = gST->ConIn->ReadKeyStroke (gST->ConIn, 

Re: [edk2] [PATCH 0/4] minuscule cleanups for Shell library resolutions

2018-02-12 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey 

> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Monday, February 12, 2018 5:45 AM
> To: edk2-devel-01 
> Cc: Andrew Fish ; Ard Biesheuvel
> ; Dong, Eric ; Carsey,
> Jaben ; Justen, Jordan L
> ; Ni, Ruiyu ; Zeng, Star
> 
> Subject: [PATCH 0/4] minuscule cleanups for Shell library resolutions
> Importance: High
> 
> Repo:   https://github.com/lersek/edk2.git
> Branch: shell_libs_cleanup
> 
> Cc: Andrew Fish 
> Cc: Ard Biesheuvel 
> Cc: Eric Dong 
> Cc: Jaben Carsey 
> Cc: Jordan Justen 
> Cc: Ruiyu Ni 
> Cc: Star Zeng 
> 
> Thanks
> Laszlo
> 
> Laszlo Ersek (4):
>   OvmfPkg: drop stale SafeBlockIoLib and SafeOpenProtocolLib resolutions
>   EmulatorPkg: drop stale SafeBlockIoLib and SafeOpenProtocolLib
> resolutions
>   MdeModulePkg/UefiBootManagerLib: remove superfluous TimerLib
> dependency
>   ShellPkg: remove superfluous TimerLib resolution
> 
>  EmulatorPkg/EmulatorPkg.dsc| 2 --
>  MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h   | 1 -
>  MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf | 1 -
>  OvmfPkg/OvmfPkgIa32.dsc| 2 --
>  OvmfPkg/OvmfPkgIa32X64.dsc | 2 --
>  OvmfPkg/OvmfPkgX64.dsc | 2 --
>  ShellPkg/ShellPkg.dsc  | 1 -
>  7 files changed, 11 deletions(-)
> 
> --
> 2.14.1.3.gb7cf6e02401b

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


Re: [edk2] [PATCH] ShellPkg/help: Fix "-?" may not show manual sometimes Shell core was enhanced to find the manual string in PE resource section. But the finding algorithm is too strict: If the manua

2018-02-12 Thread Carsey, Jaben
I think that is fine.  I don’t think that there is a difference except the 
ShellCloseFile() is only available inside the shell, while the protocol API is 
available to applications that open the ShellProtocol.

-Jaben

> -Original Message-
> From: Ni, Ruiyu
> Sent: Sunday, February 11, 2018 7:20 AM
> To: Carsey, Jaben ; edk2-devel@lists.01.org
> Subject: Re: [edk2] [PATCH] ShellPkg/help: Fix "-?" may not show manual
> sometimes Shell core was enhanced to find the manual string in PE resource
> section. But the finding algorithm is too strict: If the manual is written
> beginning with: .TH command 0 "descript...
> Importance: High
> 
> Jaben,
> I am not sure whether calling ShellCloseFile() in below code is proper.
> I tested the change and didn't find any issue.
> 
> But I found the existing code uses:
> ShellInfoObject.NewEfiShellProtocol->CloseFile(FileHandle);
> 
> I am not sure what's the difference.
> 
> On 2/11/2018 11:17 PM, Ruiyu Ni wrote:
> > but user types "COMMAND.efi -?". The finding algorithm uses
> > case-sensitive compare between "command" and "COMMAND" resulting
> > in the manual cannot be found.
> >
> > The patch fixes this issue by using existing ManFileFindTitleSection
> > and ManFileFindSections which compare command case-insensitive.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Ruiyu Ni 
> > Cc: Jaben Carsey 
> > ---
> >   ShellPkg/Application/Shell/FileHandleWrappers.c |  52 -
> >   ShellPkg/Application/Shell/ShellManParser.c | 275 
> > ++--
> >   2 files changed, 73 insertions(+), 254 deletions(-)
> >
> > diff --git a/ShellPkg/Application/Shell/FileHandleWrappers.c
> b/ShellPkg/Application/Shell/FileHandleWrappers.c
> > index 0a7a60294d..63aad69fe8 100644
> > --- a/ShellPkg/Application/Shell/FileHandleWrappers.c
> > +++ b/ShellPkg/Application/Shell/FileHandleWrappers.c
> > @@ -3,7 +3,7 @@
> > StdIn, StdOut, StdErr, etc...).
> >
> > Copyright 2016 Dell Inc.
> > -  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
> > +  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
> > (C) Copyright 2013 Hewlett-Packard Development Company, L.P.
> > This program and the accompanying materials
> > are licensed and made available under the terms and conditions of the
> BSD License
> > @@ -1554,6 +1554,54 @@ FileInterfaceMemGetPosition(
> > return (EFI_SUCCESS);
> >   }
> >
> > +/**
> > +  File style interface for Mem (GetInfo).
> > +
> > +  @param  ThisProtocol instance pointer.
> > +  @param  InformationType Type of information to return in Buffer.
> > +  @param  BufferSize  On input size of buffer, on output amount of data
> in buffer.
> > +  @param  Buffer  The buffer to return data.
> > +
> > +  @retval EFI_SUCCESS  Data was returned.
> > +  @retval EFI_UNSUPPORTInformationType is not supported.
> > +  @retval EFI_NO_MEDIA The device has no media.
> > +  @retval EFI_DEVICE_ERROR The device reported an error.
> > +  @retval EFI_VOLUME_CORRUPTED The file system structures are
> corrupted.
> > +  @retval EFI_WRITE_PROTECTED  The device is write protected.
> > +  @retval EFI_ACCESS_DENIEDThe file was open for read only.
> > +  @retval EFI_BUFFER_TOO_SMALL Buffer was too small; required size
> returned in BufferSize.
> > +
> > +**/
> > +EFI_STATUS
> > +EFIAPI
> > +FileInterfaceMemGetInfo(
> > +  IN EFI_FILE_PROTOCOL*This,
> > +  IN EFI_GUID *InformationType,
> > +  IN OUT UINTN*BufferSize,
> > +  OUT VOID*Buffer
> > +  )
> > +{
> > +  EFI_FILE_INFO   *FileInfo;
> > +
> > +  if (CompareGuid (InformationType, )) {
> > +if (*BufferSize < sizeof (EFI_FILE_INFO)) {
> > +  *BufferSize = sizeof (EFI_FILE_INFO);
> > +  return EFI_BUFFER_TOO_SMALL;
> > +}
> > +if (Buffer == NULL) {
> > +  return EFI_INVALID_PARAMETER;
> > +}
> > +FileInfo = (EFI_FILE_INFO *)Buffer;
> > +FileInfo->Size = sizeof (*FileInfo);
> > +ZeroMem (FileInfo, sizeof (*FileInfo));
> > +FileInfo->FileSize = ((EFI_FILE_PROTOCOL_MEM*)This)->FileSize;
> > +FileInfo->PhysicalSize = FileInfo->FileSize;
> > +return EFI_SUCCESS;
> > +  }
> > +
> > +  return EFI_UNSUPPORTED;
> > +}
> > +
> >   /**
> > File style interface for Mem (Write).
> >
> > @@ -1689,7 +1737,7 @@ CreateFileInterfaceMem(
> > FileInterface->Close   = FileInterfaceMemClose;
> > FileInterface->GetPosition = FileInterfaceMemGetPosition;
> > FileInterface->SetPosition = FileInterfaceMemSetPosition;
> > -  FileInterface->GetInfo = FileInterfaceNopGetInfo;
> > +  FileInterface->GetInfo = FileInterfaceMemGetInfo;
> > FileInterface->SetInfo = FileInterfaceNopSetInfo;
> > FileInterface->Flush   = FileInterfaceNopGeneric;
> > FileInterface->Delete  = 

Re: [edk2] [PATCH 1/4] OvmfPkg: drop stale SafeBlockIoLib and SafeOpenProtocolLib resolutions

2018-02-12 Thread Ard Biesheuvel
On 12 February 2018 at 13:45, Laszlo Ersek  wrote:
> These are listed under "ShellPkg/Application/Shell/Shell.inf", but they
> have been commented out ever since commit 345a0c8fce38 ("OvmfPkg: Add
> support for UEFI shell", 2011-06-26). No such lib classes exist in edk2.
>
> Cc: Ard Biesheuvel 
> Cc: Jordan Justen 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Laszlo Ersek 

Reviewed-by: Ard Biesheuvel 

> ---
>  OvmfPkg/OvmfPkgIa32.dsc| 2 --
>  OvmfPkg/OvmfPkgIa32X64.dsc | 2 --
>  OvmfPkg/OvmfPkgX64.dsc | 2 --
>  3 files changed, 6 deletions(-)
>
> diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> index e10f8986077d..fbe0f790e431 100644
> --- a/OvmfPkg/OvmfPkgIa32.dsc
> +++ b/OvmfPkg/OvmfPkgIa32.dsc
> @@ -807,8 +807,6 @@ [Components]
>  !endif
>
> HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
>PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> -#  SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
> -#  
> SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
>
> BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
>
>  
> diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
> index a31c7919ad0f..fb10e0b0f2e4 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.dsc
> +++ b/OvmfPkg/OvmfPkgIa32X64.dsc
> @@ -816,8 +816,6 @@ [Components.X64]
>  !endif
>
> HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
>PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> -#  SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
> -#  
> SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
>
> BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
>
>  
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index bc433a972400..a31551f5ae24 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -814,8 +814,6 @@ [Components]
>  !endif
>
> HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
>PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
> -#  SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
> -#  
> SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
>
> BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
>
>  
> --
> 2.14.1.3.gb7cf6e02401b
>
>
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 4/4] ShellPkg: remove superfluous TimerLib resolution

2018-02-12 Thread Laszlo Ersek
TimerLib had to be resolved in commit 5ab97a64b51c ("ShellPkg/bcfg: Add
Shell Spec 2.2 modification functionality", 2017-03-01) because:

- the BCFG command started making calls to UefiBootManagerLib
  (EfiBootManagerVariableToLoadOption(),
  EfiBootManagerLoadOptionToVariable(), EfiBootManagerFreeLoadOption()),

- and "MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf"
  depended on TimerLib.

Because TimerLib is platform-specific, but "ShellPkg/ShellPkg.dsc" is
meant to produce a UEFI shell binary that is platform-independent (see
"ShellBinPkg/ReadMe.txt"), we resolved TimerLib to
"BaseTimerLibNullTemplate.inf". (TimerLib functionality was never actually
needed on UefiBootManagerLib code paths that were exercised by the shell /
BCFG.)

Thanks to the last patch, UefiBootManagerLib no longer depends on
TimerLib, thus we can drop the TimerLib resolution entirely.

Cc: Jaben Carsey 
Cc: Ruiyu Ni 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 ShellPkg/ShellPkg.dsc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc
index 29f537641285..1c923f585149 100644
--- a/ShellPkg/ShellPkg.dsc
+++ b/ShellPkg/ShellPkg.dsc
@@ -58,7 +58,6 @@ [LibraryClasses.common]
 
   
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
-  TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
   
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
   
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
   DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
-- 
2.14.1.3.gb7cf6e02401b

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


[edk2] [PATCH 3/4] MdeModulePkg/UefiBootManagerLib: remove superfluous TimerLib dependency

2018-02-12 Thread Laszlo Ersek
In commit 3a039a567a5f ("MdeModulePkg/UefiBootManagerLib: Remove the
useless perf codes", 2018-02-12), the BmWriteBootToOsPerformanceData()
function was removed. No TimerLib API calls are left, thus remove the
TimerLib class dependency from "InternalBm.h" and "UefiBootManagerLib.inf"
as well.

Cc: Eric Dong 
Cc: Jaben Carsey 
Cc: Ruiyu Ni 
Cc: Star Zeng 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf | 1 -
 MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h   | 1 -
 2 files changed, 2 deletions(-)

diff --git a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf 
b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
index 1adffd70d06a..8d5b89ea2970 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
+++ b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
@@ -52,7 +52,6 @@ [LibraryClasses]
   PcdLib
   BaseLib
   UefiLib
-  TimerLib
   DebugLib
   PrintLib
   BaseMemoryLib
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h 
b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
index ed0cd16ef322..25a1d522fe84 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
+++ b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
@@ -68,7 +68,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-- 
2.14.1.3.gb7cf6e02401b


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


[edk2] [PATCH 1/4] OvmfPkg: drop stale SafeBlockIoLib and SafeOpenProtocolLib resolutions

2018-02-12 Thread Laszlo Ersek
These are listed under "ShellPkg/Application/Shell/Shell.inf", but they
have been commented out ever since commit 345a0c8fce38 ("OvmfPkg: Add
support for UEFI shell", 2011-06-26). No such lib classes exist in edk2.

Cc: Ard Biesheuvel 
Cc: Jordan Justen 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 OvmfPkg/OvmfPkgIa32.dsc| 2 --
 OvmfPkg/OvmfPkgIa32X64.dsc | 2 --
 OvmfPkg/OvmfPkgX64.dsc | 2 --
 3 files changed, 6 deletions(-)

diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index e10f8986077d..fbe0f790e431 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -807,8 +807,6 @@ [Components]
 !endif
   
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-#  SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
-#  
SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
   
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
 
 
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index a31c7919ad0f..fb10e0b0f2e4 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -816,8 +816,6 @@ [Components.X64]
 !endif
   
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-#  SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
-#  
SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
   
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
 
 
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index bc433a972400..a31551f5ae24 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -814,8 +814,6 @@ [Components]
 !endif
   
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-#  SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
-#  
SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
   
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
 
 
-- 
2.14.1.3.gb7cf6e02401b


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


[edk2] [PATCH 2/4] EmulatorPkg: drop stale SafeBlockIoLib and SafeOpenProtocolLib resolutions

2018-02-12 Thread Laszlo Ersek
These are listed under "ShellPkg/Application/Shell/Shell.inf", but they
have been commented out ever since commit 3f2035e7a27a ("EmulatorPkg: Fix
build break.", 2011-06-28). No such lib classes exist in edk2.

Cc: Andrew Fish 
Cc: Jordan Justen 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 EmulatorPkg/EmulatorPkg.dsc | 2 --
 1 file changed, 2 deletions(-)

diff --git a/EmulatorPkg/EmulatorPkg.dsc b/EmulatorPkg/EmulatorPkg.dsc
index ef56a86a322c..60688a4b1266 100644
--- a/EmulatorPkg/EmulatorPkg.dsc
+++ b/EmulatorPkg/EmulatorPkg.dsc
@@ -399,8 +399,6 @@ [Components]
   
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
   PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-#  SafeBlockIoLib|ShellPkg/Library/SafeBlockIoLib/SafeBlockIoLib.inf
-#  
SafeOpenProtocolLib|ShellPkg/Library/SafeOpenProtocolLib/SafeOpenProtocolLib.inf
   
BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
 
-- 
2.14.1.3.gb7cf6e02401b


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


[edk2] [PATCH 0/4] minuscule cleanups for Shell library resolutions

2018-02-12 Thread Laszlo Ersek
Repo:   https://github.com/lersek/edk2.git
Branch: shell_libs_cleanup

Cc: Andrew Fish 
Cc: Ard Biesheuvel 
Cc: Eric Dong 
Cc: Jaben Carsey 
Cc: Jordan Justen 
Cc: Ruiyu Ni 
Cc: Star Zeng 

Thanks
Laszlo

Laszlo Ersek (4):
  OvmfPkg: drop stale SafeBlockIoLib and SafeOpenProtocolLib resolutions
  EmulatorPkg: drop stale SafeBlockIoLib and SafeOpenProtocolLib
resolutions
  MdeModulePkg/UefiBootManagerLib: remove superfluous TimerLib
dependency
  ShellPkg: remove superfluous TimerLib resolution

 EmulatorPkg/EmulatorPkg.dsc| 2 --
 MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h   | 1 -
 MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf | 1 -
 OvmfPkg/OvmfPkgIa32.dsc| 2 --
 OvmfPkg/OvmfPkgIa32X64.dsc | 2 --
 OvmfPkg/OvmfPkgX64.dsc | 2 --
 ShellPkg/ShellPkg.dsc  | 1 -
 7 files changed, 11 deletions(-)

-- 
2.14.1.3.gb7cf6e02401b

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


Re: [edk2] [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime lib from common file

2018-02-12 Thread Haojian Zhuang
>From: Ard Biesheuvel 
>Sent: Monday, February 12, 2018 12:22 PM
>To: Haojian Zhuang
>Cc: Leif Lindholm; edk2-devel@lists.01.org; heyi@linaro.org; 
>linaro-u...@lists.linaro.org
>Subject: Re: [edk2] [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime 
>lib from common file
>
>On 12 February 2018 at 12:19, Haojian Zhuang  wrote:
>>>From: Ard Biesheuvel 
>>>Sent: Monday, February 12, 2018 12:05 PM
>>>To: Haojian Zhuang
>>>Cc: Leif Lindholm; edk2-devel@lists.01.org; heyi@linaro.org; 
>>>ard.sheu...@linaro.org; linaro-u...@lists.linaro.org
>>>Subject: Re: [edk2] [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime 
>>>lib from common file
>>>
On 12 February 2018 at 11:47, Haojian Zhuang  
wrote:
>From: Leif Lindholm 
>Sent: Monday, February 12, 2018 11:45 AM
>To: Haojian Zhuang
>Cc: edk2-devel@lists.01.org; linaro-u...@lists.linaro.org; 
>ard.sheu...@linaro.org; heyi@linaro.org
>Subject: Re: [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime lib 
>from common file
>
>On Sat, Feb 10, 2018 at 01:31:06AM +0800, Haojian Zhuang wrote:
>> With the SerialPortLib and DebugLib, Dxe runtime driver can't
>> be executed well on HiKey. Serial logs are missing.
>
>"Can't be executed well"? Does this mean it crashes?

 No crash. Serial output are missing since SerialPortLib is different.

>>>
>>>Does this driver take care to only create serial output at boot time?
>>>Does it, e.g., call EfiAtRuntime() or use a notification callback at
>>>ExitBootServices to make absolutely sure the serial port is no longer
>>>used?
>>
>> These drivers don't use serial port directly. But I tried to use DEBUG ()
>> function to dump some debug informations in these drivers. I found
>> that I can't output anything on serial console.
>>
>
>But do those DEBUG() calls only occur at boot time? Or could they be
>called at runtime as well?

Excuse me that I didn't explain it clearly. 

At first, I need to make sure everything executed well when I switch to
the common dsc file. So I added some debug messages in those key
drivers.
In the second, I need to debug the boot flow later. I mean that I need some
debug message in the initialization of DXE runtime driver. I'm considering
to make use of EmuVariable and predefined emu variable region in RAM.
Then I could store the predefined boot options in emu variable region.
And I could re-use PlatformBootManager in ArmPlatformPkg without big
changes. So I need to add some debug messages in these DXE runtime
driver.

These two drivers in the common dsc file blocks me enabling debug
messages in the initialization code of DXE runtime driver. So I have
to move them out.

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


Re: [edk2] [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime lib from common file

2018-02-12 Thread Ard Biesheuvel
On 12 February 2018 at 12:19, Haojian Zhuang  wrote:
>>From: Ard Biesheuvel 
>>Sent: Monday, February 12, 2018 12:05 PM
>>To: Haojian Zhuang
>>Cc: Leif Lindholm; edk2-devel@lists.01.org; heyi@linaro.org; 
>>ard.sheu...@linaro.org; linaro-u...@lists.linaro.org
>>Subject: Re: [edk2] [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime 
>>lib from common file
>>
>>On 12 February 2018 at 11:47, Haojian Zhuang  
>>wrote:
From: Leif Lindholm 
Sent: Monday, February 12, 2018 11:45 AM
To: Haojian Zhuang
Cc: edk2-devel@lists.01.org; linaro-u...@lists.linaro.org; 
ard.sheu...@linaro.org; heyi@linaro.org
Subject: Re: [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime lib 
from common file

On Sat, Feb 10, 2018 at 01:31:06AM +0800, Haojian Zhuang wrote:
> With the SerialPortLib and DebugLib, Dxe runtime driver can't
> be executed well on HiKey. Serial logs are missing.

"Can't be executed well"? Does this mean it crashes?
>>>
>>> No crash. Serial output are missing since SerialPortLib is different.
>>>
>>
>>Does this driver take care to only create serial output at boot time?
>>Does it, e.g., call EfiAtRuntime() or use a notification callback at
>>ExitBootServices to make absolutely sure the serial port is no longer
>>used?
>
> These drivers don't use serial port directly. But I tried to use DEBUG ()
> function to dump some debug informations in these drivers. I found
> that I can't output anything on serial console.
>

But do those DEBUG() calls only occur at boot time? Or could they be
called at runtime as well?
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime lib from common file

2018-02-12 Thread Haojian Zhuang
>From: Ard Biesheuvel 
>Sent: Monday, February 12, 2018 12:05 PM
>To: Haojian Zhuang
>Cc: Leif Lindholm; edk2-devel@lists.01.org; heyi@linaro.org; 
>ard.sheu...@linaro.org; linaro-u...@lists.linaro.org
>Subject: Re: [edk2] [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime 
>lib from common file
>
>On 12 February 2018 at 11:47, Haojian Zhuang  wrote:
>>>From: Leif Lindholm 
>>>Sent: Monday, February 12, 2018 11:45 AM
>>>To: Haojian Zhuang
>>>Cc: edk2-devel@lists.01.org; linaro-u...@lists.linaro.org; 
>>>ard.sheu...@linaro.org; heyi@linaro.org
>>>Subject: Re: [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime lib 
>>>from common file
>>>
>>>On Sat, Feb 10, 2018 at 01:31:06AM +0800, Haojian Zhuang wrote:
 With the SerialPortLib and DebugLib, Dxe runtime driver can't
 be executed well on HiKey. Serial logs are missing.
>>>
>>>"Can't be executed well"? Does this mean it crashes?
>>
>> No crash. Serial output are missing since SerialPortLib is different.
>>
>
>Does this driver take care to only create serial output at boot time?
>Does it, e.g., call EfiAtRuntime() or use a notification callback at
>ExitBootServices to make absolutely sure the serial port is no longer
>used?

These drivers don't use serial port directly. But I tried to use DEBUG () 
function to dump some debug informations in these drivers. I found 
that I can't output anything on serial console.

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


Re: [edk2] [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime lib from common file

2018-02-12 Thread Ard Biesheuvel
On 12 February 2018 at 11:47, Haojian Zhuang  wrote:
>>From: Leif Lindholm 
>>Sent: Monday, February 12, 2018 11:45 AM
>>To: Haojian Zhuang
>>Cc: edk2-devel@lists.01.org; linaro-u...@lists.linaro.org; 
>>ard.sheu...@linaro.org; heyi@linaro.org
>>Subject: Re: [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime lib from 
>>common file
>>
>>On Sat, Feb 10, 2018 at 01:31:06AM +0800, Haojian Zhuang wrote:
>>> With the SerialPortLib and DebugLib, Dxe runtime driver can't
>>> be executed well on HiKey. Serial logs are missing.
>>
>>"Can't be executed well"? Does this mean it crashes?
>
> No crash. Serial output are missing since SerialPortLib is different.
>

Does this driver take care to only create serial output at boot time?
Does it, e.g., call EfiAtRuntime() or use a notification callback at
ExitBootServices to make absolutely sure the serial port is no longer
used?
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 4/4] Platform/Hisilicon/HiKey960: add skeleton of HiKey960

2018-02-12 Thread Leif Lindholm
On Sat, Feb 10, 2018 at 01:31:07AM +0800, Haojian Zhuang wrote:
> Add skeleton of HiKey960 platform.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Haojian Zhuang 

Reviewed-by: Leif Lindholm 

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


Re: [edk2] [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime lib from common file

2018-02-12 Thread Haojian Zhuang
>From: Leif Lindholm 
>Sent: Monday, February 12, 2018 11:45 AM
>To: Haojian Zhuang
>Cc: edk2-devel@lists.01.org; linaro-u...@lists.linaro.org; 
>ard.sheu...@linaro.org; heyi@linaro.org
>Subject: Re: [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime lib from 
>common file
>
>On Sat, Feb 10, 2018 at 01:31:06AM +0800, Haojian Zhuang wrote:
>> With the SerialPortLib and DebugLib, Dxe runtime driver can't
>> be executed well on HiKey. Serial logs are missing.
>
>"Can't be executed well"? Does this mean it crashes?

No crash. Serial output are missing since SerialPortLib is different.

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


Re: [edk2] [PATCH v2 2/4] Platform/Hisilicon/HiKey: use Hisilicon common file

2018-02-12 Thread Leif Lindholm
On Sat, Feb 10, 2018 at 01:31:05AM +0800, Haojian Zhuang wrote:
> Use common file Hisilicon.dsc.inc/Hisilicon.fdf.inc to reduce
> redundant contents in both HiKey.dsc and HiKey.fdf.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Haojian Zhuang 

Reviewed-by: Leif Lindholm 

> ---
>  Platform/Hisilicon/HiKey/HiKey.dsc | 204 
> +++--
>  Platform/Hisilicon/HiKey/HiKey.fdf | 141 ++---
>  2 files changed, 19 insertions(+), 326 deletions(-)
> 
> diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc 
> b/Platform/Hisilicon/HiKey/HiKey.dsc
> index c7d931e..b0f8a93 100644
> --- a/Platform/Hisilicon/HiKey/HiKey.dsc
> +++ b/Platform/Hisilicon/HiKey/HiKey.dsc
> @@ -20,152 +20,55 @@
>PLATFORM_GUID  = 8edf1480-da5c-4857-bc02-7530bd8e7b7a
>PLATFORM_VERSION   = 0.2
>DSC_SPECIFICATION  = 0x00010019
> -  OUTPUT_DIRECTORY   = Build/HiKey
> +  OUTPUT_DIRECTORY   = Build/$(PLATFORM_NAME)
>SUPPORTED_ARCHITECTURES= AARCH64
>BUILD_TARGETS  = DEBUG|RELEASE
>SKUID_IDENTIFIER   = DEFAULT
> -  FLASH_DEFINITION   = Platform/Hisilicon/HiKey/HiKey.fdf
> +  FLASH_DEFINITION   = 
> Platform/Hisilicon/$(PLATFORM_NAME)/$(PLATFORM_NAME).fdf
>  
> -[LibraryClasses.common]
> -!if $(TARGET) == RELEASE
> -  DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
> -!else
> -  DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
> -!endif
> -  
> DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
> -
> -  ArmDisassemblerLib|ArmPkg/Library/ArmDisassemblerLib/ArmDisassemblerLib.inf
> -  ArmGicLib|ArmPkg/Drivers/ArmGic/ArmGicLib.inf
> -  ArmGicArchLib|ArmPkg/Library/ArmGicArchLib/ArmGicArchLib.inf
> -  ArmHvcLib|ArmPkg/Library/ArmHvcLib/ArmHvcLib.inf
> -  ArmSmcLib|ArmPkg/Library/ArmSmcLib/ArmSmcLib.inf
> -  
> ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.inf
> +!include Silicon/Hisilicon/Hisilicon.dsc.inc
>  
> +[LibraryClasses.common]
>ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
> -  ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
>ArmPlatformLib|Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKeyLib.inf
> -  
> ArmPlatformStackLib|ArmPlatformPkg/Library/ArmPlatformStackLib/ArmPlatformStackLib.inf
> -
> -  BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
> -  BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
> -  
> CacheMaintenanceLib|ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMaintenanceLib.inf
> -  
> DefaultExceptionHandlerLib|ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLib.inf
> -  CpuExceptionHandlerLib|ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.inf
> -  CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
> -  DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
> -  DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
> -  
> DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
> -  
> ResetSystemLib|ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.inf
> -  
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
> -  
> 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
>
> CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
>  
> -  ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
> -  FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
> -  SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
> -
># UiApp dependencies
>
> ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
>FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
>DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
> +  BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
>  
> -  HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> -  IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> -  HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
> -  
> UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
> -  TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf
> -  
> UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
> -  
> 

Re: [edk2] [PATCH v2 1/4] Platform/Hisilicon/HiKey: include DxePcdLib for HiiDatabase

2018-02-12 Thread Leif Lindholm
On Sat, Feb 10, 2018 at 01:31:04AM +0800, Haojian Zhuang wrote:
> Include DxePcdLib for HiiDatabase. Otherwise, PlatformBootManager
> can't be launched successfully.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Haojian Zhuang 

Reviewed-by: Leif Lindholm 

> ---
>  Platform/Hisilicon/HiKey/HiKey.dsc | 7 +--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc 
> b/Platform/Hisilicon/HiKey/HiKey.dsc
> index e8cb957..c7d931e 100644
> --- a/Platform/Hisilicon/HiKey/HiKey.dsc
> +++ b/Platform/Hisilicon/HiKey/HiKey.dsc
> @@ -1,5 +1,5 @@
>  #
> -#  Copyright (c) 2014-2017, Linaro Limited. All rights reserved.
> +#  Copyright (c) 2014-2018, 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
> @@ -422,7 +422,10 @@
># Bds
>#
>MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
> -  MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
> +  MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf {
> +
> +  PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
> +  }
>MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
>MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
>MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
> -- 
> 2.7.4
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 3/4] Platform/Hisilicon: move out dxe runtime lib from common file

2018-02-12 Thread Leif Lindholm
On Sat, Feb 10, 2018 at 01:31:06AM +0800, Haojian Zhuang wrote:
> With the SerialPortLib and DebugLib, Dxe runtime driver can't
> be executed well on HiKey. Serial logs are missing.

"Can't be executed well"? Does this mean it crashes?

> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Haojian Zhuang 
> ---
>  Platform/Hisilicon/D02/Pv660D02.dsc | 2 ++
>  Platform/Hisilicon/D03/D03.dsc  | 1 +
>  Platform/Hisilicon/D05/D05.dsc  | 1 +
>  Silicon/Hisilicon/Hisilicon.dsc.inc | 2 --
>  4 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Hisilicon/D02/Pv660D02.dsc 
> b/Platform/Hisilicon/D02/Pv660D02.dsc
> index 9e826ae..018e149 100644
> --- a/Platform/Hisilicon/D02/Pv660D02.dsc
> +++ b/Platform/Hisilicon/D02/Pv660D02.dsc
> @@ -80,6 +80,8 @@
>  
>  [LibraryClasses.common.DXE_RUNTIME_DRIVER]
>I2CLib|Silicon/Hisilicon/Library/I2CLib/I2CLibRuntime.inf
> +  
> SerialPortLib|Silicon/Hisilicon/Library/Dw8250SerialPortRuntimeLib/Dw8250SerialPortRuntimeLib.inf

This change I agree with - this is a clear fix.

> +  
> DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf

But this one just causes duplication of boilerplate.
Could you instead put the fragment in Hisilicon.dsc.inc ...

>  
>  [BuildOptions]
>GCC:*_*_AARCH64_PLATFORM_FLAGS == 
> -I$(WORKSPACE)/Silicon/Hisilicon/Pv660/Include
> diff --git a/Platform/Hisilicon/D03/D03.dsc b/Platform/Hisilicon/D03/D03.dsc
> index c496306..b9bce66 100644
> --- a/Platform/Hisilicon/D03/D03.dsc
> +++ b/Platform/Hisilicon/D03/D03.dsc
> @@ -97,6 +97,7 @@
>  [LibraryClasses.common.DXE_RUNTIME_DRIVER]
>I2CLib|Silicon/Hisilicon/Library/I2CLib/I2CLibRuntime.inf
>
> SerialPortLib|Silicon/Hisilicon/Hi1610/Library/Uart/LpcSerialPortLib/LpcSerialPortLib.inf
> +  
> DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
>  
>  [BuildOptions]
>GCC:*_*_AARCH64_PLATFORM_FLAGS == 
> -I$(WORKSPACE)/Silicon/Hisilicon/Hi1610/Include
> diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc
> index 0792b08..dfee09b 100644
> --- a/Platform/Hisilicon/D05/D05.dsc
> +++ b/Platform/Hisilicon/D05/D05.dsc
> @@ -105,6 +105,7 @@
>  [LibraryClasses.common.DXE_RUNTIME_DRIVER]
>I2CLib|Silicon/Hisilicon/Library/I2CLib/I2CLibRuntime.inf
>
> SerialPortLib|ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.inf
> +  
> DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
>  
>  [BuildOptions]
>GCC:*_*_AARCH64_PLATFORM_FLAGS == 
> -I$(WORKSPACE)/Silicon/Hisilicon/Hi1616/Include
> diff --git a/Silicon/Hisilicon/Hisilicon.dsc.inc 
> b/Silicon/Hisilicon/Hisilicon.dsc.inc
> index 5766829..b5b9e7e 100644
> --- a/Silicon/Hisilicon/Hisilicon.dsc.inc
> +++ b/Silicon/Hisilicon/Hisilicon.dsc.inc
> @@ -208,8 +208,6 @@
>
> MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
>
> ReportStatusCodeLib|MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf
>CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf
> -  
> SerialPortLib|Silicon/Hisilicon/Library/Dw8250SerialPortRuntimeLib/Dw8250SerialPortRuntimeLib.inf

... behind a conditional like

!ifndef CONFIG_NO_DEBUGLIB
> -  
> DebugLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
!endif

?

And correspondingly set CONFIG_NO_DEBUGLIB in hikey/hikey960 .dscs?

Also, if this is a problem causes by using Hisilicon.dsc.inc, it
should really go in before 2/4.
This is great, by the way - I was not expecting that you would be able
to reuse that, I thought there would be a separate .inc for
hikey/hikey960.

/
Leif

>  
>  [LibraryClasses.AARCH64]
>
> ArmGenericTimerCounterLib|ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.inf
> -- 
> 2.7.4
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v1 1/4] edk2-platforms:comcast: RDK boot manager Library implementation

2018-02-12 Thread Moorthy Baskaravenkatraman
From: 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 flash partition, it reads file path and load the file content
using configuration file.

Cc: Ard Biesheuvel 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Moorthy Baskaravenkatraman 

---
 Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec |  50 ++
 Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.inf |  76 +++
 Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.h   |  99 
 Platform/Comcast/Library/RdkBootManagerLib/DiskIo.c  | 376 
++
 Platform/Comcast/Library/RdkBootManagerLib/HttpBoot.c| 350 
+
 Platform/Comcast/Library/RdkBootManagerLib/RdkFile.c | 389 
+++
 Platform/Comcast/Library/RdkBootManagerLib/SecureBoot.c  | 523 

 7 files changed, 1863 insertions(+)

diff --git a/Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec 
b/Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec
new file mode 100644
index ..0db0c676a9b0
--- /dev/null
+++ b/Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec
@@ -0,0 +1,50 @@
+#
+#  Copyright (c) 2014-2018, 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 ..0db783613740
--- /dev/null
+++ b/Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.inf
@@ -0,0 +1,76 @@
+#
+#  Copyright (c) 2014-2018, 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.
+#

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

2018-02-12 Thread Moorthy Baskaravenkatraman
From: Kalyan Nagabhirava 

Linaro and RDK are working on standardizing the boot process for RDK
STB boxes using Uefi. Implmented couple of RDK UEFI apllications (secure
boot and DRI) which are tested on RDK Qemu platform

Cc: Ard Biesheuvel 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Moorthy Baskaravenkatraman 

---
 Platform/Comcast/RDKQemu/RDKQemu.dsc | 431 
 Platform/Comcast/RDKQemu/RDKQemu.fdf | 128 ++
 Platform/Comcast/RDKQemu/README  |  73 
 3 files changed, 632 insertions(+)

diff --git a/Platform/Comcast/RDKQemu/RDKQemu.dsc 
b/Platform/Comcast/RDKQemu/RDKQemu.dsc
new file mode 100644
index ..f5c9f328a2ed
--- /dev/null
+++ b/Platform/Comcast/RDKQemu/RDKQemu.dsc
@@ -0,0 +1,431 @@
+#
+#  Copyright (c) 2011-2015, ARM Limited. All rights reserved.
+#  Copyright (c) 2014 - 2018, 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  = TRUE
+  DEFINE HTTP_BOOT_ENABLE= TRUE
+
+!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]
+  

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

2018-02-12 Thread Moorthy Baskaravenkatraman
From: Kalyan Nagabhirava 

Application will get file path of PK key and KEK keys using rdk.conf file,
once keys are available, application will enable secure boot and validates
the signed kernel Image.

Cc: Ard Biesheuvel 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Moorthy Baskaravenkatraman 

---
 Platform/Comcast/Application/SecureBoot/SecureBoot.inf | 43 

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

diff --git a/Platform/Comcast/Application/SecureBoot/SecureBoot.inf 
b/Platform/Comcast/Application/SecureBoot/SecureBoot.inf
new file mode 100644
index ..da0cd3b3b742
--- /dev/null
+++ b/Platform/Comcast/Application/SecureBoot/SecureBoot.inf
@@ -0,0 +1,43 @@
+#
+#  Copyright (c) 2014-2018, 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 = 0x0001001A
+  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
+  EmbeddedPkg/EmbeddedPkg.dec
+  MdePkg/MdePkg.dec
+  MdeModulePkg/MdeModulePkg.dec
+  ShellPkg/ShellPkg.dec
+  SecurityPkg/SecurityPkg.dec
+  NetworkPkg/NetworkPkg.dec
+  Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec
+
+[LibraryClasses]
+  RdkBootManagerLib
+  UefiApplicationEntryPoint
diff --git a/Platform/Comcast/Application/SecureBoot/SecureBoot.c 
b/Platform/Comcast/Application/SecureBoot/SecureBoot.c
new file mode 100644
index ..bea1e5888703
--- /dev/null
+++ b/Platform/Comcast/Application/SecureBoot/SecureBoot.c
@@ -0,0 +1,30 @@
+/*
+#  Copyright (c) 2014-2018, 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 3/4] edk2-platforms:comcast: RDK DRI Application

2018-02-12 Thread Moorthy Baskaravenkatraman
From: Kalyan Nagabhirava 

Application will Download platform code Image (kernel + DTB + rootfs)
and writes into Flash partition.

Cc: Ard Biesheuvel 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Moorthy Baskaravenkatraman 

---
 Platform/Comcast/Application/Dri/Dri.inf | 43 

 Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.inf | 43 

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

diff --git a/Platform/Comcast/Application/Dri/Dri.inf 
b/Platform/Comcast/Application/Dri/Dri.inf
new file mode 100644
index ..ba0656cbc6d7
--- /dev/null
+++ b/Platform/Comcast/Application/Dri/Dri.inf
@@ -0,0 +1,43 @@
+#
+#  Copyright (c) 2014-2018, 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 = 0x0001001A
+  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
+  EmbeddedPkg/EmbeddedPkg.dec
+  MdePkg/MdePkg.dec
+  MdeModulePkg/MdeModulePkg.dec
+  NetworkPkg/NetworkPkg.dec
+  ShellPkg/ShellPkg.dec
+  SecurityPkg/SecurityPkg.dec
+  Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec
+
+[LibraryClasses]
+  RdkBootManagerLib
+  UefiApplicationEntryPoint
diff --git a/Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.inf 
b/Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.inf
new file mode 100644
index ..d31f8f8a5235
--- /dev/null
+++ b/Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.inf
@@ -0,0 +1,43 @@
+#
+#  Copyright (c) 2014-2018, 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 = 0x0001001A
+  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
+  EmbeddedPkg/EmbeddedPkg.dec
+  MdePkg/MdePkg.dec
+  MdeModulePkg/MdeModulePkg.dec
+  ShellPkg/ShellPkg.dec
+  SecurityPkg/SecurityPkg.dec
+  NetworkPkg/NetworkPkg.dec
+  Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.dec
+
+[LibraryClasses]
+  RdkBootManagerLib
+  UefiApplicationEntryPoint
diff --git a/Platform/Comcast/Application/Dri/Dri.c 
b/Platform/Comcast/Application/Dri/Dri.c
new file mode 100644
index ..4e5ede2e0ca4
--- /dev/null
+++ b/Platform/Comcast/Application/Dri/Dri.c
@@ -0,0 +1,26 @@
+/*
+#  Copyright (c) 2014-2018, 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
+  )

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

2018-02-12 Thread Moorthy Baskaravenkatraman
Linaro and RDK are working on standardizing the boot process for RDK
STB boxes using Uefi. Implmented couple of RDK UEFI apllications (secure
boot and DRI) which are tested on RDK Qemu platform

Kalyan Nagabhirava (4):
  edk2-platforms:comcast: RDK boot manager Library implementation
  edk2-platforms:comcast: RDK secure boot Application
  edk2-platforms:comcast: RDK DRI Application
  edk2-platforms: created RDK Qemu platform for RDK UEFI applications

 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 |  43 ++
 Platform/Comcast/Application/DriSecureBoot/DriSecureBoot.inf |  43 ++
 Platform/Comcast/Application/SecureBoot/SecureBoot.inf   |  43 ++
 Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.inf |  76 +++
 Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.h   |  99 
 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  | 376 
++
 Platform/Comcast/Library/RdkBootManagerLib/HttpBoot.c| 350 
+
 Platform/Comcast/Library/RdkBootManagerLib/RdkFile.c | 389 
+++
 Platform/Comcast/Library/RdkBootManagerLib/SecureBoot.c  | 523 

 Platform/Comcast/RDKQemu/README  |  73 +++
 16 files changed, 2712 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/RdkBootManagerLib.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][edk2-platforms/devel-MinnowBoard3-UDK2017] SMBus Library.

2018-02-12 Thread zwei4
Apollo Lake South Cluster SMBus executive code, which is common for PEI, DXE 
and SMM modules.

Contributed-under: TianoCore Contribution Agreement 1.1

Signed-off-by: zwei4 
Cc: Mang Guo 
---
 .../PeiDxeSmmScSmbusCommonLib.inf  |  35 ++
 .../PeiDxeSmmScSmbusCommonLib/ScSmbusExec.c| 653 +
 2 files changed, 688 insertions(+)
 create mode 100644 
Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Library/Private/PeiDxeSmmScSmbusCommonLib/PeiDxeSmmScSmbusCommonLib.inf
 create mode 100644 
Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Library/Private/PeiDxeSmmScSmbusCommonLib/ScSmbusExec.c

diff --git 
a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Library/Private/PeiDxeSmmScSmbusCommonLib/PeiDxeSmmScSmbusCommonLib.inf
 
b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Library/Private/PeiDxeSmmScSmbusCommonLib/PeiDxeSmmScSmbusCommonLib.inf
new file mode 100644
index 0..2ca6549b8
--- /dev/null
+++ 
b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Library/Private/PeiDxeSmmScSmbusCommonLib/PeiDxeSmmScSmbusCommonLib.inf
@@ -0,0 +1,35 @@
+## @file
+#  Apollo Lake South Cluster Smbus Common Lib.
+#
+#  Copyright (c) 1999 - 2018, 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]
+  INF_VERSION= 0x00010005
+  BASE_NAME  = PeiDxeSmmPchSmbusCommonLib
+  FILE_GUID  = 490CEB45-F3A8-41CD-89CB-C47BF7F7A4B4
+  MODULE_TYPE= BASE
+  VERSION_STRING = 1.0
+  LIBRARY_CLASS  = ScSmbusCommonLib
+
+[Sources]
+  ScSmbusExec.c
+
+[Packages]
+  MdePkg/MdePkg.dec
+  BroxtonSiPkg/BroxtonSiPkg.dec
+  BroxtonSiPkg/BroxtonSiPrivate.dec
+
+[LibraryClasses]
+  IoLib
+  DebugLib
+  MmPciLib
diff --git 
a/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Library/Private/PeiDxeSmmScSmbusCommonLib/ScSmbusExec.c
 
b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Library/Private/PeiDxeSmmScSmbusCommonLib/ScSmbusExec.c
new file mode 100644
index 0..2c5fe9b7b
--- /dev/null
+++ 
b/Silicon/BroxtonSoC/BroxtonSiPkg/SouthCluster/Library/Private/PeiDxeSmmScSmbusCommonLib/ScSmbusExec.c
@@ -0,0 +1,653 @@
+/** @file
+  Apollo Lake South Cluster Smbus Executive Code (common PEI/DXE/SMM code).
+
+  Copyright (c) 2014 - 2018, 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.
+
+**/
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/**
+  Get SMBUS IO Base address.
+
+  @param[in]  None
+
+  @retval UINT32  The SMBUS IO Base Address
+**/
+UINT32
+SmbusGetIoBase (
+  VOID
+  )
+{
+  UINT32  SmbusIoBase;
+
+  SmbusIoBase = MmioRead32 (
+ MmPciBase (
+ DEFAULT_PCI_BUS_NUMBER_SC,
+ PCI_DEVICE_NUMBER_SMBUS,
+ PCI_FUNCTION_NUMBER_SMBUS)
+ + R_SMBUS_BASE) & B_SMBUS_BASE_BAR;
+
+  ASSERT (SmbusIoBase != B_SMBUS_BASE_BAR && SmbusIoBase != 0);
+
+  return SmbusIoBase;
+}
+
+/**
+  This function provides a standard way to read PCH Smbus IO registers.
+
+  @param[in] Offset   Register offset from Smbus base IO address.
+
+  @retval UINT8   Returns data read from IO.
+**/
+UINT8
+EFIAPI
+SmbusIoRead (
+  IN  UINT8   Offset
+  )
+{
+  return IoRead8 (SmbusGetIoBase () + Offset);
+}
+
+/**
+  This function provides a standard way to write PCH Smbus IO registers.
+
+  @param[in] Offset   Register offset from Smbus base IO address.
+  @param[in] Data Data to write to register.
+
+**/
+VOID
+EFIAPI
+SmbusIoWrite (
+  IN  UINT8   Offset,
+  IN  UINT8   Data
+  )
+{
+
+  IoWrite8 (SmbusGetIoBase () + Offset, Data);
+  return;
+}
+
+/**
+  This function provides a standard way to check if a SMBus transaction has
+  completed.
+
+  @param[in] StsReg   Not used for input. On return, contains the
+  value of the SMBus status register.
+
+  @retval TRUETransaction is complete
+  @retval FALSE   Otherwise.
+**/