[edk2] [PATCH] CryptoPkg/OpensslLib: upgrade to openssl-1.0.2e

2015-12-04 Thread Ard Biesheuvel
Upstream OpenSSL has released version 1.0.2e with security fixes, and has pulled
the previous version from the download servers. So upgrade our OpensslLib glue
from 1.0.2d to 1.0.2e.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel 
---
 CryptoPkg/Library/OpensslLib/{EDKII_openssl-1.0.2d.patch => 
EDKII_openssl-1.0.2e.patch} | 18 +++---
 CryptoPkg/Library/OpensslLib/Install.cmd   
 |  2 +-
 CryptoPkg/Library/OpensslLib/Install.sh
 |  2 +-
 CryptoPkg/Library/OpensslLib/OpensslLib.inf
 |  2 +-
 CryptoPkg/Library/OpensslLib/Patch-HOWTO.txt   
 | 26 ++--
 5 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2d.patch 
b/CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2e.patch
similarity index 95%
rename from CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2d.patch
rename to CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2e.patch
index 6be397b8b959..e4a85bf95df3 100644
--- a/CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2d.patch
+++ b/CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2e.patch
@@ -16,7 +16,7 @@ diff U3 crypto/bio/bio.h crypto/bio/bio.h
 diff U3 crypto/bio/bss_file.c crypto/bio/bss_file.c
 --- crypto/bio/bss_file.c  Thu Jun 11 21:01:06 2015
 +++ crypto/bio/bss_file.c  Fri Jun 12 11:01:28 2015
-@@ -460,6 +460,23 @@
+@@ -467,6 +467,23 @@
  return (ret);
  }
  
@@ -83,9 +83,9 @@ diff U3 crypto/pkcs7/pk7_smime.c crypto/pkcs7/pk7_smime.c
 +char *buf = NULL;
 +int bufsiz;
  int i, j = 0, k, ret = 0;
- BIO *p7bio;
- BIO *tmpin, *tmpout;
-@@ -365,9 +366,14 @@
+ BIO *p7bio = NULL;
+ BIO *tmpin = NULL, *tmpout = NULL;
+@@ -355,9 +356,14 @@
  } else
  tmpout = out;
  
@@ -101,17 +101,17 @@ diff U3 crypto/pkcs7/pk7_smime.c crypto/pkcs7/pk7_smime.c
  if (i <= 0)
  break;
  if (tmpout)
-@@ -406,6 +412,10 @@
+@@ -394,6 +400,10 @@
+ }
  BIO_free_all(p7bio);
- 
  sk_X509_free(signers);
 +
 +if (buf != NULL) {
 +  OPENSSL_free(buf);
 +}
- 
  return ret;
  }
+ 
 diff U3 crypto/rand/rand_unix.c crypto/rand/rand_unix.c
 --- crypto/rand/rand_unix.cThu Jun 11 21:01:06 2015
 +++ crypto/rand/rand_unix.cFri Jun 12 10:51:21 2015
@@ -210,7 +210,7 @@ diff U3 crypto/rsa/rsa_ameth.c crypto/rsa/rsa_ameth.c
 diff U3 crypto/x509/x509_vfy.c crypto/x509/x509_vfy.c
 --- crypto/x509/x509_vfy.c Thu Jun 11 21:52:58 2015
 +++ crypto/x509/x509_vfy.c Fri Jun 12 11:29:37 2015
-@@ -935,6 +935,8 @@
+@@ -940,6 +940,8 @@
  ctx->current_crl = crl;
  if (ctx->param->flags & X509_V_FLAG_USE_CHECK_TIME)
  ptime = &ctx->param->check_time;
@@ -219,7 +219,7 @@ diff U3 crypto/x509/x509_vfy.c crypto/x509/x509_vfy.c
  else
  ptime = NULL;
  
-@@ -1658,6 +1660,8 @@
+@@ -1663,6 +1665,8 @@
  
  if (ctx->param->flags & X509_V_FLAG_USE_CHECK_TIME)
  ptime = &ctx->param->check_time;
diff --git a/CryptoPkg/Library/OpensslLib/Install.cmd 
b/CryptoPkg/Library/OpensslLib/Install.cmd
index ef0a4bdcebc9..b9b6fc6f7094 100755
--- a/CryptoPkg/Library/OpensslLib/Install.cmd
+++ b/CryptoPkg/Library/OpensslLib/Install.cmd
@@ -1,4 +1,4 @@
-cd openssl-1.0.2d
+cd openssl-1.0.2e
 copy e_os2.h..\..\..\Include\openssl
 copy crypto\crypto.h..\..\..\Include\openssl
 copy crypto\opensslv.h  ..\..\..\Include\openssl
diff --git a/CryptoPkg/Library/OpensslLib/Install.sh 
b/CryptoPkg/Library/OpensslLib/Install.sh
index 877e775b81af..543439529448 100755
--- a/CryptoPkg/Library/OpensslLib/Install.sh
+++ b/CryptoPkg/Library/OpensslLib/Install.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-cd openssl-1.0.2d
+cd openssl-1.0.2e
 cp e_os2.h../../../Include/openssl
 cp crypto/crypto.h../../../Include/openssl
 cp crypto/opensslv.h  ../../../Include/openssl
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf 
b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
index a6d511e83922..a1dcc3257fa8 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
@@ -20,7 +20,7 @@ [Defines]
   MODULE_TYPE= BASE
   VERSION_STRING = 1.0
   LIBRARY_CLASS  = OpensslLib
-  DEFINE OPENSSL_PATH= openssl-1.0.2d
+  DEFINE OPENSSL_PATH= openssl-1.0.2e
   DEFINE OPENSSL_FLAGS   = -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRINT 
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
 
 #
diff --git a/CryptoPkg/Library/OpensslLib/Patch-HOWTO.txt 
b/CryptoPkg/Library/OpensslLib/Patch-HOWTO.txt
index 59e74ee9b0d9..f575d7147bdf 100644
--- a/CryptoPkg/Library/OpensslLib/Patch-HOWTO.txt
+++ b/CryptoPkg/Library/OpensslLib/Patch-HOWTO.txt
@@ -17,36 +17,36 @@ cryptography. This patch will enab

Re: [edk2] [PATCH] BaseTools GCC: avoid the use of COMMON symbols

2015-12-04 Thread Gao, Liming
Good fix. How do you find this issue? 

Reviewed-by: Liming Gao 

-Original Message-
From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] 
Sent: Thursday, December 03, 2015 8:54 PM
To: edk2-devel@lists.01.org; Justen, Jordan L; Gao, Liming; Zhu, Yonghong
Cc: Ard Biesheuvel
Subject: [PATCH] BaseTools GCC: avoid the use of COMMON symbols

The default behavior of the GCC compiler is to emit uninitialized globals into 
a COMMON section, where duplicate definitions are merged.
This may result in unexpected behavior, since global variables appearing by the 
same name in different C files typically do not refer to the same conceptual 
data item.

For instance, the definitions of EFI_EVENT mVirtualAddressChangeEvent in that 
appear in the following files:

  CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c
  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c

will be folded into a single instance of the variable when the latter module 
includes the former library, which can lead to unexpected results.

So prevent GCC from emitting variables into the COMMON section, by passing 
-fno-common to the compiler, and discarding the COMMON section in the GNU ld 
linker script.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel 
---

NOTE: this patch will result in build failures until we fix the code to make
  at least some instances of mVirtualAddressChangeEvent STATIC

 BaseTools/Conf/tools_def.template | 2 +-
 BaseTools/Scripts/GccBase.lds | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index 564d1336650c..2216e747c02d 100644
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -4318,7 +4318,7 @@ NOOPT_DDK3790xASL_IPF_DLINK_FLAGS= /NOLOGO 
/NODEFAULTLIB /LTCG /DLL /OPT:REF
 DEBUG_*_*_OBJCOPY_ADDDEBUGFLAG = 
--add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_NAME).debug
 RELEASE_*_*_OBJCOPY_ADDDEBUGFLAG   =
 
-DEFINE GCC_ALL_CC_FLAGS= -g -Os -fshort-wchar -fno-strict-aliasing 
-Wall -Werror -Wno-array-bounds -c -include AutoGen.h
+DEFINE GCC_ALL_CC_FLAGS= -g -Os -fshort-wchar -fno-strict-aliasing 
-Wall -Werror -Wno-array-bounds -c -include AutoGen.h -fno-common
 DEFINE GCC_IA32_CC_FLAGS   = DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double 
-freorder-blocks -freorder-blocks-and-partition -O2 -mno-stack-arg-probe
 DEFINE GCC_X64_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) -mno-red-zone 
-Wno-address -mno-stack-arg-probe
 DEFINE GCC_IPF_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) 
-minline-int-divide-min-latency
diff --git a/BaseTools/Scripts/GccBase.lds b/BaseTools/Scripts/GccBase.lds 
index 4ee6d998532c..32310bc75dcc 100644
--- a/BaseTools/Scripts/GccBase.lds
+++ b/BaseTools/Scripts/GccBase.lds
@@ -46,7 +46,7 @@ SECTIONS {
*/
   .data ALIGN(ALIGNOF(.text)) : ALIGN(CONSTANT(COMMONPAGESIZE)) {
 *(.data .data.* .gnu.linkonce.d.*)
-*(.bss .bss.* *COM*)
+*(.bss .bss.*)
   }
 
   .eh_frame ALIGN(CONSTANT(COMMONPAGESIZE)) : { @@ -66,5 +66,6 @@ SECTIONS {
 *(.dynamic)
 *(.hash)
 *(.comment)
+*(COMMON)
   }
 }
--
1.9.1

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


Re: [edk2] [PATCH] BaseTools GCC: avoid the use of COMMON symbols

2015-12-04 Thread Ard Biesheuvel
On 4 December 2015 at 10:17, Gao, Liming  wrote:
> Good fix. How do you find this issue?
>

I got build failures with RVCT when using the UEFI Secure Boot
versions of VariableRuntimeDxe.
Could you check how VS deals with this? I.e., if the two copies of
mVirtualAddressChangeEvent are mapped onto the same memory location?


> Reviewed-by: Liming Gao 
>

Thanks

> -Original Message-
> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> Sent: Thursday, December 03, 2015 8:54 PM
> To: edk2-devel@lists.01.org; Justen, Jordan L; Gao, Liming; Zhu, Yonghong
> Cc: Ard Biesheuvel
> Subject: [PATCH] BaseTools GCC: avoid the use of COMMON symbols
>
> The default behavior of the GCC compiler is to emit uninitialized globals 
> into a COMMON section, where duplicate definitions are merged.
> This may result in unexpected behavior, since global variables appearing by 
> the same name in different C files typically do not refer to the same 
> conceptual data item.
>
> For instance, the definitions of EFI_EVENT mVirtualAddressChangeEvent in that 
> appear in the following files:
>
>   CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c
>   MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
>
> will be folded into a single instance of the variable when the latter module 
> includes the former library, which can lead to unexpected results.
>
> So prevent GCC from emitting variables into the COMMON section, by passing 
> -fno-common to the compiler, and discarding the COMMON section in the GNU ld 
> linker script.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel 
> ---
>
> NOTE: this patch will result in build failures until we fix the code to make
>   at least some instances of mVirtualAddressChangeEvent STATIC
>
>  BaseTools/Conf/tools_def.template | 2 +-
>  BaseTools/Scripts/GccBase.lds | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/BaseTools/Conf/tools_def.template 
> b/BaseTools/Conf/tools_def.template
> index 564d1336650c..2216e747c02d 100644
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -4318,7 +4318,7 @@ NOOPT_DDK3790xASL_IPF_DLINK_FLAGS= /NOLOGO 
> /NODEFAULTLIB /LTCG /DLL /OPT:REF
>  DEBUG_*_*_OBJCOPY_ADDDEBUGFLAG = 
> --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_NAME).debug
>  RELEASE_*_*_OBJCOPY_ADDDEBUGFLAG   =
>
> -DEFINE GCC_ALL_CC_FLAGS= -g -Os -fshort-wchar 
> -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -c -include AutoGen.h
> +DEFINE GCC_ALL_CC_FLAGS= -g -Os -fshort-wchar 
> -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -c -include AutoGen.h 
> -fno-common
>  DEFINE GCC_IA32_CC_FLAGS   = DEF(GCC_ALL_CC_FLAGS) -m32 
> -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 
> -mno-stack-arg-probe
>  DEFINE GCC_X64_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) -mno-red-zone 
> -Wno-address -mno-stack-arg-probe
>  DEFINE GCC_IPF_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) 
> -minline-int-divide-min-latency
> diff --git a/BaseTools/Scripts/GccBase.lds b/BaseTools/Scripts/GccBase.lds 
> index 4ee6d998532c..32310bc75dcc 100644
> --- a/BaseTools/Scripts/GccBase.lds
> +++ b/BaseTools/Scripts/GccBase.lds
> @@ -46,7 +46,7 @@ SECTIONS {
> */
>.data ALIGN(ALIGNOF(.text)) : ALIGN(CONSTANT(COMMONPAGESIZE)) {
>  *(.data .data.* .gnu.linkonce.d.*)
> -*(.bss .bss.* *COM*)
> +*(.bss .bss.*)
>}
>
>.eh_frame ALIGN(CONSTANT(COMMONPAGESIZE)) : { @@ -66,5 +66,6 @@ SECTIONS {
>  *(.dynamic)
>  *(.hash)
>  *(.comment)
> +*(COMMON)
>}
>  }
> --
> 1.9.1
>
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] MdeModulePkg: DebugAssert enhancement

2015-12-04 Thread Gao, Liming
Reviewed-by: Liming Gao 

I would like to help commit your serial patches if no other comments. 

Thanks
Liming
-Original Message-
From: Anbazhagan, Baraneedharan [mailto:anbazha...@hp.com] 
Sent: Friday, December 04, 2015 1:13 AM
To: Kinney, Michael D; Gao, Liming; edk2-devel@lists.01.org
Subject: RE: MdeModulePkg: DebugAssert enhancement

Updated code based on your suggestion to use copy mem and ModuleNameSize 
calculation.


diff --git a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c 
b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
index f1d9827..c3010df 100644
--- a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
+++ b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
@@ -261,6 +261,7 @@ DebugAssert (
   UINTN  HeaderSize;
   UINTN  TotalSize;
   CHAR8  *Temp;
+  UINTN  ModuleNameSize;
   UINTN  FileNameSize;
   UINTN  DescriptionSize;
 
@@ -268,31 +269,40 @@ DebugAssert (
   // Get string size
   //
   HeaderSize   = sizeof (EFI_DEBUG_ASSERT_DATA);
+  //
+  // Compute string size of module name enclosed by []  //
+  ModuleNameSize   = 2 + AsciiStrSize (gEfiCallerBaseName);
   FileNameSize = AsciiStrSize (FileName);
   DescriptionSize  = AsciiStrSize (Description);
 
   //
   // Make sure it will all fit in the passed in buffer.
   //
-  if (HeaderSize + FileNameSize + DescriptionSize > sizeof (Buffer)) {
+  if (HeaderSize + ModuleNameSize + FileNameSize + DescriptionSize > 
+ sizeof (Buffer)) {
 //
-// FileName + Description is too long to be filled into buffer. 
+// remove module name if it's too long to be filled into buffer
 //
-if (HeaderSize + FileNameSize < sizeof (Buffer)) {
-  //
-  // Description has enough buffer to be truncated. 
-  //
-  DescriptionSize = sizeof (Buffer) - HeaderSize - FileNameSize;
-} else {
+ModuleNameSize = 0;
+if (HeaderSize + FileNameSize + DescriptionSize > sizeof (Buffer)) 
+ {
   //
-  // FileName is too long to be filled into buffer.
-  // FileName will be truncated. Reserved one byte for Description NULL 
terminator.
+  // FileName + Description is too long to be filled into buffer. 
   //
-  DescriptionSize = 1;
-  FileNameSize= sizeof (Buffer) - HeaderSize - DescriptionSize;
+  if (HeaderSize + FileNameSize < sizeof (Buffer)) {
+//
+// Description has enough buffer to be truncated. 
+//
+DescriptionSize = sizeof (Buffer) - HeaderSize - FileNameSize;
+  } else {
+//
+// FileName is too long to be filled into buffer.
+// FileName will be truncated. Reserved one byte for Description NULL 
terminator.
+//
+DescriptionSize = 1;
+FileNameSize= sizeof (Buffer) - HeaderSize - DescriptionSize;
+  }
 }
   }
- 
   //
   // Fill in EFI_DEBUG_ASSERT_DATA
   //
@@ -300,12 +310,23 @@ DebugAssert (
   AssertData->LineNumber = (UINT32)LineNumber;
   TotalSize  = sizeof (EFI_DEBUG_ASSERT_DATA);
 
+  Temp = (CHAR8 *)(AssertData + 1);
+
+  //
+  // Copy Ascii [ModuleName].
+  //
+  if (ModuleNameSize != 0) {
+CopyMem(Temp, "[", 1);
+CopyMem(Temp + 1, gEfiCallerBaseName, ModuleNameSize - 3);
+CopyMem(Temp + ModuleNameSize - 2, "] ", 2);  }
+
   //
   // Copy Ascii FileName including NULL terminator.
   //
-  Temp = CopyMem (AssertData + 1, FileName, FileNameSize);
+  Temp = CopyMem (Temp + ModuleNameSize, FileName, FileNameSize);
   Temp[FileNameSize - 1] = 0;
-  TotalSize += FileNameSize;
+  TotalSize += (ModuleNameSize + FileNameSize);
 
   //
   // Copy Ascii Description include NULL terminator.
--
2.6.3.windows.1


> -Original Message-
> From: Kinney, Michael D [mailto:michael.d.kin...@intel.com]
> Sent: Wednesday, December 02, 2015 8:22 PM
> To: Gao, Liming; Anbazhagan, Baraneedharan; edk2-devel@lists.01.org; Kinney,
> Michael D
> Subject: RE: MdeModulePkg: DebugAssert enhancement
> 
> Baranee,
> 
> I also think the following line could be changed for smaller code gen from:
> 
> +  ModuleNameSize   = AsciiStrLen("[") + AsciiStrLen (gEfiCallerBaseName) +
> AsciiStrLen("] ");
> 
> To:
> 
> +  //
> +  // Compute string size of module name enclosed by []  //
> +  ModuleNameSize   = 2 + AsciiStrSize (gEfiCallerBaseName);
> 
> Mike
> 
> > -Original Message-
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> > Gao, Liming
> > Sent: Wednesday, December 2, 2015 6:07 PM
> > To: Anbazhagan, Baraneedharan ;
> > edk2-devel@lists.01.org
> > Subject: Re: [edk2] MdeModulePkg: DebugAssert enhancement
> >
> > Baranee:
> >   Could you use CopyMem() to fill gEfiCallerBaseName instead of
> > AsciiSPrint()? This library instance is for size optimization. So, it
> > uses
> > CopyMem() to fill FileName and Description.
> >
> > Thanks
> > Liming
> > -Original Message-
> > From: edk2-devel [mail

Re: [edk2] [PATCH] BaseTools GCC: avoid the use of COMMON symbols

2015-12-04 Thread Gao, Liming
Ard:
  I check VS build. Two copies of mVirtualAddressChangeEvent are mapped to the 
same memory location. For RuntimeDxe case, it doesn't cause any issue, because 
their notification function doesn't use Event. 

  I agree this is a potential issue. But, VS and GCC compiler doesn't report 
warning for it. Your fix is for GCC tool chain. I will investigate VS solution. 

Thanks
Liming
-Original Message-
From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] 
Sent: Friday, December 04, 2015 5:26 PM
To: Gao, Liming
Cc: edk2-devel@lists.01.org; Justen, Jordan L; Zhu, Yonghong
Subject: Re: [PATCH] BaseTools GCC: avoid the use of COMMON symbols

On 4 December 2015 at 10:17, Gao, Liming  wrote:
> Good fix. How do you find this issue?
>

I got build failures with RVCT when using the UEFI Secure Boot versions of 
VariableRuntimeDxe.
Could you check how VS deals with this? I.e., if the two copies of 
mVirtualAddressChangeEvent are mapped onto the same memory location?


> Reviewed-by: Liming Gao 
>

Thanks

> -Original Message-
> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> Sent: Thursday, December 03, 2015 8:54 PM
> To: edk2-devel@lists.01.org; Justen, Jordan L; Gao, Liming; Zhu, 
> Yonghong
> Cc: Ard Biesheuvel
> Subject: [PATCH] BaseTools GCC: avoid the use of COMMON symbols
>
> The default behavior of the GCC compiler is to emit uninitialized globals 
> into a COMMON section, where duplicate definitions are merged.
> This may result in unexpected behavior, since global variables appearing by 
> the same name in different C files typically do not refer to the same 
> conceptual data item.
>
> For instance, the definitions of EFI_EVENT mVirtualAddressChangeEvent in that 
> appear in the following files:
>
>   CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c
>   MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
>
> will be folded into a single instance of the variable when the latter module 
> includes the former library, which can lead to unexpected results.
>
> So prevent GCC from emitting variables into the COMMON section, by passing 
> -fno-common to the compiler, and discarding the COMMON section in the GNU ld 
> linker script.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel 
> ---
>
> NOTE: this patch will result in build failures until we fix the code to make
>   at least some instances of mVirtualAddressChangeEvent STATIC
>
>  BaseTools/Conf/tools_def.template | 2 +-
>  BaseTools/Scripts/GccBase.lds | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/BaseTools/Conf/tools_def.template 
> b/BaseTools/Conf/tools_def.template
> index 564d1336650c..2216e747c02d 100644
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -4318,7 +4318,7 @@ NOOPT_DDK3790xASL_IPF_DLINK_FLAGS= /NOLOGO 
> /NODEFAULTLIB /LTCG /DLL /OPT:REF
>  DEBUG_*_*_OBJCOPY_ADDDEBUGFLAG = 
> --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_NAME).debug
>  RELEASE_*_*_OBJCOPY_ADDDEBUGFLAG   =
>
> -DEFINE GCC_ALL_CC_FLAGS= -g -Os -fshort-wchar 
> -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -c -include AutoGen.h
> +DEFINE GCC_ALL_CC_FLAGS= -g -Os -fshort-wchar 
> -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -c -include AutoGen.h 
> -fno-common
>  DEFINE GCC_IA32_CC_FLAGS   = DEF(GCC_ALL_CC_FLAGS) -m32 
> -malign-double -freorder-blocks -freorder-blocks-and-partition -O2 
> -mno-stack-arg-probe
>  DEFINE GCC_X64_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) -mno-red-zone 
> -Wno-address -mno-stack-arg-probe
>  DEFINE GCC_IPF_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) 
> -minline-int-divide-min-latency
> diff --git a/BaseTools/Scripts/GccBase.lds 
> b/BaseTools/Scripts/GccBase.lds index 4ee6d998532c..32310bc75dcc 
> 100644
> --- a/BaseTools/Scripts/GccBase.lds
> +++ b/BaseTools/Scripts/GccBase.lds
> @@ -46,7 +46,7 @@ SECTIONS {
> */
>.data ALIGN(ALIGNOF(.text)) : ALIGN(CONSTANT(COMMONPAGESIZE)) {
>  *(.data .data.* .gnu.linkonce.d.*)
> -*(.bss .bss.* *COM*)
> +*(.bss .bss.*)
>}
>
>.eh_frame ALIGN(CONSTANT(COMMONPAGESIZE)) : { @@ -66,5 +66,6 @@ SECTIONS {
>  *(.dynamic)
>  *(.hash)
>  *(.comment)
> +*(COMMON)
>}
>  }
> --
> 1.9.1
>
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v3 0/2] ArmVirtPkg: Add support for multiple memory nodes

2015-12-04 Thread Shannon Zhao
From: Shannon Zhao 

If there are more than one memory nodes in FDT, currently UEFI will
assert. These two patches firstly let UEFI find the memory node with
lowest base address and check if the address is what we expected and set
PcdSystemMemorySize as the size of this node. Then add other memory
spaces through gDS->AddMemorySpace() when it parses FDT.

Changes since v2:
* Move the new added function to new driver
* call gDS->SetMemorySpaceAttributes to set the attribute

Changes since v1:
* Fix commit message and add reviewed-by tag from Laszlo (PATCH 1/2)
* Factor the codes out as a new function, fix coding style (PATCH 2/2)

Shannon Zhao (2):
  ArmVirtPkg: Find the lowest memory node
  ArmVirtPkg: Add memory space for the high memory nodes

 ArmVirtPkg/ArmVirtQemu.dsc   |   1 +
 ArmVirtPkg/ArmVirtQemu.fdf   |   1 +
 ArmVirtPkg/HighMemDxe/HighMemDxe.c   | 105 +++
 ArmVirtPkg/HighMemDxe/HighMemDxe.inf |  51 +
 ArmVirtPkg/Library/ArmVirtPlatformLib/Virt.c |  30 
 5 files changed, 175 insertions(+), 13 deletions(-)
 create mode 100644 ArmVirtPkg/HighMemDxe/HighMemDxe.c
 create mode 100644 ArmVirtPkg/HighMemDxe/HighMemDxe.inf

-- 
2.0.4


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


[edk2] [PATCH v3 1/2] ArmVirtPkg: Find the lowest memory node

2015-12-04 Thread Shannon Zhao
From: Shannon Zhao 

While QEMU NUMA support on ARM will introduce more than one /memory node
in the device tree, it needs to find the lowest one and set
PcdSystemMemorySize with the actual size of this memory node.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shannon Zhao 
Reviewed-by: Laszlo Ersek 
---
 ArmVirtPkg/Library/ArmVirtPlatformLib/Virt.c | 30 
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/ArmVirtPkg/Library/ArmVirtPlatformLib/Virt.c 
b/ArmVirtPkg/Library/ArmVirtPlatformLib/Virt.c
index 17f2686..7a0fc0e 100644
--- a/ArmVirtPkg/Library/ArmVirtPlatformLib/Virt.c
+++ b/ArmVirtPkg/Library/ArmVirtPlatformLib/Virt.c
@@ -72,8 +72,8 @@ ArmPlatformInitializeSystemMemory (
 {
   VOID *DeviceTreeBase;
   INT32Node, Prev;
-  UINT64   NewBase;
-  UINT64   NewSize;
+  UINT64   NewBase, CurBase;
+  UINT64   NewSize, CurSize;
   CONST CHAR8  *Type;
   INT32Len;
   CONST UINT64 *RegProp;
@@ -90,7 +90,7 @@ ArmPlatformInitializeSystemMemory (
   ASSERT (fdt_check_header (DeviceTreeBase) == 0);
 
   //
-  // Look for a memory node
+  // Look for the lowest memory node
   //
   for (Prev = 0;; Prev = Node) {
 Node = fdt_next_node (DeviceTreeBase, Prev, NULL);
@@ -110,26 +110,30 @@ ArmPlatformInitializeSystemMemory (
   RegProp = fdt_getprop (DeviceTreeBase, Node, "reg", &Len);
   if (RegProp != 0 && Len == (2 * sizeof (UINT64))) {
 
-NewBase = fdt64_to_cpu (ReadUnaligned64 (RegProp));
-NewSize = fdt64_to_cpu (ReadUnaligned64 (RegProp + 1));
-
-//
-// Make sure the start of DRAM matches our expectation
-//
-ASSERT (FixedPcdGet64 (PcdSystemMemoryBase) == NewBase);
-PcdSet64 (PcdSystemMemorySize, NewSize);
+CurBase = fdt64_to_cpu (ReadUnaligned64 (RegProp));
+CurSize = fdt64_to_cpu (ReadUnaligned64 (RegProp + 1));
 
 DEBUG ((EFI_D_INFO, "%a: System RAM @ 0x%lx - 0x%lx\n",
-   __FUNCTION__, NewBase, NewBase + NewSize - 1));
+   __FUNCTION__, CurBase, CurBase + CurSize - 1));
+
+if (NewBase > CurBase || NewBase == 0) {
+  NewBase = CurBase;
+  NewSize = CurSize;
+}
   } else {
 DEBUG ((EFI_D_ERROR, "%a: Failed to parse FDT memory node\n",
__FUNCTION__));
   }
-  break;
 }
   }
 
   //
+  // Make sure the start of DRAM matches our expectation
+  //
+  ASSERT (FixedPcdGet64 (PcdSystemMemoryBase) == NewBase);
+  PcdSet64 (PcdSystemMemorySize, NewSize);
+
+  //
   // We need to make sure that the machine we are running on has at least
   // 128 MB of memory configured, and is currently executing this binary from
   // NOR flash. This prevents a device tree image in DRAM from getting
-- 
2.0.4


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


[edk2] [PATCH v3 2/2] ArmVirtPkg: Add memory space for the high memory nodes

2015-12-04 Thread Shannon Zhao
From: Shannon Zhao 

Here we add the memory space for the high memory nodes except the lowest
one in FDT. So these spaces will show up in the UEFI memory map.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shannon Zhao 
---
 ArmVirtPkg/ArmVirtQemu.dsc   |   1 +
 ArmVirtPkg/ArmVirtQemu.fdf   |   1 +
 ArmVirtPkg/HighMemDxe/HighMemDxe.c   | 105 +++
 ArmVirtPkg/HighMemDxe/HighMemDxe.inf |  51 +
 4 files changed, 158 insertions(+)
 create mode 100644 ArmVirtPkg/HighMemDxe/HighMemDxe.c
 create mode 100644 ArmVirtPkg/HighMemDxe/HighMemDxe.inf

diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index b0d1d08..e6440ec 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -302,6 +302,7 @@
   # Platform Driver
   #
   ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
+  ArmVirtPkg/HighMemDxe/HighMemDxe.inf
   OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
   OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
   OvmfPkg/VirtioNetDxe/VirtioNet.inf
diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf
index 738e3db..f5e6cbd 100644
--- a/ArmVirtPkg/ArmVirtQemu.fdf
+++ b/ArmVirtPkg/ArmVirtQemu.fdf
@@ -108,6 +108,7 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Core/Dxe/DxeMain.inf
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
   INF ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
+  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf
 
   #
   # PI DXE Drivers producing Architectural Protocols (EFI Services)
diff --git a/ArmVirtPkg/HighMemDxe/HighMemDxe.c 
b/ArmVirtPkg/HighMemDxe/HighMemDxe.c
new file mode 100644
index 000..08b010e
--- /dev/null
+++ b/ArmVirtPkg/HighMemDxe/HighMemDxe.c
@@ -0,0 +1,105 @@
+/** @file
+*  High memory node enumeration DXE driver for ARM Virtual Machines
+*
+*  Copyright (c) 2015, Linaro Ltd. 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 
+
+EFI_STATUS
+EFIAPI
+InitializeHighMemDxe (
+  IN EFI_HANDLE   ImageHandle,
+  IN EFI_SYSTEM_TABLE *SystemTable
+  )
+{
+  VOID *Hob;
+  VOID *DeviceTreeBase;
+  INT32Node, Prev;
+  EFI_STATUS   Status;
+  CONST CHAR8  *Type;
+  INT32Len;
+  CONST VOID   *RegProp;
+  UINT64   CurBase;
+  UINT64   CurSize;
+
+  Hob = GetFirstGuidHob(&gFdtHobGuid);
+  if (Hob == NULL || GET_GUID_HOB_DATA_SIZE (Hob) != sizeof (UINT64)) {
+return EFI_NOT_FOUND;
+  }
+  DeviceTreeBase = (VOID *)(UINTN)*(UINT64 *)GET_GUID_HOB_DATA (Hob);
+
+  if (fdt_check_header (DeviceTreeBase) != 0) {
+DEBUG ((EFI_D_ERROR, "%a: No DTB found @ 0x%p\n", __FUNCTION__, 
DeviceTreeBase));
+return EFI_NOT_FOUND;
+  }
+
+  DEBUG ((EFI_D_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, DeviceTreeBase));
+
+  //
+  // Check for memory node and add the memory spaces expect the lowest one
+  //
+  for (Prev = 0;; Prev = Node) {
+Node = fdt_next_node (DeviceTreeBase, Prev, NULL);
+if (Node < 0) {
+  break;
+}
+
+Type = fdt_getprop (DeviceTreeBase, Node, "device_type", &Len);
+if (Type && AsciiStrnCmp (Type, "memory", Len) == 0) {
+  //
+  // Get the 'reg' property of this node. For now, we will assume
+  // two 8 byte quantities for base and size, respectively.
+  //
+  RegProp = fdt_getprop (DeviceTreeBase, Node, "reg", &Len);
+  if (RegProp != 0 && Len == (2 * sizeof (UINT64))) {
+
+CurBase = fdt64_to_cpu (((UINT64 *)RegProp)[0]);
+CurSize = fdt64_to_cpu (((UINT64 *)RegProp)[1]);
+
+if (FixedPcdGet64 (PcdSystemMemoryBase) != CurBase) {
+  Status = gDS->AddMemorySpace (
+  EfiGcdMemoryTypeSystemMemory,
+  CurBase, CurSize,
+  EFI_MEMORY_WB | EFI_MEMORY_WC |
+  EFI_MEMORY_WT | EFI_MEMORY_UC);
+
+  if (EFI_ERROR (Status)) {
+DEBUG ((EFI_D_ERROR, "%a: Failed to add System RAM @ 0x%lx - 
0x%lx\n",
+  __FUNCTION__, CurBase, CurBase + CurSize - 1));
+continue;
+  }
+
+  Status = gDS->SetMemorySpaceAttributes (
+  CurBase, CurSize,
+  EFI_MEMORY_WB);
+
+  if (EFI_ERROR (Status)) {
+DEBUG ((EFI_D_ERROR, "%a: Failed to set System RAM @ 0x%lx - 0x%lx 
attribute\n",
+  __FUNCTION__, CurBase, CurBase + CurSize - 1));
+  } else {
+DEBUG ((EFI_D_INFO, "%a: Add System RAM @ 0x%lx - 0x%lx\n",
+  __FUNCTION__, CurBa

Re: [edk2] [PATCH] BaseTools GCC: avoid the use of COMMON symbols

2015-12-04 Thread Laszlo Ersek
On 12/03/15 13:54, Ard Biesheuvel wrote:
> The default behavior of the GCC compiler is to emit uninitialized
> globals into a COMMON section, where duplicate definitions are merged.
> This may result in unexpected behavior, since global variables appearing
> by the same name in different C files typically do not refer to the same
> conceptual data item.
> 
> For instance, the definitions of EFI_EVENT mVirtualAddressChangeEvent in
> that appear in the following files:
> 
>   CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c
>   MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c
> 
> will be folded into a single instance of the variable when the latter
> module includes the former library, which can lead to unexpected
> results.
> 
> So prevent GCC from emitting variables into the COMMON section, by
> passing -fno-common to the compiler, and discarding the COMMON section
> in the GNU ld linker script.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel 
> ---
> 
> NOTE: this patch will result in build failures until we fix the code to make
>   at least some instances of mVirtualAddressChangeEvent STATIC
> 
>  BaseTools/Conf/tools_def.template | 2 +-
>  BaseTools/Scripts/GccBase.lds | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)

I don't recall where and how, but recently I encountered the exact same
phenomenon with gcc. At that time I didn't know about the -fno-common
flag (so thank you for mentioning it), but even so, I thought that
this was a standards conformance bug in gcc.

Now, after reading the -fno-common documentation in the gcc manual, I'm
actually *convinced* this is a gcc bug. The manual says on my RHEL-7.2
system (excerpt):

   -fno-common
   In C code, controls the placement of uninitialized global
   variables.  Unix C compilers have traditionally permitted
   multiple definitions of such variables in different
   compilation units by placing the variables in a common
   block.  This is the behavior specified by -fcommon, and is
   the default for GCC on most targets.  On the other hand,
   this behavior is not required by ISO C, [...]

Let us stop right there -- this  behavior is *forbidden* by ISO C,
which can be proved if someone takes the time to decipher the nearly
impenetrable passages on declarations and definitions.

Namely, consider the following program, consisting of two source files:

f1.c:

int x;


f2.c:

int x;
int main(void) { return x; }


(1) Clearly, the above excerpt from the gcc manual applies
("uninitialized global variable").

(2) From C89 "6.7.2 External object definitions":

If the declaration of an identifier for an object has file scope
and an initializer, the declaration is an external definition for
the identifier.

A declaration of an identifier for an object that has file scope
without an initializer, and without a storage-class specifier or
with the storage-class specifier *static*, constitutes a /tentative
definition/. If a translation unit contains one or more tentative
definitions for an identifier, and the translation unit contains no
external definition for that identifier, then the behavior is
exactly as if the translation unit contains a file scope
declaration of that identifier, with the composite type as of the
end of the translation unit, with an initialzier equal to 0.

This means that the above program (of two files) is equivalent to:

f1-b.c:

int x = 0;


f2-b.c:

int x = 0;
int main(void) { return x; }


Therefore *each* file is ultimately required to behave "as if" it
contains one external definition for "x".

(3) Considering the *linkage* of "x", in each file independently, it is
external. (Note that this is a separate question from the *definition*
being external!) From 6.1.2.2 "Linkages of identifiers":

[...] If the declaration of an identifier for an object has file
scope and no storage-class specifier, its linkage is external.

(4) Linking those two files into a complete program is a violation of
"6.7 External definitions":

[...] If an identifier declared with external linkage is used in an
expression (other than as part of the operand of a *sizeof*
operator), somewhere in the entire program there shall be exactly
one external definition for the identifier [...]

Again, how does the argument go?

- In each file we have exactly one tentative definition, and no
  declaration that would be, in its own right, an external definition.
  Based on (2), the files must behave exactly as-if there was one
  external *definition* for "x" in each.

- Argument (3) explains why "x" has external *linkage*.

- Argument (4) applies to "x" because "x" has external linkage, and is
  used in a non-sizeof expression. And the requirement set forth in (4

Re: [edk2] [PATCH] MdeModulePkg: allow DxeIpl to load without permanent memory to enable S3 resume from temporary memory

2015-12-04 Thread Cohen, Eugene
> You're probably right. I'm very used to catching problems with PEI at
> that ASSERT() so I hate to see it go. But it could move to some well-
> defined place in DxeIpl.

I agree - I have hit that friendly ASSERT many times over the years as well.  
This addition in my patchset in DxeIpl on the normal boot path should act as a 
replacement:

+  // DXE core load requires permanent memory
+  Status = PeiServicesLocatePpi (
+ &gEfiPeiMemoryDiscoveredPpiGuid,
+ 0,
+ NULL,
+ (VOID **)&Dummy
+ );
+  ASSERT_EFI_ERROR (Status);
+  if( EFI_ERROR(Status)) return Status;
+

> I think that the language of the PEI spec needs some clean up in this
> regard. The PEI Core/PEI Foundation/PEI Dispatcher/PEI Phase
> terminology muddle makes it hard to be precise about this kind of
> thing.

Agreed.  It's kind of muddled right now.  Clarifying what is meant by permanent 
memory from a purely PEI perspective (InstallPeiMemory, to start the RAM 
shadowing process) versus from a HOB perspective would be helpful.

Thanks,

Eugene

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf
> Of Tim Lewis
> Sent: Thursday, December 03, 2015 4:22 PM
> To: Cohen, Eugene ; Laszlo Ersek
> ; Zeng, Star ; edk2-
> de...@lists.01.org ; Liming Gao
> 
> Subject: Re: [edk2] [PATCH] MdeModulePkg: allow DxeIpl to load
> without permanent memory to enable S3 resume from temporary
> memory
> 
> You're probably right. I'm very used to catching problems with PEI at
> that ASSERT() so I hate to see it go. But it could move to some well-
> defined place in DxeIpl.
> 
> I think that the language of the PEI spec needs some clean up in this
> regard. The PEI Core/PEI Foundation/PEI Dispatcher/PEI Phase
> terminology muddle makes it hard to be precise about this kind of
> thing.
> 
> Tim
> 
> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf
> Of Cohen, Eugene
> Sent: Thursday, December 03, 2015 11:16 AM
> To: Tim Lewis ; Laszlo Ersek
> ; Zeng, Star ; edk2-
> de...@lists.01.org ; Liming Gao
> 
> Subject: Re: [edk2] [PATCH] MdeModulePkg: allow DxeIpl to load
> without permanent memory to enable S3 resume from temporary
> memory
> 
> Tim,
> 
> > Personally, I don't see this as a positive change. The PEI flow from
> > the earliest days has said: at the end of PEI there is memory and
> > there is a boot mode (see 11.2.1). You can see this assumption in 2.5
> > and 9.1 of the PI specification, where the result of the PEI
> > Foundation (not the PEI phase) is "initialized permanent memory".
> 
> I think this reflects the history of PEI - it was developed first to 
> initialize
> memory and then, "oh yeah, we need to find a place to do S3
> resume".  As such 2.5 makes no mention of S3 resume.  9.1 describes
> the handoff to the DXE Foundation and no one is arguing that you
> don't need permanent memory for that.
> 
> > Making this change would change the contract between the PEI
> > Foundation and the DXE IPL. As such, it would break existing
> > implementations.
> 
> This is relaxing the contract so a DXE IPL with the requirement of
> permanent memory (depex) would continue to work on both old and
> new implementations.  From what I can see, the contract here is really
> between the Memory Init driver and the updated DXE IPL with the
> removal of the permanent memory PPI dependency.  This change
> should be fully backwards compatible since existing Memory Init
> implementations that always publish permanent memory on S3
> resume will continue to work.  Can you elaborate on what gets
> broken?
> 
> Thanks,
> 
> Eugene
> ___
> 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 v3 2/2] ArmVirtPkg: Add memory space for the high memory nodes

2015-12-04 Thread Laszlo Ersek
Nice in general; I have three comments:

On 12/04/15 11:13, Shannon Zhao wrote:
> From: Shannon Zhao 
> 
> Here we add the memory space for the high memory nodes except the lowest
> one in FDT. So these spaces will show up in the UEFI memory map.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Shannon Zhao 
> ---
>  ArmVirtPkg/ArmVirtQemu.dsc   |   1 +
>  ArmVirtPkg/ArmVirtQemu.fdf   |   1 +
>  ArmVirtPkg/HighMemDxe/HighMemDxe.c   | 105 
> +++
>  ArmVirtPkg/HighMemDxe/HighMemDxe.inf |  51 +
>  4 files changed, 158 insertions(+)
>  create mode 100644 ArmVirtPkg/HighMemDxe/HighMemDxe.c
>  create mode 100644 ArmVirtPkg/HighMemDxe/HighMemDxe.inf
> 
> diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
> index b0d1d08..e6440ec 100644
> --- a/ArmVirtPkg/ArmVirtQemu.dsc
> +++ b/ArmVirtPkg/ArmVirtQemu.dsc
> @@ -302,6 +302,7 @@
># Platform Driver
>#
>ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
> +  ArmVirtPkg/HighMemDxe/HighMemDxe.inf
>OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
>OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
>OvmfPkg/VirtioNetDxe/VirtioNet.inf
> diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf
> index 738e3db..f5e6cbd 100644
> --- a/ArmVirtPkg/ArmVirtQemu.fdf
> +++ b/ArmVirtPkg/ArmVirtQemu.fdf
> @@ -108,6 +108,7 @@ READ_LOCK_STATUS   = TRUE
>INF MdeModulePkg/Core/Dxe/DxeMain.inf
>INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>INF ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
> +  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf
>  
>#
># PI DXE Drivers producing Architectural Protocols (EFI Services)
> diff --git a/ArmVirtPkg/HighMemDxe/HighMemDxe.c 
> b/ArmVirtPkg/HighMemDxe/HighMemDxe.c
> new file mode 100644
> index 000..08b010e
> --- /dev/null
> +++ b/ArmVirtPkg/HighMemDxe/HighMemDxe.c
> @@ -0,0 +1,105 @@
> +/** @file
> +*  High memory node enumeration DXE driver for ARM Virtual Machines
> +*
> +*  Copyright (c) 2015, Linaro Ltd. 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 
> +
> +EFI_STATUS
> +EFIAPI
> +InitializeHighMemDxe (
> +  IN EFI_HANDLE   ImageHandle,
> +  IN EFI_SYSTEM_TABLE *SystemTable
> +  )
> +{
> +  VOID *Hob;
> +  VOID *DeviceTreeBase;
> +  INT32Node, Prev;
> +  EFI_STATUS   Status;
> +  CONST CHAR8  *Type;
> +  INT32Len;
> +  CONST VOID   *RegProp;
> +  UINT64   CurBase;
> +  UINT64   CurSize;
> +
> +  Hob = GetFirstGuidHob(&gFdtHobGuid);
> +  if (Hob == NULL || GET_GUID_HOB_DATA_SIZE (Hob) != sizeof (UINT64)) {
> +return EFI_NOT_FOUND;
> +  }
> +  DeviceTreeBase = (VOID *)(UINTN)*(UINT64 *)GET_GUID_HOB_DATA (Hob);
> +
> +  if (fdt_check_header (DeviceTreeBase) != 0) {
> +DEBUG ((EFI_D_ERROR, "%a: No DTB found @ 0x%p\n", __FUNCTION__, 
> DeviceTreeBase));
> +return EFI_NOT_FOUND;
> +  }
> +
> +  DEBUG ((EFI_D_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, DeviceTreeBase));
> +
> +  //
> +  // Check for memory node and add the memory spaces expect the lowest one
> +  //
> +  for (Prev = 0;; Prev = Node) {
> +Node = fdt_next_node (DeviceTreeBase, Prev, NULL);
> +if (Node < 0) {
> +  break;
> +}
> +
> +Type = fdt_getprop (DeviceTreeBase, Node, "device_type", &Len);
> +if (Type && AsciiStrnCmp (Type, "memory", Len) == 0) {
> +  //
> +  // Get the 'reg' property of this node. For now, we will assume
> +  // two 8 byte quantities for base and size, respectively.
> +  //
> +  RegProp = fdt_getprop (DeviceTreeBase, Node, "reg", &Len);
> +  if (RegProp != 0 && Len == (2 * sizeof (UINT64))) {

(1) This is valid C, but our coding style requires "RegProp != NULL".

I can fix this up when committing the patch.

> +
> +CurBase = fdt64_to_cpu (((UINT64 *)RegProp)[0]);
> +CurSize = fdt64_to_cpu (((UINT64 *)RegProp)[1]);
> +
> +if (FixedPcdGet64 (PcdSystemMemoryBase) != CurBase) {
> +  Status = gDS->AddMemorySpace (
> +  EfiGcdMemoryTypeSystemMemory,
> +  CurBase, CurSize,
> +  EFI_MEMORY_WB | EFI_MEMORY_WC |
> +  EFI_MEMORY_WT | EFI_MEMORY_UC);
> +
> +  if (EFI_ERROR (Status)) {
> +DEBUG ((EFI_D_ERROR, "%a: Failed to add System RAM @ 0x%lx - 
> 0x%lx\n",
> +  __FUNCTION__, CurBase, CurBase + CurSize - 1));
> +continue;
> + 

Re: [edk2] [PATCH v3 0/2] ArmVirtPkg: Add support for multiple memory nodes

2015-12-04 Thread Laszlo Ersek
On 12/04/15 11:13, Shannon Zhao wrote:
> From: Shannon Zhao 
> 
> If there are more than one memory nodes in FDT, currently UEFI will
> assert. These two patches firstly let UEFI find the memory node with
> lowest base address and check if the address is what we expected and set
> PcdSystemMemorySize as the size of this node. Then add other memory
> spaces through gDS->AddMemorySpace() when it parses FDT.
> 
> Changes since v2:
> * Move the new added function to new driver
> * call gDS->SetMemorySpaceAttributes to set the attribute
> 
> Changes since v1:
> * Fix commit message and add reviewed-by tag from Laszlo (PATCH 1/2)
> * Factor the codes out as a new function, fix coding style (PATCH 2/2)
> 
> Shannon Zhao (2):
>   ArmVirtPkg: Find the lowest memory node
>   ArmVirtPkg: Add memory space for the high memory nodes
> 
>  ArmVirtPkg/ArmVirtQemu.dsc   |   1 +
>  ArmVirtPkg/ArmVirtQemu.fdf   |   1 +
>  ArmVirtPkg/HighMemDxe/HighMemDxe.c   | 105 
> +++
>  ArmVirtPkg/HighMemDxe/HighMemDxe.inf |  51 +
>  ArmVirtPkg/Library/ArmVirtPlatformLib/Virt.c |  30 
>  5 files changed, 175 insertions(+), 13 deletions(-)
>  create mode 100644 ArmVirtPkg/HighMemDxe/HighMemDxe.c
>  create mode 100644 ArmVirtPkg/HighMemDxe/HighMemDxe.inf
> 

(4) I also intend to fix up the commit subjects as:
- ArmVirtPkg: ArmVirtPlatformLib: Find the lowest memory node
- ArmVirtPkg: HighMemDxe: Add memory space for the high memory nodes

(That is, the module should also be named on the subject line. Sorry for
not pointing this out earlier.)

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


[edk2] [PATCH] MdeModulePkg: Convert HiiDatabaseDxe ConfigRouting ASSERT to return an error

2015-12-04 Thread Cohen, Eugene
This should just return an error and not assert.  We hit this when testing with 
a client that was trying to access the old IP4_CONFIG on firmware implementing 
IP4_CONFIG2.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen 
---
 MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c 
b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
index b618903..9037924 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
@@ -3873,7 +3873,9 @@ HiiConfigRoutingExtractConfig (
   &gEfiHiiConfigAccessProtocolGuid,
   (VOID **) &ConfigAccess
   );
-  ASSERT_EFI_ERROR (Status);
+  if (EFI_ERROR(Status)) {
+goto Done;
+  }
 
   Status = ConfigAccess->ExtractConfig (
ConfigAccess,
-- 
1.9.5.msysgit.0

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


Re: [edk2] [PATCH] CryptoPkg/OpensslLib: upgrade to openssl-1.0.2e

2015-12-04 Thread Long, Qin
Ard,

Thanks for your quick response against this OpenSSL upgrade. Your patch was 
ready when I am still evaluating the security impacts and source changes. :-)

The severity evaluation should be moderate / high for EDKII-CryptoPkg, since 
there were potential vulnerabilities on big number calculation (Montgomery 
Squaring Process), certificate verification, and PKCS7 handling, which means it 
is better for us to catch this upgrade. 

One issue is: Some code updates from 1.0.2e will break our Authenticode 
verification. I did the trace and analysis. The root cause is one corner case 
codes was removed from pk7_smime.c (as the following). 

pk7_smime.c
#if 0 --> This macro was removed from 1.0.2e 
/*
 * NB: this test commented out because some versions of Netscape
 * illegally include zero length content when signing data.
 */

/* Check for data and content: two sets of data */
if (!PKCS7_get_detached(p7) && indata) {
PKCS7err(PKCS7_F_PKCS7_VERIFY, PKCS7_R_CONTENT_AND_DATA_PRESENT);
return 0;
}
#endif 
-

This means pkcs7 routine will return error if we pass one pkcs7 data with 
embedded content and detached data in openssl 1.0.2e. 
For Authenticode, its format is one extended pkcs7 signed Data, and 
verification behavior also differ. OpenSSL has no formal support for 
Authenticode verification, so there are tricky handling when we enabled 
Authenticode verification under UEFI. This old comment-out macro for Netscape 
just helped us to support the Authenticode verification process. 

The fix here can also be simple: We can add "#if !defined(OPENSSL_SYS_UEFI)" 
here to keep the old behavior (which can be added in our patch file).

I would like to raise it as one open. 
David, do you think it's valuable to feedback to OpenSSL community? Personally, 
I think the old behavior (before 1.0.2e) can be acceptable when two data 
(embedded and detached data) were supplied.


Best Regards & Thanks,
LONG, Qin

> -Original Message-
> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> Sent: Friday, December 4, 2015 4:29 PM
> To: edk2-devel@lists.01.org; Long, Qin; dw...@infradead.org
> Cc: Gao, Liming; Ard Biesheuvel
> Subject: [PATCH] CryptoPkg/OpensslLib: upgrade to openssl-1.0.2e
> 
> Upstream OpenSSL has released version 1.0.2e with security fixes, and has 
> pulled
> the previous version from the download servers. So upgrade our OpensslLib glue
> from 1.0.2d to 1.0.2e.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel 
> ---
>  CryptoPkg/Library/OpensslLib/{EDKII_openssl-1.0.2d.patch => 
> EDKII_openssl-1.0.2e.patch} | 18 +++---
>  CryptoPkg/Library/OpensslLib/Install.cmd 
>|  2 +-
>  CryptoPkg/Library/OpensslLib/Install.sh  
>|  2 +-
>  CryptoPkg/Library/OpensslLib/OpensslLib.inf  
>|  2 +-
>  CryptoPkg/Library/OpensslLib/Patch-HOWTO.txt 
>| 26 ++--
>  5 files changed, 25 insertions(+), 25 deletions(-)
> 
> diff --git a/CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2d.patch 
> b/CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2e.patch
> similarity index 95%
> rename from CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2d.patch
> rename to CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2e.patch
> index 6be397b8b959..e4a85bf95df3 100644
> --- a/CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2d.patch
> +++ b/CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2e.patch
> @@ -16,7 +16,7 @@ diff U3 crypto/bio/bio.h crypto/bio/bio.h
>  diff U3 crypto/bio/bss_file.c crypto/bio/bss_file.c
>  --- crypto/bio/bss_file.cThu Jun 11 21:01:06 2015
>  +++ crypto/bio/bss_file.cFri Jun 12 11:01:28 2015
> -@@ -460,6 +460,23 @@
> +@@ -467,6 +467,23 @@
>   return (ret);
>   }
> 
> @@ -83,9 +83,9 @@ diff U3 crypto/pkcs7/pk7_smime.c crypto/pkcs7/pk7_smime.c
>  +char *buf = NULL;
>  +int bufsiz;
>   int i, j = 0, k, ret = 0;
> - BIO *p7bio;
> - BIO *tmpin, *tmpout;
> -@@ -365,9 +366,14 @@
> + BIO *p7bio = NULL;
> + BIO *tmpin = NULL, *tmpout = NULL;
> +@@ -355,9 +356,14 @@
>   } else
>   tmpout = out;
> 
> @@ -101,17 +101,17 @@ diff U3 crypto/pkcs7/pk7_smime.c 
> crypto/pkcs7/pk7_smime.c
>   if (i <= 0)
>   break;
>   if (tmpout)
> -@@ -406,6 +412,10 @@
> +@@ -394,6 +400,10 @@
> + }
>   BIO_free_all(p7bio);
> -
>   sk_X509_free(signers);
>  +
>  +if (buf != NULL) {
>  +  OPENSSL_free(buf);
>  +}
> -
>   return ret;
>   }
> +
>  diff U3 crypto/rand/rand_unix.c crypto/rand/rand_unix.c
>  --- crypto/rand/rand_unix.c  Thu Jun 11 21:01:06 2015
>  +++ crypto/rand/rand_unix.c  Fri Jun 12 10:51:21 2015
> @@ -210,7 +210,7 @@ diff U3 crypto/rsa/rsa_ameth.c crypto/rsa/rsa_ameth.c
>  diff U3 crypto/x509/x509_vfy

Re: [edk2] [PATCH] CryptoPkg/OpensslLib: upgrade to openssl-1.0.2e

2015-12-04 Thread Long, Qin
Another open is: 
I know some companies / orgs will use the script to download / unpack / patch 
the openssl tar package for daily / automatic build testing. 
In before, OpenSSl put all releases (old and the latest) in one same folder, so 
no impacts to this process. In this year, OpenSSL only keep the latest version 
in source folder, and move the old releases into "old" folder. This means we 
have to catch every release even if this upgrade may not impact EDKII usage. 
In fact, we may update the main OpenSSL version in CryptoPkg based on the 
security risk evaluations and other impacts. So I would like to know if it's 
feasible to update those scripts (CURL?) to try two URLs (e.g. 
https://www.openssl.org/source/openssl-1.0.2d.tar.gz, and 
https://www.openssl.org/source/old/1.0.2/openssl-1.0.2d.tar.gz)

Of cause, this process may be optimized after 1.1 HEAD's release. We may be 
able to remove whole EDKII-openssl-xxx.patch, and have some native EFI 
configuration, INF generation, etc, if all patches were integrated into openssl 
head. :-)


Best Regards & Thanks,
LONG, Qin

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Long, 
> Qin
> Sent: Friday, December 4, 2015 10:25 PM
> To: Ard Biesheuvel; edk2-devel@lists.01.org; dw...@infradead.org
> Cc: Hale, Robert P; Zimmer, Vincent; Gao, Liming
> Subject: Re: [edk2] [PATCH] CryptoPkg/OpensslLib: upgrade to openssl-1.0.2e
> 
> Ard,
> 
> Thanks for your quick response against this OpenSSL upgrade. Your patch was 
> ready when I am still evaluating the security impacts and
> source changes. :-)
> 
> The severity evaluation should be moderate / high for EDKII-CryptoPkg, since 
> there were potential vulnerabilities on big number
> calculation (Montgomery Squaring Process), certificate verification, and 
> PKCS7 handling, which means it is better for us to catch this
> upgrade.
> 
> One issue is: Some code updates from 1.0.2e will break our Authenticode 
> verification. I did the trace and analysis. The root cause is
> one corner case codes was removed from pk7_smime.c (as the following).
> 
> pk7_smime.c
> #if 0 --> This macro was removed from 1.0.2e
> /*
>  * NB: this test commented out because some versions of Netscape
>  * illegally include zero length content when signing data.
>  */
> 
> /* Check for data and content: two sets of data */
> if (!PKCS7_get_detached(p7) && indata) {
> PKCS7err(PKCS7_F_PKCS7_VERIFY, PKCS7_R_CONTENT_AND_DATA_PRESENT);
> return 0;
> }
> #endif
> -
> 
> This means pkcs7 routine will return error if we pass one pkcs7 data with 
> embedded content and detached data in openssl 1.0.2e.
> For Authenticode, its format is one extended pkcs7 signed Data, and 
> verification behavior also differ. OpenSSL has no formal support
> for Authenticode verification, so there are tricky handling when we enabled 
> Authenticode verification under UEFI. This old comment-
> out macro for Netscape just helped us to support the Authenticode 
> verification process.
> 
> The fix here can also be simple: We can add "#if !defined(OPENSSL_SYS_UEFI)" 
> here to keep the old behavior (which can be added in
> our patch file).
> 
> I would like to raise it as one open.
> David, do you think it's valuable to feedback to OpenSSL community? 
> Personally, I think the old behavior (before 1.0.2e) can be
> acceptable when two data (embedded and detached data) were supplied.
> 
> 
> Best Regards & Thanks,
> LONG, Qin
> 
> > -Original Message-
> > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> > Sent: Friday, December 4, 2015 4:29 PM
> > To: edk2-devel@lists.01.org; Long, Qin; dw...@infradead.org
> > Cc: Gao, Liming; Ard Biesheuvel
> > Subject: [PATCH] CryptoPkg/OpensslLib: upgrade to openssl-1.0.2e
> >
> > Upstream OpenSSL has released version 1.0.2e with security fixes, and has 
> > pulled
> > the previous version from the download servers. So upgrade our OpensslLib 
> > glue
> > from 1.0.2d to 1.0.2e.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Ard Biesheuvel 
> > ---
> >  CryptoPkg/Library/OpensslLib/{EDKII_openssl-1.0.2d.patch => 
> > EDKII_openssl-1.0.2e.patch} | 18 +++---
> >  CryptoPkg/Library/OpensslLib/Install.cmd   
> >  |  2 +-
> >  CryptoPkg/Library/OpensslLib/Install.sh
> >  |  2 +-
> >  CryptoPkg/Library/OpensslLib/OpensslLib.inf
> >  |  2 +-
> >  CryptoPkg/Library/OpensslLib/Patch-HOWTO.txt   
> >  | 26 ++--
> >  5 files changed, 25 insertions(+), 25 deletions(-)
> >
> > diff --git a/CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2d.patch 
> > b/CryptoPkg/Library/OpensslLib/EDKII_openssl-1.0.2e.patch
> > similarity index 95%
> > rename from CryptoPkg/Library/OpensslLi

Re: [edk2] [PATCH v3 2/2] ArmVirtPkg: Add memory space for the high memory nodes

2015-12-04 Thread Ard Biesheuvel
On 4 December 2015 at 12:53, Laszlo Ersek  wrote:
> Nice in general; I have three comments:
>
> On 12/04/15 11:13, Shannon Zhao wrote:
>> From: Shannon Zhao 
>>
>> Here we add the memory space for the high memory nodes except the lowest
>> one in FDT. So these spaces will show up in the UEFI memory map.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Shannon Zhao 
>> ---
>>  ArmVirtPkg/ArmVirtQemu.dsc   |   1 +
>>  ArmVirtPkg/ArmVirtQemu.fdf   |   1 +
>>  ArmVirtPkg/HighMemDxe/HighMemDxe.c   | 105 
>> +++
>>  ArmVirtPkg/HighMemDxe/HighMemDxe.inf |  51 +
>>  4 files changed, 158 insertions(+)
>>  create mode 100644 ArmVirtPkg/HighMemDxe/HighMemDxe.c
>>  create mode 100644 ArmVirtPkg/HighMemDxe/HighMemDxe.inf
>>
>> diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
>> index b0d1d08..e6440ec 100644
>> --- a/ArmVirtPkg/ArmVirtQemu.dsc
>> +++ b/ArmVirtPkg/ArmVirtQemu.dsc
>> @@ -302,6 +302,7 @@
>># Platform Driver
>>#
>>ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
>> +  ArmVirtPkg/HighMemDxe/HighMemDxe.inf
>>OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
>>OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
>>OvmfPkg/VirtioNetDxe/VirtioNet.inf
>> diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf
>> index 738e3db..f5e6cbd 100644
>> --- a/ArmVirtPkg/ArmVirtQemu.fdf
>> +++ b/ArmVirtPkg/ArmVirtQemu.fdf
>> @@ -108,6 +108,7 @@ READ_LOCK_STATUS   = TRUE
>>INF MdeModulePkg/Core/Dxe/DxeMain.inf
>>INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>>INF ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
>> +  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf
>>
>>#
>># PI DXE Drivers producing Architectural Protocols (EFI Services)
>> diff --git a/ArmVirtPkg/HighMemDxe/HighMemDxe.c 
>> b/ArmVirtPkg/HighMemDxe/HighMemDxe.c
>> new file mode 100644
>> index 000..08b010e
>> --- /dev/null
>> +++ b/ArmVirtPkg/HighMemDxe/HighMemDxe.c
>> @@ -0,0 +1,105 @@
>> +/** @file
>> +*  High memory node enumeration DXE driver for ARM Virtual Machines
>> +*
>> +*  Copyright (c) 2015, Linaro Ltd. 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 
>> +
>> +EFI_STATUS
>> +EFIAPI
>> +InitializeHighMemDxe (
>> +  IN EFI_HANDLE   ImageHandle,
>> +  IN EFI_SYSTEM_TABLE *SystemTable
>> +  )
>> +{
>> +  VOID *Hob;
>> +  VOID *DeviceTreeBase;
>> +  INT32Node, Prev;
>> +  EFI_STATUS   Status;
>> +  CONST CHAR8  *Type;
>> +  INT32Len;
>> +  CONST VOID   *RegProp;
>> +  UINT64   CurBase;
>> +  UINT64   CurSize;
>> +
>> +  Hob = GetFirstGuidHob(&gFdtHobGuid);
>> +  if (Hob == NULL || GET_GUID_HOB_DATA_SIZE (Hob) != sizeof (UINT64)) {
>> +return EFI_NOT_FOUND;
>> +  }
>> +  DeviceTreeBase = (VOID *)(UINTN)*(UINT64 *)GET_GUID_HOB_DATA (Hob);
>> +
>> +  if (fdt_check_header (DeviceTreeBase) != 0) {
>> +DEBUG ((EFI_D_ERROR, "%a: No DTB found @ 0x%p\n", __FUNCTION__, 
>> DeviceTreeBase));
>> +return EFI_NOT_FOUND;
>> +  }
>> +
>> +  DEBUG ((EFI_D_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, DeviceTreeBase));
>> +
>> +  //
>> +  // Check for memory node and add the memory spaces expect the lowest one
>> +  //
>> +  for (Prev = 0;; Prev = Node) {
>> +Node = fdt_next_node (DeviceTreeBase, Prev, NULL);
>> +if (Node < 0) {
>> +  break;
>> +}
>> +
>> +Type = fdt_getprop (DeviceTreeBase, Node, "device_type", &Len);
>> +if (Type && AsciiStrnCmp (Type, "memory", Len) == 0) {
>> +  //
>> +  // Get the 'reg' property of this node. For now, we will assume
>> +  // two 8 byte quantities for base and size, respectively.
>> +  //
>> +  RegProp = fdt_getprop (DeviceTreeBase, Node, "reg", &Len);
>> +  if (RegProp != 0 && Len == (2 * sizeof (UINT64))) {
>
> (1) This is valid C, but our coding style requires "RegProp != NULL".
>
> I can fix this up when committing the patch.
>
>> +
>> +CurBase = fdt64_to_cpu (((UINT64 *)RegProp)[0]);
>> +CurSize = fdt64_to_cpu (((UINT64 *)RegProp)[1]);
>> +
>> +if (FixedPcdGet64 (PcdSystemMemoryBase) != CurBase) {
>> +  Status = gDS->AddMemorySpace (
>> +  EfiGcdMemoryTypeSystemMemory,
>> +  CurBase, CurSize,
>> +  EFI_MEMORY_WB | EFI_MEMORY_WC |
>> +  EFI_MEMORY_WT | EFI_MEMORY_UC);
>> +
>> +  if (EFI_ERROR (Sta

Re: [edk2] [PATCH 0/4] CryptoPkg: fix ARM and RVCT issues

2015-12-04 Thread Long, Qin
For the series, reviewed-by: Qin Long 


Best Regards & Thanks,
LONG, Qin

> -Original Message-
> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> Sent: Thursday, December 3, 2015 6:51 PM
> To: edk2-devel@lists.01.org; eug...@hp.com; Long, Qin; dw...@infradead.org
> Cc: Ard Biesheuvel
> Subject: [PATCH 0/4] CryptoPkg: fix ARM and RVCT issues
> 
> These fixes some minor issues in CryptoPkg that prevent CryptoPkg.dsc and
> OpensslLib from being built for ARM in general, and using RVCT in particular.
> 
> Note that I sent out a separate single patch that touches CryptoPkg as well,
> before I realized that there were more issues to address. This series, 
> combined
> with the other patch, should supersede the combined patch sent out by Eugene 
> on
> the 24th of Nov.
> 
> Ard Biesheuvel (4):
>   CryptoPkg ARM: add ArmSoftFloatLib resolution to CryptoPkg.dsc
>   CryptoPkg/BaseCryptLib: make mVirtualAddressChangeEvent STATIC
>   CryptoPkg/OpensslLib: comment out unused code
>   CryptoPkg/OpensslLib: ignore more false positive warnings for RVCT
> 
>  CryptoPkg/CryptoPkg.dsc   |  3 ++
>  CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c |  2 +-
>  CryptoPkg/Library/OpensslLib/OpensslLib.inf   | 32 
> 
>  3 files changed, 23 insertions(+), 14 deletions(-)
> 
> --
> 1.9.1

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


Re: [edk2] [PATCH] CryptoPkg/OpensslLib: upgrade to openssl-1.0.2e

2015-12-04 Thread Ard Biesheuvel
On 4 December 2015 at 15:50, Long, Qin  wrote:
> Another open is:
> I know some companies / orgs will use the script to download / unpack / patch 
> the openssl tar package for daily / automatic build testing.
> In before, OpenSSl put all releases (old and the latest) in one same folder, 
> so no impacts to this process. In this year, OpenSSL only keep the latest 
> version in source folder, and move the old releases into "old" folder. This 
> means we have to catch every release even if this upgrade may not impact 
> EDKII usage.
> In fact, we may update the main OpenSSL version in CryptoPkg based on the 
> security risk evaluations and other impacts. So I would like to know if it's 
> feasible to update those scripts (CURL?) to try two URLs (e.g. 
> https://www.openssl.org/source/openssl-1.0.2d.tar.gz, and 
> https://www.openssl.org/source/old/1.0.2/openssl-1.0.2d.tar.gz)
>
> Of cause, this process may be optimized after 1.1 HEAD's release. We may be 
> able to remove whole EDKII-openssl-xxx.patch, and have some native EFI 
> configuration, INF generation, etc, if all patches were integrated into 
> openssl head. :-)
>

Considering the above, and your analysis from the previous email, I
think it is perfectly reasonable to freeze support at 1.0.2d until we
can switch to 1.1, as long as that does not take too much time. Feel
free to ignore my patch if this turns out to be the best way forward.

Thanks,
Ard.

>
>> -Original Message-
>> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Long, 
>> Qin
>> Sent: Friday, December 4, 2015 10:25 PM
>> To: Ard Biesheuvel; edk2-devel@lists.01.org; dw...@infradead.org
>> Cc: Hale, Robert P; Zimmer, Vincent; Gao, Liming
>> Subject: Re: [edk2] [PATCH] CryptoPkg/OpensslLib: upgrade to openssl-1.0.2e
>>
>> Ard,
>>
>> Thanks for your quick response against this OpenSSL upgrade. Your patch was 
>> ready when I am still evaluating the security impacts and
>> source changes. :-)
>>
>> The severity evaluation should be moderate / high for EDKII-CryptoPkg, since 
>> there were potential vulnerabilities on big number
>> calculation (Montgomery Squaring Process), certificate verification, and 
>> PKCS7 handling, which means it is better for us to catch this
>> upgrade.
>>
>> One issue is: Some code updates from 1.0.2e will break our Authenticode 
>> verification. I did the trace and analysis. The root cause is
>> one corner case codes was removed from pk7_smime.c (as the following).
>>
>> pk7_smime.c
>> #if 0 --> This macro was removed from 1.0.2e
>> /*
>>  * NB: this test commented out because some versions of Netscape
>>  * illegally include zero length content when signing data.
>>  */
>>
>> /* Check for data and content: two sets of data */
>> if (!PKCS7_get_detached(p7) && indata) {
>> PKCS7err(PKCS7_F_PKCS7_VERIFY, PKCS7_R_CONTENT_AND_DATA_PRESENT);
>> return 0;
>> }
>> #endif
>> -
>>
>> This means pkcs7 routine will return error if we pass one pkcs7 data with 
>> embedded content and detached data in openssl 1.0.2e.
>> For Authenticode, its format is one extended pkcs7 signed Data, and 
>> verification behavior also differ. OpenSSL has no formal support
>> for Authenticode verification, so there are tricky handling when we enabled 
>> Authenticode verification under UEFI. This old comment-
>> out macro for Netscape just helped us to support the Authenticode 
>> verification process.
>>
>> The fix here can also be simple: We can add "#if !defined(OPENSSL_SYS_UEFI)" 
>> here to keep the old behavior (which can be added in
>> our patch file).
>>
>> I would like to raise it as one open.
>> David, do you think it's valuable to feedback to OpenSSL community? 
>> Personally, I think the old behavior (before 1.0.2e) can be
>> acceptable when two data (embedded and detached data) were supplied.
>>
>>
>> Best Regards & Thanks,
>> LONG, Qin
>>
>> > -Original Message-
>> > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
>> > Sent: Friday, December 4, 2015 4:29 PM
>> > To: edk2-devel@lists.01.org; Long, Qin; dw...@infradead.org
>> > Cc: Gao, Liming; Ard Biesheuvel
>> > Subject: [PATCH] CryptoPkg/OpensslLib: upgrade to openssl-1.0.2e
>> >
>> > Upstream OpenSSL has released version 1.0.2e with security fixes, and has 
>> > pulled
>> > the previous version from the download servers. So upgrade our OpensslLib 
>> > glue
>> > from 1.0.2d to 1.0.2e.
>> >
>> > Contributed-under: TianoCore Contribution Agreement 1.0
>> > Signed-off-by: Ard Biesheuvel 
>> > ---
>> >  CryptoPkg/Library/OpensslLib/{EDKII_openssl-1.0.2d.patch => 
>> > EDKII_openssl-1.0.2e.patch} | 18 +++---
>> >  CryptoPkg/Library/OpensslLib/Install.cmd  
>> >   |  2 +-
>> >  CryptoPkg/Library/OpensslLib/Install.sh   
>> >   |  2 +-
>> >  CryptoPkg/Library/OpensslLib/OpensslLib.inf   
>

Re: [edk2] [PATCH] BaseTools GCC: avoid the use of COMMON symbols

2015-12-04 Thread Paolo Bonzini


On 04/12/2015 11:39, Laszlo Ersek wrote:
> (4) Linking those two files into a complete program is a violation of
> "6.7 External definitions":
> 
> [...] If an identifier declared with external linkage is used in an
> expression (other than as part of the operand of a *sizeof*
> operator), somewhere in the entire program there shall be exactly
> one external definition for the identifier [...]
> 
> Again, how does the argument go?
> 
> - In each file we have exactly one tentative definition, and no
>   declaration that would be, in its own right, an external definition.
>   Based on (2), the files must behave exactly as-if there was one
>   external *definition* for "x" in each.
> 
> - Argument (3) explains why "x" has external *linkage*.
> 
> - Argument (4) applies to "x" because "x" has external linkage, and is
>   used in a non-sizeof expression. And the requirement set forth in (4)
>   is broken by the program because the program is required to behave
>   exactly as if "x" had two external definitions.
> 
> In practical terms:
> 
> - If you compile the first version of the program (without any special
>   options), it links together successfully:
> 
>   $ gcc -std=c89 -pedantic -Wall -Wextra -o f f1.c f2.c
> 
> - If you compile the second (equivalent) version of the program,
>   linkage fails:
> 
>   $ gcc -std=c89 -pedantic -Wall -Wextra -o f-b f1-b.c f2-b.c
> 
>   /tmp/cc8Isbn8.o:(.bss+0x0): multiple definition of `x'
>   /tmp/cciQUlDz.o:(.bss+0x0): first defined here
>   collect2: error: ld returned 1 exit status
> 
> - The gcc bug is that linking the first version *too* should fail,
>   without any particular options.

That's true, but it would break existing code that declares variables in
headers without "extern".  That's why Visual Studio does the same.

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


Re: [edk2] [PATCH v3 2/2] ArmVirtPkg: Add memory space for the high memory nodes

2015-12-04 Thread Laszlo Ersek
On 12/04/15 16:26, Ard Biesheuvel wrote:
> On 4 December 2015 at 12:53, Laszlo Ersek  wrote:
>> Nice in general; I have three comments:
>>
>> On 12/04/15 11:13, Shannon Zhao wrote:
>>> From: Shannon Zhao 
>>>
>>> Here we add the memory space for the high memory nodes except the lowest
>>> one in FDT. So these spaces will show up in the UEFI memory map.
>>>
>>> Contributed-under: TianoCore Contribution Agreement 1.0
>>> Signed-off-by: Shannon Zhao 
>>> ---
>>>  ArmVirtPkg/ArmVirtQemu.dsc   |   1 +
>>>  ArmVirtPkg/ArmVirtQemu.fdf   |   1 +
>>>  ArmVirtPkg/HighMemDxe/HighMemDxe.c   | 105 
>>> +++
>>>  ArmVirtPkg/HighMemDxe/HighMemDxe.inf |  51 +
>>>  4 files changed, 158 insertions(+)
>>>  create mode 100644 ArmVirtPkg/HighMemDxe/HighMemDxe.c
>>>  create mode 100644 ArmVirtPkg/HighMemDxe/HighMemDxe.inf
>>>
>>> diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
>>> index b0d1d08..e6440ec 100644
>>> --- a/ArmVirtPkg/ArmVirtQemu.dsc
>>> +++ b/ArmVirtPkg/ArmVirtQemu.dsc
>>> @@ -302,6 +302,7 @@
>>># Platform Driver
>>>#
>>>ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
>>> +  ArmVirtPkg/HighMemDxe/HighMemDxe.inf
>>>OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
>>>OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
>>>OvmfPkg/VirtioNetDxe/VirtioNet.inf
>>> diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf
>>> index 738e3db..f5e6cbd 100644
>>> --- a/ArmVirtPkg/ArmVirtQemu.fdf
>>> +++ b/ArmVirtPkg/ArmVirtQemu.fdf
>>> @@ -108,6 +108,7 @@ READ_LOCK_STATUS   = TRUE
>>>INF MdeModulePkg/Core/Dxe/DxeMain.inf
>>>INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
>>>INF ArmVirtPkg/VirtFdtDxe/VirtFdtDxe.inf
>>> +  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf
>>>
>>>#
>>># PI DXE Drivers producing Architectural Protocols (EFI Services)
>>> diff --git a/ArmVirtPkg/HighMemDxe/HighMemDxe.c 
>>> b/ArmVirtPkg/HighMemDxe/HighMemDxe.c
>>> new file mode 100644
>>> index 000..08b010e
>>> --- /dev/null
>>> +++ b/ArmVirtPkg/HighMemDxe/HighMemDxe.c
>>> @@ -0,0 +1,105 @@
>>> +/** @file
>>> +*  High memory node enumeration DXE driver for ARM Virtual Machines
>>> +*
>>> +*  Copyright (c) 2015, Linaro Ltd. 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 
>>> +
>>> +EFI_STATUS
>>> +EFIAPI
>>> +InitializeHighMemDxe (
>>> +  IN EFI_HANDLE   ImageHandle,
>>> +  IN EFI_SYSTEM_TABLE *SystemTable
>>> +  )
>>> +{
>>> +  VOID *Hob;
>>> +  VOID *DeviceTreeBase;
>>> +  INT32Node, Prev;
>>> +  EFI_STATUS   Status;
>>> +  CONST CHAR8  *Type;
>>> +  INT32Len;
>>> +  CONST VOID   *RegProp;
>>> +  UINT64   CurBase;
>>> +  UINT64   CurSize;
>>> +
>>> +  Hob = GetFirstGuidHob(&gFdtHobGuid);
>>> +  if (Hob == NULL || GET_GUID_HOB_DATA_SIZE (Hob) != sizeof (UINT64)) {
>>> +return EFI_NOT_FOUND;
>>> +  }
>>> +  DeviceTreeBase = (VOID *)(UINTN)*(UINT64 *)GET_GUID_HOB_DATA (Hob);
>>> +
>>> +  if (fdt_check_header (DeviceTreeBase) != 0) {
>>> +DEBUG ((EFI_D_ERROR, "%a: No DTB found @ 0x%p\n", __FUNCTION__, 
>>> DeviceTreeBase));
>>> +return EFI_NOT_FOUND;
>>> +  }
>>> +
>>> +  DEBUG ((EFI_D_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, DeviceTreeBase));
>>> +
>>> +  //
>>> +  // Check for memory node and add the memory spaces expect the lowest one
>>> +  //
>>> +  for (Prev = 0;; Prev = Node) {
>>> +Node = fdt_next_node (DeviceTreeBase, Prev, NULL);
>>> +if (Node < 0) {
>>> +  break;
>>> +}
>>> +
>>> +Type = fdt_getprop (DeviceTreeBase, Node, "device_type", &Len);
>>> +if (Type && AsciiStrnCmp (Type, "memory", Len) == 0) {
>>> +  //
>>> +  // Get the 'reg' property of this node. For now, we will assume
>>> +  // two 8 byte quantities for base and size, respectively.
>>> +  //
>>> +  RegProp = fdt_getprop (DeviceTreeBase, Node, "reg", &Len);
>>> +  if (RegProp != 0 && Len == (2 * sizeof (UINT64))) {
>>
>> (1) This is valid C, but our coding style requires "RegProp != NULL".
>>
>> I can fix this up when committing the patch.
>>
>>> +
>>> +CurBase = fdt64_to_cpu (((UINT64 *)RegProp)[0]);
>>> +CurSize = fdt64_to_cpu (((UINT64 *)RegProp)[1]);
>>> +
>>> +if (FixedPcdGet64 (PcdSystemMemoryBase) != CurBase) {
>>> +  Status = gDS->AddMemorySpace (
>>> +  EfiGcdMemoryTypeSystemMemory,
>>> +

Re: [edk2] [PATCH] BaseTools GCC: avoid the use of COMMON symbols

2015-12-04 Thread Laszlo Ersek
On 12/04/15 17:23, Paolo Bonzini wrote:
> 
> 
> On 04/12/2015 11:39, Laszlo Ersek wrote:
>> (4) Linking those two files into a complete program is a violation of
>> "6.7 External definitions":
>>
>> [...] If an identifier declared with external linkage is used in an
>> expression (other than as part of the operand of a *sizeof*
>> operator), somewhere in the entire program there shall be exactly
>> one external definition for the identifier [...]
>>
>> Again, how does the argument go?
>>
>> - In each file we have exactly one tentative definition, and no
>>   declaration that would be, in its own right, an external definition.
>>   Based on (2), the files must behave exactly as-if there was one
>>   external *definition* for "x" in each.
>>
>> - Argument (3) explains why "x" has external *linkage*.
>>
>> - Argument (4) applies to "x" because "x" has external linkage, and is
>>   used in a non-sizeof expression. And the requirement set forth in (4)
>>   is broken by the program because the program is required to behave
>>   exactly as if "x" had two external definitions.
>>
>> In practical terms:
>>
>> - If you compile the first version of the program (without any special
>>   options), it links together successfully:
>>
>>   $ gcc -std=c89 -pedantic -Wall -Wextra -o f f1.c f2.c
>>
>> - If you compile the second (equivalent) version of the program,
>>   linkage fails:
>>
>>   $ gcc -std=c89 -pedantic -Wall -Wextra -o f-b f1-b.c f2-b.c
>>
>>   /tmp/cc8Isbn8.o:(.bss+0x0): multiple definition of `x'
>>   /tmp/cciQUlDz.o:(.bss+0x0): first defined here
>>   collect2: error: ld returned 1 exit status
>>
>> - The gcc bug is that linking the first version *too* should fail,
>>   without any particular options.
> 
> That's true, but it would break existing code that declares variables in
> headers without "extern". 

I agree. After I posted the email I pondered what it would take to fix
this in gcc. It would be impossible. :)

> That's why Visual Studio does the same.

Looks plausible.

Thanks!
Laszlo

> 
> Paolo
> 

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


Re: [edk2] [PATCH] BaseTools GCC: avoid the use of COMMON symbols

2015-12-04 Thread Ard Biesheuvel
On 4 December 2015 at 17:27, Laszlo Ersek  wrote:
> On 12/04/15 17:23, Paolo Bonzini wrote:
>>
>>
>> On 04/12/2015 11:39, Laszlo Ersek wrote:
>>> (4) Linking those two files into a complete program is a violation of
>>> "6.7 External definitions":
>>>
>>> [...] If an identifier declared with external linkage is used in an
>>> expression (other than as part of the operand of a *sizeof*
>>> operator), somewhere in the entire program there shall be exactly
>>> one external definition for the identifier [...]
>>>
>>> Again, how does the argument go?
>>>
>>> - In each file we have exactly one tentative definition, and no
>>>   declaration that would be, in its own right, an external definition.
>>>   Based on (2), the files must behave exactly as-if there was one
>>>   external *definition* for "x" in each.
>>>
>>> - Argument (3) explains why "x" has external *linkage*.
>>>
>>> - Argument (4) applies to "x" because "x" has external linkage, and is
>>>   used in a non-sizeof expression. And the requirement set forth in (4)
>>>   is broken by the program because the program is required to behave
>>>   exactly as if "x" had two external definitions.
>>>
>>> In practical terms:
>>>
>>> - If you compile the first version of the program (without any special
>>>   options), it links together successfully:
>>>
>>>   $ gcc -std=c89 -pedantic -Wall -Wextra -o f f1.c f2.c
>>>
>>> - If you compile the second (equivalent) version of the program,
>>>   linkage fails:
>>>
>>>   $ gcc -std=c89 -pedantic -Wall -Wextra -o f-b f1-b.c f2-b.c
>>>
>>>   /tmp/cc8Isbn8.o:(.bss+0x0): multiple definition of `x'
>>>   /tmp/cciQUlDz.o:(.bss+0x0): first defined here
>>>   collect2: error: ld returned 1 exit status
>>>
>>> - The gcc bug is that linking the first version *too* should fail,
>>>   without any particular options.
>>
>> That's true, but it would break existing code that declares variables in
>> headers without "extern".
>
> I agree. After I posted the email I pondered what it would take to fix
> this in gcc. It would be impossible. :)
>
>> That's why Visual Studio does the same.
>
> Looks plausible.
>
> Thanks!
> Laszlo
>

Indeed. Liming is looking into that. I spotted very few issues with
-fno-common, only two in CryptoPkg, so I think we should disallow
common allocations going forward if we can, especially since the
modularity of EDK2 makes it almost impossible to guarantee that it
never leads to problems.

Qin has already acked a fix for one of those issues, I will ping him
for the other one. In the mean time, perhaps GCC users could double
check whether there is any breakage? Laszlo, could you check your OVMF
builds, please?

I won't merge this until we have some more confidence that the rest of
the code base is COMMON clean.

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


Re: [edk2] [PATCH] CryptoPkg: remove global variable 'timeval' from OpenSslSupport.h

2015-12-04 Thread Ard Biesheuvel
On 3 December 2015 at 10:32, Ard Biesheuvel  wrote:
> The header file OpenSslSupport.h not only defines a type 'struct timeval'
> but also defines a global variable 'timeval' of that type. The RVCT
> compiler does not merge this definition into a common symbol, resulting
> in duplicate definition errors in the final link. So remove the
> variable definition.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel 

Qin,

This is another patch that fixes the build for RVCT. Note that this is
also related to the -fno-common discussion, but in this particular
case, I don't think the 'timeval' variable is actually ever used.

Thanks,
Ard.



> ---
>  CryptoPkg/Include/OpenSslSupport.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/CryptoPkg/Include/OpenSslSupport.h 
> b/CryptoPkg/Include/OpenSslSupport.h
> index 64bef42d0595..239ae8bd6f41 100644
> --- a/CryptoPkg/Include/OpenSslSupport.h
> +++ b/CryptoPkg/Include/OpenSslSupport.h
> @@ -139,7 +139,7 @@ struct tm {
>  struct timeval {
>long tv_sec;  /* time value, in seconds */
>long tv_usec; /* time value, in microseconds */
> -} timeval;
> +};
>
>  struct dirent {
>UINT32  d_fileno; /* file number of entry */
> --
> 1.9.1
>
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch] ShellPkg: Fix ifconfig hang issue with incomplete parameters

2015-12-04 Thread Carsey, Jaben
Looks good to me.  I think we should wait for Leekha for up to a few days to 
confirm that this fixes the problem at their location.

Reviewed-by: Jaben Carsey 

-Jaben

> -Original Message-
> From: Wu, Jiaxin
> Sent: Thursday, December 03, 2015 5:27 PM
> To: edk2-devel@lists.01.org
> Cc: Leekha Shaveta ; Carsey, Jaben
> ; Ye, Ting 
> Subject: [Patch] ShellPkg: Fix ifconfig hang issue with incomplete parameters
> Importance: High
> 
> This patch is used to fix ifconfig hang issue with incomplete
> parameters. In addition, some error related output information
> is added to increase the interactivity.
> 
> Cc: Leekha Shaveta 
> Cc: Carsey Jaben 
> Cc: Ye Ting 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiaxin Wu 
> ---
>  .../UefiShellNetwork1CommandsLib/Ifconfig.c|  61 --
> ---
>  .../UefiShellNetwork1CommandsLib.uni   | Bin 21094 -> 21256 bytes
>  2 files changed, 47 insertions(+), 14 deletions(-)
> 
> diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
> b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
> index fb6f575..f8dbc88 100644
> --- a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
> +++ b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
> @@ -826,10 +826,11 @@ IfConfigClearInterfaceInfo (
>  Ip4Config2DataTypePolicy,
>  sizeof (EFI_IP4_CONFIG2_POLICY),
>  &Policy
>  );
>  if (EFI_ERROR (Status)) {
> +  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD),
> gShellNetwork1HiiHandle, L"ifconfig");
>ShellStatus = SHELL_ACCESS_DENIED;
>break;
>  }
>}
> 
> @@ -902,10 +903,11 @@ IfConfigSetInterfaceInfo (
>NULL,
>NULL,
>&TimeOutEvt
>);
>if (EFI_ERROR (Status)) {
> +ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD),
> gShellNetwork1HiiHandle, L"ifconfig");
>  ShellStatus = SHELL_ACCESS_DENIED;
>  goto ON_EXIT;
>}
> 
>Status = gBS->CreateEvent (
> @@ -914,10 +916,11 @@ IfConfigSetInterfaceInfo (
>IfConfigManualAddressNotify,
>&IsAddressOk,
>&MappedEvt
>);
>if (EFI_ERROR (Status)) {
> +ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD),
> gShellNetwork1HiiHandle, L"ifconfig");
>  ShellStatus = SHELL_ACCESS_DENIED;
>  goto ON_EXIT;
>}
> 
>//
> @@ -972,10 +975,11 @@ IfConfigSetInterfaceInfo (
>  //
>  if (StrCmp(VarArg->Arg, L"dhcp") == 0) {
>if (IfCb->Policy == Ip4Config2PolicyDhcp) {
>  Status = IfConfigStartIp4 (IfCb->NicHandle, gImageHandle);
>  if (EFI_ERROR(Status)) {
> +  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD),
> gShellNetwork1HiiHandle, L"ifconfig");
>ShellStatus = SHELL_ACCESS_DENIED;
>goto ON_EXIT;
>  }
>} else {
>  //
> @@ -987,74 +991,100 @@ IfConfigSetInterfaceInfo (
>  Ip4Config2DataTypePolicy,
>  sizeof (EFI_IP4_CONFIG2_POLICY),
>  &Policy
>  );
>  if (EFI_ERROR(Status)) {
> +  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD),
> gShellNetwork1HiiHandle, L"ifconfig");
>ShellStatus = SHELL_ACCESS_DENIED;
>goto ON_EXIT;
>  }
>}
> 
>VarArg= VarArg->Next;
> 
>  } else if (StrCmp (VarArg->Arg, L"static") == 0) {
> -  //
> -  // Set manual config policy.
> -  //
> -  Policy = Ip4Config2PolicyStatic;
> -  Status = IfCb->IfCfg->SetData (
> -  IfCb->IfCfg,
> -  Ip4Config2DataTypePolicy,
> -  sizeof (EFI_IP4_CONFIG2_POLICY),
> -  &Policy
> -  );
> -  if (EFI_ERROR(Status)) {
> -ShellStatus = SHELL_ACCESS_DENIED;
> +  VarArg= VarArg->Next;
> +  if (VarArg == NULL) {
> +ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN
> (STR_IFCONFIG_LACK_COMMAND), gShellNetwork1HiiHandle);
> +ShellStatus = SHELL_INVALID_PARAMETER;
>  goto ON_EXIT;
>}
> 
> -  VarArg= VarArg->Next;
> -
>ZeroMem (&ManualAddress, sizeof (ManualAddress));
> 
>//
>// Get manual IP address.
>//
>Status = NetLibStrToIp4 (VarArg->Arg, &ManualAddress.Address);
>if (EFI_ERROR(Status)) {
> +ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN
> (STR_IFCONFIG_INVALID_IPADDRESS), gShellNetwork1HiiHandle, VarArg-
> >Arg);
>  ShellStatus = SHELL_INVALID_PARAMETER;
>  goto ON_EXIT;
>}
> 
>//
>// Get subnetmask.
>//
>VarArg = VarArg->Next;
> +  

Re: [edk2] [PATCH] CryptoPkg: remove global variable 'timeval' from OpenSslSupport.h

2015-12-04 Thread Long, Qin
Sorry, I missed this patch. Yes, this looks good. 

Reviewed-by: Qin Long 


Best Regards & Thanks,
LONG, Qin

> -Original Message-
> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> Sent: Saturday, December 5, 2015 12:45 AM
> To: edk2-devel@lists.01.org; Long, Qin
> Cc: Ard Biesheuvel
> Subject: Re: [PATCH] CryptoPkg: remove global variable 'timeval' from 
> OpenSslSupport.h
> 
> On 3 December 2015 at 10:32, Ard Biesheuvel  wrote:
> > The header file OpenSslSupport.h not only defines a type 'struct timeval'
> > but also defines a global variable 'timeval' of that type. The RVCT
> > compiler does not merge this definition into a common symbol, resulting
> > in duplicate definition errors in the final link. So remove the
> > variable definition.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Ard Biesheuvel 
> 
> Qin,
> 
> This is another patch that fixes the build for RVCT. Note that this is
> also related to the -fno-common discussion, but in this particular
> case, I don't think the 'timeval' variable is actually ever used.
> 
> Thanks,
> Ard.
> 
> 
> 
> > ---
> >  CryptoPkg/Include/OpenSslSupport.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/CryptoPkg/Include/OpenSslSupport.h 
> > b/CryptoPkg/Include/OpenSslSupport.h
> > index 64bef42d0595..239ae8bd6f41 100644
> > --- a/CryptoPkg/Include/OpenSslSupport.h
> > +++ b/CryptoPkg/Include/OpenSslSupport.h
> > @@ -139,7 +139,7 @@ struct tm {
> >  struct timeval {
> >long tv_sec;  /* time value, in seconds */
> >long tv_usec; /* time value, in microseconds */
> > -} timeval;
> > +};
> >
> >  struct dirent {
> >UINT32  d_fileno; /* file number of entry */
> > --
> > 1.9.1
> >
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] BaseTools GCC: avoid the use of COMMON symbols

2015-12-04 Thread Jordan Justen
On 2015-12-04 08:43:29, Ard Biesheuvel wrote:
> On 4 December 2015 at 17:27, Laszlo Ersek  wrote:
> > On 12/04/15 17:23, Paolo Bonzini wrote:
> >>
> >>
> >> On 04/12/2015 11:39, Laszlo Ersek wrote:
> >>> (4) Linking those two files into a complete program is a violation of
> >>> "6.7 External definitions":
> >>>
> >>> [...] If an identifier declared with external linkage is used in an
> >>> expression (other than as part of the operand of a *sizeof*
> >>> operator), somewhere in the entire program there shall be exactly
> >>> one external definition for the identifier [...]
> >>>
> >>> Again, how does the argument go?
> >>>
> >>> - In each file we have exactly one tentative definition, and no
> >>>   declaration that would be, in its own right, an external definition.
> >>>   Based on (2), the files must behave exactly as-if there was one
> >>>   external *definition* for "x" in each.
> >>>
> >>> - Argument (3) explains why "x" has external *linkage*.
> >>>
> >>> - Argument (4) applies to "x" because "x" has external linkage, and is
> >>>   used in a non-sizeof expression. And the requirement set forth in (4)
> >>>   is broken by the program because the program is required to behave
> >>>   exactly as if "x" had two external definitions.
> >>>
> >>> In practical terms:
> >>>
> >>> - If you compile the first version of the program (without any special
> >>>   options), it links together successfully:
> >>>
> >>>   $ gcc -std=c89 -pedantic -Wall -Wextra -o f f1.c f2.c
> >>>
> >>> - If you compile the second (equivalent) version of the program,
> >>>   linkage fails:
> >>>
> >>>   $ gcc -std=c89 -pedantic -Wall -Wextra -o f-b f1-b.c f2-b.c
> >>>
> >>>   /tmp/cc8Isbn8.o:(.bss+0x0): multiple definition of `x'
> >>>   /tmp/cciQUlDz.o:(.bss+0x0): first defined here
> >>>   collect2: error: ld returned 1 exit status
> >>>
> >>> - The gcc bug is that linking the first version *too* should fail,
> >>>   without any particular options.
> >>
> >> That's true, but it would break existing code that declares variables in
> >> headers without "extern".
> >
> > I agree. After I posted the email I pondered what it would take to fix
> > this in gcc. It would be impossible. :)
> >
> >> That's why Visual Studio does the same.
> >
> > Looks plausible.
> >
> > Thanks!
> > Laszlo
> >
> 
> Indeed. Liming is looking into that. I spotted very few issues with
> -fno-common, only two in CryptoPkg, so I think we should disallow
> common allocations going forward if we can, especially since the
> modularity of EDK2 makes it almost impossible to guarantee that it
> never leads to problems.
> 
> Qin has already acked a fix for one of those issues, I will ping him
> for the other one. In the mean time, perhaps GCC users could double
> check whether there is any breakage? Laszlo, could you check your OVMF
> builds, please?

I'm seeing a build error with MdeModulePkg and OvmfPkg. This is with
gcc 5.2 using the GCC49 toolchain.

Both cases seem to be unitialized global variables declared in a
single .c file. I'm not sure what needs to be changed to fix this.

MdeModulePkg:

"ld" -o 
Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/DEBUG/MemoryProfileInfo.dll
 -nostdlib -n -q --gc-sections -z common-page-size=0x40 --entry 
_ModuleEntryPoint -u _ModuleEntryPoint -Map 
Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/DEBUG/MemoryProfileInfo.map
 -melf_x86_64 --oformat=elf64-x86-64 --start-group  
@Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/OUTPUT/static_library_files.lst
 --end-group --defsym=PECOFF_HEADER_SIZE=0x228 
--script=BaseTools/Scripts/GccBase.lds
`mNameString' referenced in section `.text.GetDriverNameString' of 
Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/OUTPUT/MemoryProfileInfo.lib(MemoryProfileInfo.obj):
 defined in discarded section `COMMON' of 
Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/OUTPUT/MemoryProfileInfo.lib(MemoryProfileInfo.obj)
`mNameString' referenced in section `.text.GetDriverNameString' of 
Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/OUTPUT/MemoryProfileInfo.lib(MemoryProfileInfo.obj):
 defined in discarded section `COMMON' of 
Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/OUTPUT/MemoryProfileInfo.lib(MemoryProfileInfo.obj)
`mNameString' referenced in section `.text.GetDriverNameString' of 
Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/OUTPUT/MemoryProfileInfo.lib(MemoryProfileInfo.obj):
 defined in discarded section `COMMON' of 
Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/OUTPUT/MemoryProfileInfo.lib(MemoryProfileInfo.obj)
`mNameString' referenced in section `.text.GetDriverName

Re: [edk2] [PATCH] BaseTools GCC: avoid the use of COMMON symbols

2015-12-04 Thread Ard Biesheuvel
On 4 December 2015 at 20:13, Jordan Justen  wrote:
> On 2015-12-04 08:43:29, Ard Biesheuvel wrote:
>> On 4 December 2015 at 17:27, Laszlo Ersek  wrote:
>> > On 12/04/15 17:23, Paolo Bonzini wrote:
>> >>
>> >>
>> >> On 04/12/2015 11:39, Laszlo Ersek wrote:
>> >>> (4) Linking those two files into a complete program is a violation of
>> >>> "6.7 External definitions":
>> >>>
>> >>> [...] If an identifier declared with external linkage is used in an
>> >>> expression (other than as part of the operand of a *sizeof*
>> >>> operator), somewhere in the entire program there shall be exactly
>> >>> one external definition for the identifier [...]
>> >>>
>> >>> Again, how does the argument go?
>> >>>
>> >>> - In each file we have exactly one tentative definition, and no
>> >>>   declaration that would be, in its own right, an external definition.
>> >>>   Based on (2), the files must behave exactly as-if there was one
>> >>>   external *definition* for "x" in each.
>> >>>
>> >>> - Argument (3) explains why "x" has external *linkage*.
>> >>>
>> >>> - Argument (4) applies to "x" because "x" has external linkage, and is
>> >>>   used in a non-sizeof expression. And the requirement set forth in (4)
>> >>>   is broken by the program because the program is required to behave
>> >>>   exactly as if "x" had two external definitions.
>> >>>
>> >>> In practical terms:
>> >>>
>> >>> - If you compile the first version of the program (without any special
>> >>>   options), it links together successfully:
>> >>>
>> >>>   $ gcc -std=c89 -pedantic -Wall -Wextra -o f f1.c f2.c
>> >>>
>> >>> - If you compile the second (equivalent) version of the program,
>> >>>   linkage fails:
>> >>>
>> >>>   $ gcc -std=c89 -pedantic -Wall -Wextra -o f-b f1-b.c f2-b.c
>> >>>
>> >>>   /tmp/cc8Isbn8.o:(.bss+0x0): multiple definition of `x'
>> >>>   /tmp/cciQUlDz.o:(.bss+0x0): first defined here
>> >>>   collect2: error: ld returned 1 exit status
>> >>>
>> >>> - The gcc bug is that linking the first version *too* should fail,
>> >>>   without any particular options.
>> >>
>> >> That's true, but it would break existing code that declares variables in
>> >> headers without "extern".
>> >
>> > I agree. After I posted the email I pondered what it would take to fix
>> > this in gcc. It would be impossible. :)
>> >
>> >> That's why Visual Studio does the same.
>> >
>> > Looks plausible.
>> >
>> > Thanks!
>> > Laszlo
>> >
>>
>> Indeed. Liming is looking into that. I spotted very few issues with
>> -fno-common, only two in CryptoPkg, so I think we should disallow
>> common allocations going forward if we can, especially since the
>> modularity of EDK2 makes it almost impossible to guarantee that it
>> never leads to problems.
>>
>> Qin has already acked a fix for one of those issues, I will ping him
>> for the other one. In the mean time, perhaps GCC users could double
>> check whether there is any breakage? Laszlo, could you check your OVMF
>> builds, please?
>
> I'm seeing a build error with MdeModulePkg and OvmfPkg. This is with
> gcc 5.2 using the GCC49 toolchain.
>
> Both cases seem to be unitialized global variables declared in a
> single .c file. I'm not sure what needs to be changed to fix this.
>
> MdeModulePkg:
>
> "ld" -o 
> Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/DEBUG/MemoryProfileInfo.dll
>  -nostdlib -n -q --gc-sections -z common-page-size=0x40 --entry 
> _ModuleEntryPoint -u _ModuleEntryPoint -Map 
> Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/DEBUG/MemoryProfileInfo.map
>  -melf_x86_64 --oformat=elf64-x86-64 --start-group  
> @Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/OUTPUT/static_library_files.lst
>  --end-group --defsym=PECOFF_HEADER_SIZE=0x228 
> --script=BaseTools/Scripts/GccBase.lds
> `mNameString' referenced in section `.text.GetDriverNameString' of 
> Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/OUTPUT/MemoryProfileInfo.lib(MemoryProfileInfo.obj):
>  defined in discarded section `COMMON' of 
> Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/OUTPUT/MemoryProfileInfo.lib(MemoryProfileInfo.obj)
> `mNameString' referenced in section `.text.GetDriverNameString' of 
> Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/OUTPUT/MemoryProfileInfo.lib(MemoryProfileInfo.obj):
>  defined in discarded section `COMMON' of 
> Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/OUTPUT/MemoryProfileInfo.lib(MemoryProfileInfo.obj)
> `mNameString' referenced in section `.text.GetDriverNameString' of 
> Build/MdeModule/DEBUG_GCC49/X64/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo/OUTPUT/MemoryProfileInfo.lib(MemoryProfileInfo.obj):
>  defined in discarded section `COMMON' of 
> Build/MdeModule/DEBUG_GC

Re: [edk2] [PATCH] BaseTools GCC: avoid the use of COMMON symbols

2015-12-04 Thread Daryl McDaniel
On Friday, December 04, 2015, Laszlo Ersek wrote:
> Now, after reading the -fno-common documentation in the gcc manual, I'm
> actually *convinced* this is a gcc bug. The manual says on my RHEL-7.2
> system (excerpt):
> 
>-fno-common
>In C code, controls the placement of uninitialized global
>variables.  Unix C compilers have traditionally permitted
>multiple definitions of such variables in different
>compilation units by placing the variables in a common
>block.  This is the behavior specified by -fcommon, and is
>the default for GCC on most targets.  On the other hand,
>this behavior is not required by ISO C, [...]
> 

I think this part of the GCC documentation was written a bit sloppily and used
"definition" instead of "declaration".  Since it is talking about
"uninitialized" global variables, then it is a "tentative definition" and
"the behavior is exactly as if the translation unit contains a
file scope |declaration| of that identifier...".

> Let us stop right there -- this  behavior is *forbidden* by ISO C,
> which can be proved if someone takes the time to decipher the nearly
> impenetrable passages on declarations and definitions.

I disagree, unless you are talking about the behavior of the -fno-common flag
or where the GCC doc. says "this behavior is not required by ISO C".
I think use of the -fno-common flag produces non-conforming behavior.

> This means that the above program (of two files) is equivalent to:
> 
> f1-b.c:
> 
> int x = 0;
> 
> 
> f2-b.c:
> 
> int x = 0;
> int main(void) { return x; }
> 
> 
> Therefore *each* file is ultimately required to behave "as if" it
> contains one external definition for "x".

I strongly disagree.  I believe the misunderstanding occurs from the very sloppy
use of the term "translation unit" in the C specs; from ANSII (C89) through
ISO/IEC 9899:TC3.  The definition of a "translation unit" (TU) is fairly well
defined as a single preprocessed C file, but the specs are inconsistent in
describing whether something applies to a SINGLE TU or a SET of TUs.

Also poorly described is the difference between "translation" and "linking".
While "linking" is beyond the scope of the spec., and since the process of
"linking", and the use of "libraries", is mentioned many times, the spec could
have been clearer about how this interacts with "translation units".

>From the spec as a whole, one can infer that a library is treated as a TU and
when linked with other TUs to produce an executable program the entire set is
treated as a single unit for linkage purposes.

The "implicit initialization" described in item 2 of section
"External object definitions" seems to contradict other parts of the C spec.
if one maintains that the TUs must be thought of as individual files in 
isolation.

Here are the specification sections related to this.

5.1.1.1 Program structure
  1 A C program need not all be translated at the same time. The text of the
program is kept in units called source files, (or preprocessing files) in
this International Standard. A source file together with all the headers
and source files included via the preprocessing directive #include is known
as a preprocessing translation unit. After preprocessing, a preprocessing
translation unit is called a translation unit. Previously translated
translation units may be preserved individually or in libraries. The
separate translation units of a program communicate by (for example) calls
to functions whose identifiers have external linkage, manipulation of
objects whose identifiers have external linkage, or manipulation of data
files. Translation units may be separately translated and then later linked
to produce an executable program.

6.2.2 Linkages of identifiers
  1  An identifier declared in different scopes or in the same scope more than
 once can be made to refer to the same object or function by a process
 called linkage. [...]
 
  2 In the set of translation units and libraries that constitutes an entire
program, each declaration of a particular identifier with external linkage
denotes the same object or function. Within one translation unit, each
declaration of an identifier with internal linkage denotes the same object
or function. [...]

6.2.4 Storage durations of objects
  3 An object whose identifier is declared with external or internal linkage,
or with the storage-class specifier static has static storage duration.
Its lifetime is the entire execution of the program and its stored value
is initialized only once, prior to program startup.

6.9 External definitions
  Syntax
1 translation-unit:
external-declaration
translation-unit external-declaration
  external-declaration:
function-definition
declaration

  Semantics
4 As discussed i

Re: [edk2] [PATCH] BaseTools GCC: avoid the use of COMMON symbols

2015-12-04 Thread Ard Biesheuvel
On 4 December 2015 at 20:20, Daryl McDaniel  wrote:
[...]
>> On 12/03/15 13:54, Ard Biesheuvel wrote:
>>> The default behavior of the GCC compiler is to emit uninitialized
>>> globals into a COMMON section, where duplicate definitions are merged.
>>> This may result in unexpected behavior, since global variables appearing
>>> by the same name in different C files typically do not refer to the same
>>> conceptual data item.
>
> If the files are being linked together, then this is exactly the correct
> behavior.  If the variables do not refer to the "same conceptual data item"
> then they either have to be renamed or made static.
>

Indeed. This remains true regardless of whether we use -fno-common or
not, and the only difference is that we will flag them rather than let
the compiler silently merge them. And if no instances remain that are
intended uses of COMMON behavior, it no longer matters whether we pass
-fno-common or not.

> This is a common problem when combining code that comes from multiple
> unrelated sources.  Checking for this type of name collision should be part
> of the porting process.
>
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v2 02/20] ArmPkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py ArmPkg

Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 ArmPkg/Application/LinuxLoader/LinuxLoader.uni | Bin 8166 -> 4082 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/ArmPkg/Application/LinuxLoader/LinuxLoader.uni 
b/ArmPkg/Application/LinuxLoader/LinuxLoader.uni
index 861c2b4..5da072d 100644
Binary files a/ArmPkg/Application/LinuxLoader/LinuxLoader.uni and 
b/ArmPkg/Application/LinuxLoader/LinuxLoader.uni differ
-- 
2.6.2

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


[edk2] [PATCH v2 03/20] ArmPlatformPkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py ArmPlatformPkg

Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 .../Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.uni   | Bin 6472 -> 3235 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/ArmPlatformPkg/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.uni 
b/ArmPlatformPkg/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.uni
index 33cc734..6b72960 100644
Binary files a/ArmPlatformPkg/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.uni 
and b/ArmPlatformPkg/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.uni differ
-- 
2.6.2

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


[edk2] [PATCH v2 07/20] EmulatorPkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py EmulatorPkg

Cc: Andrew Fish 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 .../MiscBaseBoardManufacturer.uni | Bin 2214 -> 1106 bytes
 .../MiscSubClassPlatformDxe/MiscBiosVendor.uni| Bin 1588 -> 793 bytes
 .../MiscChassisManufacturer.uni   | Bin 1774 -> 886 bytes
 EmulatorPkg/MiscSubClassPlatformDxe/MiscOemString.uni | Bin 1312 -> 655 bytes
 .../MiscPortInternalConnectorDesignator.uni   | Bin 8914 -> 4456 bytes
 .../MiscSubClassPlatformDxe/MiscSubClassDriver.uni| Bin 2004 -> 1001 bytes
 .../MiscSystemLanguageString.uni  | Bin 1314 -> 656 bytes
 .../MiscSystemManufacturer.uni| Bin 1772 -> 885 bytes
 .../MiscSystemOptionString.uni| Bin 1308 -> 653 bytes
 .../MiscSystemSlotDesignation.uni | Bin 1322 -> 660 bytes
 10 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturer.uni 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturer.uni
index 669654e..566d6cb 100644
Binary files 
a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturer.uni and 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturer.uni differ
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBiosVendor.uni 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBiosVendor.uni
index dda02d2..b0c212c 100644
Binary files a/EmulatorPkg/MiscSubClassPlatformDxe/MiscBiosVendor.uni and 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscBiosVendor.uni differ
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscChassisManufacturer.uni 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscChassisManufacturer.uni
index 177ff38..fad78a4 100644
Binary files a/EmulatorPkg/MiscSubClassPlatformDxe/MiscChassisManufacturer.uni 
and b/EmulatorPkg/MiscSubClassPlatformDxe/MiscChassisManufacturer.uni differ
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscOemString.uni 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscOemString.uni
index 782a83b..67bd776 100644
Binary files a/EmulatorPkg/MiscSubClassPlatformDxe/MiscOemString.uni and 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscOemString.uni differ
diff --git 
a/EmulatorPkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignator.uni 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignator.uni
index 87c5a81..c0319f1 100644
Binary files 
a/EmulatorPkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignator.uni 
and 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignator.uni 
differ
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubClassDriver.uni 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubClassDriver.uni
index 7a4e8a2..897662a 100644
Binary files a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubClassDriver.uni and 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSubClassDriver.uni differ
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemLanguageString.uni 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemLanguageString.uni
index 709c53a..46cd9d3 100644
Binary files a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemLanguageString.uni 
and b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemLanguageString.uni differ
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemManufacturer.uni 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemManufacturer.uni
index 3ff890b..59563cf 100644
Binary files a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemManufacturer.uni 
and b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemManufacturer.uni differ
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemOptionString.uni 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemOptionString.uni
index abf2da7..fc9e12a 100644
Binary files a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemOptionString.uni 
and b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemOptionString.uni differ
diff --git a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignation.uni 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignation.uni
index 45e9ce3..6740ebf 100644
Binary files 
a/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignation.uni and 
b/EmulatorPkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignation.uni differ
-- 
2.6.2

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


[edk2] [PATCH v2 04/20] CryptoPkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py CryptoPkg

Cc: Qin Long 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 CryptoPkg/Application/Cryptest/Cryptest.uni   | Bin 1924 -> 961 bytes
 CryptoPkg/Application/Cryptest/CryptestExtra.uni  | Bin 1330 -> 664 bytes
 CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxe.uni | Bin 1968 -> 983 bytes
 CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxeExtra.uni| Bin 1358 -> 678 bytes
 CryptoPkg/CryptoPkg.uni   | Bin 2014 -> 1006 bytes
 CryptoPkg/CryptoPkgExtra.uni  | Bin 1344 -> 671 bytes
 CryptoPkg/Library/BaseCryptLib/BaseCryptLib.uni   | Bin 2500 -> 1249 bytes
 CryptoPkg/Library/BaseCryptLib/PeiCryptLib.uni| Bin 3990 -> 1994 bytes
 CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.uni| Bin 3634 -> 1816 bytes
 CryptoPkg/Library/BaseCryptLib/SmmCryptLib.uni| Bin 3602 -> 1800 bytes
 .../BaseCryptLibRuntimeCryptProtocol.uni  | Bin 3586 -> 1792 bytes
 CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni   | Bin 1780 -> 889 bytes
 CryptoPkg/Library/OpensslLib/OpensslLib.uni   | Bin 1742 -> 870 bytes
 13 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/CryptoPkg/Application/Cryptest/Cryptest.uni 
b/CryptoPkg/Application/Cryptest/Cryptest.uni
index 0ae792e..34f5549 100644
Binary files a/CryptoPkg/Application/Cryptest/Cryptest.uni and 
b/CryptoPkg/Application/Cryptest/Cryptest.uni differ
diff --git a/CryptoPkg/Application/Cryptest/CryptestExtra.uni 
b/CryptoPkg/Application/Cryptest/CryptestExtra.uni
index 6887305..530faa5 100644
Binary files a/CryptoPkg/Application/Cryptest/CryptestExtra.uni and 
b/CryptoPkg/Application/Cryptest/CryptestExtra.uni differ
diff --git a/CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxe.uni 
b/CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxe.uni
index 9e49aeb..337cdf4 100644
Binary files a/CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxe.uni and 
b/CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxe.uni differ
diff --git a/CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxeExtra.uni 
b/CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxeExtra.uni
index 584d9ff..7fe3a61 100644
Binary files a/CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxeExtra.uni and 
b/CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxeExtra.uni differ
diff --git a/CryptoPkg/CryptoPkg.uni b/CryptoPkg/CryptoPkg.uni
index 0f3dd22..effb918 100644
Binary files a/CryptoPkg/CryptoPkg.uni and b/CryptoPkg/CryptoPkg.uni differ
diff --git a/CryptoPkg/CryptoPkgExtra.uni b/CryptoPkg/CryptoPkgExtra.uni
index 92e9fd4..71c4a65 100644
Binary files a/CryptoPkg/CryptoPkgExtra.uni and b/CryptoPkg/CryptoPkgExtra.uni 
differ
diff --git a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.uni 
b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.uni
index dcfde21..0060994 100644
Binary files a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.uni and 
b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.uni differ
diff --git a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.uni 
b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.uni
index aaa28d0..41fdbbd 100644
Binary files a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.uni and 
b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.uni differ
diff --git a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.uni 
b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.uni
index fdf3f89..593faa7 100644
Binary files a/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.uni and 
b/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.uni differ
diff --git a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.uni 
b/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.uni
index 89f598a..9b2df98 100644
Binary files a/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.uni and 
b/CryptoPkg/Library/BaseCryptLib/SmmCryptLib.uni differ
diff --git 
a/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/BaseCryptLibRuntimeCryptProtocol.uni
 
b/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/BaseCryptLibRuntimeCryptProtocol.uni
index f16637b..533fffa 100644
Binary files 
a/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/BaseCryptLibRuntimeCryptProtocol.uni
 and 
b/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/BaseCryptLibRuntimeCryptProtocol.uni
 differ
diff --git a/CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni 
b/CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni
index 7435d12..c40b856 100644
Binary files a/CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni and 
b/CryptoPkg/Library/IntrinsicLib/BaseIntrinsicLib.uni differ
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.uni 
b/CryptoPkg/Library/OpensslLib/OpensslLib.uni
index 86412d8..0dffec1 100644
Binary files a/CryptoPkg/Library/OpensslLib/OpensslLib.uni and 
b/CryptoPkg/Library/OpensslLib/OpensslLib.uni differ
-- 
2.6.2

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


[edk2] [PATCH v2 01/20] BaseTools/Scripts: Add ConvertUni.py script

2015-12-04 Thread Jordan Justen
This script uses python codecs to convert .uni string files between
the utf-16 and utf-8 formats.

The advantages of utf-8 data:
 * Generally smaller files
 * More commonly supported by editors
 * Not treated as binary data in patch files

The script was tested on MdePkg with both python 2.7 and python 3.4.
It was able to convert all MdePkg .uni files between utf-8 and utf-16
multiple times always producing the same files for each format.

v2:
 * Rename ConvertUtf16ToUtf8.py to ConvertUni.py
 * Also support utf-8 to utf-16 conversion (with --utf-16)

Cc: Yonghong Zhu 
Cc: Liming Gao 
Cc: Michael D Kinney 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
Reviewed-by: Jaben Carsey 
---
 BaseTools/Scripts/ConvertUni.py | 137 
 1 file changed, 137 insertions(+)
 create mode 100755 BaseTools/Scripts/ConvertUni.py

diff --git a/BaseTools/Scripts/ConvertUni.py b/BaseTools/Scripts/ConvertUni.py
new file mode 100755
index 000..2af55df
--- /dev/null
+++ b/BaseTools/Scripts/ConvertUni.py
@@ -0,0 +1,137 @@
+## @file
+#  Check a patch for various format issues
+#
+#  Copyright (c) 2015, 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.
+#
+
+from __future__ import print_function
+
+VersionNumber = '0.1'
+__copyright__ = "Copyright (c) 2015, Intel Corporation  All rights reserved."
+
+import argparse
+import codecs
+import os
+import sys
+
+try:
+from io import StringIO
+except ImportError:
+from StringIO import StringIO
+
+class ConvertOneArg:
+"""Converts utf-16 to utf-8 for one command line argument.
+
+   This could be a single file, or a directory.
+"""
+
+def __init__(self, utf8, source):
+self.utf8 = utf8
+self.source = source
+
+self.ok = True
+
+if not os.path.exists(source):
+self.ok = False
+elif os.path.isdir(source):
+for (root, dirs, files) in os.walk(source):
+files = filter(lambda a: a.endswith('.uni'), files)
+for filename in files:
+path = os.path.join(root, filename)
+self.ok &= self.convert_one_file(path)
+if not self.ok:
+break
+
+if not self.ok:
+break
+else:
+self.ok &= self.convert_one_file(source)
+
+def convert_one_file(self, source):
+if self.utf8:
+new_enc, old_enc = 'utf-8', 'utf-16'
+else:
+new_enc, old_enc = 'utf-16', 'utf-8'
+#
+# Read file
+#
+f = open(source, mode='rb')
+file_content = f.read()
+f.close()
+
+#
+# Detect UTF-16 Byte Order Mark at beginning of file.
+#
+bom = (file_content.startswith(codecs.BOM_UTF16_BE) or
+   file_content.startswith(codecs.BOM_UTF16_LE))
+if bom != self.utf8:
+print("%s: already %s" % (source, new_enc))
+return True
+
+#
+# Decode old string data
+#
+str_content = file_content.decode(old_enc, 'ignore')
+
+#
+# Encode new string data
+#
+new_content = str_content.encode(new_enc, 'ignore')
+
+#
+# Write converted data back to file
+#
+f = open(source, mode='wb')
+f.write(new_content)
+f.close()
+
+print(source + ": converted, size", len(file_content), '=>', 
len(new_content))
+return True
+
+
+class ConvertUniApp:
+"""Converts .uni files between utf-16 and utf-8."""
+
+def __init__(self):
+self.parse_options()
+sources = self.args.source
+
+self.ok = True
+for patch in sources:
+self.process_one_arg(patch)
+
+if self.ok:
+self.retval = 0
+else:
+self.retval = -1
+
+def process_one_arg(self, arg):
+self.ok &= ConvertOneArg(self.utf8, arg).ok
+
+def parse_options(self):
+parser = argparse.ArgumentParser(description=__copyright__)
+parser.add_argument('--version', action='version',
+version='%(prog)s ' + VersionNumber)
+parser.add_argument('source', nargs='+',
+help='[uni file | directory]')
+group = parser.add_mutually_exclusive_group()
+group.add_argument("--utf-8",
+   action="store_true",
+   help="Convert from utf-16 to utf-8 [default]")
+group.add_argume

[edk2] [PATCH v2 09/20] IntelFrameworkPkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py IntelFrameworkPkg

Cc: Michael D Kinney 
Cc: Jeff Fan 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 IntelFrameworkPkg/IntelFrameworkPkg.uni   | Bin 1930 -> 964 bytes
 IntelFrameworkPkg/IntelFrameworkPkgExtra.uni  | Bin 1358 -> 678 bytes
 .../Library/DxeIoLibCpuIo/DxeIoLibCpuIo.uni   | Bin 1996 -> 997 bytes
 .../DxeSmmDriverEntryPoint/DxeSmmDriverEntryPoint.uni | Bin 1850 -> 924 bytes
 .../Library/FrameworkUefiLib/FrameworkUefiLib.uni | Bin 2616 -> 1307 bytes
 .../Library/PeiHobLibFramework/PeiHobLib.uni  | Bin 2384 -> 1191 bytes
 .../PeiSmbusLibSmbusPpi/PeiSmbusLibSmbusPpi.uni   | Bin 1734 -> 866 bytes
 7 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/IntelFrameworkPkg/IntelFrameworkPkg.uni 
b/IntelFrameworkPkg/IntelFrameworkPkg.uni
index b358886..9b63fd4 100644
Binary files a/IntelFrameworkPkg/IntelFrameworkPkg.uni and 
b/IntelFrameworkPkg/IntelFrameworkPkg.uni differ
diff --git a/IntelFrameworkPkg/IntelFrameworkPkgExtra.uni 
b/IntelFrameworkPkg/IntelFrameworkPkgExtra.uni
index 77e969c..ca96cc8 100644
Binary files a/IntelFrameworkPkg/IntelFrameworkPkgExtra.uni and 
b/IntelFrameworkPkg/IntelFrameworkPkgExtra.uni differ
diff --git a/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.uni 
b/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.uni
index 06f0aef..b2a4b4a 100644
Binary files a/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.uni and 
b/IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.uni differ
diff --git 
a/IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DxeSmmDriverEntryPoint.uni 
b/IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DxeSmmDriverEntryPoint.uni
index 0965afc..5042026 100644
Binary files 
a/IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DxeSmmDriverEntryPoint.uni 
and 
b/IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DxeSmmDriverEntryPoint.uni 
differ
diff --git a/IntelFrameworkPkg/Library/FrameworkUefiLib/FrameworkUefiLib.uni 
b/IntelFrameworkPkg/Library/FrameworkUefiLib/FrameworkUefiLib.uni
index 5ea7cae..8643521 100644
Binary files a/IntelFrameworkPkg/Library/FrameworkUefiLib/FrameworkUefiLib.uni 
and b/IntelFrameworkPkg/Library/FrameworkUefiLib/FrameworkUefiLib.uni differ
diff --git a/IntelFrameworkPkg/Library/PeiHobLibFramework/PeiHobLib.uni 
b/IntelFrameworkPkg/Library/PeiHobLibFramework/PeiHobLib.uni
index f591416..6072750 100644
Binary files a/IntelFrameworkPkg/Library/PeiHobLibFramework/PeiHobLib.uni and 
b/IntelFrameworkPkg/Library/PeiHobLibFramework/PeiHobLib.uni differ
diff --git 
a/IntelFrameworkPkg/Library/PeiSmbusLibSmbusPpi/PeiSmbusLibSmbusPpi.uni 
b/IntelFrameworkPkg/Library/PeiSmbusLibSmbusPpi/PeiSmbusLibSmbusPpi.uni
index 6a4ae14..8f5d426 100644
Binary files 
a/IntelFrameworkPkg/Library/PeiSmbusLibSmbusPpi/PeiSmbusLibSmbusPpi.uni and 
b/IntelFrameworkPkg/Library/PeiSmbusLibSmbusPpi/PeiSmbusLibSmbusPpi.uni differ
-- 
2.6.2

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


[edk2] [PATCH v2 10/20] MdePkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py MdePkg

Cc: Michael D Kinney 
Cc: Liming Gao 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 .../BaseCacheMaintenanceLib.uni | Bin 2434 -> 1216 bytes
 MdePkg/Library/BaseCpuLib/BaseCpuLib.uni| Bin 2304 -> 1151 bytes
 .../Library/BaseDebugLibNull/BaseDebugLibNull.uni   | Bin 1638 -> 818 bytes
 .../BaseDebugLibSerialPort.uni  | Bin 1902 -> 950 bytes
 .../BaseDebugPrintErrorLevelLib.uni | Bin 1918 -> 958 bytes
 .../BaseExtractGuidedSectionLib.uni | Bin 3712 -> 1855 bytes
 .../BaseIoLibIntrinsic/BaseIoLibIntrinsic.uni   | Bin 2546 -> 1272 bytes
 MdePkg/Library/BaseLib/BaseLib.uni  | Bin 1882 -> 940 bytes
 MdePkg/Library/BaseMemoryLib/BaseMemoryLib.uni  | Bin 1730 -> 864 bytes
 .../Library/BaseMemoryLibMmx/BaseMemoryLibMmx.uni   | Bin 1938 -> 968 bytes
 .../BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.uni | Bin 2036 -> 1017 bytes
 .../BaseMemoryLibOptPei/BaseMemoryLibOptPei.uni | Bin 2154 -> 1076 bytes
 .../BaseMemoryLibRepStr/BaseMemoryLibRepStr.uni | Bin 2078 -> 1038 bytes
 .../Library/BaseMemoryLibSse2/BaseMemoryLibSse2.uni | Bin 1834 -> 916 bytes
 .../BaseOrderedCollectionRedBlackTreeLib.uni| Bin 2640 -> 1319 bytes
 MdePkg/Library/BasePalLibNull/BasePalLibNull.uni| Bin 1758 -> 878 bytes
 MdePkg/Library/BasePcdLibNull/BasePcdLibNull.uni| Bin 2210 -> 1104 bytes
 MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.uni  | Bin 2126 -> 1062 bytes
 .../Library/BasePciExpressLib/BasePciExpressLib.uni | Bin 2230 -> 1114 bytes
 MdePkg/Library/BasePciLibCf8/BasePciLibCf8.uni  | Bin 2086 -> 1042 bytes
 .../BasePciLibPciExpress/BasePciLibPciExpress.uni   | Bin 2124 -> 1061 bytes
 .../PeCoffExtraActionLibNull.uni| Bin 1878 -> 938 bytes
 .../BasePeCoffGetEntryPointLib.uni  | Bin 1702 -> 850 bytes
 MdePkg/Library/BasePeCoffLib/BasePeCoffLib.uni  | Bin 3514 -> 1756 bytes
 .../BasePerformanceLibNull.uni  | Bin 1782 -> 890 bytes
 .../BasePostCodeLibDebug/BasePostCodeLibDebug.uni   | Bin 2018 -> 1008 bytes
 .../BasePostCodeLibPort80/BasePostCodeLibPort80.uni | Bin 1814 -> 906 bytes
 MdePkg/Library/BasePrintLib/BasePrintLib.uni| Bin 1590 -> 794 bytes
 .../BaseReportStatusCodeLibNull.uni | Bin 1742 -> 870 bytes
 MdePkg/Library/BaseRngLib/BaseRngLib.uni| Bin 1878 -> 938 bytes
 .../BaseS3BootScriptLibNull.uni | Bin 2292 -> 1145 bytes
 MdePkg/Library/BaseS3IoLib/BaseS3IoLib.uni  | Bin 2100 -> 1049 bytes
 MdePkg/Library/BaseS3PciLib/BaseS3PciLib.uni| Bin 2132 -> 1065 bytes
 MdePkg/Library/BaseS3SmbusLib/BaseS3SmbusLib.uni| Bin 2132 -> 1065 bytes
 MdePkg/Library/BaseS3StallLib/BaseS3StallLib.uni| Bin 2060 -> 1029 bytes
 .../BaseSerialPortLibNull/BaseSerialPortLibNull.uni | Bin 1822 -> 910 bytes
 .../Library/BaseSmbusLibNull/BaseSmbusLibNull.uni   | Bin 1688 -> 843 bytes
 .../Library/BaseStackCheckLib/BaseStackCheckLib.uni | Bin 1478 -> 738 bytes
 .../BaseSynchronizationLib.uni  | Bin 1862 -> 930 bytes
 .../BaseTimerLibNullTemplate.uni| Bin 2828 -> 1413 bytes
 .../BaseUefiDecompressLib/BaseUefiDecompressLib.uni | Bin 1670 -> 834 bytes
 .../Library/DxeCoreEntryPoint/DxeCoreEntryPoint.uni | Bin 1678 -> 838 bytes
 MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.uni  | Bin 2042 -> 1020 bytes
 .../Library/DxeExtendedSalLib/DxeExtendedSalLib.uni | Bin 2010 -> 1004 bytes
 .../DxeExtractGuidedSectionLib.uni  | Bin 1894 -> 946 bytes
 MdePkg/Library/DxeHobLib/DxeHobLib.uni  | Bin 2106 -> 1052 bytes
 MdePkg/Library/DxeHstiLib/DxeHstiLib.uni| Bin 1612 -> 805 bytes
 MdePkg/Library/DxeIoLibCpuIo2/DxeIoLibCpuIo2.uni| Bin 1920 -> 959 bytes
 MdePkg/Library/DxeIoLibEsal/DxeIoLibEsal.uni| Bin 1984 -> 991 bytes
 MdePkg/Library/DxePalLibEsal/DxePalLibEsal.uni  | Bin 1848 -> 923 bytes
 MdePkg/Library/DxePcdLib/DxePcdLib.uni  | Bin 3336 -> 1667 bytes
 MdePkg/Library/DxePciLibEsal/DxePciLibEsal.uni  | Bin 1916 -> 957 bytes
 .../DxePciSegmentLibEsal/DxePciSegementLibEsal.uni  | Bin 1964 -> 981 bytes
 .../DxeRuntimeExtendedSalLib.uni| Bin 2068 -> 1033 bytes
 .../DxeRuntimePciExpressLib.uni | Bin 2922 -> 1460 bytes
 MdePkg/Library/DxeSalLibEsal/DxeSalLibEsal.uni  | Bin 1930 -> 964 bytes
 MdePkg/Library/DxeServicesLib/DxeServicesLib.uni| Bin 2594 -> 1296 bytes
 .../DxeServicesTableLib/DxeServicesTableLib.uni | Bin 2076 -> 1037 bytes
 MdePkg/Library/DxeSmbusLib/DxeSmbusLib.uni  | Bin 1798 -> 898 bytes
 MdePkg/Library/DxeTimerLibEsal/DxeTimerLibEsal.uni  | Bin 2020 -> 1009 bytes
 .../Library/PeiCoreEntryPoint/PeiCoreEntryPoint.uni | Bin 1678 -> 838 bytes
 .../PeiDxePostCodeLibReportStatusCode.uni   | Bin 1938

[edk2] [PATCH v2 13/20] Nt32Pkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py Nt32Pkg

Cc: Ruiyu Ni 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 Nt32Pkg/CpuRuntimeDxe/Strings.uni| Bin 2172 -> 1088 bytes
 Nt32Pkg/Library/PlatformBootManagerLib/Strings.uni   | Bin 3732 -> 1878 bytes
 .../MiscSubClassPlatformDxe/MiscSubclassDriver.uni   | Bin 13652 -> 6827 bytes
 3 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/Nt32Pkg/CpuRuntimeDxe/Strings.uni 
b/Nt32Pkg/CpuRuntimeDxe/Strings.uni
index 9d9b668..979578f 100644
Binary files a/Nt32Pkg/CpuRuntimeDxe/Strings.uni and 
b/Nt32Pkg/CpuRuntimeDxe/Strings.uni differ
diff --git a/Nt32Pkg/Library/PlatformBootManagerLib/Strings.uni 
b/Nt32Pkg/Library/PlatformBootManagerLib/Strings.uni
index f8823fe..0575693 100644
Binary files a/Nt32Pkg/Library/PlatformBootManagerLib/Strings.uni and 
b/Nt32Pkg/Library/PlatformBootManagerLib/Strings.uni differ
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriver.uni 
b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriver.uni
index 569572b..df197b1 100644
Binary files a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriver.uni and 
b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriver.uni differ
-- 
2.6.2

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


[edk2] [PATCH v2 16/20] SecurityPkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py SecurityPkg

Cc: Chao Zhang 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 SecurityPkg/Application/RngTest/RngTest.uni | Bin 2254 -> 1126 bytes
 SecurityPkg/Application/RngTest/RngTestExtra.uni| Bin 1390 -> 694 bytes
 SecurityPkg/Hash2DxeCrypto/Hash2DxeCrypto.uni   | Bin 1708 -> 853 bytes
 SecurityPkg/Hash2DxeCrypto/Hash2DxeCryptoExtra.uni  | Bin 1348 -> 673 bytes
 .../Library/AuthVariableLib/AuthVariableLib.uni | Bin 1670 -> 834 bytes
 .../DxeDeferImageLoadLib/DxeDeferImageLoadLib.uni   | Bin 2430 -> 1214 bytes
 .../DxeImageAuthenticationStatusLib.uni | Bin 1836 -> 917 bytes
 .../DxeImageVerificationLib.uni | Bin 2868 -> 1433 bytes
 .../DxeRsa2048Sha256GuidedSectionExtractLib.uni | Bin 2768 -> 1383 bytes
 .../DxeTcg2PhysicalPresenceLib.uni  | Bin 2938 -> 1468 bytes
 .../PhysicalPresenceStrings.uni | Bin 10998 -> 5498 bytes
 .../DxeTcgPhysicalPresenceLib.uni   | Bin 3126 -> 1562 bytes
 .../PhysicalPresenceStrings.uni | Bin 8314 -> 4158 bytes
 .../DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.uni | Bin 3196 -> 1597 bytes
 .../DxeTpmMeasureBootLib/DxeTpmMeasureBootLib.uni   | Bin 3196 -> 1597 bytes
 .../DxeTpmMeasurementLib/DxeTpmMeasurementLib.uni   | Bin 2102 -> 1050 bytes
 .../DxeTrEEPhysicalPresenceLib.uni  | Bin 2938 -> 1468 bytes
 .../PhysicalPresenceStrings.uni | Bin 3712 -> 1855 bytes
 .../HashInstanceLibSha1/HashInstanceLibSha1.uni | Bin 1814 -> 906 bytes
 .../HashInstanceLibSha256/HashInstanceLibSha256.uni | Bin 1822 -> 910 bytes
 .../HashLibBaseCryptoRouterDxe.uni  | Bin 2326 -> 1162 bytes
 .../HashLibBaseCryptoRouterPei.uni  | Bin 2312 -> 1155 bytes
 SecurityPkg/Library/HashLibTpm2/HashLibTpm2.uni | Bin 1958 -> 978 bytes
 .../PeiRsa2048Sha256GuidedSectionExtractLib.uni | Bin 2768 -> 1383 bytes
 .../PeiTcg2PhysicalPresenceLib.uni  | Bin 1754 -> 876 bytes
 .../PlatformSecureLibNull/PlatformSecureLibNull.uni | Bin 3056 -> 1527 bytes
 .../SmmTcg2PhysicalPresenceLib.uni  | Bin 2706 -> 1352 bytes
 .../Tcg2PpVendorLibNull/Tcg2PpVendorLibNull.uni | Bin 1810 -> 904 bytes
 .../TcgPpVendorLibNull/TcgPpVendorLibNull.uni   | Bin 1810 -> 904 bytes
 .../Library/Tpm12CommandLib/Tpm12CommandLib.uni | Bin 1744 -> 871 bytes
 .../Tpm12DeviceLibDTpm/Tpm12DeviceLibDTpm.uni   | Bin 2214 -> 1106 bytes
 .../Library/Tpm12DeviceLibTcg/Tpm12DeviceLibTcg.uni | Bin 1966 -> 982 bytes
 .../Library/Tpm2CommandLib/Tpm2CommandLib.uni   | Bin 1744 -> 871 bytes
 .../Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.uni | Bin 2270 -> 1134 bytes
 .../Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.uni   | Bin 1958 -> 978 bytes
 .../Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.uni  | Bin 2550 -> 1274 bytes
 .../Tpm2DeviceLibRouter/Tpm2DeviceLibRouterPei.uni  | Bin 2550 -> 1274 bytes
 .../Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.uni | Bin 1970 -> 984 bytes
 .../Library/Tpm2DeviceLibTrEE/Tpm2DeviceLibTrEE.uni | Bin 1970 -> 984 bytes
 SecurityPkg/Library/TpmCommLib/TpmCommLib.uni   | Bin 1958 -> 978 bytes
 .../TrEEPpVendorLibNull/TrEEPpVendorLibNull.uni | Bin 1816 -> 907 bytes
 .../Pkcs7Verify/Pkcs7VerifyDxe/Pkcs7VerifyDxe.uni   | Bin 2254 -> 1126 bytes
 .../Pkcs7VerifyDxe/Pkcs7VerifyDxeExtra.uni  | Bin 1342 -> 670 bytes
 SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.uni | Bin 2736 -> 1367 bytes
 .../RandomNumberGenerator/RngDxe/RngDxeExtra.uni| Bin 1336 -> 667 bytes
 SecurityPkg/SecurityPkg.uni | Bin 39586 -> 19792 bytes
 SecurityPkg/SecurityPkgExtra.uni| Bin 1346 -> 672 bytes
 SecurityPkg/Tcg/MemoryOverwriteControl/TcgMor.uni   | Bin 1808 -> 903 bytes
 .../Tcg/MemoryOverwriteControl/TcgMorExtra.uni  | Bin 1352 -> 675 bytes
 .../TcgMorLock.uni  | Bin 1964 -> 981 bytes
 .../TcgMorLockExtra.uni | Bin 1356 -> 677 bytes
 .../Tcg/PhysicalPresencePei/PhysicalPresencePei.uni | Bin 2262 -> 1130 bytes
 .../PhysicalPresencePeiExtra.uni| Bin 1354 -> 676 bytes
 SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.uni| Bin 2124 -> 1061 bytes
 SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxeExtra.uni   | Bin 1382 -> 690 bytes
 SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.uni| Bin 2206 -> 1102 bytes
 SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeiExtra.uni   | Bin 1382 -> 690 bytes
 SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigStrings.uni| Bin 13376 -> 6687 bytes
 SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.uni | Bin 2320 -> 1159 bytes
 SecurityPkg/Tcg/Tcg2Dxe/Tcg2DxeExtra.uni| Bin 1334 -> 666 bytes
 SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.uni | Bin 1876 -> 937 bytes
 SecurityPkg/Tcg/Tcg2Pei/Tcg2PeiExtra.uni| Bin 1342 -> 670 bytes

[edk2] [PATCH v2 12/20] NetworkPkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py NetworkPkg

Cc: Siyuan Fu 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 NetworkPkg/Application/IfConfig6/IfConfig6.uni  | Bin 1884 -> 941 bytes
 NetworkPkg/Application/IfConfig6/IfConfig6Extra.uni | Bin 1328 -> 663 bytes
 .../Application/IfConfig6/IfConfig6Strings.uni  | Bin 15680 -> 7839 bytes
 NetworkPkg/Application/IpsecConfig/IpSecConfig.uni  | Bin 1972 -> 985 bytes
 .../Application/IpsecConfig/IpSecConfigExtra.uni| Bin 1338 -> 668 bytes
 .../Application/IpsecConfig/IpSecConfigStrings.uni  | Bin 24240 -> 12119 bytes
 NetworkPkg/Application/Ping6/Ping6.uni  | Bin 1788 -> 893 bytes
 NetworkPkg/Application/Ping6/Ping6Extra.uni | Bin 1312 -> 655 bytes
 NetworkPkg/Application/Ping6/Ping6Strings.uni   | Bin 7484 -> 3741 bytes
 NetworkPkg/Application/VConfig/VConfig.uni  | Bin 1804 -> 901 bytes
 NetworkPkg/Application/VConfig/VConfigExtra.uni | Bin 1328 -> 663 bytes
 NetworkPkg/Application/VConfig/VConfigStrings.uni   | Bin 8624 -> 4311 bytes
 NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.uni| Bin 2016 -> 1007 bytes
 NetworkPkg/Dhcp6Dxe/Dhcp6DxeExtra.uni   | Bin 1318 -> 658 bytes
 NetworkPkg/DnsDxe/DnsDxe.uni| Bin 1960 -> 979 bytes
 NetworkPkg/DnsDxe/DnsDxeExtra.uni   | Bin 1306 -> 652 bytes
 NetworkPkg/HttpBootDxe/HttpBootDxe.uni  | Bin 2040 -> 1019 bytes
 NetworkPkg/HttpBootDxe/HttpBootDxeExtra.uni | Bin 1328 -> 663 bytes
 NetworkPkg/HttpDxe/HttpDxe.uni  | Bin 1854 -> 926 bytes
 NetworkPkg/HttpDxe/HttpDxeExtra.uni | Bin 1310 -> 654 bytes
 NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.uni| Bin 1700 -> 849 bytes
 .../HttpUtilitiesDxe/HttpUtilitiesDxeExtra.uni  | Bin 1348 -> 673 bytes
 NetworkPkg/IScsiDxe/IScsiConfigStrings.uni  | Bin 12526 -> 6262 bytes
 NetworkPkg/IScsiDxe/IScsiDxe.uni| Bin 1876 -> 937 bytes
 NetworkPkg/IScsiDxe/IScsiDxeExtra.uni   | Bin 1316 -> 657 bytes
 NetworkPkg/Ip6Dxe/Ip6Dxe.uni| Bin 2912 -> 1455 bytes
 NetworkPkg/Ip6Dxe/Ip6DxeExtra.uni   | Bin 1310 -> 654 bytes
 NetworkPkg/Ip6Dxe/Ip6DxeStrings.uni | Bin 10244 -> 5121 bytes
 NetworkPkg/IpSecDxe/IpSecDxe.uni| Bin 2676 -> 1337 bytes
 NetworkPkg/IpSecDxe/IpSecDxeExtra.uni   | Bin 1318 -> 658 bytes
 NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.uni  | Bin 1956 -> 977 bytes
 NetworkPkg/Mtftp6Dxe/Mtftp6DxeExtra.uni | Bin 1318 -> 658 bytes
 NetworkPkg/NetworkPkg.uni   | Bin 7964 -> 3981 bytes
 NetworkPkg/NetworkPkgExtra.uni  | Bin 1342 -> 670 bytes
 NetworkPkg/TcpDxe/TcpDxe.uni| Bin 2412 -> 1205 bytes
 NetworkPkg/TcpDxe/TcpDxeExtra.uni   | Bin 1310 -> 654 bytes
 NetworkPkg/Udp6Dxe/Udp6Dxe.uni  | Bin 2024 -> 1011 bytes
 NetworkPkg/Udp6Dxe/Udp6DxeExtra.uni | Bin 1314 -> 656 bytes
 NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.uni| Bin 2416 -> 1207 bytes
 NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxeExtra.uni   | Bin 1332 -> 665 bytes
 40 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/NetworkPkg/Application/IfConfig6/IfConfig6.uni 
b/NetworkPkg/Application/IfConfig6/IfConfig6.uni
index 7c3e20e..e0ea589 100644
Binary files a/NetworkPkg/Application/IfConfig6/IfConfig6.uni and 
b/NetworkPkg/Application/IfConfig6/IfConfig6.uni differ
diff --git a/NetworkPkg/Application/IfConfig6/IfConfig6Extra.uni 
b/NetworkPkg/Application/IfConfig6/IfConfig6Extra.uni
index e39bcbe..7d3f27a 100644
Binary files a/NetworkPkg/Application/IfConfig6/IfConfig6Extra.uni and 
b/NetworkPkg/Application/IfConfig6/IfConfig6Extra.uni differ
diff --git a/NetworkPkg/Application/IfConfig6/IfConfig6Strings.uni 
b/NetworkPkg/Application/IfConfig6/IfConfig6Strings.uni
index e22879e..3753bd8 100644
Binary files a/NetworkPkg/Application/IfConfig6/IfConfig6Strings.uni and 
b/NetworkPkg/Application/IfConfig6/IfConfig6Strings.uni differ
diff --git a/NetworkPkg/Application/IpsecConfig/IpSecConfig.uni 
b/NetworkPkg/Application/IpsecConfig/IpSecConfig.uni
index 4dd8d10..3dab958 100644
Binary files a/NetworkPkg/Application/IpsecConfig/IpSecConfig.uni and 
b/NetworkPkg/Application/IpsecConfig/IpSecConfig.uni differ
diff --git a/NetworkPkg/Application/IpsecConfig/IpSecConfigExtra.uni 
b/NetworkPkg/Application/IpsecConfig/IpSecConfigExtra.uni
index bdc200e..5300857 100644
Binary files a/NetworkPkg/Application/IpsecConfig/IpSecConfigExtra.uni and 
b/NetworkPkg/Application/IpsecConfig/IpSecConfigExtra.uni differ
diff --git a/NetworkPkg/Application/IpsecConfig/IpSecConfigStrings.uni 
b/NetworkPkg/Application/IpsecConfig/IpSecConfigStrings.uni
index 4ebccd4..2c342d3 100644
Binary files a/NetworkPkg/Application/IpsecConfig/IpSecConfigStrings.uni and 
b/N

[edk2] [PATCH v2 11/20] MdeModulePkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py MdeModulePkg

Cc: Feng Tian 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 .../BootManagerMenuApp/BootManagerMenuApp.uni  | Bin 2110 -> 1054 bytes
 .../BootManagerMenuApp/BootManagerMenuAppExtra.uni | Bin 1668 -> 833 bytes
 .../BootManagerMenuApp/BootManagerMenuStrings.uni  | Bin 2756 -> 1386 bytes
 MdeModulePkg/Application/HelloWorld/HelloWorld.uni | Bin 2306 -> 1152 bytes
 .../Application/HelloWorld/HelloWorldExtra.uni | Bin 1340 -> 669 bytes
 .../MemoryProfileInfo/MemoryProfileInfo.uni| Bin 2188 -> 1093 bytes
 .../MemoryProfileInfo/MemoryProfileInfoExtra.uni   | Bin 1370 -> 684 bytes
 .../Application/UiApp/FrontPageStrings.uni | Bin 8930 -> 4486 bytes
 MdeModulePkg/Application/UiApp/UiApp.uni   | Bin 1520 -> 759 bytes
 MdeModulePkg/Application/UiApp/UiAppExtra.uni  | Bin 1296 -> 647 bytes
 .../Application/VariableInfo/VariableInfo.uni  | Bin 2904 -> 1451 bytes
 .../Application/VariableInfo/VariableInfoExtra.uni | Bin 1362 -> 680 bytes
 .../Ata/AtaAtapiPassThru/AtaAtapiPassThruDxe.uni   | Bin 2160 -> 1079 bytes
 .../AtaAtapiPassThru/AtaAtapiPassThruDxeExtra.uni  | Bin 1372 -> 685 bytes
 MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.uni   | Bin 2446 -> 1222 bytes
 MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxeExtra.uni  | Bin 1328 -> 663 bytes
 MdeModulePkg/Bus/I2c/I2cDxe/I2cBusDxe.uni  | Bin 2070 -> 1034 bytes
 MdeModulePkg/Bus/I2c/I2cDxe/I2cBusDxeExtra.uni | Bin 1314 -> 656 bytes
 MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.uni | Bin 2326 -> 1162 bytes
 MdeModulePkg/Bus/I2c/I2cDxe/I2cDxeExtra.uni| Bin 1300 -> 649 bytes
 MdeModulePkg/Bus/I2c/I2cDxe/I2cHostDxe.uni | Bin 1862 -> 930 bytes
 MdeModulePkg/Bus/I2c/I2cDxe/I2cHostDxeExtra.uni| Bin 1318 -> 658 bytes
 MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.uni   | Bin 2742 -> 1370 bytes
 MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxeExtra.uni  | Bin 1302 -> 650 bytes
 MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.uni   | Bin 3940 -> 1969 bytes
 MdeModulePkg/Bus/Pci/EhciDxe/EhciDxeExtra.uni  | Bin 1348 -> 673 bytes
 MdeModulePkg/Bus/Pci/EhciPei/EhciPei.uni   | Bin 2216 -> 1107 bytes
 MdeModulePkg/Bus/Pci/EhciPei/EhciPeiExtra.uni  | Bin 1362 -> 680 bytes
 MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPei.uni   | Bin 2572 -> 1285 bytes
 MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPeiExtra.uni  | Bin 1372 -> 685 bytes
 .../IncompatiblePciDeviceSupport.uni   | Bin 1992 -> 995 bytes
 .../IncompatiblePciDeviceSupportExtra.uni  | Bin 1414 -> 706 bytes
 .../Bus/Pci/NvmExpressDxe/NvmExpressDxe.uni| Bin 1942 -> 970 bytes
 .../Bus/Pci/NvmExpressDxe/NvmExpressDxeExtra.uni   | Bin 1330 -> 664 bytes
 MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.uni   | Bin 2042 -> 1020 bytes
 MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxeExtra.uni  | Bin 1328 -> 663 bytes
 MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.uni   | Bin 1980 -> 989 bytes
 .../Bus/Pci/UfsPciHcDxe/UfsPciHcDxeExtra.uni   | Bin 1336 -> 667 bytes
 MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.uni   | Bin 2076 -> 1037 bytes
 .../Bus/Pci/UfsPciHcPei/UfsPciHcPeiExtra.uni   | Bin 1372 -> 685 bytes
 MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.uni   | Bin 2260 -> 1129 bytes
 MdeModulePkg/Bus/Pci/UhciDxe/UhciDxeExtra.uni  | Bin 1326 -> 662 bytes
 MdeModulePkg/Bus/Pci/UhciPei/UhciPei.uni   | Bin 2246 -> 1122 bytes
 MdeModulePkg/Bus/Pci/UhciPei/UhciPeiExtra.uni  | Bin 1362 -> 680 bytes
 MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.uni   | Bin 2358 -> 1178 bytes
 MdeModulePkg/Bus/Pci/XhciDxe/XhciDxeExtra.uni  | Bin 1326 -> 662 bytes
 MdeModulePkg/Bus/Pci/XhciPei/XhciPei.uni   | Bin 2238 -> 1118 bytes
 MdeModulePkg/Bus/Pci/XhciPei/XhciPeiExtra.uni  | Bin 1338 -> 668 bytes
 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.uni   | Bin 2072 -> 1035 bytes
 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusExtra.uni  | Bin 1336 -> 667 bytes
 MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.uni | Bin 1998 -> 998 bytes
 .../Bus/Scsi/ScsiDiskDxe/ScsiDiskExtra.uni | Bin 1340 -> 669 bytes
 .../Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.uni| Bin 1844 -> 921 bytes
 .../Bus/Ufs/UfsBlockIoPei/UfsBlockIoPeiExtra.uni   | Bin 1362 -> 680 bytes
 .../Bus/Ufs/UfsPassThruDxe/UfsPassThru.uni | Bin 2032 -> 1015 bytes
 .../Bus/Ufs/UfsPassThruDxe/UfsPassThruExtra.uni| Bin 1346 -> 672 bytes
 MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.uni   | Bin 1968 -> 983 bytes
 MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeiExtra.uni  | Bin 1364 -> 681 bytes
 MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.uni   | Bin 1934 -> 966 bytes
 MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxeExtra.uni  | Bin 1336 -> 667 bytes
 MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.uni   | Bin 1856 -> 927 bytes
 MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPeiExtra.uni  | Bin 1372 -> 685 bytes
 MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.uni | Bin 5008 -> 2503 by

[edk2] [PATCH v2 05/20] DuetPkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py DuetPkg

Cc: Ruiyu Ni 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 DuetPkg/SmbiosGenDxe/SmbiosGenStrings.uni | Bin 2006 -> 1002 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/DuetPkg/SmbiosGenDxe/SmbiosGenStrings.uni 
b/DuetPkg/SmbiosGenDxe/SmbiosGenStrings.uni
index 954ccd6..5ef9e98 100644
Binary files a/DuetPkg/SmbiosGenDxe/SmbiosGenStrings.uni and 
b/DuetPkg/SmbiosGenDxe/SmbiosGenStrings.uni differ
-- 
2.6.2

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


[edk2] [PATCH v2 06/20] EmbeddedPkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py EmbeddedPkg

Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.uni | Bin 9422 -> 4710 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.uni 
b/EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.uni
index 876c6c0..f8bde83 100644
Binary files a/EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.uni and 
b/EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatformDxe.uni differ
-- 
2.6.2

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


[edk2] [PATCH v2 00/20] Convert utf-16 .uni files to utf-8

2015-12-04 Thread Jordan Justen
web: https://github.com/jljusten/edk2/tree/uni-to-utf8-v2

git: https://github.com/jljusten/edk2.git uni-to-utf8-v2

Jordan Justen (20):
  BaseTools/Scripts: Add ConvertUni.py script
  ArmPkg: Convert all .uni files to utf-8
  ArmPlatformPkg: Convert all .uni files to utf-8
  CryptoPkg: Convert all .uni files to utf-8
  DuetPkg: Convert all .uni files to utf-8
  EmbeddedPkg: Convert all .uni files to utf-8
  EmulatorPkg: Convert all .uni files to utf-8
  IntelFrameworkModulePkg: Convert all .uni files to utf-8
  IntelFrameworkPkg: Convert all .uni files to utf-8
  MdePkg: Convert all .uni files to utf-8
  MdeModulePkg: Convert all .uni files to utf-8
  NetworkPkg: Convert all .uni files to utf-8
  Nt32Pkg: Convert all .uni files to utf-8
  PcAtChipsetPkg: Convert all .uni files to utf-8
  PerformancePkg: Convert all .uni files to utf-8
  SecurityPkg: Convert all .uni files to utf-8
  ShellPkg: Convert all .uni files to utf-8
  SourceLevelDebugPkg: Convert all .uni files to utf-8
  UefiCpuPkg: Convert all .uni files to utf-8
  Vlv2TbltDevicePkg: Convert all .uni files to utf-8

 ArmPkg/Application/LinuxLoader/LinuxLoader.uni | Bin 8166 -> 4082 bytes
 .../ArmShellCmdRunAxf/ArmShellCmdRunAxf.uni| Bin 6472 -> 3235 bytes
 BaseTools/Scripts/ConvertUni.py| 137 +
 CryptoPkg/Application/Cryptest/Cryptest.uni| Bin 1924 -> 961 bytes
 CryptoPkg/Application/Cryptest/CryptestExtra.uni   | Bin 1330 -> 664 bytes
 CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxe.uni  | Bin 1968 -> 983 bytes
 CryptoPkg/CryptRuntimeDxe/CryptRuntimeDxeExtra.uni | Bin 1358 -> 678 bytes
 CryptoPkg/CryptoPkg.uni| Bin 2014 -> 1006 bytes
 CryptoPkg/CryptoPkgExtra.uni   | Bin 1344 -> 671 bytes
 CryptoPkg/Library/BaseCryptLib/BaseCryptLib.uni| Bin 2500 -> 1249 bytes
 CryptoPkg/Library/BaseCryptLib/PeiCryptLib.uni | Bin 3990 -> 1994 bytes
 CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.uni | Bin 3634 -> 1816 bytes
 CryptoPkg/Library/BaseCryptLib/SmmCryptLib.uni | Bin 3602 -> 1800 bytes
 .../BaseCryptLibRuntimeCryptProtocol.uni   | Bin 3586 -> 1792 bytes
 .../Library/IntrinsicLib/BaseIntrinsicLib.uni  | Bin 1780 -> 889 bytes
 CryptoPkg/Library/OpensslLib/OpensslLib.uni| Bin 1742 -> 870 bytes
 DuetPkg/SmbiosGenDxe/SmbiosGenStrings.uni  | Bin 2006 -> 1002 bytes
 .../Drivers/FdtPlatformDxe/FdtPlatformDxe.uni  | Bin 9422 -> 4710 bytes
 .../MiscBaseBoardManufacturer.uni  | Bin 2214 -> 1106 bytes
 .../MiscSubClassPlatformDxe/MiscBiosVendor.uni | Bin 1588 -> 793 bytes
 .../MiscChassisManufacturer.uni| Bin 1774 -> 886 bytes
 .../MiscSubClassPlatformDxe/MiscOemString.uni  | Bin 1312 -> 655 bytes
 .../MiscPortInternalConnectorDesignator.uni| Bin 8914 -> 4456 bytes
 .../MiscSubClassPlatformDxe/MiscSubClassDriver.uni | Bin 2004 -> 1001 bytes
 .../MiscSystemLanguageString.uni   | Bin 1314 -> 656 bytes
 .../MiscSystemManufacturer.uni | Bin 1772 -> 885 bytes
 .../MiscSystemOptionString.uni | Bin 1308 -> 653 bytes
 .../MiscSystemSlotDesignation.uni  | Bin 1322 -> 660 bytes
 .../Bus/Isa/IsaBusDxe/IsaBusDxe.uni| Bin 2658 -> 1328 bytes
 .../Bus/Isa/IsaBusDxe/IsaBusDxeExtra.uni   | Bin 1336 -> 667 bytes
 .../Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.uni  | Bin 2444 -> 1221 bytes
 .../Bus/Isa/IsaFloppyDxe/IsaFloppyDxeExtra.uni | Bin 1348 -> 673 bytes
 .../Bus/Isa/IsaFloppyPei/IsaFloppyPei.uni  | Bin 2348 -> 1173 bytes
 .../Bus/Isa/IsaFloppyPei/IsaFloppyPeiExtra.uni | Bin 1358 -> 678 bytes
 .../Bus/Isa/IsaIoDxe/IsaIoDxe.uni  | Bin 2414 -> 1206 bytes
 .../Bus/Isa/IsaIoDxe/IsaIoDxeExtra.uni | Bin 1334 -> 666 bytes
 .../Bus/Isa/IsaSerialDxe/IsaSerialDxe.uni  | Bin 2094 -> 1046 bytes
 .../Bus/Isa/IsaSerialDxe/IsaSerialDxeExtra.uni | Bin 1366 -> 682 bytes
 .../Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.uni  | Bin 1928 -> 963 bytes
 .../Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxeExtra.uni | Bin 1358 -> 678 bytes
 .../Ps2MouseAbsolutePointerDxe.uni | Bin 2064 -> 1031 bytes
 .../Ps2MouseAbsolutePointerDxeExtra.uni| Bin 1394 -> 696 bytes
 .../Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.uni| Bin 1628 -> 813 bytes
 .../Bus/Isa/Ps2MouseDxe/Ps2MouseDxeExtra.uni   | Bin 1346 -> 672 bytes
 .../Bus/Pci/IdeBusDxe/IdeBusDxe.uni| Bin 1764 -> 881 bytes
 .../Bus/Pci/IdeBusDxe/IdeBusDxeExtra.uni   | Bin 1328 -> 663 bytes
 .../Bus/Pci/VgaMiniPortDxe/VgaMiniPort.uni | Bin 2038 -> 1018 bytes
 .../Bus/Pci/VgaMiniPortDxe/VgaMiniPortExtra.uni| Bin 1352 -> 675 bytes
 .../Csm/BiosThunk/BlockIoDxe/BlockIoDxe.uni| Bin 2138 -> 1068 bytes
 .../Csm/BiosThunk/BlockIoDxe/BlockIoDxeExtra.uni   | Bin 1366 -> 682 bytes
 .../Csm/BiosThunk/KeyboardDxe/KeyboardDxe.uni  | Bin 2044 -> 1021 bytes
 ..

[edk2] [PATCH v2 08/20] IntelFrameworkModulePkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py IntelFrameworkModulePkg

Cc: Jeff Fan 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 .../Bus/Isa/IsaBusDxe/IsaBusDxe.uni | Bin 2658 -> 1328 bytes
 .../Bus/Isa/IsaBusDxe/IsaBusDxeExtra.uni| Bin 1336 -> 667 bytes
 .../Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.uni   | Bin 2444 -> 1221 bytes
 .../Bus/Isa/IsaFloppyDxe/IsaFloppyDxeExtra.uni  | Bin 1348 -> 673 bytes
 .../Bus/Isa/IsaFloppyPei/IsaFloppyPei.uni   | Bin 2348 -> 1173 bytes
 .../Bus/Isa/IsaFloppyPei/IsaFloppyPeiExtra.uni  | Bin 1358 -> 678 bytes
 .../Bus/Isa/IsaIoDxe/IsaIoDxe.uni   | Bin 2414 -> 1206 bytes
 .../Bus/Isa/IsaIoDxe/IsaIoDxeExtra.uni  | Bin 1334 -> 666 bytes
 .../Bus/Isa/IsaSerialDxe/IsaSerialDxe.uni   | Bin 2094 -> 1046 bytes
 .../Bus/Isa/IsaSerialDxe/IsaSerialDxeExtra.uni  | Bin 1366 -> 682 bytes
 .../Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.uni   | Bin 1928 -> 963 bytes
 .../Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxeExtra.uni  | Bin 1358 -> 678 bytes
 .../Ps2MouseAbsolutePointerDxe.uni  | Bin 2064 -> 1031 bytes
 .../Ps2MouseAbsolutePointerDxeExtra.uni | Bin 1394 -> 696 bytes
 .../Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.uni | Bin 1628 -> 813 bytes
 .../Bus/Isa/Ps2MouseDxe/Ps2MouseDxeExtra.uni| Bin 1346 -> 672 bytes
 .../Bus/Pci/IdeBusDxe/IdeBusDxe.uni | Bin 1764 -> 881 bytes
 .../Bus/Pci/IdeBusDxe/IdeBusDxeExtra.uni| Bin 1328 -> 663 bytes
 .../Bus/Pci/VgaMiniPortDxe/VgaMiniPort.uni  | Bin 2038 -> 1018 bytes
 .../Bus/Pci/VgaMiniPortDxe/VgaMiniPortExtra.uni | Bin 1352 -> 675 bytes
 .../Csm/BiosThunk/BlockIoDxe/BlockIoDxe.uni | Bin 2138 -> 1068 bytes
 .../Csm/BiosThunk/BlockIoDxe/BlockIoDxeExtra.uni| Bin 1366 -> 682 bytes
 .../Csm/BiosThunk/KeyboardDxe/KeyboardDxe.uni   | Bin 2044 -> 1021 bytes
 .../Csm/BiosThunk/KeyboardDxe/KeyboardDxeExtra.uni  | Bin 1366 -> 682 bytes
 .../Csm/BiosThunk/Snp16Dxe/BiosSnp16.uni| Bin 1824 -> 911 bytes
 .../Csm/BiosThunk/Snp16Dxe/BiosSnp16Extra.uni   | Bin 1392 -> 695 bytes
 .../Csm/BiosThunk/VideoDxe/BiosVideoDxe.uni | Bin 1984 -> 991 bytes
 .../Csm/BiosThunk/VideoDxe/BiosVideoDxeExtra.uni| Bin 1362 -> 680 bytes
 .../Csm/LegacyBiosDxe/LegacyBiosDxe.uni | Bin 1848 -> 923 bytes
 .../Csm/LegacyBiosDxe/LegacyBiosDxeExtra.uni| Bin 1378 -> 688 bytes
 IntelFrameworkModulePkg/IntelFrameworkModulePkg.uni | Bin 37484 -> 18741 bytes
 .../IntelFrameworkModulePkgExtra.uni| Bin 1398 -> 698 bytes
 .../BaseUefiTianoDecompressLib.uni  | Bin 2040 -> 1019 bytes
 .../Library/DxeCapsuleLib/DxeCapsuleLib.uni | Bin 1840 -> 919 bytes
 .../DxeReportStatusCodeLib.uni  | Bin 1986 -> 992 bytes
 .../Library/GenericBdsLib/GenericBdsLib.uni | Bin 2378 -> 1188 bytes
 .../Library/GenericBdsLib/GenericBdsStrings.uni | Bin 3852 -> 1926 bytes
 .../LegacyBootMaintUiLib/LegacyBootMaintUiLib.uni   | Bin 1800 -> 899 bytes
 .../LegacyBootMaintUiStrings.uni| Bin 6380 -> 3190 bytes
 .../LegacyBootManagerLib/LegacyBootManagerLib.uni   | Bin 1736 -> 867 bytes
 .../LzmaArchDecompressLib.uni   | Bin 2480 -> 1239 bytes
 .../LzmaCustomDecompressLib/LzmaDecompressLib.uni   | Bin 2274 -> 1136 bytes
 .../PeiDxeDebugLibReportStatusCode.uni  | Bin 1896 -> 947 bytes
 .../Library/PeiRecoveryLib/PeiRecoveryLib.uni   | Bin 2272 -> 1135 bytes
 .../Library/PeiS3Lib/PeiS3Lib.uni   | Bin 2392 -> 1195 bytes
 .../Library/PlatformBdsLibNull/PlatformBdsLib.uni   | Bin 1880 -> 939 bytes
 .../SmmRuntimeDxeReportStatusCodeLibFramework.uni   | Bin 2844 -> 1421 bytes
 .../Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.uni  | Bin 1916 -> 957 bytes
 .../Acpi/AcpiS3SaveDxe/AcpiS3SaveDxeExtra.uni   | Bin 1368 -> 683 bytes
 .../Acpi/AcpiSupportDxe/AcpiSupportDxe.uni  | Bin 2246 -> 1122 bytes
 .../Acpi/AcpiSupportDxe/AcpiSupportDxeExtra.uni | Bin 1366 -> 682 bytes
 IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.uni | Bin 5172 -> 2585 bytes
 .../Universal/BdsDxe/BdsDxeExtra.uni| Bin 1370 -> 684 bytes
 .../Universal/BdsDxe/BootMaint/Bmstring.uni | Bin 38776 -> 19388 bytes
 .../BdsDxe/BootMngr/BootManagerStrings.uni  | Bin 3344 -> 1680 bytes
 .../BdsDxe/DeviceMngr/DeviceManagerStrings.uni  | Bin 13366 -> 6683 bytes
 .../Universal/BdsDxe/FrontPageStrings.uni   | Bin 9974 -> 5011 bytes
 .../Universal/BdsDxe/Strings.uni| Bin 7444 -> 3742 bytes
 .../Universal/Console/VgaClassDxe/VgaClassDxe.uni   | Bin 2006 -> 1002 bytes
 .../Console/VgaClassDxe/VgaClassDxeExtra.uni| Bin 1346 -> 672 bytes
 .../Universal/CpuIoDxe/CpuIoDxe.uni | Bin 2066 -> 1032 bytes
 .../Universal/CpuIoDxe/CpuIoDxeExtra.uni| Bin 1338 -> 

[edk2] [PATCH v2 17/20] ShellPkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py ShellPkg

Cc: Jaben Carsey 
Cc: Shumin Qiu 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 ShellPkg/Application/Shell/Shell.uni   | Bin 4840 -> 2419 bytes
 ShellPkg/Library/UefiDpLib/UefiDpLib.uni   | Bin 18146 -> 9072 bytes
 .../UefiHandleParsingLib/UefiHandleParsingLib.uni  | Bin 32404 -> 16201 bytes
 .../UefiShellBcfgCommandLib.uni| Bin 18414 -> 9206 bytes
 .../Edit/TextEditStrings.uni   | Bin 11484 -> 5741 bytes
 .../HexEdit/HexeditStrings.uni | Bin 13156 -> 6577 bytes
 .../SmbiosView/SmbiosViewStrings.uni   | Bin 109944 -> 54971 bytes
 .../UefiShellDebug1CommandsLib.uni | Bin 140676 -> 70337 bytes
 .../UefiShellDriver1CommandsLib.uni| Bin 70806 -> 35402 bytes
 .../UefiShellLevel1CommandsLib.uni | Bin 43930 -> 21964 bytes
 .../UefiShellLevel2CommandsLib.uni | Bin 109742 -> 54870 bytes
 .../UefiShellLevel3CommandsLib.uni | Bin 44956 -> 22477 bytes
 .../UefiShellNetwork1CommandsLib.uni   | Bin 21094 -> 10546 bytes
 .../UefiShellTftpCommandLib.uni| Bin 9952 -> 4975 bytes
 14 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/ShellPkg/Application/Shell/Shell.uni 
b/ShellPkg/Application/Shell/Shell.uni
index 25cf699..301d879 100644
Binary files a/ShellPkg/Application/Shell/Shell.uni and 
b/ShellPkg/Application/Shell/Shell.uni differ
diff --git a/ShellPkg/Library/UefiDpLib/UefiDpLib.uni 
b/ShellPkg/Library/UefiDpLib/UefiDpLib.uni
index 5bcb496..b092274 100644
Binary files a/ShellPkg/Library/UefiDpLib/UefiDpLib.uni and 
b/ShellPkg/Library/UefiDpLib/UefiDpLib.uni differ
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni 
b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
index d8e45d0..1d142e9 100644
Binary files a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni 
and b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni differ
diff --git 
a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni 
b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni
index d34f314..b680a48 100644
Binary files 
a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni and 
b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni differ
diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni
index a61cae3..f799148 100644
Binary files 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni and 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni differ
diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni
index f521931..d9591ca 100644
Binary files 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni and 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni differ
diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni
index f368825..24fca87 100644
Binary files 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni 
and 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni 
differ
diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
index e16175a..1974060 100644
Binary files 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni 
and 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni 
differ
diff --git 
a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni 
b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
index a289853..a14469a 100644
Binary files 
a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni 
and 
b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni 
differ
diff --git 
a/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.uni 
b/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.uni
index 40fa57e..73e8655 100644
Binary files 
a/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.uni 
and 
b/ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.uni 
differ
diff --git 
a/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.uni 
b/ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.uni
index cc2c33c..60f48f4 100644
Binary files 
a/ShellPkg/Library/UefiShellLevel2Comman

[edk2] [PATCH v2 20/20] Vlv2TbltDevicePkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py Vlv2TbltDevicePkg

Cc: David Wei 
Cc: Tim He 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 .../FirmwareUpdate/FirmwareUpdateStrings.uni   | Bin 7472 -> 3750 bytes
 .../Library/PlatformBdsLib/PlatformBdsStrings.uni  | Bin 3852 -> 1926 bytes
 .../Library/GenericBdsLib/GenericBdsLib.uni| Bin 2378 -> 1188 bytes
 .../Library/GenericBdsLib/GenericBdsStrings.uni| Bin 3856 -> 1928 bytes
 .../PlatformSetupDxe/FwVersionStrings.uni  | Bin 4108 -> 2053 bytes
 Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni | Bin 66540 -> 33269 bytes
 Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni  | Bin 215420 -> 107717 bytes
 .../SmBiosMiscDxe/MiscBaseBoardManufacturer.uni| Bin 2866 -> 1432 bytes
 Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBiosVendor.uni | Bin 1860 -> 929 bytes
 .../SmBiosMiscDxe/MiscChassisManufacturer.uni  | Bin 2056 -> 1027 bytes
 .../SmBiosMiscDxe/MiscMemoryDevice.uni | Bin 2904 -> 1451 bytes
 Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscOemString.uni  | Bin 1848 -> 923 bytes
 .../SmBiosMiscDxe/MiscOemType0x90.uni  | Bin 2078 -> 1038 bytes
 .../SmBiosMiscDxe/MiscOemType0x94.uni  | Bin 4302 -> 2150 bytes
 .../SmBiosMiscDxe/MiscOnboardDevice.uni| Bin 1910 -> 954 bytes
 .../SmBiosMiscDxe/MiscPhysicalArray.uni| Bin 1518 -> 758 bytes
 .../MiscPortInternalConnectorDesignator.uni| Bin 2566 -> 1282 bytes
 .../SmBiosMiscDxe/MiscProcessorCache.uni   | Bin 1506 -> 752 bytes
 .../SmBiosMiscDxe/MiscProcessorInformation.uni | Bin 2208 -> 1103 bytes
 .../SmBiosMiscDxe/MiscSubclassDriver.uni   | Bin 2354 -> 1176 bytes
 .../SmBiosMiscDxe/MiscSystemLanguageString.uni | Bin 1576 -> 787 bytes
 .../SmBiosMiscDxe/MiscSystemManufacturer.uni   | Bin 2478 -> 1238 bytes
 .../SmBiosMiscDxe/MiscSystemOptionString.uni   | Bin 1578 -> 788 bytes
 .../SmBiosMiscDxe/MiscSystemSlotDesignation.uni| Bin 2920 -> 1459 bytes
 24 files changed, 0 insertions(+), 0 deletions(-)

diff --git 
a/Vlv2TbltDevicePkg/Application/FirmwareUpdate/FirmwareUpdateStrings.uni 
b/Vlv2TbltDevicePkg/Application/FirmwareUpdate/FirmwareUpdateStrings.uni
index bbf497f..ad01e4a 100644
Binary files 
a/Vlv2TbltDevicePkg/Application/FirmwareUpdate/FirmwareUpdateStrings.uni and 
b/Vlv2TbltDevicePkg/Application/FirmwareUpdate/FirmwareUpdateStrings.uni differ
diff --git a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsStrings.uni 
b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsStrings.uni
index 7c3b4f9..5326685 100644
Binary files a/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsStrings.uni 
and b/Vlv2TbltDevicePkg/Library/PlatformBdsLib/PlatformBdsStrings.uni differ
diff --git 
a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.uni
 
b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.uni
index 5611f6f..dae4adf 100644
Binary files 
a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.uni
 and 
b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.uni
 differ
diff --git 
a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsStrings.uni
 
b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsStrings.uni
index 1b345b0..c423b1f 100644
Binary files 
a/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsStrings.uni
 and 
b/Vlv2TbltDevicePkg/Override/IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsStrings.uni
 differ
diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/FwVersionStrings.uni 
b/Vlv2TbltDevicePkg/PlatformSetupDxe/FwVersionStrings.uni
index 767388c..485ec6f 100644
Binary files a/Vlv2TbltDevicePkg/PlatformSetupDxe/FwVersionStrings.uni and 
b/Vlv2TbltDevicePkg/PlatformSetupDxe/FwVersionStrings.uni differ
diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni 
b/Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni
index 229b75e..5a888ff 100644
Binary files a/Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni and 
b/Vlv2TbltDevicePkg/PlatformSetupDxe/UqiList.uni differ
diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni 
b/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni
index d1e1b6d..1d981df 100644
Binary files a/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni and 
b/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni differ
diff --git a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufacturer.uni 
b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufacturer.uni
index 5d23abd..4deae68 100644
Binary files a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufacturer.uni 
and b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBaseBoardManufacturer.uni differ
diff --git a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBiosVendor.uni 
b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscBiosVendor.uni
index e9fffae..66

[edk2] [PATCH v2 14/20] PcAtChipsetPkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py PcAtChipsetPkg

Cc: Ruiyu Ni 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 PcAtChipsetPkg/8254TimerDxe/Timer.uni   | Bin 1784 -> 891 bytes
 PcAtChipsetPkg/8254TimerDxe/TimerExtra.uni  | Bin 1336 -> 667 bytes
 .../8259InterruptControllerDxe/Legacy8259.uni   | Bin 1912 -> 955 bytes
 .../8259InterruptControllerDxe/Legacy8259Extra.uni  | Bin 1390 -> 694 bytes
 .../Bus/Pci/IdeControllerDxe/IdeController.uni  | Bin 1934 -> 966 bytes
 .../Bus/Pci/IdeControllerDxe/IdeControllerExtra.uni | Bin 1360 -> 679 bytes
 PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.uni| Bin 1976 -> 987 bytes
 PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxeExtra.uni   | Bin 1368 -> 683 bytes
 PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.uni   | Bin 1752 -> 875 bytes
 PcAtChipsetPkg/IsaAcpiDxe/IsaAcpiExtra.uni  | Bin 1346 -> 672 bytes
 PcAtChipsetPkg/KbcResetDxe/KbcReset.uni | Bin 2010 -> 1004 bytes
 PcAtChipsetPkg/KbcResetDxe/KbcResetExtra.uni| Bin 1478 -> 738 bytes
 .../Library/AcpiTimerLib/BaseAcpiTimerLib.uni   | Bin 1866 -> 932 bytes
 .../Library/AcpiTimerLib/DxeAcpiTimerLib.uni| Bin 1864 -> 931 bytes
 .../Library/BaseIoApicLib/BaseIoApicLib.uni | Bin 1718 -> 858 bytes
 .../Library/ResetSystemLib/ResetSystemLib.uni   | Bin 1874 -> 936 bytes
 .../Library/SerialIoLib/PcAtSerialPortLib.uni   | Bin 1718 -> 858 bytes
 PcAtChipsetPkg/PcAtChipsetPkg.uni   | Bin 24586 -> 12292 bytes
 PcAtChipsetPkg/PcAtChipsetPkgExtra.uni  | Bin 1362 -> 680 bytes
 .../PcatRealTimeClockRuntimeDxe/PcRtc.uni   | Bin 2450 -> 1224 bytes
 .../PcatRealTimeClockRuntimeDxe/PcRtcExtra.uni  | Bin 1356 -> 677 bytes
 PcAtChipsetPkg/PciHostBridgeDxe/PciHostBridge.uni   | Bin 2000 -> 999 bytes
 .../PciHostBridgeDxe/PciHostBridgeExtra.uni | Bin 1348 -> 673 bytes
 23 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/PcAtChipsetPkg/8254TimerDxe/Timer.uni 
b/PcAtChipsetPkg/8254TimerDxe/Timer.uni
index aea2e73..15b6901 100644
Binary files a/PcAtChipsetPkg/8254TimerDxe/Timer.uni and 
b/PcAtChipsetPkg/8254TimerDxe/Timer.uni differ
diff --git a/PcAtChipsetPkg/8254TimerDxe/TimerExtra.uni 
b/PcAtChipsetPkg/8254TimerDxe/TimerExtra.uni
index e200747..3f20889 100644
Binary files a/PcAtChipsetPkg/8254TimerDxe/TimerExtra.uni and 
b/PcAtChipsetPkg/8254TimerDxe/TimerExtra.uni differ
diff --git a/PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259.uni 
b/PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259.uni
index 812f5e4..a29daac 100644
Binary files a/PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259.uni and 
b/PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259.uni differ
diff --git a/PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259Extra.uni 
b/PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259Extra.uni
index ad5e721..f3c6c72 100644
Binary files a/PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259Extra.uni 
and b/PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259Extra.uni differ
diff --git a/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeController.uni 
b/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeController.uni
index 185c538..0e53a06 100644
Binary files a/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeController.uni and 
b/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeController.uni differ
diff --git a/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeControllerExtra.uni 
b/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeControllerExtra.uni
index 07f36d5..8e643f9 100644
Binary files a/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeControllerExtra.uni 
and b/PcAtChipsetPkg/Bus/Pci/IdeControllerDxe/IdeControllerExtra.uni differ
diff --git a/PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.uni 
b/PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.uni
index 1d0d88c..6bb1c4e 100644
Binary files a/PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.uni and 
b/PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxe.uni differ
diff --git a/PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxeExtra.uni 
b/PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxeExtra.uni
index d7ca415..aeb58d1 100644
Binary files a/PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxeExtra.uni and 
b/PcAtChipsetPkg/HpetTimerDxe/HpetTimerDxeExtra.uni differ
diff --git a/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.uni 
b/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.uni
index 5aaf436..45b021a 100644
Binary files a/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.uni and 
b/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.uni differ
diff --git a/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpiExtra.uni 
b/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpiExtra.uni
index f5f7325..ed1e079 100644
Binary files a/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpiExtra.uni and 
b/PcAtChipsetPkg/IsaAcpiDxe/IsaAcpiExtra.uni differ
diff --git a/PcAtChipsetPkg/KbcResetDxe/KbcReset.uni 
b/PcAtChipsetPkg/KbcResetDxe/KbcReset.uni
index 7c1591f..5535dac 100644
Binary files a/PcAtChipsetPkg/KbcResetDxe/KbcReset.uni and 
b/PcAtChipsetPkg/KbcResetDxe/KbcReset.uni differ
diff 

[edk2] [PATCH v2 19/20] UefiCpuPkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py UefiCpuPkg

Cc: Jeff Fan 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 UefiCpuPkg/CpuDxe/CpuDxe.uni| Bin 1756 -> 877 bytes
 UefiCpuPkg/CpuDxe/CpuDxeExtra.uni   | Bin 1352 -> 675 bytes
 UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.uni  | Bin 1952 -> 975 bytes
 UefiCpuPkg/CpuIo2Dxe/CpuIo2DxeExtra.uni | Bin 1344 -> 671 bytes
 UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.uni  | Bin 1972 -> 985 bytes
 UefiCpuPkg/CpuIo2Smm/CpuIo2SmmExtra.uni | Bin 1332 -> 665 bytes
 UefiCpuPkg/CpuIoPei/CpuIoPei.uni| Bin 1896 -> 947 bytes
 UefiCpuPkg/CpuIoPei/CpuIoPeiExtra.uni   | Bin 1336 -> 667 bytes
 UefiCpuPkg/CpuMpPei/CpuMpPei.uni| Bin 1706 -> 852 bytes
 UefiCpuPkg/CpuMpPei/CpuMpPeiExtra.uni   | Bin 1344 -> 671 bytes
 .../Library/BaseUefiCpuLib/BaseUefiCpuLib.uni   | Bin 1826 -> 912 bytes
 UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.uni| Bin 1962 -> 980 bytes
 .../BaseXApicX2ApicLib/BaseXApicX2ApicLib.uni   | Bin 2136 -> 1067 bytes
 .../DxeCpuExceptionHandlerLib.uni   | Bin 1810 -> 904 bytes
 .../SecPeiCpuExceptionHandlerLib.uni| Bin 1842 -> 920 bytes
 .../SmmCpuExceptionHandlerLib.uni   | Bin 1810 -> 904 bytes
 UefiCpuPkg/Library/MtrrLib/MtrrLib.uni  | Bin 1736 -> 867 bytes
 .../PlatformSecLibNull/PlatformSecLibNull.uni   | Bin 1644 -> 821 bytes
 .../SecPeiDxeTimerLibUefiCpu.uni| Bin 4168 -> 2083 bytes
 .../Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.uni | Bin 1672 -> 835 bytes
 .../SmmCpuPlatformHookLibNull.uni   | Bin 1604 -> 801 bytes
 .../PiSmmCommunication/PiSmmCommunicationPei.uni| Bin 2066 -> 1032 bytes
 .../PiSmmCommunicationPeiExtra.uni  | Bin 1370 -> 684 bytes
 .../PiSmmCommunication/PiSmmCommunicationSmm.uni| Bin 3004 -> 1501 bytes
 .../PiSmmCommunicationSmmExtra.uni  | Bin 1392 -> 695 bytes
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.uni| Bin 1868 -> 933 bytes
 UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmmExtra.uni   | Bin 1378 -> 688 bytes
 UefiCpuPkg/ResetVector/FixupVtf/ResetVector.uni | Bin 1696 -> 847 bytes
 .../ResetVector/FixupVtf/ResetVectorExtra.uni   | Bin 1310 -> 654 bytes
 UefiCpuPkg/ResetVector/Vtf0/Bin/ResetVector.uni | Bin 1510 -> 754 bytes
 .../ResetVector/Vtf0/Bin/ResetVectorExtra.uni   | Bin 1310 -> 654 bytes
 UefiCpuPkg/ResetVector/Vtf0/ResetVector.uni | Bin 1454 -> 726 bytes
 UefiCpuPkg/ResetVector/Vtf0/ResetVectorExtra.uni| Bin 1310 -> 654 bytes
 UefiCpuPkg/SecCore/SecCore.uni  | Bin 2908 -> 1453 bytes
 UefiCpuPkg/SecCore/SecCoreExtra.uni | Bin 1316 -> 657 bytes
 UefiCpuPkg/UefiCpuPkg.uni   | Bin 21898 -> 10948 bytes
 UefiCpuPkg/UefiCpuPkgExtra.uni  | Bin 1346 -> 672 bytes
 .../Universal/Acpi/S3Resume2Pei/S3Resume2Pei.uni| Bin 2606 -> 1302 bytes
 .../Acpi/S3Resume2Pei/S3Resume2PeiExtra.uni | Bin 1354 -> 676 bytes
 39 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.uni b/UefiCpuPkg/CpuDxe/CpuDxe.uni
index 715766d..5ac7810 100644
Binary files a/UefiCpuPkg/CpuDxe/CpuDxe.uni and b/UefiCpuPkg/CpuDxe/CpuDxe.uni 
differ
diff --git a/UefiCpuPkg/CpuDxe/CpuDxeExtra.uni 
b/UefiCpuPkg/CpuDxe/CpuDxeExtra.uni
index 0ba595e..fbfc2e1 100644
Binary files a/UefiCpuPkg/CpuDxe/CpuDxeExtra.uni and 
b/UefiCpuPkg/CpuDxe/CpuDxeExtra.uni differ
diff --git a/UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.uni 
b/UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.uni
index 3ce8ec0..59456fb 100644
Binary files a/UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.uni and 
b/UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.uni differ
diff --git a/UefiCpuPkg/CpuIo2Dxe/CpuIo2DxeExtra.uni 
b/UefiCpuPkg/CpuIo2Dxe/CpuIo2DxeExtra.uni
index 512a2f6..655da48 100644
Binary files a/UefiCpuPkg/CpuIo2Dxe/CpuIo2DxeExtra.uni and 
b/UefiCpuPkg/CpuIo2Dxe/CpuIo2DxeExtra.uni differ
diff --git a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.uni 
b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.uni
index 89bac86..c3a212b 100644
Binary files a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.uni and 
b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.uni differ
diff --git a/UefiCpuPkg/CpuIo2Smm/CpuIo2SmmExtra.uni 
b/UefiCpuPkg/CpuIo2Smm/CpuIo2SmmExtra.uni
index 84ba721..b1b82b0 100644
Binary files a/UefiCpuPkg/CpuIo2Smm/CpuIo2SmmExtra.uni and 
b/UefiCpuPkg/CpuIo2Smm/CpuIo2SmmExtra.uni differ
diff --git a/UefiCpuPkg/CpuIoPei/CpuIoPei.uni b/UefiCpuPkg/CpuIoPei/CpuIoPei.uni
index 366efe4..0d8a14e 100644
Binary files a/UefiCpuPkg/CpuIoPei/CpuIoPei.uni and 
b/UefiCpuPkg/CpuIoPei/CpuIoPei.uni differ
diff --git a/UefiCpuPkg/CpuIoPei/CpuIoPeiExtra.uni 
b/UefiCpuPkg/CpuIoPei/CpuIoPeiExtra.uni
index 7aa54a3..cd1f53a 100644
Binary files a/UefiCpuPkg/CpuIoPei/CpuIoPeiExtra.uni and 
b/UefiCpuPkg/CpuIoPei/CpuIoPeiExtra.uni differ
diff --git a

[edk2] [PATCH v2 18/20] SourceLevelDebugPkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py SourceLevelDebugPkg

Cc: Jeff Fan 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxe.uni  | Bin 1888 -> 943 bytes
 .../DebugAgentDxe/DebugAgentDxeExtra.uni | Bin 1354 -> 676 bytes
 SourceLevelDebugPkg/DebugAgentPei/DebugAgentPei.uni  | Bin 1912 -> 955 bytes
 .../DebugAgentPei/DebugAgentPeiExtra.uni | Bin 1356 -> 677 bytes
 .../Library/DebugAgent/DxeDebugAgentLib.uni  | Bin 1822 -> 910 bytes
 .../Library/DebugAgent/SecPeiDebugAgentLib.uni   | Bin 1822 -> 910 bytes
 .../Library/DebugAgent/SmmDebugAgentLib.uni  | Bin 1718 -> 858 bytes
 .../DebugCommunicationLibSerialPort.uni  | Bin 1822 -> 910 bytes
 .../DebugCommunicationLibUsb.uni | Bin 1846 -> 922 bytes
 .../DebugCommunicationLibUsb3Dxe.uni | Bin 2032 -> 1015 bytes
 .../DebugCommunicationLibUsb3Pei.uni | Bin 1968 -> 983 bytes
 .../PeCoffExtraActionLib.uni | Bin 1806 -> 902 bytes
 SourceLevelDebugPkg/SourceLevelDebugPkg.uni  | Bin 17388 -> 8693 bytes
 SourceLevelDebugPkg/SourceLevelDebugPkgExtra.uni | Bin 1374 -> 686 bytes
 14 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxe.uni 
b/SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxe.uni
index 34c645f..35621a5 100644
Binary files a/SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxe.uni and 
b/SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxe.uni differ
diff --git a/SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxeExtra.uni 
b/SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxeExtra.uni
index df952ca..2329b1d 100644
Binary files a/SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxeExtra.uni and 
b/SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxeExtra.uni differ
diff --git a/SourceLevelDebugPkg/DebugAgentPei/DebugAgentPei.uni 
b/SourceLevelDebugPkg/DebugAgentPei/DebugAgentPei.uni
index 5aaf641..4fd12a0 100644
Binary files a/SourceLevelDebugPkg/DebugAgentPei/DebugAgentPei.uni and 
b/SourceLevelDebugPkg/DebugAgentPei/DebugAgentPei.uni differ
diff --git a/SourceLevelDebugPkg/DebugAgentPei/DebugAgentPeiExtra.uni 
b/SourceLevelDebugPkg/DebugAgentPei/DebugAgentPeiExtra.uni
index a0ee3de..620e82a 100644
Binary files a/SourceLevelDebugPkg/DebugAgentPei/DebugAgentPeiExtra.uni and 
b/SourceLevelDebugPkg/DebugAgentPei/DebugAgentPeiExtra.uni differ
diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.uni 
b/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.uni
index d9d9204..af29766 100644
Binary files a/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.uni and 
b/SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgentLib.uni differ
diff --git a/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.uni 
b/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.uni
index a29b6eb..389e2af 100644
Binary files a/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.uni 
and b/SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgentLib.uni differ
diff --git a/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.uni 
b/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.uni
index 9016669..74d7b71 100644
Binary files a/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.uni and 
b/SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgentLib.uni differ
diff --git 
a/SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.uni
 
b/SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.uni
index a0eb387..7c7d8c4 100644
Binary files 
a/SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.uni
 and 
b/SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCommunicationLibSerialPort.uni
 differ
diff --git 
a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommunicationLibUsb.uni
 
b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommunicationLibUsb.uni
index cd76725..86983f2 100644
Binary files 
a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommunicationLibUsb.uni
 and 
b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommunicationLibUsb.uni
 differ
diff --git 
a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.uni
 
b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.uni
index 111cf79..9a19c41 100644
Binary files 
a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.uni
 and 
b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.uni
 differ
diff --git 
a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Pei.uni
 
b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Pei.uni
index 074b686..7b34f01 100644
Bin

[edk2] [PATCH v2 15/20] PerformancePkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py PerformancePkg

Cc: Daryl McDaniel 
Cc: Jaben Carsey 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen 
---
 PerformancePkg/Dp_App/DpStrings.uni | Bin 38432 -> 19222 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/PerformancePkg/Dp_App/DpStrings.uni 
b/PerformancePkg/Dp_App/DpStrings.uni
index c4c146f..f368f34 100644
Binary files a/PerformancePkg/Dp_App/DpStrings.uni and 
b/PerformancePkg/Dp_App/DpStrings.uni differ
-- 
2.6.2

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


Re: [edk2] MdeModulePkg: DebugAssert enhancement

2015-12-04 Thread Anbazhagan, Baraneedharan
Thanks. I will send updated code change for the same library in 
IntelFrameworkModulePkg.

> -Original Message-
> From: Gao, Liming [mailto:liming@intel.com]
> Sent: Friday, December 04, 2015 3:32 AM
> To: Anbazhagan, Baraneedharan; Kinney, Michael D; edk2-devel@lists.01.org
> Subject: RE: MdeModulePkg: DebugAssert enhancement
> 
> Reviewed-by: Liming Gao 
> 
> I would like to help commit your serial patches if no other comments.
> 
> Thanks
> Liming
> -Original Message-
> From: Anbazhagan, Baraneedharan [mailto:anbazha...@hp.com]
> Sent: Friday, December 04, 2015 1:13 AM
> To: Kinney, Michael D; Gao, Liming; edk2-devel@lists.01.org
> Subject: RE: MdeModulePkg: DebugAssert enhancement
> 
> Updated code based on your suggestion to use copy mem and ModuleNameSize
> calculation.
> 
> 
> diff --git a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
> b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
> index f1d9827..c3010df 100644
> --- a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
> +++ b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
> @@ -261,6 +261,7 @@ DebugAssert (
>UINTN  HeaderSize;
>UINTN  TotalSize;
>CHAR8  *Temp;
> +  UINTN  ModuleNameSize;
>UINTN  FileNameSize;
>UINTN  DescriptionSize;
> 
> @@ -268,31 +269,40 @@ DebugAssert (
>// Get string size
>//
>HeaderSize   = sizeof (EFI_DEBUG_ASSERT_DATA);
> +  //
> +  // Compute string size of module name enclosed by []  //
> +  ModuleNameSize   = 2 + AsciiStrSize (gEfiCallerBaseName);
>FileNameSize = AsciiStrSize (FileName);
>DescriptionSize  = AsciiStrSize (Description);
> 
>//
>// Make sure it will all fit in the passed in buffer.
>//
> -  if (HeaderSize + FileNameSize + DescriptionSize > sizeof (Buffer)) {
> +  if (HeaderSize + ModuleNameSize + FileNameSize + DescriptionSize >
> + sizeof (Buffer)) {
>  //
> -// FileName + Description is too long to be filled into buffer.
> +// remove module name if it's too long to be filled into buffer
>  //
> -if (HeaderSize + FileNameSize < sizeof (Buffer)) {
> -  //
> -  // Description has enough buffer to be truncated.
> -  //
> -  DescriptionSize = sizeof (Buffer) - HeaderSize - FileNameSize;
> -} else {
> +ModuleNameSize = 0;
> +if (HeaderSize + FileNameSize + DescriptionSize > sizeof (Buffer))
> + {
>//
> -  // FileName is too long to be filled into buffer.
> -  // FileName will be truncated. Reserved one byte for Description NULL 
> terminator.
> +  // FileName + Description is too long to be filled into buffer.
>//
> -  DescriptionSize = 1;
> -  FileNameSize= sizeof (Buffer) - HeaderSize - DescriptionSize;
> +  if (HeaderSize + FileNameSize < sizeof (Buffer)) {
> +//
> +// Description has enough buffer to be truncated.
> +//
> +DescriptionSize = sizeof (Buffer) - HeaderSize - FileNameSize;
> +  } else {
> +//
> +// FileName is too long to be filled into buffer.
> +// FileName will be truncated. Reserved one byte for Description NULL
> terminator.
> +//
> +DescriptionSize = 1;
> +FileNameSize= sizeof (Buffer) - HeaderSize - DescriptionSize;
> +  }
>  }
>}
> -
>//
>// Fill in EFI_DEBUG_ASSERT_DATA
>//
> @@ -300,12 +310,23 @@ DebugAssert (
>AssertData->LineNumber = (UINT32)LineNumber;
>TotalSize  = sizeof (EFI_DEBUG_ASSERT_DATA);
> 
> +  Temp = (CHAR8 *)(AssertData + 1);
> +
> +  //
> +  // Copy Ascii [ModuleName].
> +  //
> +  if (ModuleNameSize != 0) {
> +CopyMem(Temp, "[", 1);
> +CopyMem(Temp + 1, gEfiCallerBaseName, ModuleNameSize - 3);
> +CopyMem(Temp + ModuleNameSize - 2, "] ", 2);  }
> +
>//
>// Copy Ascii FileName including NULL terminator.
>//
> -  Temp = CopyMem (AssertData + 1, FileName, FileNameSize);
> +  Temp = CopyMem (Temp + ModuleNameSize, FileName, FileNameSize);
>Temp[FileNameSize - 1] = 0;
> -  TotalSize += FileNameSize;
> +  TotalSize += (ModuleNameSize + FileNameSize);
> 
>//
>// Copy Ascii Description include NULL terminator.
> --
> 2.6.3.windows.1
> 
> 
> > -Original Message-
> > From: Kinney, Michael D [mailto:michael.d.kin...@intel.com]
> > Sent: Wednesday, December 02, 2015 8:22 PM
> > To: Gao, Liming; Anbazhagan, Baraneedharan; edk2-devel@lists.01.org;
> > Kinney, Michael D
> > Subject: RE: MdeModulePkg: DebugAssert enhancement
> >
> > Baranee,
> >
> > I also think the following line could be changed for smaller code gen from:
> >
> > +  ModuleNameSize   = AsciiStrLen("[") + AsciiStrLen (gEfiCallerBaseName) +
> > AsciiStrLen("] ");
> >
> > To:
> >
> > +  //
> > +  // Compute string size of module name enclosed by []  //
> > +  ModuleNameSize   = 2 + AsciiStrSize (gEfiCallerBaseName);
> >
> > Mike
> 

Re: [edk2] IntelFrameworkModulePkg: DebugAssert enhancement

2015-12-04 Thread Anbazhagan, Baraneedharan
Updated patch to use CopyMem instead of AsciiSPrint based on code review 
feedback.

---
 .../PeiDxeDebugLibReportStatusCode/DebugLib.c  | 51 +++---
 1 file changed, 36 insertions(+), 15 deletions(-)

diff --git 
a/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c 
b/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
index cfdd2f5..4e89d92 100644
--- a/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
+++ b/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
@@ -268,6 +268,7 @@ DebugAssert (
   UINTN  HeaderSize;
   UINTN  TotalSize;
   CHAR8  *Temp;
+  UINTN  ModuleNameSize;
   UINTN  FileNameSize;
   UINTN  DescriptionSize;
 
@@ -275,31 +276,40 @@ DebugAssert (
   // Get string size
   //
   HeaderSize   = sizeof (EFI_DEBUG_ASSERT_DATA);
+  //
+  // Compute string size of module name enclosed by []  
+  //
+  ModuleNameSize   = 2 + AsciiStrSize (gEfiCallerBaseName);
   FileNameSize = AsciiStrSize (FileName);
   DescriptionSize  = AsciiStrSize (Description);
 
   //
   // Make sure it will all fit in the passed in buffer.
   //
-  if (HeaderSize + FileNameSize + DescriptionSize > sizeof (Buffer)) {
+  if (HeaderSize + ModuleNameSize + FileNameSize + DescriptionSize > sizeof 
(Buffer)) {
 //
-// FileName + Description is too long to be filled into buffer. 
+// remove module name if it's too long to be filled into buffer
 //
-if (HeaderSize + FileNameSize < sizeof (Buffer)) {
-  //
-  // Description has enough buffer to be truncated. 
-  //
-  DescriptionSize = sizeof (Buffer) - HeaderSize - FileNameSize;
-} else {
+ModuleNameSize = 0;
+if (HeaderSize + FileNameSize + DescriptionSize > sizeof (Buffer)) {
   //
-  // FileName is too long to be filled into buffer.
-  // FileName will be truncated. Reserved one byte for Description NULL 
terminator.
+  // FileName + Description is too long to be filled into buffer. 
   //
-  DescriptionSize = 1;
-  FileNameSize= sizeof (Buffer) - HeaderSize - DescriptionSize;
+  if (HeaderSize + FileNameSize < sizeof (Buffer)) {
+//
+// Description has enough buffer to be truncated. 
+//
+DescriptionSize = sizeof (Buffer) - HeaderSize - FileNameSize;
+  } else {
+//
+// FileName is too long to be filled into buffer.
+// FileName will be truncated. Reserved one byte for Description NULL 
terminator.
+//
+DescriptionSize = 1;
+FileNameSize= sizeof (Buffer) - HeaderSize - DescriptionSize;
+  }
 }
   }
- 
   //
   // Fill in EFI_DEBUG_ASSERT_DATA
   //
@@ -307,12 +317,23 @@ DebugAssert (
   AssertData->LineNumber = (UINT32)LineNumber;
   TotalSize  = sizeof (EFI_DEBUG_ASSERT_DATA);
 
+  Temp = (CHAR8 *)(AssertData + 1);
+
+  //
+  // Copy Ascii [ModuleName].
+  //
+  if (ModuleNameSize != 0) {
+CopyMem(Temp, "[", 1);
+CopyMem(Temp + 1, gEfiCallerBaseName, ModuleNameSize - 3);
+CopyMem(Temp + ModuleNameSize - 2, "] ", 2);
+  }
+
   //
   // Copy Ascii FileName including NULL terminator.
   //
-  Temp = CopyMem (AssertData + 1, FileName, FileNameSize);
+  Temp = CopyMem (Temp + ModuleNameSize, FileName, FileNameSize);
   Temp[FileNameSize - 1] = 0;
-  TotalSize += FileNameSize;
+  TotalSize += (ModuleNameSize + FileNameSize);
 
   //
   // Copy Ascii Description include NULL terminator.
-- 
2.6.3.windows.1


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Anbazhagan, Baraneedharan
> Sent: Wednesday, December 02, 2015 9:42 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] IntelFrameworkModulePkg: DebugAssert enhancement
> 
> If the assert happens in a library, then it's hard to determine which module 
> using that
> library is generating that assert.
> Use gEfiCallerBaseName in DebugAssert to display the module name.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Baraneedharan Anbazhagan 
> ---
>  .../PeiDxeDebugLibReportStatusCode/DebugLib.c  | 58 
> ++
>  .../PeiDxeDebugLibReportStatusCode.inf |  1 +
>  2 files changed, 39 insertions(+), 20 deletions(-)
> 
> diff --git
> a/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
> b/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
> index cfdd2f5..0435a6f 100644
> ---
> a/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c
> +++ b/IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/Deb
> +++ ugLib.c
> @@ -22,6 +22,7 @@
> 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include   #include  @@ 
> -268,6
> +269,7 @@ DebugAssert (
>UINTN  HeaderSize;
>UINTN  TotalSize;
>CHAR8 

[edk2] Can I determine from Linux if Secure Boot is supported?

2015-12-04 Thread Rod Smith
Hi,

I'm wondering under what conditions the SecureBoot EFI variable (with
GUID 8be4df61-93ca-11d2-aa0d-00e098032b8c) created. In particular, is it
necessarily present on computers that support Secure Boot but on which
that feature is disabled? I realize that it will normally exist in this
case (I've seen it many times myself), but I'm wondering if a
newly-minted computer (without a Windows installation) might end up
without a SecureBoot variable even though the firmware supports this
feature?

Basically, I'm looking for a reliable way to determine, from within
Linux, whether or not a computer supports Secure Boot, even if it's
currently disabled. If the SecureBoot variable can't provide this, is
there some other way to do it?

-- 
Rod Smith
rodsm...@rodsbooks.com
http://www.rodsbooks.com
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 15/20] PerformancePkg: Convert all .uni files to utf-8

2015-12-04 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey 

> -Original Message-
> From: Justen, Jordan L
> Sent: Friday, December 04, 2015 12:14 PM
> To: edk2-devel@lists.01.org
> Cc: Justen, Jordan L ; Daryl McDaniel  li...@mc2research.org>; Carsey, Jaben 
> Subject: [PATCH v2 15/20] PerformancePkg: Convert all .uni files to utf-8
> Importance: High
> 
> To convert these files I ran:
> 
> $ python3 BaseTools/Scripts/ConvertUni.py PerformancePkg
> 
> Cc: Daryl McDaniel 
> Cc: Jaben Carsey 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jordan Justen 
> ---
>  PerformancePkg/Dp_App/DpStrings.uni | Bin 38432 -> 19222 bytes
>  1 file changed, 0 insertions(+), 0 deletions(-)
> 
> diff --git a/PerformancePkg/Dp_App/DpStrings.uni
> b/PerformancePkg/Dp_App/DpStrings.uni
> index c4c146f..f368f34 100644
> Binary files a/PerformancePkg/Dp_App/DpStrings.uni and
> b/PerformancePkg/Dp_App/DpStrings.uni differ
> --
> 2.6.2

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


Re: [edk2] [PATCH v2 17/20] ShellPkg: Convert all .uni files to utf-8

2015-12-04 Thread Carsey, Jaben
There is a large change outstanding that was reviewed, but not yet committed 
for updating DH to display additional protocols.  Can you commit that before 
this change?

If yes,

Reviewed-by: Jaben Carsey 

> -Original Message-
> From: Justen, Jordan L
> Sent: Friday, December 04, 2015 12:14 PM
> To: edk2-devel@lists.01.org
> Cc: Justen, Jordan L ; Carsey, Jaben
> ; Qiu, Shumin 
> Subject: [PATCH v2 17/20] ShellPkg: Convert all .uni files to utf-8
> Importance: High
> 
> To convert these files I ran:
> 
> $ python3 BaseTools/Scripts/ConvertUni.py ShellPkg
> 
> Cc: Jaben Carsey 
> Cc: Shumin Qiu 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jordan Justen 
> ---
>  ShellPkg/Application/Shell/Shell.uni   | Bin 4840 -> 2419 bytes
>  ShellPkg/Library/UefiDpLib/UefiDpLib.uni   | Bin 18146 -> 9072 bytes
>  .../UefiHandleParsingLib/UefiHandleParsingLib.uni  | Bin 32404 -> 16201
> bytes
>  .../UefiShellBcfgCommandLib.uni| Bin 18414 -> 9206 bytes
>  .../Edit/TextEditStrings.uni   | Bin 11484 -> 5741 bytes
>  .../HexEdit/HexeditStrings.uni | Bin 13156 -> 6577 bytes
>  .../SmbiosView/SmbiosViewStrings.uni   | Bin 109944 -> 54971 
> bytes
>  .../UefiShellDebug1CommandsLib.uni | Bin 140676 -> 70337 
> bytes
>  .../UefiShellDriver1CommandsLib.uni| Bin 70806 -> 35402 bytes
>  .../UefiShellLevel1CommandsLib.uni | Bin 43930 -> 21964 bytes
>  .../UefiShellLevel2CommandsLib.uni | Bin 109742 -> 54870 
> bytes
>  .../UefiShellLevel3CommandsLib.uni | Bin 44956 -> 22477 bytes
>  .../UefiShellNetwork1CommandsLib.uni   | Bin 21094 -> 10546 bytes
>  .../UefiShellTftpCommandLib.uni| Bin 9952 -> 4975 bytes
>  14 files changed, 0 insertions(+), 0 deletions(-)
> 
> diff --git a/ShellPkg/Application/Shell/Shell.uni
> b/ShellPkg/Application/Shell/Shell.uni
> index 25cf699..301d879 100644
> Binary files a/ShellPkg/Application/Shell/Shell.uni and
> b/ShellPkg/Application/Shell/Shell.uni differ
> diff --git a/ShellPkg/Library/UefiDpLib/UefiDpLib.uni
> b/ShellPkg/Library/UefiDpLib/UefiDpLib.uni
> index 5bcb496..b092274 100644
> Binary files a/ShellPkg/Library/UefiDpLib/UefiDpLib.uni and
> b/ShellPkg/Library/UefiDpLib/UefiDpLib.uni differ
> diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> index d8e45d0..1d142e9 100644
> Binary files a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> and b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni differ
> diff --git
> a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni
> b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni
> index d34f314..b680a48 100644
> Binary files
> a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni
> and
> b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni
> differ
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni
> index a61cae3..f799148 100644
> Binary files
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni and
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni
> differ
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni
> index f521931..d9591ca 100644
> Binary files
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni
> and
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni
> differ
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewSt
> rings.uni
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewSt
> rings.uni
> index f368825..24fca87 100644
> Binary files
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewSt
> rings.uni and
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewSt
> rings.uni differ
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Command
> sLib.uni
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Command
> sLib.uni
> index e16175a..1974060 100644
> Binary files
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Command
> sLib.uni and
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Command
> sLib.uni differ
> diff --git
> a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1Commands
> Lib.uni
> b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1Command
> sLib.uni
> index a289853..a14469a 100644
> Binary files
> a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1Commands
> Lib.uni and
> b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiS

Re: [edk2] [PATCH v2 17/20] ShellPkg: Convert all .uni files to utf-8

2015-12-04 Thread Jordan Justen
On 2015-12-04 13:16:34, Carsey, Jaben wrote:
> There is a large change outstanding that was reviewed, but not yet
> committed for updating DH to display additional protocols. Can you
> commit that before this change?

How about we do the opposite? Commit this one first, and then rebase
that patch. This would let us actually see the diff of that change in
source control.

I'd be willing to do the rebase for that patch.

-Jordan

> 
> If yes,
> 
> Reviewed-by: Jaben Carsey 
> 
> > -Original Message-
> > From: Justen, Jordan L
> > Sent: Friday, December 04, 2015 12:14 PM
> > To: edk2-devel@lists.01.org
> > Cc: Justen, Jordan L ; Carsey, Jaben
> > ; Qiu, Shumin 
> > Subject: [PATCH v2 17/20] ShellPkg: Convert all .uni files to utf-8
> > Importance: High
> > 
> > To convert these files I ran:
> > 
> > $ python3 BaseTools/Scripts/ConvertUni.py ShellPkg
> > 
> > Cc: Jaben Carsey 
> > Cc: Shumin Qiu 
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Jordan Justen 
> > ---
> >  ShellPkg/Application/Shell/Shell.uni   | Bin 4840 -> 2419 bytes
> >  ShellPkg/Library/UefiDpLib/UefiDpLib.uni   | Bin 18146 -> 9072 
> > bytes
> >  .../UefiHandleParsingLib/UefiHandleParsingLib.uni  | Bin 32404 -> 16201
> > bytes
> >  .../UefiShellBcfgCommandLib.uni| Bin 18414 -> 9206 
> > bytes
> >  .../Edit/TextEditStrings.uni   | Bin 11484 -> 5741 
> > bytes
> >  .../HexEdit/HexeditStrings.uni | Bin 13156 -> 6577 
> > bytes
> >  .../SmbiosView/SmbiosViewStrings.uni   | Bin 109944 -> 54971 
> > bytes
> >  .../UefiShellDebug1CommandsLib.uni | Bin 140676 -> 70337 
> > bytes
> >  .../UefiShellDriver1CommandsLib.uni| Bin 70806 -> 35402 
> > bytes
> >  .../UefiShellLevel1CommandsLib.uni | Bin 43930 -> 21964 
> > bytes
> >  .../UefiShellLevel2CommandsLib.uni | Bin 109742 -> 54870 
> > bytes
> >  .../UefiShellLevel3CommandsLib.uni | Bin 44956 -> 22477 
> > bytes
> >  .../UefiShellNetwork1CommandsLib.uni   | Bin 21094 -> 10546 
> > bytes
> >  .../UefiShellTftpCommandLib.uni| Bin 9952 -> 4975 bytes
> >  14 files changed, 0 insertions(+), 0 deletions(-)
> > 
> > diff --git a/ShellPkg/Application/Shell/Shell.uni
> > b/ShellPkg/Application/Shell/Shell.uni
> > index 25cf699..301d879 100644
> > Binary files a/ShellPkg/Application/Shell/Shell.uni and
> > b/ShellPkg/Application/Shell/Shell.uni differ
> > diff --git a/ShellPkg/Library/UefiDpLib/UefiDpLib.uni
> > b/ShellPkg/Library/UefiDpLib/UefiDpLib.uni
> > index 5bcb496..b092274 100644
> > Binary files a/ShellPkg/Library/UefiDpLib/UefiDpLib.uni and
> > b/ShellPkg/Library/UefiDpLib/UefiDpLib.uni differ
> > diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> > b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> > index d8e45d0..1d142e9 100644
> > Binary files 
> > a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> > and b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni differ
> > diff --git
> > a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni
> > b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni
> > index d34f314..b680a48 100644
> > Binary files
> > a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni
> > and
> > b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni
> > differ
> > diff --git
> > a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni
> > b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni
> > index a61cae3..f799148 100644
> > Binary files
> > a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni and
> > b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni
> > differ
> > diff --git
> > a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni
> > b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni
> > index f521931..d9591ca 100644
> > Binary files
> > a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni
> > and
> > b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni
> > differ
> > diff --git
> > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewSt
> > rings.uni
> > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewSt
> > rings.uni
> > index f368825..24fca87 100644
> > Binary files
> > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewSt
> > rings.uni and
> > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewSt
> > rings.uni differ
> > diff --git
> > a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Command
> > sLib.uni
> > b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1Command
> > sLib.uni
> > index e16175a..1974060 100644
> > Binary files
> > a/ShellPkg/Library/UefiShellD

Re: [edk2] [PATCH v2 17/20] ShellPkg: Convert all .uni files to utf-8

2015-12-04 Thread Carsey, Jaben
Agreed. that works fine too... 

> -Original Message-
> From: Justen, Jordan L
> Sent: Friday, December 04, 2015 2:14 PM
> To: Carsey, Jaben ; edk2-devel@lists.01.org
> Cc: Qiu, Shumin ; Carsey, Jaben
> 
> Subject: RE: [PATCH v2 17/20] ShellPkg: Convert all .uni files to utf-8
> Importance: High
> 
> On 2015-12-04 13:16:34, Carsey, Jaben wrote:
> > There is a large change outstanding that was reviewed, but not yet
> > committed for updating DH to display additional protocols. Can you
> > commit that before this change?
> 
> How about we do the opposite? Commit this one first, and then rebase
> that patch. This would let us actually see the diff of that change in
> source control.
> 
> I'd be willing to do the rebase for that patch.
> 
> -Jordan
> 
> >
> > If yes,
> >
> > Reviewed-by: Jaben Carsey 
> >
> > > -Original Message-
> > > From: Justen, Jordan L
> > > Sent: Friday, December 04, 2015 12:14 PM
> > > To: edk2-devel@lists.01.org
> > > Cc: Justen, Jordan L ; Carsey, Jaben
> > > ; Qiu, Shumin 
> > > Subject: [PATCH v2 17/20] ShellPkg: Convert all .uni files to utf-8
> > > Importance: High
> > >
> > > To convert these files I ran:
> > >
> > > $ python3 BaseTools/Scripts/ConvertUni.py ShellPkg
> > >
> > > Cc: Jaben Carsey 
> > > Cc: Shumin Qiu 
> > > Contributed-under: TianoCore Contribution Agreement 1.0
> > > Signed-off-by: Jordan Justen 
> > > ---
> > >  ShellPkg/Application/Shell/Shell.uni   | Bin 4840 -> 2419 
> > > bytes
> > >  ShellPkg/Library/UefiDpLib/UefiDpLib.uni   | Bin 18146 -> 9072 
> > > bytes
> > >  .../UefiHandleParsingLib/UefiHandleParsingLib.uni  | Bin 32404 -> 16201
> > > bytes
> > >  .../UefiShellBcfgCommandLib.uni| Bin 18414 -> 9206 
> > > bytes
> > >  .../Edit/TextEditStrings.uni   | Bin 11484 -> 5741 
> > > bytes
> > >  .../HexEdit/HexeditStrings.uni | Bin 13156 -> 6577 
> > > bytes
> > >  .../SmbiosView/SmbiosViewStrings.uni   | Bin 109944 -> 54971
> bytes
> > >  .../UefiShellDebug1CommandsLib.uni | Bin 140676 -> 70337
> bytes
> > >  .../UefiShellDriver1CommandsLib.uni| Bin 70806 -> 35402 
> > > bytes
> > >  .../UefiShellLevel1CommandsLib.uni | Bin 43930 -> 21964 
> > > bytes
> > >  .../UefiShellLevel2CommandsLib.uni | Bin 109742 -> 54870
> bytes
> > >  .../UefiShellLevel3CommandsLib.uni | Bin 44956 -> 22477 
> > > bytes
> > >  .../UefiShellNetwork1CommandsLib.uni   | Bin 21094 -> 10546
> bytes
> > >  .../UefiShellTftpCommandLib.uni| Bin 9952 -> 4975 
> > > bytes
> > >  14 files changed, 0 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/ShellPkg/Application/Shell/Shell.uni
> > > b/ShellPkg/Application/Shell/Shell.uni
> > > index 25cf699..301d879 100644
> > > Binary files a/ShellPkg/Application/Shell/Shell.uni and
> > > b/ShellPkg/Application/Shell/Shell.uni differ
> > > diff --git a/ShellPkg/Library/UefiDpLib/UefiDpLib.uni
> > > b/ShellPkg/Library/UefiDpLib/UefiDpLib.uni
> > > index 5bcb496..b092274 100644
> > > Binary files a/ShellPkg/Library/UefiDpLib/UefiDpLib.uni and
> > > b/ShellPkg/Library/UefiDpLib/UefiDpLib.uni differ
> > > diff --git
> a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> > > b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> > > index d8e45d0..1d142e9 100644
> > > Binary files
> a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> > > and b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> differ
> > > diff --git
> > >
> a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni
> > >
> b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni
> > > index d34f314..b680a48 100644
> > > Binary files
> > >
> a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni
> > > and
> > >
> b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.uni
> > > differ
> > > diff --git
> > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni
> > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni
> > > index a61cae3..f799148 100644
> > > Binary files
> > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni
> and
> > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/TextEditStrings.uni
> > > differ
> > > diff --git
> > >
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni
> > >
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni
> > > index f521931..d9591ca 100644
> > > Binary files
> > >
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni
> > > and
> > >
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/HexeditStrings.uni
> > > differ
> > > diff --git
> > >
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewSt
> > > rings.uni
> > >
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/

[edk2] [PATCH] ShellPkg: Make 'dh' support showing all spec defined protocols.

2015-12-04 Thread Jordan Justen
From: Qiu Shumin 

When using 'dh' to dump all protocols installed on a handle, some of
them are shown as 'UnknownDevice'.

Device patch make 'dh' support all spec defined protocols.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey 
Reviewed-by: Qiu Shumin 
Reviewed-by: Ruiyu Ni 
Reviewed-by: Samer El-Haj-Mahmoud 
---

 Here is the patch with a diff after converting the .uni to utf-8.

 Who is the author of this patch? Qui or Jaben?

 .../UefiHandleParsingLib/UefiHandleParsingLib.c| 123 +
 .../UefiHandleParsingLib/UefiHandleParsingLib.inf  | 115 +++
 .../UefiHandleParsingLib/UefiHandleParsingLib.uni  | 116 +++
 3 files changed, 354 insertions(+)

diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c 
b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index b211de7..6f093ff 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -1026,6 +1026,124 @@ STATIC CONST GUID_INFO_BLOCK mGuidStringList[] = {
   {STRING_TOKEN(STR_DISK_INFO), &gEfiDiskInfoProtocolGuid, 
   NULL},
 
 //
+// PI Spec 1.0
+//
+  {STRING_TOKEN(STR_BDS_ARCH),  &gEfiBdsArchProtocolGuid,  
   NULL},
+  {STRING_TOKEN(STR_CPU_ARCH),  &gEfiCpuArchProtocolGuid,  
   NULL},
+  {STRING_TOKEN(STR_MET_ARCH),  &gEfiMetronomeArchProtocolGuid,
   NULL},
+  {STRING_TOKEN(STR_MON_ARCH),  
&gEfiMonotonicCounterArchProtocolGuid,NULL},
+  {STRING_TOKEN(STR_RTC_ARCH),  
&gEfiRealTimeClockArchProtocolGuid,   NULL},
+  {STRING_TOKEN(STR_RESET_ARCH),&gEfiResetArchProtocolGuid,
   NULL},
+  {STRING_TOKEN(STR_RT_ARCH),   &gEfiRuntimeArchProtocolGuid,  
   NULL},
+  {STRING_TOKEN(STR_SEC_ARCH),  &gEfiSecurityArchProtocolGuid, 
   NULL},
+  {STRING_TOKEN(STR_TIMER_ARCH),&gEfiTimerArchProtocolGuid,
   NULL},
+  {STRING_TOKEN(STR_VAR_ARCH),  
&gEfiVariableWriteArchProtocolGuid,   NULL},
+  {STRING_TOKEN(STR_V_ARCH),&gEfiVariableArchProtocolGuid, 
   NULL},
+  {STRING_TOKEN(STR_SECP),  &gEfiSecurityPolicyProtocolGuid,   
   NULL},
+  {STRING_TOKEN(STR_WDT_ARCH),  
&gEfiWatchdogTimerArchProtocolGuid,   NULL},
+  {STRING_TOKEN(STR_SCR),   
&gEfiStatusCodeRuntimeProtocolGuid,   NULL},
+  {STRING_TOKEN(STR_SMB_HC),&gEfiSmbusHcProtocolGuid,  
   NULL},
+  {STRING_TOKEN(STR_FV_2),  &gEfiFirmwareVolume2ProtocolGuid,  
   NULL},
+  {STRING_TOKEN(STR_FV_BLOCK),  
&gEfiFirmwareVolumeBlockProtocolGuid, NULL},
+  {STRING_TOKEN(STR_CAP_ARCH),  &gEfiCapsuleArchProtocolGuid,  
   NULL},
+  {STRING_TOKEN(STR_MP_SERVICE),&gEfiMpServiceProtocolGuid,
   NULL},
+  {STRING_TOKEN(STR_HBRAP), 
&gEfiPciHostBridgeResourceAllocationProtocolGuid, NULL},
+  {STRING_TOKEN(STR_PCIP),  &gEfiPciPlatformProtocolGuid,  
   NULL},
+  {STRING_TOKEN(STR_PCIO),  &gEfiPciOverrideProtocolGuid,  
   NULL},
+  {STRING_TOKEN(STR_PCIE),  
&gEfiPciEnumerationCompleteProtocolGuid,  NULL},
+  {STRING_TOKEN(STR_IPCID), 
&gEfiIncompatiblePciDeviceSupportProtocolGuid,NULL},
+  {STRING_TOKEN(STR_PCIHPI),&gEfiPciHotPlugInitProtocolGuid,   
   NULL},
+  {STRING_TOKEN(STR_PCIHPR),
&gEfiPciHotPlugRequestProtocolGuid,   NULL},
+  {STRING_TOKEN(STR_SMBIOS),&gEfiSmbiosProtocolGuid,   
   NULL},
+  {STRING_TOKEN(STR_S3_SAVE),   &gEfiS3SaveStateProtocolGuid,  
   NULL},
+  {STRING_TOKEN(STR_S3_S_SMM),  &gEfiS3SmmSaveStateProtocolGuid,   
   NULL},
+  {STRING_TOKEN(STR_RSC),   &gEfiRscHandlerProtocolGuid,   
   NULL},
+  {STRING_TOKEN(STR_S_RSC), &gEfiSmmRscHandlerProtocolGuid,
   NULL},
+  {STRING_TOKEN(STR_ACPI_SDT),  &gEfiAcpiSdtProtocolGuid,  
   NULL},
+  {STRING_TOKEN(STR_SIO),   &gEfiSioProtocolGuid,  
   NULL},
+  {STRING_TOKEN(STR_S_CPU2),&gEfiSmmCpuIo2ProtocolGuid,
   NULL},
+  {STRING_TOKEN(STR_S_BASE2),   &gEfiSmmBase2ProtocolGuid, 
   NULL},
+  {STRING_TOKEN(STR_S_ACC_2),   &gEfiSmmAccess2ProtocolGuid,   
   NULL},
+  {STRING_TOKEN(STR_S_CON_2),

[edk2] Double or floating point on edk2 ?

2015-12-04 Thread Shubha Ramani
I know this question has been answered before. Do I need to convert my 
application to a UEFI StdLib applicationto do double or floating point math ? 
Can't do it in a regular Shell App ?
Please illuminate.
Thanks,
Shubha Shubha D. ramanishubharam...@gmail.com
shubharam...@yahoo.com
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] ShellPkg: Make 'dh' support showing all spec defined protocols.

2015-12-04 Thread Carsey, Jaben
I am the author.  Shumin did some final verification and fixed a bug and then 
sent out for review.

> -Original Message-
> From: Justen, Jordan L
> Sent: Friday, December 04, 2015 4:11 PM
> To: edk2-devel@lists.01.org
> Cc: Carsey, Jaben ; Qiu, Shumin
> 
> Subject: [PATCH] ShellPkg: Make 'dh' support showing all spec defined
> protocols.
> Importance: High
> 
> From: Qiu Shumin 
> 
> When using 'dh' to dump all protocols installed on a handle, some of
> them are shown as 'UnknownDevice'.
> 
> Device patch make 'dh' support all spec defined protocols.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jaben Carsey 
> Reviewed-by: Qiu Shumin 
> Reviewed-by: Ruiyu Ni 
> Reviewed-by: Samer El-Haj-Mahmoud 
> ---
> 
>  Here is the patch with a diff after converting the .uni to utf-8.
> 
>  Who is the author of this patch? Qui or Jaben?
> 
>  .../UefiHandleParsingLib/UefiHandleParsingLib.c| 123
> +
>  .../UefiHandleParsingLib/UefiHandleParsingLib.inf  | 115
> +++
>  .../UefiHandleParsingLib/UefiHandleParsingLib.uni  | 116
> +++
>  3 files changed, 354 insertions(+)
> 
> diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> index b211de7..6f093ff 100644
> --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> @@ -1026,6 +1026,124 @@ STATIC CONST GUID_INFO_BLOCK
> mGuidStringList[] = {
>{STRING_TOKEN(STR_DISK_INFO), &gEfiDiskInfoProtocolGuid,
> NULL},
> 
>  //
> +// PI Spec 1.0
> +//
> +  {STRING_TOKEN(STR_BDS_ARCH),  &gEfiBdsArchProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_CPU_ARCH),  &gEfiCpuArchProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_MET_ARCH),
> &gEfiMetronomeArchProtocolGuid,   NULL},
> +  {STRING_TOKEN(STR_MON_ARCH),
> &gEfiMonotonicCounterArchProtocolGuid,NULL},
> +  {STRING_TOKEN(STR_RTC_ARCH),
> &gEfiRealTimeClockArchProtocolGuid,   NULL},
> +  {STRING_TOKEN(STR_RESET_ARCH),&gEfiResetArchProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_RT_ARCH),   &gEfiRuntimeArchProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_SEC_ARCH),  &gEfiSecurityArchProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_TIMER_ARCH),&gEfiTimerArchProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_VAR_ARCH),
> &gEfiVariableWriteArchProtocolGuid,   NULL},
> +  {STRING_TOKEN(STR_V_ARCH),&gEfiVariableArchProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_SECP),  &gEfiSecurityPolicyProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_WDT_ARCH),
> &gEfiWatchdogTimerArchProtocolGuid,   NULL},
> +  {STRING_TOKEN(STR_SCR),   
> &gEfiStatusCodeRuntimeProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_SMB_HC),&gEfiSmbusHcProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_FV_2),  &gEfiFirmwareVolume2ProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_FV_BLOCK),
> &gEfiFirmwareVolumeBlockProtocolGuid, NULL},
> +  {STRING_TOKEN(STR_CAP_ARCH),  &gEfiCapsuleArchProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_MP_SERVICE),&gEfiMpServiceProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_HBRAP),
> &gEfiPciHostBridgeResourceAllocationProtocolGuid, NULL},
> +  {STRING_TOKEN(STR_PCIP),  &gEfiPciPlatformProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_PCIO),  &gEfiPciOverrideProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_PCIE),
> &gEfiPciEnumerationCompleteProtocolGuid,  NULL},
> +  {STRING_TOKEN(STR_IPCID),
> &gEfiIncompatiblePciDeviceSupportProtocolGuid,NULL},
> +  {STRING_TOKEN(STR_PCIHPI),&gEfiPciHotPlugInitProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_PCIHPR),
> &gEfiPciHotPlugRequestProtocolGuid,   NULL},
> +  {STRING_TOKEN(STR_SMBIOS),&gEfiSmbiosProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_S3_SAVE),   &gEfiS3SaveStateProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_S3_S_SMM),
> &gEfiS3SmmSaveStateProtocolGuid,  NULL},
> +  {STRING_TOKEN(STR_RSC),   &gEfiRscHandlerProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_S_RSC), &gEfiSmmRscHandlerProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_ACPI_SDT),  &gEfiAcpiSdtProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_SIO),   &gEfiSioProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_S_CPU2),&gEfiSmmCpuIo2ProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_S_BASE2),   &gEfiSmmBase2ProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_S_ACC_2),   &gEfiSmmAccess2ProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_S_CON_2),   &gEfiSmmControl2ProtocolGuid,
> NULL},
> +  {STRING_TOKEN(STR_S_CONFIG),
> &gEfiSmmConfigurationProtocolGuid,NULL},
>