[edk2] [PATCH] MdePkg: remove Libray references from code base

2016-05-15 Thread Michael Zimmermann
as reported on github:
https://github.com/tianocore/edk2/issues/79

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Zimmermann 
---
 .../PeiDxePostCodeLibReportStatusCode.inf | 4
++--
 .../PeiDxePostCodeLibReportStatusCode.uni | 4
++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git
a/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.inf
b/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.inf
index 68854ae..dc162c2 100644
---
a/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.inf
+++
b/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.inf
@@ -1,7 +1,7 @@
 ## @file
-# Instance of Post Code Library based on Report Status Code Libray.
+# Instance of Post Code Library based on Report Status Code Library.
 #
-# Post Code Library that layers on top of a Report Status Code Libray
instance.
+# Post Code Library that layers on top of a Report Status Code Library
instance.
 #
 # Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
 #
diff --git
a/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.uni
b/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.uni
index fe73719..165f27f 100644
---
a/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.uni
+++
b/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.uni
@@ -1,7 +1,7 @@
 // /** @file
-// Instance of Post Code Library based on Report Status Code Libray.
+// Instance of Post Code Library based on Report Status Code Library.
 //
-// Post Code Library that layers on top of a Report Status Code Libray
instance.
+// Post Code Library that layers on top of a Report Status Code Library
instance.
 //
 // Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
 //
-- 
2.8.2
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH] ShellPkg if user press "shift" key under shell command line that have incorrect behavior

2016-05-15 Thread Pedroa
when the user press "shift" key , the shell core read the data from
STDIN and thought that a bad value so it resume then reset the position
of the cursor
and keep waiting for user input.

if use "ReadKeyStroke" function to read STDIN when it read a "shift" key
,it would return a value "EFI_NOT_READY". so we can skip it or use
"ReadKeyStrokeEx"  to replace it.

diff --git a/ShellPkg/Application/Shell/FileHandleWrappers.c
b/ShellPkg/Application/Shell/FileHandleWrappers.c
index 0e5efe3..dcc2225 100644
--- a/ShellPkg/Application/Shell/FileHandleWrappers.c
+++ b/ShellPkg/Application/Shell/FileHandleWrappers.c
@@ -421,7 +421,7 @@ FileInterfaceStdInRead(
 //
 gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &EventIndex);
 Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
-if (EFI_ERROR (Status)) {
+if (EFI_ERROR (Status) && Status != EFI_NOT_READY) {
   break;
 }
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH] Emulator Pkg Assert at "Bad signature"

2016-05-15 Thread Pedroa

---
 EmulatorPkg/EmuGopDxe/GopInput.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/EmulatorPkg/EmuGopDxe/GopInput.c
b/EmulatorPkg/EmuGopDxe/GopInput.c
index a1f636a..505f340 100644
--- a/EmulatorPkg/EmuGopDxe/GopInput.c
+++ b/EmulatorPkg/EmuGopDxe/GopInput.c
@@ -389,7 +389,7 @@ EmuGopSimpleTextInExReadKeyStrokeEx (
 return EFI_INVALID_PARAMETER;
   }
 
-  Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_THIS (This);
+  Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This);
   if (Private->EmuGraphicsWindow == NULL) {
 return EFI_NOT_READY;
   }
-- 
2.1.4

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


Re: [edk2] a minor logic error in PcAtChipsetPkg\Library\AcpiTimerLib\AcpiTimerLib.c

2016-05-15 Thread Zeng, Star
The patch has been pushed at dde4aedc35ee3c06b67c1a5c4f392e7a0b0f8254.
Thanks for the contribution.

Star
-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of wang 
xiaofeng
Sent: Friday, May 13, 2016 10:56 AM
To: Zeng, Star 
Cc: edk2-devel@lists.01.org; Gao, Liming 
Subject: Re: [edk2] a minor logic error in 
PcAtChipsetPkg\Library\AcpiTimerLib\AcpiTimerLib.c

Hi Star,
   The attached is my code change for  this issue .You can see the 
difference with beyond compare. It is not based on latest code. Could you help 
to start a formal code review with this patch on behalf of me?  I am not 
familar the process of checking code to edk2. 
   Thanks !








At 2016-05-13 10:34:21, "Zeng, Star"  wrote:
>I think you are right. Could you help contribute the patch to fix it?
>
>Thanks,
>Star
>-Original Message-
>From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of wang 
>xiaofeng
>Sent: Friday, May 13, 2016 10:20 AM
>To: edk2-devel@lists.01.org
>Subject: [edk2] a minor logic error in 
>PcAtChipsetPkg\Library\AcpiTimerLib\AcpiTimerLib.c
>
>Hi Everyone ,
>Please refer to the code in AcpiTimerLibConstructor  in 
> PcAtChipsetPkg\Library\AcpiTimerLib\AcpiTimerLib.c
>The orginal code is 
>
>
>  if ((PciRead8 (PCI_LIB_ADDRESS (Bus, Device, Function, EnableRegister) & 
> EnableMask) != EnableMask)) {
>
>
>The bracket place is not right, I think it should be 
>
>
>   if ((PciRead8 (PCI_LIB_ADDRESS (Bus, Device, Function, EnableRegister)) & 
> EnableMask) != EnableMask)
> 
>Anyhow , the impact is minor since it will enable ACPI I/O base again.
>
>___
>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


Re: [edk2] [PATCH] Emulator Pkg Assert at "Bad signature"

2016-05-15 Thread Jordan Justen
Refer to EmulatorPkg/Contributions.txt for
Signed-off-by/Contributed-under.

Do you have your full name set with git config user.name?

For example, I use:

git config --global user.name "Jordan Justen"

If you update your user.name or user.email settings, then you can fix
the commit author with:

git commit --amend --reset-author

-Jordan

On 2016-05-15 01:09:04, Pedroa wrote:
> 
> ---
>  EmulatorPkg/EmuGopDxe/GopInput.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/EmulatorPkg/EmuGopDxe/GopInput.c
> b/EmulatorPkg/EmuGopDxe/GopInput.c
> index a1f636a..505f340 100644
> --- a/EmulatorPkg/EmuGopDxe/GopInput.c
> +++ b/EmulatorPkg/EmuGopDxe/GopInput.c
> @@ -389,7 +389,7 @@ EmuGopSimpleTextInExReadKeyStrokeEx (
>  return EFI_INVALID_PARAMETER;
>}
>  
> -  Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_THIS (This);
> +  Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This);
>if (Private->EmuGraphicsWindow == NULL) {
>  return EFI_NOT_READY;
>}
> -- 
> 2.1.4
> 
> ___
> 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 v4] SecurityPkg/DxeImageVerificationLib: Add DEBUG messages for image verification failures

2016-05-15 Thread Zhang, Chao B
Reviewed-by: Chao Zhang 





Thanks & Best regards
Chao Zhang

-Original Message-
From: Cinnamon Shia [mailto:cinnamon.s...@hpe.com] 
Sent: Friday, May 13, 2016 12:25 PM
To: edk2-devel@lists.01.org
Cc: ler...@redhat.com; samer.el-haj-mahm...@hpe.com; Zhang, Chao B; Cinnamon 
Shia
Subject: [PATCH v4] SecurityPkg/DxeImageVerificationLib: Add DEBUG messages for 
image verification failures

Add DEBUG messages in DxeImageerificationLib to help debug Secure Boot image 
verification failures

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia 
Reviewed-by: Samer EL-Haj-Mahmoud 
---
 .../DxeImageVerificationLib/DxeImageVerificationLib.c | 19 ++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git 
a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c 
b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
index 4b0e3f1..3aef1af 100644
--- a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
+++ b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
@@ -13,6 +13,7 @@
   untrusted PE/COFF image and validate its data structure within this image 
buffer before use.
 
 Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP
 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
@@ -71,6 +72,8 @@ HASH_TABLE mHash[] = {
   { L"SHA512", 64, &mHashOidValue[32], 9, Sha512GetContextSize, Sha512Init, 
Sha512Update, Sha512Final}
 };
 
+EFI_STRING mHashTypeStr;
+
 /**
   SecureBoot Hook for processing image verification.
 
@@ -340,6 +343,7 @@ HashPeImage (
 return FALSE;
   }
 
+  mHashTypeStr = mHash[HashAlg].Name;
   CtxSize   = mHash[HashAlg].GetContextSize();
 
   HashCtx = AllocatePool (CtxSize);
@@ -1303,6 +1307,7 @@ IsForbiddenByDbx (
 );
 if (IsForbidden) {
   SecureBootHook (EFI_IMAGE_SECURITY_DATABASE1, 
&gEfiImageSecurityDatabaseGuid, CertList->SignatureSize, CertData);
+  DEBUG ((DEBUG_INFO, "DxeImageVerificationLib: Image is signed but 
signature is forbidden by DBX.\n"));
   goto Done;
 }
 
@@ -1361,6 +1366,7 @@ IsForbiddenByDbx (
 //
 continue;
   }
+  DEBUG ((DEBUG_INFO, "DxeImageVerificationLib: Image is signed but 
signature failed the timestamp check.\n"));
   goto Done;
 }
 
@@ -1476,9 +1482,12 @@ IsAllowedByDb (
 
 if (IsCertHashFoundInDatabase (RootCert, RootCertSize, 
(EFI_SIGNATURE_LIST *)DbxData, DbxDataSize, &RevocationTime)) {
   //
-  // Check the timestamp signature and signing time to determine 
if the image can be trusted.
+  // Check the timestamp signature and signing time to determine 
if the RootCert can be trusted.
   //
   VerifyStatus = PassTimestampCheck (AuthData, AuthDataSize, 
&RevocationTime);
+  if (!VerifyStatus) {
+DEBUG ((DEBUG_INFO, "DxeImageVerificationLib: Image is signed 
and signature is accepted by DB, but its root cert failed the timestamp 
check.\n"));
+  }
 }
 
 goto Done;
@@ -1679,6 +1688,7 @@ DxeImageVerificationHandler (
 //
 // The information can't be got from the invalid PeImage
 //
+DEBUG ((DEBUG_INFO, "DxeImageVerificationLib: PeImage invalid. Cannot 
retrieve image information.\n"));
 goto Done;
   }
 
@@ -1702,6 +1712,7 @@ DxeImageVerificationHandler (
 //
 // It is not a valid Pe/Coff file.
 //
+DEBUG ((DEBUG_INFO, "DxeImageVerificationLib: Not a valid PE/COFF 
image.\n"));
 goto Done;
   }
 
@@ -1747,6 +1758,7 @@ DxeImageVerificationHandler (
 // and not be reflected in the security data base "dbx".
 //
 if (!HashPeImage (HASHALG_SHA256)) {
+  DEBUG ((DEBUG_INFO, "DxeImageVerificationLib: Failed to hash this image 
using %s.\n", mHashTypeStr));
   goto Done;
 }
 
@@ -1754,6 +1766,7 @@ DxeImageVerificationHandler (
   //
   // Image Hash is in forbidden database (DBX).
   //
+  DEBUG ((DEBUG_INFO, "DxeImageVerificationLib: Image is not signed and %s 
hash of image is forbidden by DBX.\n", mHashTypeStr));
   goto Done;
 }
 
@@ -1767,6 +1780,7 @@ DxeImageVerificationHandler (
 //
 // Image Hash is not found in both forbidden and allowed database.
 //
+DEBUG ((DEBUG_INFO, "DxeImageVerificationLib: Image is not signed and %s 
hash of image is not found in DB/DBX.\n", mHashTypeStr));
 goto Done;
   }
 
@@ -1846,11 +1860,14 @@ DxeImageVerificationHandler (
 //
 if (IsSignatureFoundInDatabase (EFI_IMAGE_SECURITY_DATABASE1, 
mImageDigest, &mCertType, mImageDigestSize)) {
   Action = EFI_IMAGE_EXECUTION_AUTH_SIG_FOUND;
+  DEBUG ((DEBUG_INFO, "DxeImageVe

Re: [edk2] [PATCH 0/2] Fix GCC build failures introduced with a85be3ae48a8

2016-05-15 Thread Gao, Liming
Reviewed-by: Liming Gao 

> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Friday, May 13, 2016 5:51 PM
> To: edk2-devel-01 
> Cc: Ard Biesheuvel ; Dong, Eric
> ; Gerd Hoffmann ; Gao, Liming
> 
> Subject: [PATCH 0/2] Fix GCC build failures introduced with a85be3ae48a8
> 
> ... namely "BootMaintenanceManagerUiLib: change code for customization."
> 
> The first patch fixes a trivial issue.
> 
> The second patch fixes a genuine bug.
> 
> I'm CC'ing Ard on the blurb and the second patch only so he can see his
> work pay off; I'm not expecting a review from him.
> 
> The build failures were reported by Gerd's Jenkins CI.
> 
> Cc: Ard Biesheuvel 
> Cc: Eric Dong 
> Cc: Gerd Hoffmann 
> Cc: Liming Gao 
> 
> Thanks
> Laszlo
> 
> Laszlo Ersek (2):
>   MdeModulePkg/BootMaintenanceManagerUiLib: remove unused but set
> variable
>   MdeModulePkg/BootMaintenanceManagerUiLib: hide library-internal
> symbol
> 
> 
> MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance
> ManagerCustomizedUiSupport.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> --
> 1.8.3.1

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


Re: [edk2] [PATCH] MdePkg: remove Libray references from code base

2016-05-15 Thread Gao, Liming
Reviewed-by: Liming Gao 

From: Michael Zimmermann [mailto:sigmaepsilo...@gmail.com]
Sent: Sunday, May 15, 2016 3:18 PM
To: edk2-devel@lists.01.org ; Kinney, Michael D 
; Gao, Liming 
Subject: [edk2] [PATCH] MdePkg: remove Libray references from code base

as reported on github:
https://github.com/tianocore/edk2/issues/79

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Zimmermann 
mailto:sigmaepsilo...@gmail.com>>
---
 .../PeiDxePostCodeLibReportStatusCode.inf | 4 ++--
 .../PeiDxePostCodeLibReportStatusCode.uni | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.inf
 
b/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.inf
index 68854ae..dc162c2 100644
--- 
a/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.inf
+++ 
b/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.inf
@@ -1,7 +1,7 @@
 ## @file
-# Instance of Post Code Library based on Report Status Code Libray.
+# Instance of Post Code Library based on Report Status Code Library.
 #
-# Post Code Library that layers on top of a Report Status Code Libray instance.
+# Post Code Library that layers on top of a Report Status Code Library 
instance.
 #
 # Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
 #
diff --git 
a/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.uni
 
b/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.uni
index fe73719..165f27f 100644
--- 
a/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.uni
+++ 
b/MdePkg/Library/PeiDxePostCodeLibReportStatusCode/PeiDxePostCodeLibReportStatusCode.uni
@@ -1,7 +1,7 @@
 // /** @file
-// Instance of Post Code Library based on Report Status Code Libray.
+// Instance of Post Code Library based on Report Status Code Library.
 //
-// Post Code Library that layers on top of a Report Status Code Libray 
instance.
+// Post Code Library that layers on top of a Report Status Code Library 
instance.
 //
 // Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
 //
--
2.8.2

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


Re: [edk2] [Patch 0/3] Fix BTS feature check issue

2016-05-15 Thread Yao, Jiewen
Reviewed-by: jiewen@intel.com

From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Laszlo 
Ersek
Sent: Friday, May 13, 2016 5:15 PM
To: Kinney, Michael D ; edk2-de...@ml01.01.org
Subject: Re: [edk2] [Patch 0/3] Fix BTS feature check issue

On 05/13/16 03:42, Michael Kinney wrote:
> This patch series
> * Fixes a logic bug checking that BTS feature status.
> * Removes some unnecessary BST MSRs.
> * Adds use of the Msr.h file and uses MSR definitions from Msr.h
>   to test/save/restore MSR register values for the BTS and XD features.
>
> Jeff Fan (3):
>   UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile: Fix BTS support check bug
>   UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile: Remove unnecessary BTS MSRs
>   UefiCpuPkg/PiSmmCpuDxeSmm: Use public MSR_IA32_MISC_ENABLE definition
>
>  UefiCpuPkg/PiSmmCpuDxeSmm/MpService.c  | 25 +++--
>  UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h |  3 ++-
>  UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c | 13 ++---
>  UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.h |  6 --
>  UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h |  5 +
>  5 files changed, 24 insertions(+), 28 deletions(-)
>

I did my usual regression tests for this, with my long-term Q35 OVMF
guests (Ia32 Fedora, Ia32X64 Fedora, Ia32X64 Windows 8.1).

Regression-tested-by: Laszlo Ersek mailto:ler...@redhat.com>>
___
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] [BaseTools] Does PACKAGES_PATH support !include ?

2016-05-15 Thread Gao, Liming
Andrew:
  I add the case to !include StdLib/StdLib.inc in Nt32Pkg.dsc, and I configure 
PACKAGES_PATH. It can build pass. There is no error. Here is my tree layout. 
Could you share your tree layout that expose this issue?

Root
-->edk2-BaseTools-win32
-->edk2
-->Conf
-->Build

set WORKSPACE=ROOT
set PACKAGES_PATH=Root\edk2
set edk-tools-bin=Root\edk2-BaseTools-win32

edksetup.bat --nt32
build -p Nt32Pkg\Nt32Pkg.dsc -a IA32 -t VS2015x86

Thanks
Liming
> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Andrew Fish
> Sent: Saturday, May 14, 2016 6:42 AM
> To: edk2-devel 
> Subject: [edk2] [BaseTools] Does PACKAGES_PATH support !include ?
> 
> I was looking into using PACKAGES_PATH in our Tree and it seems to fail on
> a !include statement in DSC files that depend on PACKAGES_PATH.
> 
> I'm not sure how to fix it as the error is coming from PathClass::Validate in
> code that is using that as a probe to try the workspace.
> 
> BaseTools/Source/Python/Workspace/MetaFileParser.py
> IncludedFile = NormPath(ReplaceMacro(self._ValueList[1],
> __IncludeMacros, RaiseError=True))
> #
> # First search the include file under the same directory as DSC 
> file
> #
> IncludedFile1 = PathClass(IncludedFile, self.MetaFile.Dir)
> ErrorCode, ErrorInfo1 = IncludedFile1.Validate()
> if ErrorCode != 0:
> #
> # Also search file under the WORKSPACE directory
> #
> IncludedFile1 = PathClass(IncludedFile, GlobalData.gWorkspace)
> ErrorCode, ErrorInfo2 = IncludedFile1.Validate()
> if ErrorCode != 0:
> EdkLogger.error('parser', ErrorCode, 
> File=self._FileWithError,
> Line=self._LineIndex + 1, 
> ExtraData=ErrorInfo1 + "\n" +
> ErrorInfo2)
> 
> Should invoking PathClass() abstract the PACKAGES_PATH? I see it calling
> mws.getWs()?
> 
> It looks like the PathClass() is invoked like (FYI /Volumes/Case/edk2-
> git/edk2/StdLib/StdLib.inc):
> PathClass self.Root = /Volumes/Case/edk2-git/Vendor/X/XPkg self.File =
> StdLib/StdLib.inc
> 
> getWs() Ws=/Volumes/Case/Janus/Vendor/X/XPkg Path=StdLib/StdLib.inc
> getWs() /Volumes/Case/edk2-git/Vendor/X/XPkg
> 
> For a test case you can shift to an edk2/ and then try to include StdLib.inc.
> !include StdLib/StdLib.inc
> 
> Thanks,
> 
> Andrew Fish
> ___
> 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] add '!include' support to tools_def.txt parser

2016-05-15 Thread Gao, Liming
Does it support the relative path? 

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Michael Zimmermann
> Sent: Saturday, May 14, 2016 5:49 PM
> To: edk2-devel@lists.01.org 
> Subject: [edk2] [PATCH 0/2] add '!include' support to tools_def.txt parser
> 
> this is a response to this github issue:
> https://github.com/tianocore/edk2/issues/77
> 
> this patch just adds !include support to tools_def.txt like it's supported
> for FDF and DSC files already.
> 
> the split of the current tools_def.txt into multiple per-toolchain files
> can be done in another patch.
> 
> Thanks
> Michael
> 
> Michael Zimmermann (2):
>   BaseTools: fix incorrect documentation about return value of
> 'LoadToolDefFile'
>   BaseTools: add '!include' support to tools_def.txt parser
> 
>  BaseTools/Source/Python/Common/ToolDefClassObject.py | 51
> +--
>  1 file changed, 33 insertions(+), 18 deletions(-)
> --
> 2.8.2
> ___
> 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] Fix GCC build failures introduced with a85be3ae48a8

2016-05-15 Thread Dong, Eric
Reviewed-by: Eric Dong 

> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Friday, May 13, 2016 5:51 PM
> To: edk2-devel-01
> Cc: Ard Biesheuvel; Dong, Eric; Gerd Hoffmann; Gao, Liming
> Subject: [PATCH 0/2] Fix GCC build failures introduced with a85be3ae48a8
> 
> ... namely "BootMaintenanceManagerUiLib: change code for customization."
> 
> The first patch fixes a trivial issue.
> 
> The second patch fixes a genuine bug.
> 
> I'm CC'ing Ard on the blurb and the second patch only so he can see his
> work pay off; I'm not expecting a review from him.
> 
> The build failures were reported by Gerd's Jenkins CI.
> 
> Cc: Ard Biesheuvel 
> Cc: Eric Dong 
> Cc: Gerd Hoffmann 
> Cc: Liming Gao 
> 
> Thanks
> Laszlo
> 
> Laszlo Ersek (2):
>   MdeModulePkg/BootMaintenanceManagerUiLib: remove unused but set
> variable
>   MdeModulePkg/BootMaintenanceManagerUiLib: hide library-internal symbol
> 
>  
> MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c
>  | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> --
> 1.8.3.1

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


[edk2] [Patch] MdeModulePkg: Refine the code for DxeHttpLib

2016-05-15 Thread Jiaxin Wu
Cc: Ye Ting 
Cc: Fu Siyuan 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu 
---
 MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c 
b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
index 46f035a..727cc42 100644
--- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
+++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
@@ -1671,15 +1671,17 @@ HttpGenRequestMessage (
   EFI_HTTP_UTILITIES_PROTOCOL  *HttpUtilitiesProtocol;
 
 
   ASSERT (Message != NULL);
 
-  *RequestMsg = NULL;
-  MsgSize = 0;
-  Success = FALSE;
-  HttpHdr = NULL;
-  AppendList = NULL;
+  *RequestMsg   = NULL;
+  Status= EFI_SUCCESS;
+  HttpHdrSize   = 0;
+  MsgSize   = 0;
+  Success   = FALSE;
+  HttpHdr   = NULL;
+  AppendList= NULL;
   HttpUtilitiesProtocol = NULL;
 
   //
   // 1. If we have a Request, we cannot have a NULL Url
   // 2. If we have a Request, HeaderCount can not be non-zero
-- 
1.9.5.msysgit.1

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


Re: [edk2] [BaseTools] Does PACKAGES_PATH support !include ?

2016-05-15 Thread Andrew Fish

> On May 15, 2016, at 7:24 PM, Gao, Liming  wrote:
> 
> Andrew:
>  I add the case to !include StdLib/StdLib.inc in Nt32Pkg.dsc, and I configure 
> PACKAGES_PATH. It can build pass. There is no error. Here is my tree layout. 
> Could you share your tree layout that expose this issue?
> 
> Root
> -->edk2-BaseTools-win32
> -->edk2
> -->Conf
> -->Build
> 

The DSC file that was including, that failed,  was also in an alternate path. 

So try moving things in parts. Move the Nt32 to one PACKAGE_PATH and the StdLib 
to another. 

Thanks,

Andrew Fish

> set WORKSPACE=ROOT
> set PACKAGES_PATH=Root\edk2
> set edk-tools-bin=Root\edk2-BaseTools-win32
> 
> edksetup.bat --nt32
> build -p Nt32Pkg\Nt32Pkg.dsc -a IA32 -t VS2015x86
> 
> Thanks
> Liming
>> -Original Message-
>> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
>> Andrew Fish
>> Sent: Saturday, May 14, 2016 6:42 AM
>> To: edk2-devel 
>> Subject: [edk2] [BaseTools] Does PACKAGES_PATH support !include ?
>> 
>> I was looking into using PACKAGES_PATH in our Tree and it seems to fail on
>> a !include statement in DSC files that depend on PACKAGES_PATH.
>> 
>> I'm not sure how to fix it as the error is coming from PathClass::Validate in
>> code that is using that as a probe to try the workspace.
>> 
>> BaseTools/Source/Python/Workspace/MetaFileParser.py
>>IncludedFile = NormPath(ReplaceMacro(self._ValueList[1],
>> __IncludeMacros, RaiseError=True))
>>#
>># First search the include file under the same directory as DSC 
>> file
>>#
>>IncludedFile1 = PathClass(IncludedFile, self.MetaFile.Dir)
>>ErrorCode, ErrorInfo1 = IncludedFile1.Validate()
>>if ErrorCode != 0:
>>#
>># Also search file under the WORKSPACE directory
>>#
>>IncludedFile1 = PathClass(IncludedFile, GlobalData.gWorkspace)
>>ErrorCode, ErrorInfo2 = IncludedFile1.Validate()
>>if ErrorCode != 0:
>>EdkLogger.error('parser', ErrorCode, 
>> File=self._FileWithError,
>>Line=self._LineIndex + 1, 
>> ExtraData=ErrorInfo1 + "\n" +
>> ErrorInfo2)
>> 
>> Should invoking PathClass() abstract the PACKAGES_PATH? I see it calling
>> mws.getWs()?
>> 
>> It looks like the PathClass() is invoked like (FYI /Volumes/Case/edk2-
>> git/edk2/StdLib/StdLib.inc):
>> PathClass self.Root = /Volumes/Case/edk2-git/Vendor/X/XPkg self.File =
>> StdLib/StdLib.inc
>> 
>> getWs() Ws=/Volumes/Case/Janus/Vendor/X/XPkg Path=StdLib/StdLib.inc
>> getWs() /Volumes/Case/edk2-git/Vendor/X/XPkg
>> 
>> For a test case you can shift to an edk2/ and then try to include StdLib.inc.
>> !include StdLib/StdLib.inc
>> 
>> Thanks,
>> 
>> Andrew Fish
>> ___
>> 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 1/2] BootMaintenanceManagerUiLib: make gHiiDriverList STATIC

2016-05-15 Thread Gary Lin
Make gHiiDriverList STATIC to avoid conflicting with the other
gHiiDriverList in MdeModulePkg/UiApp so that the linker won't
complain multiple definition of `gHiiDriverList'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin 
---
 .../BootMaintenanceManagerCustomizedUiSupport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c
 
b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c
index b32cbdb..55cf713 100644
--- 
a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c
+++ 
b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c
@@ -26,7 +26,7 @@ typedef struct {
   BOOLEAN EmptyLineAfter;
 } UI_HII_DRIVER_INSTANCE;
 
-UI_HII_DRIVER_INSTANCE   *gHiiDriverList;
+STATIC UI_HII_DRIVER_INSTANCE   *gHiiDriverList;
 
 
 /**
-- 
2.8.2

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


[edk2] [PATCH 2/2] MdeModulePkg UiApp: make gHiiDriverList STATIC

2016-05-15 Thread Gary Lin
Make gHiiDriverList STATIC to avoid conflicting with the other
gHiiDriverList in BootMaintenanceManagerUiLib so that the linker
won't complain multiple definition of `gHiiDriverList'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin 
---
 MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c 
b/MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c
index 80450a5..1affbe0 100644
--- a/MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c
+++ b/MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c
@@ -52,10 +52,10 @@ typedef struct {
   BOOLEAN EmptyLineAfter;
 } UI_HII_DRIVER_INSTANCE;
 
-CHAR8*gLanguageString;
-EFI_STRING_ID*gLanguageToken;
-UI_HII_DRIVER_INSTANCE   *gHiiDriverList;
-EFI_HII_HANDLE   gHiiHandle;
+CHAR8   *gLanguageString;
+EFI_STRING_ID   *gLanguageToken;
+STATIC UI_HII_DRIVER_INSTANCE   *gHiiDriverList;
+EFI_HII_HANDLE  gHiiHandle;
 
 
 /**
-- 
2.8.2

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


Re: [edk2] [PATCH 1/2] BootMaintenanceManagerUiLib: make gHiiDriverList STATIC

2016-05-15 Thread Gary Lin
On Mon, May 16, 2016 at 12:24:26PM +0800, Gary Lin wrote:
> Make gHiiDriverList STATIC to avoid conflicting with the other
> gHiiDriverList in MdeModulePkg/UiApp so that the linker won't
> complain multiple definition of `gHiiDriverList'.
> 
I just found Laszlo already sent the fixes.
Please ignore my patches.

Thanks,

Gary Lin

> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Gary Lin 
> ---
>  .../BootMaintenanceManagerCustomizedUiSupport.c | 2 
> +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git 
> a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c
>  
> b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c
> index b32cbdb..55cf713 100644
> --- 
> a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c
> +++ 
> b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c
> @@ -26,7 +26,7 @@ typedef struct {
>BOOLEAN EmptyLineAfter;
>  } UI_HII_DRIVER_INSTANCE;
>  
> -UI_HII_DRIVER_INSTANCE   *gHiiDriverList;
> +STATIC UI_HII_DRIVER_INSTANCE   *gHiiDriverList;
>  
>  
>  /**
> -- 
> 2.8.2
> 
> ___
> 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: Refine the code for DxeHttpLib

2016-05-15 Thread Gao, Liming
Reviewed-by: Liming Gao 

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Jiaxin Wu
> Sent: Monday, May 16, 2016 11:47 AM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Fu, Siyuan 
> Subject: [edk2] [Patch] MdeModulePkg: Refine the code for DxeHttpLib
> 
> Cc: Ye Ting 
> Cc: Fu Siyuan 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiaxin Wu 
> ---
>  MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c | 12 +++-
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
> b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
> index 46f035a..727cc42 100644
> --- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
> +++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c
> @@ -1671,15 +1671,17 @@ HttpGenRequestMessage (
>EFI_HTTP_UTILITIES_PROTOCOL  *HttpUtilitiesProtocol;
> 
> 
>ASSERT (Message != NULL);
> 
> -  *RequestMsg = NULL;
> -  MsgSize = 0;
> -  Success = FALSE;
> -  HttpHdr = NULL;
> -  AppendList = NULL;
> +  *RequestMsg   = NULL;
> +  Status= EFI_SUCCESS;
> +  HttpHdrSize   = 0;
> +  MsgSize   = 0;
> +  Success   = FALSE;
> +  HttpHdr   = NULL;
> +  AppendList= NULL;
>HttpUtilitiesProtocol = NULL;
> 
>//
>// 1. If we have a Request, we cannot have a NULL Url
>// 2. If we have a Request, HeaderCount can not be non-zero
> --
> 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] BaseTools: Add HII definitions from UEFI 2.6

2016-05-15 Thread Zhu, Yonghong
Hi Samer,

I will remove the Trailing whitespace and push this patch.

Best Regards,
Zhu Yonghong


-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Bi, 
Dandan
Sent: Thursday, May 12, 2016 11:27 AM
To: Samer El-Haj-Mahmoud ; edk2-devel@lists.01.org
Cc: Samer El-Haj-Mahmoud ; Gao, Liming 
Subject: Re: [edk2] [PATCH] BaseTools: Add HII definitions from UEFI 2.6

A minor comment:
There are some whitespace in the line " typedef struct _EFI_HII_IIBT_PNG_BLOCK 
{  " and the line below " (C) Copyright 2016 Hewlett Packard Enterprise 
Development LP ".
Please remove them when commit the patch. You can use the patch check tool 
(BaseTools\Scripts\PatchCheck.py) to check the patch.

Others are good to me.
Reviewed-by: Dandan Bi 

Thanks,
Dandan

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Samer 
El-Haj-Mahmoud
Sent: Thursday, May 12, 2016 4:29 AM
To: edk2-devel@lists.01.org
Cc: Samer El-Haj-Mahmoud ; Gao, Liming 
Subject: [edk2] [PATCH] BaseTools: Add HII definitions from UEFI 2.6

Add HII definitions from UEFI 2.6 for HII Image Variability and PNG Blocks

Cc: Yonghong Zhu 
Cc: Liming Gao 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud 
---
 .../Common/UefiInternalFormRepresentation.h| 24 ++
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h 
b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
index 8c2edf2..4b585fd 100644
--- a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
+++ b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
@@ -3,11 +3,9 @@
   IFR is primarily consumed by the EFI presentation engine, and produced by EFI
   internal application and drivers as well as all add-in card option-ROM 
drivers
 
-  @par Revision Reference:
-  These definitions are from UEFI2.1.
-
   Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
-
+ (C) Copyright 2016 Hewlett Packard Enterprise Development LP
+ 
   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 @@ -16,6 +14,9 @@
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
+  @par Revision Reference:
+  These definitions are from UEFI 2.6
+
 **/
 
 #ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__
@@ -167,6 +168,7 @@ typedef struct _EFI_HII_FONT_PACKAGE_HDR {
 #define EFI_HII_GIBT_GLYPHS   0x11
 #define EFI_HII_GIBT_GLYPH_DEFAULT0x12
 #define EFI_HII_GIBT_GLYPHS_DEFAULT   0x13
+#define EFI_HII_GIBT_GLYPH_VARIABILITY0x14
 #define EFI_HII_GIBT_DUPLICATE0x20
 #define EFI_HII_GIBT_SKIP20x21
 #define EFI_HII_GIBT_SKIP10x22
@@ -235,6 +237,13 @@ typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK {
   UINT8  BitmapData[1]; // the number of bytes per bitmap can 
be calculated by ((Global.Cell.Width+7)/8)*Global.Cell.Height
 } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK;
 
+typedef struct _EFI_HII_GIBT_VARIABILITY_BLOCK {
+  EFI_HII_GLYPH_BLOCKHeader;
+  EFI_HII_GLYPH_INFO Cell;
+  UINT8  GlyphPackInBits;
+  UINT8  BitmapData [1];
+} EFI_HII_GIBT_VARIABILITY_BLOCK;
+
 typedef struct _EFI_HII_GIBT_SKIP1_BLOCK {
   EFI_HII_GLYPH_BLOCKHeader;
   UINT8  SkipCount;
@@ -416,6 +425,7 @@ typedef struct _EFI_HII_IMAGE_BLOCK {
 #define EFI_HII_IIBT_IMAGE_24BIT   0x16
 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
 #define EFI_HII_IIBT_IMAGE_JPEG0x18
+#define EFI_HII_IIBT_IMAGE_PNG 0x19
 #define EFI_HII_IIBT_DUPLICATE 0x20
 #define EFI_HII_IIBT_SKIP2 0x21
 #define EFI_HII_IIBT_SKIP1 0x22
@@ -532,6 +542,12 @@ typedef struct _EFI_HII_IIBT_JPEG_BLOCK {
   UINT8Data[1];
 } EFI_HII_IIBT_JPEG_BLOCK;
 
+typedef struct _EFI_HII_IIBT_PNG_BLOCK {
+  EFI_HII_IMAGE_BLOCK  Header;
+  UINT32   Size;
+  UINT8Data[1];
+} EFI_HII_IIBT_PNG_BLOCK;
+
 typedef struct _EFI_HII_IIBT_SKIP1_BLOCK {
   EFI_HII_IMAGE_BLOCK  Header;
   UINT8SkipCount;
--
2.6.3.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-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/2] add '!include' support to tools_def.txt parser

2016-05-15 Thread Michael Zimmermann
I guess you mean relative to the currently parsed file?
It doesn't, I'll make a new patch with support for that.

On Mon, May 16, 2016 at 4:30 AM, Gao, Liming  wrote:

> Does it support the relative path?
>
> > -Original Message-
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> > Michael Zimmermann
> > Sent: Saturday, May 14, 2016 5:49 PM
> > To: edk2-devel@lists.01.org 
> > Subject: [edk2] [PATCH 0/2] add '!include' support to tools_def.txt
> parser
> >
> > this is a response to this github issue:
> > https://github.com/tianocore/edk2/issues/77
> >
> > this patch just adds !include support to tools_def.txt like it's
> supported
> > for FDF and DSC files already.
> >
> > the split of the current tools_def.txt into multiple per-toolchain files
> > can be done in another patch.
> >
> > Thanks
> > Michael
> >
> > Michael Zimmermann (2):
> >   BaseTools: fix incorrect documentation about return value of
> > 'LoadToolDefFile'
> >   BaseTools: add '!include' support to tools_def.txt parser
> >
> >  BaseTools/Source/Python/Common/ToolDefClassObject.py | 51
> > +--
> >  1 file changed, 33 insertions(+), 18 deletions(-)
> > --
> > 2.8.2
> > ___
> > 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] add '!include' support to tools_def.txt parser

2016-05-15 Thread Gao, Liming
Michael:
  In DSC/FDF, if the file path is relative, Build tool will find it from 
$(WORKSPACE) and $(PACKAGES_PATH). I expect the same way is in tools_def.txt 
file. 

Thanks
Liming
> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Michael Zimmermann
> Sent: Monday, May 16, 2016 2:00 PM
> To: Gao, Liming 
> Cc: edk2-devel@lists.01.org 
> Subject: Re: [edk2] [PATCH 0/2] add '!include' support to tools_def.txt parser
> 
> I guess you mean relative to the currently parsed file?
> It doesn't, I'll make a new patch with support for that.
> 
> On Mon, May 16, 2016 at 4:30 AM, Gao, Liming 
> wrote:
> 
> > Does it support the relative path?
> >
> > > -Original Message-
> > > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> > > Michael Zimmermann
> > > Sent: Saturday, May 14, 2016 5:49 PM
> > > To: edk2-devel@lists.01.org 
> > > Subject: [edk2] [PATCH 0/2] add '!include' support to tools_def.txt
> > parser
> > >
> > > this is a response to this github issue:
> > > https://github.com/tianocore/edk2/issues/77
> > >
> > > this patch just adds !include support to tools_def.txt like it's
> > supported
> > > for FDF and DSC files already.
> > >
> > > the split of the current tools_def.txt into multiple per-toolchain files
> > > can be done in another patch.
> > >
> > > Thanks
> > > Michael
> > >
> > > Michael Zimmermann (2):
> > >   BaseTools: fix incorrect documentation about return value of
> > > 'LoadToolDefFile'
> > >   BaseTools: add '!include' support to tools_def.txt parser
> > >
> > >  BaseTools/Source/Python/Common/ToolDefClassObject.py | 51
> > > +--
> > >  1 file changed, 33 insertions(+), 18 deletions(-)
> > > --
> > > 2.8.2
> > > ___
> > > 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] [BaseTools] Does PACKAGES_PATH support !include ?

2016-05-15 Thread Gao, Liming
Andrew:
  I change the tree layout to the below. It can still pass build. 

Root
-->edk2-BaseTools-win32
-->edk2
->Nt32Pkg
-->other
->StdLib
-->Conf
-->Build

set PACKAGES_PATH=Root\edk2;Root\other

Thanks
Liming
> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Andrew Fish
> Sent: Monday, May 16, 2016 12:00 PM
> To: Gao, Liming 
> Cc: edk2-devel 
> Subject: Re: [edk2] [BaseTools] Does PACKAGES_PATH support !include ?
> 
> 
> > On May 15, 2016, at 7:24 PM, Gao, Liming  wrote:
> >
> > Andrew:
> >  I add the case to !include StdLib/StdLib.inc in Nt32Pkg.dsc, and I 
> > configure
> PACKAGES_PATH. It can build pass. There is no error. Here is my tree layout.
> Could you share your tree layout that expose this issue?
> >
> > Root
> > -->edk2-BaseTools-win32
> > -->edk2
> > -->Conf
> > -->Build
> >
> 
> The DSC file that was including, that failed,  was also in an alternate path.
> 
> So try moving things in parts. Move the Nt32 to one PACKAGE_PATH and the
> StdLib to another.
> 
> Thanks,
> 
> Andrew Fish
> 
> > set WORKSPACE=ROOT
> > set PACKAGES_PATH=Root\edk2
> > set edk-tools-bin=Root\edk2-BaseTools-win32
> >
> > edksetup.bat --nt32
> > build -p Nt32Pkg\Nt32Pkg.dsc -a IA32 -t VS2015x86
> >
> > Thanks
> > Liming
> >> -Original Message-
> >> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> >> Andrew Fish
> >> Sent: Saturday, May 14, 2016 6:42 AM
> >> To: edk2-devel 
> >> Subject: [edk2] [BaseTools] Does PACKAGES_PATH support !include ?
> >>
> >> I was looking into using PACKAGES_PATH in our Tree and it seems to fail
> on
> >> a !include statement in DSC files that depend on PACKAGES_PATH.
> >>
> >> I'm not sure how to fix it as the error is coming from PathClass::Validate 
> >> in
> >> code that is using that as a probe to try the workspace.
> >>
> >> BaseTools/Source/Python/Workspace/MetaFileParser.py
> >>IncludedFile = NormPath(ReplaceMacro(self._ValueList[1],
> >> __IncludeMacros, RaiseError=True))
> >>#
> >># First search the include file under the same directory as DSC 
> >> file
> >>#
> >>IncludedFile1 = PathClass(IncludedFile, self.MetaFile.Dir)
> >>ErrorCode, ErrorInfo1 = IncludedFile1.Validate()
> >>if ErrorCode != 0:
> >>#
> >># Also search file under the WORKSPACE directory
> >>#
> >>IncludedFile1 = PathClass(IncludedFile, 
> >> GlobalData.gWorkspace)
> >>ErrorCode, ErrorInfo2 = IncludedFile1.Validate()
> >>if ErrorCode != 0:
> >>EdkLogger.error('parser', ErrorCode, 
> >> File=self._FileWithError,
> >>Line=self._LineIndex + 1, 
> >> ExtraData=ErrorInfo1 + "\n" +
> >> ErrorInfo2)
> >>
> >> Should invoking PathClass() abstract the PACKAGES_PATH? I see it calling
> >> mws.getWs()?
> >>
> >> It looks like the PathClass() is invoked like (FYI /Volumes/Case/edk2-
> >> git/edk2/StdLib/StdLib.inc):
> >> PathClass self.Root = /Volumes/Case/edk2-git/Vendor/X/XPkg self.File =
> >> StdLib/StdLib.inc
> >>
> >> getWs() Ws=/Volumes/Case/Janus/Vendor/X/XPkg
> Path=StdLib/StdLib.inc
> >> getWs() /Volumes/Case/edk2-git/Vendor/X/XPkg
> >>
> >> For a test case you can shift to an edk2/ and then try to include 
> >> StdLib.inc.
> >> !include StdLib/StdLib.inc
> >>
> >> Thanks,
> >>
> >> Andrew Fish
> >> ___
> >> 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