[edk2-devel] [PATCH v1 6/9] OvmfPkg/Csm/LegacyBiosDxe: Update to make it build for OVMF

2019-05-15 Thread Wu, Hao A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1811

This commit will update the driver's INF file to:

A) Assign a new file GUID;
B) Consume the PCDs duplicated in OvmfPkg DEC file;
C) Remove the IntelFramework[Module]Pkg DEC file dependency.

Please note that a subsequent commit (final patch of the series) will:

Replace the use of LegacyBiosDxe in IntelFrameworkModulePkg with the one
copied in OvmfPkg within DSC/FDF files.

Cc: Ray Ni 
Cc: David Woodhouse 
Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Signed-off-by: Hao A Wu 
---
 OvmfPkg/Csm/LegacyBiosDxe/LegacyBiosDxe.inf | 22 +---
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/OvmfPkg/Csm/LegacyBiosDxe/LegacyBiosDxe.inf 
b/OvmfPkg/Csm/LegacyBiosDxe/LegacyBiosDxe.inf
index 471d37365c..f6379dcc46 100644
--- a/OvmfPkg/Csm/LegacyBiosDxe/LegacyBiosDxe.inf
+++ b/OvmfPkg/Csm/LegacyBiosDxe/LegacyBiosDxe.inf
@@ -3,7 +3,7 @@
 #
 # This driver installs Legacy Bios Protocol to support CSM module work in EFI 
system.
 #
-# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -13,7 +13,7 @@
   INF_VERSION= 0x00010005
   BASE_NAME  = LegacyBiosDxe
   MODULE_UNI_FILE= LegacyBiosDxe.uni
-  FILE_GUID  = F122A15C-C10B-4d54-8F48-60F4F06DD1AD
+  FILE_GUID  = 46482D14-7CA1-4977-9DDB-64D747E13DE6
   MODULE_TYPE= DXE_DRIVER
   VERSION_STRING = 1.0
 
@@ -50,9 +50,7 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  IntelFrameworkPkg/IntelFrameworkPkg.dec
-  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
-
+  OvmfPkg/OvmfPkg.dec
 
 [LibraryClasses]
   DevicePathLib
@@ -116,13 +114,13 @@
   gEdkiiIoMmuProtocolGuid   ## CONSUMES
 
 [Pcd]
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLegacyBiosCacheLegacyRegion  ## 
CONSUMES
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdEbdaReservedMemorySize   ## 
CONSUMES
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdEndOpromShadowAddress## 
SOMETIMES_CONSUMES
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLowPmmMemorySize ## 
CONSUMES
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdHighPmmMemorySize## 
CONSUMES
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdOpromReservedMemoryBase  ## 
CONSUMES
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdOpromReservedMemorySize  ## 
CONSUMES
+  gUefiOvmfPkgTokenSpaceGuid.PcdLegacyBiosCacheLegacyRegion  ## CONSUMES
+  gUefiOvmfPkgTokenSpaceGuid.PcdEbdaReservedMemorySize   ## CONSUMES
+  gUefiOvmfPkgTokenSpaceGuid.PcdEndOpromShadowAddress## 
SOMETIMES_CONSUMES
+  gUefiOvmfPkgTokenSpaceGuid.PcdLowPmmMemorySize ## CONSUMES
+  gUefiOvmfPkgTokenSpaceGuid.PcdHighPmmMemorySize## CONSUMES
+  gUefiOvmfPkgTokenSpaceGuid.PcdOpromReservedMemoryBase  ## CONSUMES
+  gUefiOvmfPkgTokenSpaceGuid.PcdOpromReservedMemorySize  ## CONSUMES
 
 [Depex]
   gEfiLegacyRegion2ProtocolGuid AND gEfiLegacyInterruptProtocolGuid AND 
gEfiLegacyBiosPlatformProtocolGuid AND gEfiLegacy8259ProtocolGuid AND 
gEfiGenericMemTestProtocolGuid AND gEfiCpuArchProtocolGuid AND 
gEfiTimerArchProtocolGuid AND gEfiVariableWriteArchProtocolGuid
-- 
2.12.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40654): https://edk2.groups.io/g/devel/message/40654
Mute This Topic: https://groups.io/mt/31627726/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v1 8/9] OvmfPkg/Csm/LegacyBootManagerLib: Update to make it build for OVMF

2019-05-15 Thread Wu, Hao A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1811

This commit will update the library's INF file to:

A) Assign a new file GUID;
B) Remove the IntelFramework[Module]Pkg DEC file dependency.

Please note that a subsequent commit (final patch of the series) will:

Replace the use of LegacyBootManagerLib in IntelFrameworkModulePkg with
the one copied in OvmfPkg within DSC files.

Cc: Ray Ni 
Cc: David Woodhouse 
Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Signed-off-by: Hao A Wu 
---
 OvmfPkg/Csm/LegacyBootManagerLib/LegacyBootManagerLib.inf | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/OvmfPkg/Csm/LegacyBootManagerLib/LegacyBootManagerLib.inf 
b/OvmfPkg/Csm/LegacyBootManagerLib/LegacyBootManagerLib.inf
index eaf7b7235d..e43351cf95 100644
--- a/OvmfPkg/Csm/LegacyBootManagerLib/LegacyBootManagerLib.inf
+++ b/OvmfPkg/Csm/LegacyBootManagerLib/LegacyBootManagerLib.inf
@@ -1,7 +1,7 @@
 ## @file
 #  Legacy Boot Manager module is library for BDS phase.
 #
-#  Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+#  Copyright (c) 2011 - 2019, Intel Corporation. All rights reserved.
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -10,7 +10,7 @@
   INF_VERSION= 0x00010005
   BASE_NAME  = LegacyBootManagerLib
   MODULE_UNI_FILE= LegacyBootManagerLib.uni
-  FILE_GUID  = F1B87BE4-0ACC-409A-A52B-7BFFABCC96A0
+  FILE_GUID  = D1BBB810-6A9E-40E0-87CB-65EAD2AA2A09
   MODULE_TYPE= DXE_DRIVER
   VERSION_STRING = 1.0
   LIBRARY_CLASS  = NULL|DXE_DRIVER UEFI_APPLICATION
@@ -29,8 +29,7 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  IntelFrameworkPkg/IntelFrameworkPkg.dec
-  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
+  OvmfPkg/OvmfPkg.dec
 
 [LibraryClasses]
   BaseLib
-- 
2.12.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40656): https://edk2.groups.io/g/devel/message/40656
Mute This Topic: https://groups.io/mt/31627728/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v1 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Fix PPTT cache attributes validation

2019-05-15 Thread Krzysztof Koch
Hi Jaben and Ray,

It's been a while since I posted this patch. Can I help you in any way to get 
this merged?

Kind regards,

Krzysztof Koch

-Original Message-
From: Sami Mujawar  
Sent: Thursday, May 9, 2019 14:37
To: devel@edk2.groups.io
Cc: jaben.car...@intel.com; ray...@intel.com; Matteo Carlini 
; Stephanie Hughes-Fitt 
; nd ; Krzysztof Koch 

Subject: RE: [PATCH v1 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Fix PPTT 
cache attributes validation

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar

-Original Message-
From: Krzysztof Koch  
Sent: 31 January 2019 01:30 PM
To: edk2-de...@lists.01.org
Cc: jaben.car...@intel.com; ray...@intel.com; Matteo Carlini 
; Stephanie Hughes-Fitt 
; Sami Mujawar ; nd 

Subject: [PATCH v1 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Fix PPTT cache 
attributes validation

Removed conditional pre-compiling for ARM CPUs because function
ValidateCacheAttributes(..) is based on ACPI PPTT specification.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Krzysztof Koch 
Reported-by: Zhichao Gao 
---

The code can be found at: 
https://github.com/KrzysztofKoch1/edk2/tree/woa_422_cache_valid_fix_v1

Notes:
v1:
- removed conditional precompilation[Krzysztof]

 ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git 
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c
index 
bc56fe9ea1dd9c1e98a6a568d3f9191263bedc90..b6b420890a3494869020ed8bcc7b791fcf7d70f3
 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c
@@ -86,11 +86,9 @@ ValidateCacheAttributes (
   IN VOID*  Context
   )
 {
-#if defined(MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
   // Reference: Advanced Configuration and Power Interface (ACPI) Specification
   //Version 6.2 Errata A, September 2017
   // Table 5-153: Cache Type Structure
-
   UINT8 Attributes;
   Attributes = *(UINT8*)Ptr;
 
@@ -102,7 +100,6 @@ ValidateCacheAttributes (
   );
 return;
   }
-#endif
 }
 
 /**
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40647): https://edk2.groups.io/g/devel/message/40647
Mute This Topic: https://groups.io/mt/30917572/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v1 1/1] ShellPkg: acpiview: Add GT Frame Number validation to GTDT parser

2019-05-15 Thread Krzysztof Koch
Hi Jaben and Ray,

Is there anything I can do to help get this patch merged?

Kind regards,

Krzysztof Koch

-Original Message-
From: Sami Mujawar  
Sent: Thursday, May 9, 2019 14:37
To: devel@edk2.groups.io
Cc: jaben.car...@intel.com; ray...@intel.com; Krzysztof Koch 
; nd 
Subject: RE: [PATCH v1 1/1] ShellPkg: acpiview: Add GT Frame Number validation 
to GTDT parser

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar

-Original Message-
From: Krzysztof Koch  
Sent: 08 May 2019 02:44 PM
To: devel@edk2.groups.io
Cc: jaben.car...@intel.com; ray...@intel.com; Sami Mujawar 
; Girish Pathak ; Pierre Gondois 
; Matteo Carlini ; Stephanie 
Hughes-Fitt ; nd 
Subject: [PATCH v1 1/1] ShellPkg: acpiview: Add GT Frame Number validation to 
GTDT parser


The ACPI 6.2 specification mandates that the Generic Timer (GT) Block Timer 
Structures must have a frame number in the range 0-7.

Update the GTDT parser to warn if this condition is violated.

Signed-off-by: Krzysztof Koch 
---

The changes can be seen at: 
https://github.com/KrzysztofKoch1/edk2/tree/woa_528_acpiview_gt_frame_validate_v1

Notes:
v1:
  - Add GTDT Frame Number checks [Krzysztof]

 ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c | 47 
+++-
 1 file changed, 45 insertions(+), 2 deletions(-)

diff --git 
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c 
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c
index 
f31c4a2761751c58d4b1d3eb75084e24ec318e7f..572e52385c54932b14630481e85a67d0b211966a
 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtPars
+++ er.c
@@ -1,7 +1,7 @@
 /** @file
   GTDT table parser
 
-  Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
+  Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
   @par Reference(s):
@@ -38,6 +38,21 @@ ValidateGtBlockTimerCount (
   IN VOID*  Context
   );
 
+/**
+  This function validates the GT Frame Number.
+
+  @param [in] Ptr Pointer to the start of the field data.
+  @param [in] Context Pointer to context specific information e.g. this
+  could be a pointer to the ACPI table header.
+**/
+STATIC
+VOID
+EFIAPI
+ValidateGtFrameNumber (
+  IN UINT8* Ptr,
+  IN VOID*  Context
+  );
+
 /**
   An ACPI_PARSER array describing the ACPI GTDT Table.
 **/
@@ -92,7 +107,7 @@ STATIC CONST ACPI_PARSER GtBlockParser[] = {
   An ACPI_PARSER array describing the GT Block timer.
 **/
 STATIC CONST ACPI_PARSER GtBlockTimerParser[] = {
-  {L"Frame Number", 1, 0, L"%d", NULL, NULL, NULL, NULL},
+  {L"Frame Number", 1, 0, L"%d", NULL, NULL, ValidateGtFrameNumber, 
+ NULL},
   {L"Reserved", 3, 1, L"%x %x %x", Dump3Chars, NULL, NULL, NULL},
   {L"Physical address (CntBaseX)", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL},
   {L"Physical address (CntEL0BaseX)", 8, 12, L"0x%lx", NULL, NULL, NULL, @@ 
-145,6 +160,34 @@ ValidateGtBlockTimerCount (
   }
 }
 
+/**
+  This function validates the GT Frame Number.
+
+  @param [in] Ptr Pointer to the start of the field data.
+  @param [in] Context Pointer to context specific information e.g. this
+  could be a pointer to the ACPI table header.
+**/
+STATIC
+VOID
+EFIAPI
+ValidateGtFrameNumber (
+  IN UINT8* Ptr,
+  IN VOID*  Context
+  )
+{
+  UINT32 FrameNumber;
+
+  FrameNumber = *(UINT8*)Ptr;
+
+  if (FrameNumber > 7) {
+IncrementErrorCount ();
+Print (
+  L"\nERROR: GT Frame Number = %d. GT Frame Number must be in range 0-7.",
+  FrameNumber
+  );
+  }
+}
+
 /**
   This function parses the Platform GT Block.
 
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40646): https://edk2.groups.io/g/devel/message/40646
Mute This Topic: https://groups.io/mt/31543249/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v1 1/1 -resend] MdePkg: Add ACPI 6.3 header file

2019-05-15 Thread Krzysztof Koch
Hi Liming and Michael,

Is there any way I can help to get this patch merged?

Kind regards,

Krzysztof Koch

-Original Message-
From: Sami Mujawar  
Sent: Wednesday, May 8, 2019 9:06
To: Gao, Liming ; devel@edk2.groups.io; Krzysztof Koch 

Cc: nd 
Subject: RE: [edk2-devel] [PATCH v1 1/1 -resend] MdePkg: Add ACPI 6.3 header 
file

Reviewed-by: Sami Mujawar 

-Original Message-
From: Gao, Liming  
Sent: 07 May 2019 04:08 PM
To: devel@edk2.groups.io; Krzysztof Koch 
Cc: Sami Mujawar ; nd 
Subject: RE: [edk2-devel] [PATCH v1 1/1 -resend] MdePkg: Add ACPI 6.3 header 
file

The change is good. Reviewed-by: Liming Gao 

Thanks
Liming
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of 
> Krzysztof Koch
> Sent: Tuesday, May 7, 2019 8:56 PM
> To: devel@edk2.groups.io
> Cc: sami.muja...@arm.com; n...@arm.com
> Subject: [edk2-devel] [PATCH v1 1/1 -resend] MdePkg: Add ACPI 6.3 header file
> 
> The patch includes the following ACPI 6.3 updates:
>  1. Reserve CRAT and CDIT table names in ACPI 6.3 header.
> - ACPI 6.3 January 2019, Table 5-30
> - Mantis ID 1883 (https://mantis.uefi.org/mantis/view.php?id=1883)
>  2. Add new processor structure flags in PPTT.
> - ACPI 6.3 January 2019, Section 5.2.29
> - Mantis ID 1870 (https://mantis.uefi.org/mantis/view.php?id=1870)
> - Mantis ID 1934 (https://mantis.uefi.org/mantis/view.php?id=1934)
>  3. Add SPE support to MADT.
> - ACPI 6.3 January 2019, Table 5-60
> - Mantis ID 1934 (https://mantis.uefi.org/mantis/view.php?id=1934)
>  4. Add 'Hot-plug Capable' flag to APIC.
> - ACPI 6.3 January 2019, Table 5-44, Table 5-47 & Table 5-58
> - Mantis ID 1948 (https://mantis.uefi.org/mantis/view.php?id=1948)
>  5. Add CNTHV timer to GTDT.
> - ACPI 6.3 January 2019, Section 5.2.24
> - Mantis ID 1851 (https://mantis.uefi.org/mantis/view.php?id=1851)
>  6. Add 'Trigger Order' to Platform Communication Channel Identification
> Structure.
> - ACPI 6.3 January 2019, Section 5.2.28
> - Mantis ID 1867 (https://mantis.uefi.org/mantis/view.php?id=1867)
>  7. Add Generic Initiator Affinity Structure to SRAT.
> - ACPI 6.3 January 2019, Section 5.2.16.6
> - Mantis ID 1904 (https://mantis.uefi.org/mantis/view.php?id=1904)
>  8. Add 'HMAT Enhancements'.
> - ACPI 6.3 January 2019, Section 5.2.27
> - Mantis ID 1914 (https://mantis.uefi.org/mantis/view.php?id=1914)
> - Mantis ID 1959 (https://mantis.uefi.org/mantis/view.php?id=1959)
>  9. Fix generic address structure definition to include all address
> space ID keywords.
>- ACPI 6.3 January 2019, Table 5-25
>- Mantis ID 1965 (https://mantis.uefi.org/mantis/view.php?id=1965)
> 10. Make Acpi63.h the latest ACPI definition.
> 
> Signed-off-by: Krzysztof Koch 
> ---
> Resending patch as it did not reach the mailing list.
> 
> The patch can be viewed at:
> https://github.com/KrzysztofKoch1/edk2/tree/woa_529_acpi63_header_v1
> 
> Notes:
> v1:
> - add header file for ACPI 6.3 [Krzysztof]
> 
>  MdePkg/Include/IndustryStandard/Acpi.h   |3 +-
>  MdePkg/Include/IndustryStandard/Acpi63.h | 2946 
>  2 files changed, 2948 insertions(+), 1 deletion(-)
> 
> diff --git a/MdePkg/Include/IndustryStandard/Acpi.h 
> b/MdePkg/Include/IndustryStandard/Acpi.h
> index 
> cc3f34b6e2fa66d0e97ea1ee07bffce91a7dfcce..48f4d7176125ee33db0f103268af199c7efacdad
>  100644
> --- a/MdePkg/Include/IndustryStandard/Acpi.h
> +++ b/MdePkg/Include/IndustryStandard/Acpi.h
> @@ -3,6 +3,7 @@
>consumed by drivers that do not care about ACPI versions.
> 
>Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
> +  Copyright (c) 2019, ARM Ltd. All rights reserved.
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -10,6 +11,6 @@
>  #ifndef _ACPI_H_
>  #define _ACPI_H_
> 
> -#include 
> +#include 
> 
>  #endif
> diff --git a/MdePkg/Include/IndustryStandard/Acpi63.h 
> b/MdePkg/Include/IndustryStandard/Acpi63.h
> new file mode 100644
> index 
> ..a8e011579ffcf070ecdfd2c6726a16d1afd65891
> --- /dev/null
> +++ b/MdePkg/Include/IndustryStandard/Acpi63.h
> @@ -0,0 +1,2946 @@
> +/** @file
> +  ACPI 6.3 definitions from the ACPI Specification Revision 6.3 Jan, 2019.
> +
> +  Copyright (c) 2017, Intel Corporation. All rights reserved.
> +  Copyright (c) 2019, ARM Ltd. All rights reserved.
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +**/
> +
> +#ifndef _ACPI_6_3_H_
> +#define _ACPI_6_3_H_
> +
> +#include 
> +
> +//
> +// Ensure proper structure formats
> +//
> +#pragma pack(1)
> +
> +///
> +/// ACPI 6.3 Generic Address Space definition
> +///
> +typedef struct {
> +  UINT8   AddressSpaceId;
> +  UINT8   RegisterBitWidth;
> +  UINT8   RegisterBitOffset;
> +  UINT8   AccessSize;
> +  UINT64  Address;
> +} EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE;
> +
> +//
> +// Generic Address Space Address IDs
> +//
> +#define EFI_ACPI_6_3_SYSTEM_MEMORY  

Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2019-05-15 Thread Laszlo Ersek
On 05/15/19 09:02, Zhang, Shenglei wrote:
> Hi Laszlo:
> 
>> -Original Message-
>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>> Laszlo Ersek
>> Sent: Tuesday, May 14, 2019 9:49 PM
>> To: devel@edk2.groups.io; Zhang, Shenglei 
>> Cc: Justen, Jordan L ; Ard Biesheuvel
>> ; Anthony Perard ;
>> Julien Grall 
>> Subject: Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use
>> NetworkPkg's include fragment file.

>> (4) Therefore, please *prepend* a patch to this series that eliminates
>> the [LibraryClasses.common.DXE_DRIVER] resolutions altogether, at first.
> 
> Thanks for your comments!
> I'll send a patch first to solve the duplicated library classes about network 
> in
> [LibraryClasses.common.DXE_DRIVER] section.

Thanks for that, I'll review it soon.

>> (6) Please be consistent with the comments that you add near the
>> !include directives. In the current patch, you add comments for the libs
>> and the PCDs, but not for the defines or the components. Please stick
>> with one style -- either add zero comments, or add comments on all of
>> the !includes.
> 
> Actually, for components I add "Network Support" in the comments, which looks 
> like
> aligning with nearby components. Do you thinks it is acceptable?

Sorry, I missed the pre-existent comment there, and the fact that you
were preserving the comment.

So yes, that is fine -- as long as all !include directives uniformly
have a comment (newly added, or inherited from preexistent code), it's OK.

Please note however that your network *defines* !include still lacks a
comment! Please fix that, for consistency with the rest of the !include
directives.

Thanks
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40644): https://edk2.groups.io/g/devel/message/40644
Mute This Topic: https://groups.io/mt/31616136/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v3 0/6] CryptoPkg: Upgrade OpenSSL to 1.1.1b

2019-05-15 Thread Laszlo Ersek
Hi Xiaoyu,

On 05/15/19 04:00, Lu, XiaoyuX wrote:
> Hi Gary Lin:
>   I also need to modify the code about the entropy source today.
>   But I have uploaded a TimerLib based implementation.
> 
>   https://github.com/xiaoyuxlu/edk2/commits/bz_1089_patch_v4

This is not a good strategy.

Please refer to contributor step 31:

https://github.com/tianocore/tianocore.github.io/wiki/Laszlo's-unkempt-git-guide-for-edk2-contributors-and-maintainers#contrib-31

You should push a topic branch called "_v4" *only* if you are ready
to post it immediately to the list, as "PATCH v4".

Topic branches in personal repos must be *identical* to the
corresponding posting on edk2-devel. And once such a topic branch is
pushed and referenced in an edk2-devel posting, the branch should never
ever be modified again. Not rebased, not force-pushed, not
fast-forwarded to additional commits on top. Once you have a v4 posting
on edk2-devel, the topic branch *for that version* becomes read-only. If
you need updates, you need to prepare a v5.

It's OK to push (even force-push) branches to your personal repo that
are work-in-progress. However, the name of the branch should be very
clear about that. For example, you could call the branch
"bz_1089_patch_v4_wip", with the "_wip" suffix standing for
"work-in-progress". Then people fetching that branch will understand
it's not final, and may easily change until the mailing list posting.
When you decide it's time to post, you can rename the branch (drop the
"_wip" suffix), from which point on you should treat the branch as
read-only.

Thanks
Laszlo

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Gary Lin
> Sent: Wednesday, May 15, 2019 9:54 AM
> To: devel@edk2.groups.io; Wang, Jian J 
> Cc: Laszlo Ersek ; Lu, XiaoyuX ; Ye, 
> Ting 
> Subject: Re: [edk2-devel] [PATCH v3 0/6] CryptoPkg: Upgrade OpenSSL to 1.1.1b
> 
> On Tue, May 14, 2019 at 01:26:15PM +, Wang, Jian J wrote:
>> Yes, please wait for v4 version of this patch series.
> 
> Good. I'm looking forward to the new series :)
> 
> Thanks,
> 
> Gary Lin
> 
>>
>> Regards,
>> Jian
>>
>>
>>> -Original Message-
>>> From: Laszlo Ersek [mailto:ler...@redhat.com]
>>> Sent: Tuesday, May 14, 2019 8:06 PM
>>> To: devel@edk2.groups.io; g...@suse.com
>>> Cc: Lu, XiaoyuX ; Wang, Jian J 
>>> ; Ye, Ting 
>>> Subject: Re: [edk2-devel] [PATCH v3 0/6] CryptoPkg: Upgrade OpenSSL 
>>> to 1.1.1b
>>>
>>> On 05/14/19 08:16, Gary Lin wrote:
 On Mon, May 13, 2019 at 09:24:39PM +0200, Laszlo Ersek wrote:
> On 05/13/19 15:25, Xiaoyu lu wrote:
>> (1) CryptoPkg/OpensslLib: Modify process_files.pl for  upgrading OpenSSL
>>   OpenSSL only support seeding NONE for UEFI(rand_unix.c line 93).
>>   So add --with-rand-seed=none to process_files.pl.
>>
>> (2) CryptoPkg/OpensslLib: Exclude unnecessary files in  process_files.pl
>>   When running process_files.py to configure OpenSSL, we can 
>> exclude some
>>> unnecessary files. This can reduce porting time, compiling time and library 
>>> size.
>>
>> (3) CryptoPkg/IntrinsicLib: Fix possible unresolved  external 
>> symbol issue
>>
>> (4) CryptoPkg/OpensslLib: Prepare for upgrading OpenSSL
>>   Disable warning for building OpenSSL_1_1_1b
>>
>> (5) CryptoPkg: Upgrade OpenSSL to 1.1.1b
>>   Update OpenSSL submodule to OpenSSL_1_1_1b
>>   OpenSSL_1_1_1b(50eaac9f3337667259de725451f201e784599687)
>>
>>   OpenSSL doesn't implement some rand_pool function for UEFI.
>>   Use EFI_RNG_PROTOCOL to generate random for entropy.
>>   If EFI_RNG_PROTOCOL is not avaliable, fall back to performance
>>   counter, but we not sure about the amount of randomness it provides.
>>
>> (6) CryptoPkg/BaseCryptLib: Make HMAC_CTX size backward  
>> compatible
>>
>>   Note: Will be remove next update.
>>   Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1792
>>   Ref: https://github.com/openssl/openssl/pull/4338
>>
>>
>> Cc: Jian J Wang 
>> Cc: Ting Ye 
>
> I'm withdrawing from reviewing or testing this series.
>
> Gary, if you have the time, can you please regression test this 
> (for HTTPS boot) in both OVMF and ArmVirtQemu?
>
 I'll find some time to do the regression test tomorrorw.
>>>
>>> Thanks, Gary!
>>>
>>> Xiaoyu might post a v4 with a remote topic branch for reviewers to 
>>> fetch; I suggest awaiting that. (The series is difficult to apply 
>>> with
>>> git-am.)
>>>
>>> Thanks
>>> Laszlo
>>>
 Cheers,

 Gary Lin



>>
>>
>>
>>
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40643): https://edk2.groups.io/g/devel/message/40643
Mute This Topic: https://groups.io/mt/31606972/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=

[edk2-devel] [PATCH] OvmfPkg: Remove duplicated library classes in dxe drivers section in DSC

2019-05-15 Thread Zhang, Shenglei
NetLib,IpIoLib,UdpIoLib and DpcLib already exist in [LibraryClasses].
So the ones in [LibraryClasses.common.DXE_DRIVER] are duplicated,
which should be removed.

Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Anthony Perard 
Cc: Julien Grall 
Signed-off-by: Shenglei Zhang 
---
 OvmfPkg/OvmfPkgIa32.dsc| 4 
 OvmfPkg/OvmfPkgIa32X64.dsc | 4 
 OvmfPkg/OvmfPkgX64.dsc | 4 
 3 files changed, 12 deletions(-)

diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index 36a0f87258..64054e226f 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -339,10 +339,6 @@
 !else
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
 !endif
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   
PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
   
PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf
   QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index 9b341e17d7..ca7c5aaeb7 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -344,10 +344,6 @@
 !else
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
 !endif
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   
PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
   
PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf
   QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index a0f87f74da..ff5b910fd4 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -344,10 +344,6 @@
 !else
   DebugLib|OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf
 !endif
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   
PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
   
PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf
   QemuBootOrderLib|OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf
-- 
2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40642): https://edk2.groups.io/g/devel/message/40642
Mute This Topic: https://groups.io/mt/31627429/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH] Change edk2-platforms/master to BSD+Patent License

2019-05-15 Thread Chiu, Chasel


Hi Mike,

Seems we missed below files, would you please check?
.\Platform\Intel\KabylakeOpenBoardPkg\License.txt
.\Silicon\Intel\KabylakeSiliconPkg\License.txt

With above 2 files updated, 
Reviewed-by: Chasel Chiu 
.\Platform\Intel\KabylakeOpenBoardPkg
.\Silicon\Intel\KabylakeSiliconPkg

Thanks!
Chasel


> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Michael D Kinney
> Sent: Wednesday, May 15, 2019 9:31 AM
> To: devel@edk2.groups.io
> Cc: leif.lindh...@linaro.org; Ard Biesheuvel (ard.biesheu...@linaro.org)
> ; Kubacki, Michael A
> ; Gillispie, Thad ; Bu,
> Daocheng ; Oram, Isaac W
> ; Piwko, Maciej ; Chiu,
> Chasel ; Lu, Shifei A ; Zhou,
> Bowen ; Sinha, Ankit ;
> Chaganty, Rangasai V 
> Subject: [edk2-devel] [edk2-platforms][PATCH] Change edk2-platforms/master
> to BSD+Patent License
> 
> Hello,
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1373
> 
> This change is based on the following emails:
>   https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
>   https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html
> 
> RFCs with detailed process for the license change:
>   V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
>   V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
>   V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html
> 
> I have posted a V1 branch for review for converting the edk2-platforms/master
> branch to the BSD + Patent license
> 
> https://github.com/mdkinney/edk2-platforms/tree/Bug_1373_BsdPatentLicen
> se_V1
> 
> The list of commits in the series are here:
> 
> https://github.com/mdkinney/edk2-platforms/commits/Bug_1373_BsdPatent
> License_V1
> 
> I have a couple questions out to maintainers for a few files in this 
> repository.
> Once I have that feedback, I will post a
> V2 version with those updates.
> 
> The edk2-platforms/master branch maintainers and package reviewers should
> provide review feedback for their packages.  The critical part of the review 
> is:
> 1) Any changes that cause build breaks or logic changes.  These code
>changes are intended to only modify license contents in comment
>blocks.
> 2) Any file that has been changed to BSD+Patent, but should remain
>with the current license.
> 3) Any file that that has not changed to BSD+Patent, but should be
>changed to BSD+Patent.
> 
> Thanks,
> 
> Mike
> 
> 
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40641): https://edk2.groups.io/g/devel/message/40641
Mute This Topic: https://groups.io/mt/31625434/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use NetworkPkg's include fragment file.

2019-05-15 Thread Zhang, Shenglei
Hi Laszlo:

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Laszlo Ersek
> Sent: Tuesday, May 14, 2019 9:49 PM
> To: devel@edk2.groups.io; Zhang, Shenglei 
> Cc: Justen, Jordan L ; Ard Biesheuvel
> ; Anthony Perard ;
> Julien Grall 
> Subject: Re: [edk2-devel] [PATCH 1/4] OvmfPkg: Update DSC/FDF to use
> NetworkPkg's include fragment file.
> 
> On 05/14/19 09:39, Zhang, Shenglei wrote:
> > This patch updates the platform DSC/FDF files to use the include fragment
> > files provided by NetworkPkg.
> > The feature enabling flags in [Defines] section have been updated to use
> > the NetworkPkg's terms, and the value has been overridden with the
> original
> > default value on this platform.
> >
> > This patch also rename the TLS_ENABLE flag to PLATFORM_TLS_ENABLE for
> the
> > platform specific configuration for TLS support.
> 
> Originally I thought that would be the right approach. However, Liming
> explained that we don't need "PLATFORM_TLS_ENABLE", because the
> platform
> DSC can override [Components] entries that are included from
> "NetworkComponents.dsc.inc".
> 
> Please see:
> 
>   https://bugzilla.tianocore.org/show_bug.cgi?id=1449
>   http://mid.mail-
> archive.com/4A89E2EF3DFEDB4C8BFDE51014F606A14E443D46@SHSMSX104.c
> cr.corp.intel.com
> 
> ... Oh wait, this patch doesn't actually introduce PLATFORM_TLS_ENABLE!
> The patch could be correct in fact (I'll review it just below); however,
> the commit message is incorrect.
> 
> (1) Please remove the PLATFORM_TLS_ENABLE paragraph from the commit
> message.
> 
> 
> > Cc: Jordan Justen 
> > Cc: Laszlo Ersek 
> > Cc: Ard Biesheuvel 
> > Cc: Anthony Perard 
> > Cc: Julien Grall 
> > Signed-off-by: Shenglei Zhang 
> > ---
> >  OvmfPkg/OvmfPkgIa32.dsc| 70 +++--
> >  OvmfPkg/OvmfPkgIa32.fdf| 29 +---
> >  OvmfPkg/OvmfPkgIa32X64.dsc | 71 +++---
> >  OvmfPkg/OvmfPkgIa32X64.fdf | 29 +---
> >  OvmfPkg/OvmfPkgX64.dsc | 69 +++-
> >  OvmfPkg/OvmfPkgX64.fdf | 29 +---
> >  6 files changed, 65 insertions(+), 232 deletions(-)
> >
> > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> > index 36a0f87258..0977233b8b 100644
> > --- a/OvmfPkg/OvmfPkgIa32.dsc
> > +++ b/OvmfPkg/OvmfPkgIa32.dsc
> > @@ -29,14 +29,17 @@
> ># -D FLAG=VALUE
> >#
> >DEFINE SECURE_BOOT_ENABLE  = FALSE
> > -  DEFINE NETWORK_IP6_ENABLE  = FALSE
> > -  DEFINE HTTP_BOOT_ENABLE= FALSE
> >DEFINE SMM_REQUIRE = FALSE
> > -  DEFINE TLS_ENABLE  = FALSE
> >DEFINE TPM2_ENABLE = FALSE
> >DEFINE TPM2_CONFIG_ENABLE  = FALSE
> >DEFINE USE_LEGACY_ISA_STACK= FALSE
> >
> > +  DEFINE NETWORK_TLS_ENABLE = FALSE
> > +  DEFINE NETWORK_IP6_ENABLE = FALSE
> > +  DEFINE NETWORK_HTTP_BOOT_ENABLE   = FALSE
> > +
> 
> (2) You forgot:
> 
>   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
> 
> 
> > +!include NetworkPkg/NetworkDefines.dsc.inc
> > +
> >#
> ># Flash size selection. Setting FD_SIZE_IN_KB on the command line
> directly to
> ># one of the supported values, in place of any of the convenience macros,
> is
> > @@ -139,10 +142,6 @@
> 
> (3) Please update your git configuration so that the diff hunk headers
> (@@) show what section you are modifying, in the INF, DSC, DEC, and FDF
> files:
> 
> (3a) run the command
> 
>   $ git config diff.ini.xfuncname '^\[[A-Za-z0-9_., ]+]'
> 
> from
>  git-guide-for-edk2-contributors-and-maintainers#contrib-05>.
> 
> (3b) implement the settings from
>  git-guide-for-edk2-contributors-and-maintainers#contrib-09>.
> 
> 
> >FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
> >UefiCpuLib|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf
> >
> SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementL
> ib/DxeSecurityManagementLib.inf
> > -  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
> > -  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
> > -  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
> > -  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
> >UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
> >
> SerializeVariablesLib|OvmfPkg/Library/SerializeVariablesLib/SerializeVariable
> sLib.inf
> >QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxeLib.inf
> 
> Unfortunately, the OVMF DSC files have a small wart that should be fixed
> up, before this patch.
> 
> Namely, the above library class resolutions are duplicated between
> [LibraryClasses], and [LibraryClasses.common.DXE_DRIVER].
> 
> (4) Therefore, please *prepend* a patch to this series that eliminates
> the [LibraryClasses.common.DXE_DRIVER] resolutions altogether, at first.


<    1   2