Re: [edk2-devel] [PATCH v2] MdeModulePkg/RegularExpressionDxe: Make oniguruma a submodule in edk2.

2020-04-02 Thread Liming Gao
Reviewed-by: Liming Gao 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Zhang, Shenglei
> Sent: Thursday, April 2, 2020 3:17 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J ; Wu, Hao A ; 
> Gao, Liming 
> Subject: [edk2-devel] [PATCH v2] MdeModulePkg/RegularExpressionDxe: Make 
> oniguruma a submodule in edk2.
> 
> Use submodule way to access oniguruma. And upgrade oniguruma
> version from v6.9.3 to v6.9.4_mark1.
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2073
> 
> Cc: Jian J Wang 
> Cc: Hao A Wu 
> Cc: Liming Gao 
> Signed-off-by: Shenglei Zhang 
> ---
> 
> v2:1.Update the inf file to make VS2019 build pass.
>2.Add ignore files in MdeModulePkg.ci.yaml.
> 
> The patch is too big, so I put the change on my forked tree.
> https://github.com/shenglei10/edk2/tree/oniguruma
> 
> --
> 2.18.0.windows.1
> 
> 
> 


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

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



Re: [edk2-devel] [PATCH] .azurepipelines: Update CI steps

2020-04-02 Thread Liming Gao
Reviewed-by: Liming Gao 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Zhang, Shenglei
> Sent: Wednesday, April 1, 2020 4:25 PM
> To: devel@edk2.groups.io
> Cc: Sean Brogan ; Bret Barkelew 
> ; Kinney, Michael D
> ; Gao, Liming 
> Subject: [edk2-devel] [PATCH] .azurepipelines: Update CI steps
> 
> From: Sean Brogan 
> 
> Update CI steps to build base tools after setup and update,
> as basetools might have dependencies that need to be resolved.
> 
> Cc: Sean Brogan 
> Cc: Bret Barkelew 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Signed-off-by: Shenglei Zhang 
> ---
>  .azurepipelines/templates/pr-gate-steps.yml | 12 +++-
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/.azurepipelines/templates/pr-gate-steps.yml 
> b/.azurepipelines/templates/pr-gate-steps.yml
> index a969661dea15..3fcc1e88d804 100644
> --- a/.azurepipelines/templates/pr-gate-steps.yml
> +++ b/.azurepipelines/templates/pr-gate-steps.yml
> @@ -39,11 +39,6 @@ steps:
>  arguments: -c .pytool/CISettings.py -p ${{ parameters.build_pkgs }} 
> --pr-target origin/$(System.PullRequest.targetBranch) --output-
> csv-format-string "##vso[task.setvariable 
> variable=pkgs_to_build;isOutpout=true]{pkgcsv}" --output-count-format-string
> "##vso[task.setvariable variable=pkg_count;isOutpout=true]{pkgcount}"
>condition: eq(variables['Build.Reason'], 'PullRequest')
> 
> -# build basetools
> -- template: basetools-build-steps.yml
> -  parameters:
> -tool_chain_tag: ${{ parameters.tool_chain_tag }}
> -
>  # install spell check prereqs
>  - template: spell-check-prereq-steps.yml
> 
> @@ -62,6 +57,13 @@ steps:
>  arguments: -c .pytool/CISettings.py -p $(pkgs_to_build) -t ${{ 
> parameters.build_targets}} -a ${{ parameters.build_archs}}
> TOOL_CHAIN_TAG=${{ parameters.tool_chain_tag}}
>condition: and(gt(variables.pkg_count, 0), succeeded())
> 
> +# build basetools
> +#   do this after setup and update so that code base dependencies
> +#   are all resolved.
> +- template: basetools-build-steps.yml
> +  parameters:
> +tool_chain_tag: ${{ parameters.tool_chain_tag }}
> +
>  - task: CmdLine@1
>displayName: Build and Test ${{ parameters.build_pkgs }} ${{ 
> parameters.build_archs}}
>inputs:
> --
> 2.18.0.windows.1
> 
> 
> 


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

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



Re: [edk2-devel] [PATCH v2 0/2] Use submodule way to access brotli

2020-04-02 Thread Liming Gao
Reviewed-by: Liming Gao 

> -Original Message-
> From: Zhang, Shenglei 
> Sent: Wednesday, April 1, 2020 4:32 PM
> To: devel@edk2.groups.io
> Cc: Gao, Liming ; Wang, Jian J ; 
> Wu, Hao A ; Feng, Bob C
> 
> Subject: [PATCH v2 0/2] Use submodule way to access brotli
> 
> Currently brotli is used and customized by edk2 in BaseTools
> and MdeModulePkg. These two patches make brotli a submodule in
> edk2.
> https://bugzilla.tianocore.org/show_bug.cgi?id=2558
> https://bugzilla.tianocore.org/show_bug.cgi?id=2559
> 
> v2: Add submodule path in CISettings.py
> 
> Cc: Liming Gao 
> Cc: Jian J Wang 
> Cc: Hao A Wu 
> Cc: Bob Feng 
> Shenglei Zhang (2):
>   MdeModulePkg/BrotliCustomDecompressLib: Make brotli a submodule
>   BaseTools: Make brotli a submodule
> 
>  .../C/BrotliCompress/common/dictionary.c  | 5905 -
>  .../C/BrotliCompress/common/transform.c   |  235 -
>  .../Source/C/BrotliCompress/dec/bit_reader.c  |   48 -
>  .../Source/C/BrotliCompress/dec/decode.c  | 2497 ---
>  .../Source/C/BrotliCompress/dec/huffman.c |  356 -
>  BaseTools/Source/C/BrotliCompress/dec/state.c |  164 -
>  .../BrotliCompress/enc/backward_references.c  |  144 -
>  .../enc/backward_references_hq.c  |  830 ---
>  .../Source/C/BrotliCompress/enc/bit_cost.c|   35 -
>  .../C/BrotliCompress/enc/block_splitter.c |  194 -
>  .../C/BrotliCompress/enc/brotli_bit_stream.c  | 1331 
>  .../Source/C/BrotliCompress/enc/cluster.c |   56 -
>  .../C/BrotliCompress/enc/compress_fragment.c  |  790 ---
>  .../enc/compress_fragment_two_pass.c  |  645 --
>  .../C/BrotliCompress/enc/dictionary_hash.c| 1120 
>  .../Source/C/BrotliCompress/enc/encode.c  | 1864 --
>  .../C/BrotliCompress/enc/encoder_dict.c   |   32 -
>  .../C/BrotliCompress/enc/entropy_encode.c |  501 --
>  .../Source/C/BrotliCompress/enc/histogram.c   |  100 -
>  .../C/BrotliCompress/enc/literal_cost.c   |  175 -
>  .../Source/C/BrotliCompress/enc/memory.c  |  170 -
>  .../Source/C/BrotliCompress/enc/metablock.c   |  667 --
>  .../Source/C/BrotliCompress/enc/static_dict.c |  486 --
>  .../Source/C/BrotliCompress/enc/utf8_util.c   |   85 -
>  .../Source/C/BrotliCompress/tools/brotli.c| 1143 
>  .../BrotliDecUefiSupport.c|   31 +
>  .../common/dictionary.c   | 5905 -
>  .../common/transform.c|  235 -
>  .../dec/bit_reader.c  |   48 -
>  .../BrotliCustomDecompressLib/dec/decode.c| 2500 ---
>  .../BrotliCustomDecompressLib/dec/huffman.c   |  356 -
>  .../BrotliCustomDecompressLib/dec/state.c |  164 -
>  .gitmodules   |6 +
>  .pytool/CISettings.py |4 +
>  BaseTools/Source/C/BrotliCompress/GNUmakefile |   54 +-
>  BaseTools/Source/C/BrotliCompress/LICENSE |   19 -
>  BaseTools/Source/C/BrotliCompress/Makefile|   52 +-
>  BaseTools/Source/C/BrotliCompress/README.md   |   26 -
>  BaseTools/Source/C/BrotliCompress/ReadMe.txt  |2 -
>  BaseTools/Source/C/BrotliCompress/brotli  |1 +
>  .../C/BrotliCompress/common/constants.h   |   64 -
>  .../Source/C/BrotliCompress/common/context.h  |  261 -
>  .../C/BrotliCompress/common/dictionary.h  |   64 -
>  .../Source/C/BrotliCompress/common/platform.h |  558 --
>  .../C/BrotliCompress/common/transform.h   |   80 -
>  .../Source/C/BrotliCompress/common/version.h  |   26 -
>  .../Source/C/BrotliCompress/dec/bit_reader.h  |  309 -
>  .../Source/C/BrotliCompress/dec/huffman.h |   72 -
>  .../Source/C/BrotliCompress/dec/prefix.h  |  750 ---
>  BaseTools/Source/C/BrotliCompress/dec/state.h |  258 -
>  .../brotli-comparison-study-2015-09-22.pdf|  Bin 215208 -> 0 bytes
>  .../BrotliCompress/enc/backward_references.h  |   38 -
>  .../enc/backward_references_hq.h  |   93 -
>  .../enc/backward_references_inc.h |  153 -
>  .../Source/C/BrotliCompress/enc/bit_cost.h|   63 -
>  .../C/BrotliCompress/enc/bit_cost_inc.h   |  127 -
>  .../C/BrotliCompress/enc/block_encoder_inc.h  |   34 -
>  .../C/BrotliCompress/enc/block_splitter.h |   51 -
>  .../C/BrotliCompress/enc/block_splitter_inc.h |  431 --
>  .../C/BrotliCompress/enc/brotli_bit_stream.h  |   84 -
>  .../Source/C/BrotliCompress/enc/cluster.h |   48 -
>  .../Source/C/BrotliCompress/enc/cluster_inc.h |  317 -
>  .../Source/C/BrotliCompress/enc/command.h |  190 -
>  .../C/BrotliCompress/enc/compress_fragment.h  |   61 -
>  .../enc/compress_fragment_two_pass.h  |   54 -
>  .../C/BrotliCompress/enc/dictionary_hash.h|   24 -
>  .../C/BrotliCompress/enc/encoder_dict.h   |   41 -
>  .../C/BrotliCompress/enc/entropy_encode.h |  122 -
>  .../enc/entropy_encode_static.h   |  539 --
>  .../Source/C/BrotliCompress/enc/fast_log.h|  147 -
>  .../C/BrotliCompress/enc/find_match_length.h  |   80 -
>  

Re: [edk2-devel] [PATCH v2] MdeModulePkg/SmiHandlerProfileInfo: Overflowed Array Index

2020-04-02 Thread Wang, Jian J


Reviewed-by: Jian J Wang 

Regards,
Jian

> -Original Message-
> From: Jiang, Guomin 
> Sent: Friday, April 03, 2020 12:25 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J ; Wu, Hao A ;
> Dong, Eric ; Ni, Ray 
> Subject: [PATCH v2] MdeModulePkg/SmiHandlerProfileInfo: Overflowed Array
> Index
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2272
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2287
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2288
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2289
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2290
> 
> Index should be off-by one than size of array, so when check
> array, the max index should less than size of array.
> 
> Cc: Jian J Wang 
> Cc: Hao A Wu 
> Cc: Eric Dong 
> Cc: Ray Ni 
> Signed-off-by: Guomin Jiang 
> ---
>  .../SmiHandlerProfileInfo/SmiHandlerProfileInfo.c| 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git
> a/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
> b/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
> index 0f7163160b..4153074b7a 100644
> ---
> a/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
> +++
> b/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
> @@ -382,7 +382,7 @@ SxTypeToString (
>IN EFI_SLEEP_TYPE  Type
> 
>)
> 
>  {
> 
> -  if (Type >= 0 && Type <= ARRAY_SIZE(mSxTypeString)) {
> 
> +  if (Type >= 0 && Type < ARRAY_SIZE(mSxTypeString)) {
> 
>  return mSxTypeString[Type];
> 
>} else {
> 
>  AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Type);
> 
> @@ -407,7 +407,7 @@ SxPhaseToString (
>IN EFI_SLEEP_PHASE Phase
> 
>)
> 
>  {
> 
> -  if (Phase >= 0 && Phase <= ARRAY_SIZE(mSxPhaseString)) {
> 
> +  if (Phase >= 0 && Phase < ARRAY_SIZE(mSxPhaseString)) {
> 
>  return mSxPhaseString[Phase];
> 
>} else {
> 
>  AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Phase);
> 
> @@ -432,7 +432,7 @@ PowerButtonPhaseToString (
>IN EFI_POWER_BUTTON_PHASE  Phase
> 
>)
> 
>  {
> 
> -  if (Phase >= 0 && Phase <= ARRAY_SIZE(mPowerButtonPhaseString)) {
> 
> +  if (Phase >= 0 && Phase < ARRAY_SIZE(mPowerButtonPhaseString)) {
> 
>  return mPowerButtonPhaseString[Phase];
> 
>} else {
> 
>  AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Phase);
> 
> @@ -457,7 +457,7 @@ StandbyButtonPhaseToString (
>IN EFI_STANDBY_BUTTON_PHASE  Phase
> 
>)
> 
>  {
> 
> -  if (Phase >= 0 && Phase <= ARRAY_SIZE(mStandbyButtonPhaseString)) {
> 
> +  if (Phase >= 0 && Phase < ARRAY_SIZE(mStandbyButtonPhaseString)) {
> 
>  return mStandbyButtonPhaseString[Phase];
> 
>} else {
> 
>  AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Phase);
> 
> @@ -483,7 +483,7 @@ IoTrapTypeToString (
>IN EFI_SMM_IO_TRAP_DISPATCH_TYPE  Type
> 
>)
> 
>  {
> 
> -  if (Type >= 0 && Type <= ARRAY_SIZE(mIoTrapTypeString)) {
> 
> +  if (Type >= 0 && Type < ARRAY_SIZE(mIoTrapTypeString)) {
> 
>  return mIoTrapTypeString[Type];
> 
>} else {
> 
>  AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Type);
> 
> @@ -508,7 +508,7 @@ UsbTypeToString (
>IN EFI_USB_SMI_TYPE  Type
> 
>)
> 
>  {
> 
> -  if (Type >= 0 && Type <= ARRAY_SIZE(mUsbTypeString)) {
> 
> +  if (Type >= 0 && Type < ARRAY_SIZE(mUsbTypeString)) {
> 
>  return mUsbTypeString[Type];
> 
>} else {
> 
>  AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Type);
> 
> --
> 2.25.1.windows.1


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

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



[edk2-devel] [PATCH v2] MdeModulePkg/SmiHandlerProfileInfo: Overflowed Array Index

2020-04-02 Thread Guomin Jiang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2272
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2287
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2288
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2289
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2290

Index should be off-by one than size of array, so when check
array, the max index should less than size of array.

Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Eric Dong 
Cc: Ray Ni 
Signed-off-by: Guomin Jiang 
---
 .../SmiHandlerProfileInfo/SmiHandlerProfileInfo.c| 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c 
b/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
index 0f7163160b..4153074b7a 100644
--- a/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
+++ b/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
@@ -382,7 +382,7 @@ SxTypeToString (
   IN EFI_SLEEP_TYPE  Type
   )
 {
-  if (Type >= 0 && Type <= ARRAY_SIZE(mSxTypeString)) {
+  if (Type >= 0 && Type < ARRAY_SIZE(mSxTypeString)) {
 return mSxTypeString[Type];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Type);
@@ -407,7 +407,7 @@ SxPhaseToString (
   IN EFI_SLEEP_PHASE Phase
   )
 {
-  if (Phase >= 0 && Phase <= ARRAY_SIZE(mSxPhaseString)) {
+  if (Phase >= 0 && Phase < ARRAY_SIZE(mSxPhaseString)) {
 return mSxPhaseString[Phase];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Phase);
@@ -432,7 +432,7 @@ PowerButtonPhaseToString (
   IN EFI_POWER_BUTTON_PHASE  Phase
   )
 {
-  if (Phase >= 0 && Phase <= ARRAY_SIZE(mPowerButtonPhaseString)) {
+  if (Phase >= 0 && Phase < ARRAY_SIZE(mPowerButtonPhaseString)) {
 return mPowerButtonPhaseString[Phase];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Phase);
@@ -457,7 +457,7 @@ StandbyButtonPhaseToString (
   IN EFI_STANDBY_BUTTON_PHASE  Phase
   )
 {
-  if (Phase >= 0 && Phase <= ARRAY_SIZE(mStandbyButtonPhaseString)) {
+  if (Phase >= 0 && Phase < ARRAY_SIZE(mStandbyButtonPhaseString)) {
 return mStandbyButtonPhaseString[Phase];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Phase);
@@ -483,7 +483,7 @@ IoTrapTypeToString (
   IN EFI_SMM_IO_TRAP_DISPATCH_TYPE  Type
   )
 {
-  if (Type >= 0 && Type <= ARRAY_SIZE(mIoTrapTypeString)) {
+  if (Type >= 0 && Type < ARRAY_SIZE(mIoTrapTypeString)) {
 return mIoTrapTypeString[Type];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Type);
@@ -508,7 +508,7 @@ UsbTypeToString (
   IN EFI_USB_SMI_TYPE  Type
   )
 {
-  if (Type >= 0 && Type <= ARRAY_SIZE(mUsbTypeString)) {
+  if (Type >= 0 && Type < ARRAY_SIZE(mUsbTypeString)) {
 return mUsbTypeString[Type];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Type);
-- 
2.25.1.windows.1


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

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



[edk2-devel] [PATCH] MdeModulePkg/SmiHandlerProfileInfo: Overflowed Array Index

2020-04-02 Thread Guomin Jiang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2272
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2287
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2288
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2289
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2290

Index should be off-by one than size of array, so when check
array, the max index should less than size of array.

Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Eric Dong 
Cc: Ray Ni 
Signed-off-by: Guomin Jiang 
---
 .../SmiHandlerProfileInfo/SmiHandlerProfileInfo.c| 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c 
b/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
index 0f7163160b..4153074b7a 100644
--- a/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
+++ b/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
@@ -382,7 +382,7 @@ SxTypeToString (
   IN EFI_SLEEP_TYPE  Type
   )
 {
-  if (Type >= 0 && Type <= ARRAY_SIZE(mSxTypeString)) {
+  if (Type >= 0 && Type < ARRAY_SIZE(mSxTypeString)) {
 return mSxTypeString[Type];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Type);
@@ -407,7 +407,7 @@ SxPhaseToString (
   IN EFI_SLEEP_PHASE Phase
   )
 {
-  if (Phase >= 0 && Phase <= ARRAY_SIZE(mSxPhaseString)) {
+  if (Phase >= 0 && Phase < ARRAY_SIZE(mSxPhaseString)) {
 return mSxPhaseString[Phase];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Phase);
@@ -432,7 +432,7 @@ PowerButtonPhaseToString (
   IN EFI_POWER_BUTTON_PHASE  Phase
   )
 {
-  if (Phase >= 0 && Phase <= ARRAY_SIZE(mPowerButtonPhaseString)) {
+  if (Phase >= 0 && Phase < ARRAY_SIZE(mPowerButtonPhaseString)) {
 return mPowerButtonPhaseString[Phase];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Phase);
@@ -457,7 +457,7 @@ StandbyButtonPhaseToString (
   IN EFI_STANDBY_BUTTON_PHASE  Phase
   )
 {
-  if (Phase >= 0 && Phase <= ARRAY_SIZE(mStandbyButtonPhaseString)) {
+  if (Phase >= 0 && Phase < ARRAY_SIZE(mStandbyButtonPhaseString)) {
 return mStandbyButtonPhaseString[Phase];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Phase);
@@ -483,7 +483,7 @@ IoTrapTypeToString (
   IN EFI_SMM_IO_TRAP_DISPATCH_TYPE  Type
   )
 {
-  if (Type >= 0 && Type <= ARRAY_SIZE(mIoTrapTypeString)) {
+  if (Type >= 0 && Type < ARRAY_SIZE(mIoTrapTypeString)) {
 return mIoTrapTypeString[Type];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Type);
@@ -508,7 +508,7 @@ UsbTypeToString (
   IN EFI_USB_SMI_TYPE  Type
   )
 {
-  if (Type >= 0 && Type <= ARRAY_SIZE(mUsbTypeString)) {
+  if (Type >= 0 && Type < ARRAY_SIZE(mUsbTypeString)) {
 return mUsbTypeString[Type];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Type);
-- 
2.25.1.windows.1


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

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



Re: [edk2-devel] [PATCH 1/1] BaseTools:Add the spare space FV image size checker

2020-04-02 Thread Sean via groups.io
Not sure I follow.  The changes are in BaseTools/Source/Python/GenFds/GenFds.py
I am suggesting this functionality to be written outside the GenFds.py files so 
that we don't add complexity to the critical tools used for building and 
packaging FW binaries.

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

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



Re: [edk2-devel] [PATCH 1/1] BaseTools:Add the spare space FV image size checker

2020-04-02 Thread Fan, ZhijuX
Hi,

It can be implemented independent of the GenFds tool
It accepts the parameters passed by building and GenFds Tool

Best Regards
Fan Zhiju



From: sean.brogan via [] 
Sent: Friday, April 3, 2020 10:51 AM
To: Fan; Fan, ZhijuX ; devel@edk2.groups.io
Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools:Add the spare space FV image 
size checker

I would have much rather seen this implemented independent of the GenFds tool 
as this is a nice feature but shouldn't be tightly coupled into the tool that 
does building and packaging firmware.

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

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



Re: [edk2-devel] [PATCH] MdeModulePkg/SmiHandlerProfileInfo: Overflowed Array Index

2020-04-02 Thread Wang, Jian J
Hi Guomin,

I think you missed one at line 435, function PowerButtonPhaseToString().

Regards,
Jian

From: Jiang, Guomin 
Sent: Monday, March 30, 2020 9:32 AM
To: devel@edk2.groups.io; newexplor...@gmail.com; GuoMinJ via Groups.Io 

Cc: Wang, Jian J ; Wu, Hao A 
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg/SmiHandlerProfileInfo: 
Overflowed Array Index

Hi Jian, Hao,

Could you please help review this change?

Thanks
From: devel@edk2.groups.io 
[mailto:devel@edk2.groups.io] On Behalf Of GuoMinJ
Sent: Thursday, March 26, 2020 2:11 PM
To: devel@edk2.groups.io; 
newexplor...@gmail.com; GuoMinJ via Groups.Io 
mailto:newexplorerj=gmail@groups.io>>
Cc: Wang, Jian J mailto:jian.j.w...@intel.com>>; Wu, Hao 
A mailto:hao.a...@intel.com>>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/SmiHandlerProfileInfo: 
Overflowed Array Index

Hi jiang, hao
could you please help verify this change.


 Original message 
From: "GuoMinJ via Groups.Io" 
mailto:newexplorerj=gmail@groups.io>>
Date: Sat, Feb 22, 2020, 1:19 PM
To: devel@edk2.groups.io
Cc: GuoMinJ mailto:newexplor...@gmail.com>>
Subject: [edk2-devel] [PATCH] MdeModulePkg/SmiHandlerProfileInfo: Overflowed 
Array Index
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2272
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2289
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2290
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2287
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2288

Index should be off-by one than size of array, so when check
array, the max index should less than size of array.

Signed-off-by: GuoMinJ mailto:newexplor...@gmail.com>>
---
.../SmiHandlerProfileInfo/SmiHandlerProfileInfo.c  | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c 
b/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
index 0f7163160b..4f195b16ce 100644
--- a/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
+++ b/MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.c
@@ -382,7 +382,7 @@ SxTypeToString (
   IN EFI_SLEEP_TYPE  Type
   )
{
-  if (Type >= 0 && Type <= ARRAY_SIZE(mSxTypeString)) {
+  if (Type >= 0 && Type < ARRAY_SIZE(mSxTypeString)) {
 return mSxTypeString[Type];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Type);
@@ -407,7 +407,7 @@ SxPhaseToString (
   IN EFI_SLEEP_PHASE Phase
   )
{
-  if (Phase >= 0 && Phase <= ARRAY_SIZE(mSxPhaseString)) {
+  if (Phase >= 0 && Phase < ARRAY_SIZE(mSxPhaseString)) {
 return mSxPhaseString[Phase];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Phase);
@@ -457,7 +457,7 @@ StandbyButtonPhaseToString (
   IN EFI_STANDBY_BUTTON_PHASE  Phase
   )
{
-  if (Phase >= 0 && Phase <= ARRAY_SIZE(mStandbyButtonPhaseString)) {
+  if (Phase >= 0 && Phase < ARRAY_SIZE(mStandbyButtonPhaseString)) {
 return mStandbyButtonPhaseString[Phase];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Phase);
@@ -483,7 +483,7 @@ IoTrapTypeToString (
   IN EFI_SMM_IO_TRAP_DISPATCH_TYPE  Type
   )
{
-  if (Type >= 0 && Type <= ARRAY_SIZE(mIoTrapTypeString)) {
+  if (Type >= 0 && Type < ARRAY_SIZE(mIoTrapTypeString)) {
 return mIoTrapTypeString[Type];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Type);
@@ -508,7 +508,7 @@ UsbTypeToString (
   IN EFI_USB_SMI_TYPE  Type
   )
{
-  if (Type >= 0 && Type <= ARRAY_SIZE(mUsbTypeString)) {
+  if (Type >= 0 && Type < ARRAY_SIZE(mUsbTypeString)) {
 return mUsbTypeString[Type];
   } else {
 AsciiSPrint (mNameString, sizeof(mNameString), "0x%x", Type);
--
2.17.1




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

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



Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Update Edk2ToolsBuild.py to use multiple threads on Linux

2020-04-02 Thread Bob Feng
This change is good to me.

Reviewed-by: Bob C Feng 

-Original Message-
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Michael 
Kubacki
Sent: Friday, April 3, 2020 1:05 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C ; Gao, Liming 
Subject: [edk2-devel] [PATCH v1 1/1] BaseTools: Update Edk2ToolsBuild.py to use 
multiple threads on Linux

From: Sean Brogan 

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2640

Azure Pipelines agents have 2 threads. This commit has been shown to reduce the 
build time in half on those agents.

Cc: Bob C Feng 
Cc: Liming Gao 
Signed-off-by: Michael Kubacki 
---
 BaseTools/Edk2ToolsBuild.py | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Edk2ToolsBuild.py b/BaseTools/Edk2ToolsBuild.py index 
057d2e9e0633..1ea8187de693 100644
--- a/BaseTools/Edk2ToolsBuild.py
+++ b/BaseTools/Edk2ToolsBuild.py
@@ -11,6 +11,7 @@ import os
 import sys
 import logging
 import argparse
+import multiprocessing
 from edk2toolext import edk2_logging
 from edk2toolext.environment import self_describing_environment  from 
edk2toolext.base_abstract_invocable import BaseAbstractInvocable @@ -141,7 
+142,8 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
 return ret
 
 elif self.tool_chain_tag.lower().startswith("gcc"):
-ret = RunCmd("make", "-C .", 
workingdir=shell_env.get_shell_var("EDK_TOOLS_PATH"))
+cpu_count = self.GetCpuThreads()
+ret = RunCmd("make", f"-C .  -j {cpu_count}", 
+ workingdir=shell_env.get_shell_var("EDK_TOOLS_PATH"))
 if ret != 0:
 raise Exception("Failed to build.")
 
@@ -154,6 +156,18 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
 logging.critical("Tool Chain not supported")
 return -1
 
+def GetCpuThreads(self) -> int:
+''' Function to return number of cpus. If error return 1'''
+cpus = 1
+try:
+cpus = multiprocessing.cpu_count()
+except:
+# from the internet there are cases where cpu_count is not 
implemented.
+# will handle error by just doing single proc build
+pass
+return cpus
+
+
 
 def main():
 Edk2ToolsBuild().Invoke()
--
2.16.3.windows.1





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

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



Re: [edk2-devel] [PATCH 1/1] BaseTools:Add the spare space FV image size checker

2020-04-02 Thread Sean via groups.io
I would have much rather seen this implemented independent of the GenFds tool 
as this is a nice feature but shouldn't be tightly coupled into the tool that 
does building and packaging firmware.

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

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



[edk2-devel] [PATCH 1/1] BaseTools:Add the spare space FV image size checker

2020-04-02 Thread Fan, ZhijuX
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2654

If FV is placed in FD region, its FV image size is fixed.
When FV image size exceeds it, it will trig the build break.
To alert the developer to adjust FV image size earlier,
I request to add new checker for the the spare FV space.
When the spare FV space is less than the specified threshold,
build tool will report the error.

This checker is the optional.
It can be enabled by -D FV_SPARE_SPACE_THRESHOLD=1.
Macro is the value of the spare space threshold size.
It can be decimal or hex format. If it is enabled,
BaseTools will check every FV with the fixed size.
If FV doesn't meet with the size requirement,
Build tool will report error message to say there is no
enough spare space.

Cc: Liming Gao 
Cc: Bob Feng 
Signed-off-by: Zhiju.Fan 
---
 BaseTools/Source/Python/Common/BuildToolError.py |  2 ++
 BaseTools/Source/Python/GenFds/GenFds.py | 32 +---
 2 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/Python/Common/BuildToolError.py 
b/BaseTools/Source/Python/Common/BuildToolError.py
index ecc83d0f48bd..21549683cd19 100644
--- a/BaseTools/Source/Python/Common/BuildToolError.py
+++ b/BaseTools/Source/Python/Common/BuildToolError.py
@@ -64,6 +64,8 @@ COMMAND_FAILURE = 0x7000
 
 PERMISSION_FAILURE = 0x8000
 
+FV_FREESIZE_ERROR = 0x9000
+
 CODE_ERROR = 0xC0DE
 
 AUTOGEN_ERROR = 0xF000
diff --git a/BaseTools/Source/Python/GenFds/GenFds.py 
b/BaseTools/Source/Python/GenFds/GenFds.py
index d5511f4c40e5..c4782e89111b 100644
--- a/BaseTools/Source/Python/GenFds/GenFds.py
+++ b/BaseTools/Source/Python/GenFds/GenFds.py
@@ -29,7 +29,7 @@ from Common.Misc import DirCache, PathClass, 
GuidStructureStringToGuidString
 from Common.Misc import SaveFileOnChange, ClearDuplicatedInf
 from Common.BuildVersion import gBUILD_VERSION
 from Common.MultipleWorkspace import MultipleWorkspace as mws
-from Common.BuildToolError import FatalError, GENFDS_ERROR, CODE_ERROR, 
FORMAT_INVALID, RESOURCE_NOT_AVAILABLE, FILE_NOT_FOUND, OPTION_MISSING, 
FORMAT_NOT_SUPPORTED, OPTION_VALUE_INVALID, PARAMETER_INVALID
+from Common.BuildToolError import FatalError, GENFDS_ERROR, CODE_ERROR, 
FORMAT_INVALID, RESOURCE_NOT_AVAILABLE, FILE_NOT_FOUND, OPTION_MISSING, 
FORMAT_NOT_SUPPORTED, OPTION_VALUE_INVALID, PARAMETER_INVALID, FV_FREESIZE_ERROR
 from Workspace.WorkspaceDatabase import WorkspaceDatabase
 
 from .FdfParser import FdfParser, Warning
@@ -374,7 +374,8 @@ def GenFdsApi(FdsCommandDict, WorkSpaceDataBase=None):
 GenFds.GenerateGuidXRefFile(BuildWorkSpace, ArchList, FdfParserObj)
 
 """Display FV space info."""
-GenFds.DisplayFvSpaceInfo(FdfParserObj)
+Threshold = GenFds.GetFreeSizeThreshold()
+GenFds.DisplayFvSpaceInfo(FdfParserObj, Threshold)
 
 except Warning as X:
 EdkLogger.error(X.ToolName, FORMAT_INVALID, File=X.FileName, 
Line=X.LineNumber, ExtraData=X.Message, RaiseError=False)
@@ -584,13 +585,31 @@ class GenFds(object):
 return 
ElementRegion.BlockSizeOfRegion(ElementFd.BlockSizeList)
 return DefaultBlockSize
 
+## GetFreeSizeThreshold()
+#
+#   @retval int Threshold value
+#
+@staticmethod
+def GetFreeSizeThreshold():
+Threshold = None
+Threshold_Str = 
GlobalData.gCommandLineDefines.get('FV_SPARE_SPACE_THRESHOLD')
+if Threshold_Str:
+try:
+if Threshold_Str.lower().startswith('0x'):
+Threshold = int(Threshold_Str, 16)
+else:
+Threshold = int(Threshold_Str)
+except:
+EdkLogger.warn("GenFds", 'incorrect value for 
FV_SPARE_SPACE_THRESHOLD %s. It can be decimal or hex format' % Threshold_Str)
+return Threshold
+
 ## DisplayFvSpaceInfo()
 #
 #   @param  FvObj   Whose block size to get
 #   @retval None
 #
 @staticmethod
-def DisplayFvSpaceInfo(FdfParserObject):
+def DisplayFvSpaceInfo(FdfParserObject, Threshold):
 
 FvSpaceInfoList = []
 MaxFvNameLength = 0
@@ -623,6 +642,10 @@ class GenFds(object):
 FvSpaceInfoList.append((FvName, Total, Used, Free))
 
 GenFdsGlobalVariable.InfLogger('\nFV Space Information')
+if Threshold:
+FvRegionNameList = [FvName for FvName in 
FdfParserObject.Profile.FvDict if 
FdfParserObject.Profile.FvDict[FvName].FvRegionInFD]
+else:
+FvRegionNameList = []
 for FvSpaceInfo in FvSpaceInfoList:
 Name = FvSpaceInfo[0]
 TotalSizeValue = int(FvSpaceInfo[1], 0)
@@ -634,6 +657,9 @@ class GenFds(object):
 Percentage = str((UsedSizeValue + 0.0) / 
TotalSizeValue)[0:4].lstrip('0.')
 
 GenFdsGlobalVariable.InfLogger(Name + ' ' + '[' + Percentage + 
'%Full] ' + str(TotalSizeValue) + ' total, ' + str(UsedSizeValue) + ' used, ' + 
str(FreeSizeValue) + ' 

Re: [edk2-devel] [PATCH 0/4] remove generation of EFI properties table

2020-04-02 Thread Dandan Bi
For the functionality, it is the same with before for platforms which set 
PcdPropertiesTableEnable to false by default.
Reviewed-by: Dandan Bi  for patch [PATCH 2/4] [PATCH 3/4] 
[PATCH 4/4].


If anyone still has the use case of enabling PcdPropertiesTableEnable, please 
comment.


Thanks,
Dandan
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Ard Biesheuvel
> Sent: Thursday, March 26, 2020 6:25 PM
> To: devel@edk2.groups.io
> Cc: Ard Biesheuvel ; Laszlo Ersek
> ; Leif Lindholm ; Kinney, Michael
> D ; Ni, Ray ; Yao, Jiewen
> ; Bret Barkelew 
> Subject: [edk2-devel] [PATCH 0/4] remove generation of EFI properties table
> 
> The EFI properties table is broken by design, deprecated, and seems to be
> causing confusion as it is unclear to some how it differs from the memory
> attributes table (which supersedes it). So let's get rid of the code that
> generates it entirely, along with the GUID definitions, PCDs etc.
> 
> Due to how the two implementations are intertwined, patch #2 makes the
> minimal changes required to stop producing the table (and to allow patch
> #3 to remove the associated definitions from MdePkg). Patch #4 is optional
> and merges the code together.
> 
> Cc: Laszlo Ersek 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> Cc: Ray Ni 
> Cc: Jiewen Yao 
> Cc: Bret Barkelew 
> 
> Link: https://bugzilla.tianocore.org/show_bug.cgi?id=2633
> 
> Ard Biesheuvel (4):
>   OvmfPkg: remove handling of properties table
>   MdeModulePkg: disable properties table generation but retain the code
>   MdePkg: remove PropertiesTable GUID
>   MdeModulePkg/DxeCore: merge properties table routines into MAT
> handling
> 
>  MdeModulePkg/Core/Dxe/DxeMain.h   |9 -
>  MdeModulePkg/Core/Dxe/DxeMain.inf |3 -
>  MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c   |1 -
>  .../Core/Dxe/Misc/MemoryAttributesTable.c | 1226 ++-
>  MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c |1 -
>  MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c  | 1373 -
>  MdeModulePkg/MdeModulePkg.dec |   24 -
>  MdeModulePkg/MdeModulePkg.uni |   21 -
>  MdePkg/Include/Guid/PropertiesTable.h |   31 -
>  MdePkg/MdePkg.dec |3 -
>  OvmfPkg/OvmfPkgIa32.dsc   |1 -
>  OvmfPkg/OvmfPkgIa32X64.dsc|1 -
>  OvmfPkg/OvmfPkgX64.dsc|1 -
>  OvmfPkg/OvmfXen.dsc   |1 -
>  OvmfPkg/PlatformPei/Platform.c|1 -
>  OvmfPkg/PlatformPei/PlatformPei.inf   |1 -
>  16 files changed, 1222 insertions(+), 1476 deletions(-)  delete mode 100644
> MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c
>  delete mode 100644 MdePkg/Include/Guid/PropertiesTable.h
> 
> --
> 2.17.1
> 
> 
> 


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

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



[edk2-devel] Upcoming Event: TianoCore Community Meeting - APAC/NAMO - Thu, 04/02/2020 7:30pm-8:30pm #cal-reminder

2020-04-02 Thread devel@edk2.groups.io Calendar
*Reminder:* TianoCore Community Meeting - APAC/NAMO

*When:* Thursday, 2 April 2020, 7:30pm to 8:30pm, (GMT-07:00) America/Los 
Angeles

*Where:* https://bluejeans.com/889357567?src=join_info

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=700768 )

*Organizer:* Brian Richardson brian.richard...@intel.com ( 
brian.richard...@intel.com?subject=Re:%20Event:%20TianoCore%20Community%20Meeting%20-%20APAC%2FNAMO
 )

*Description:*

Meeting URL

https://bluejeans.com/889357567?src=join_info

Meeting ID

889 357 567

Want to dial in from a phone?

Dial one of the following numbers:

+1.408.740.7256 (US (San Jose))

+1.408.317.9253 (US (Primary, San Jose))

(see all numbers - https://www.bluejeans.com/numbers )

Enter the meeting ID and passcode followed by #

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

View/Reply Online (#56918): https://edk2.groups.io/g/devel/message/56918
Mute This Topic: https://groups.io/mt/72740750/21656
Mute #cal-reminder: https://groups.io/mk?hashtag=cal-reminder=3846945
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] TianoCore Design Meeting - APAC/NAMO - Fri, 04/03/2020 #cal-notice

2020-04-02 Thread devel@edk2.groups.io Calendar
"TianoCore Design Meeting - APAC/NAMO"

When:  Friday, 3 April 2020
   9:30am to 10:30am
   (GMT+08:00) Asia/Chongqing

Where: https://zoom.com.cn/j/971006237


Organizer: ray...@intel.com 

Description: # TOPIC

* EDK2 Redfish Implementation Review (Abner Chang/HPE)

  Slides: 
https://edk2.groups.io/g/devel/files/Designs/2020/0403/EDK2%20Redfish%20Implementation%20Review.pdf


## Join Zoom Meeting

https://zoom.com.cn/j/971006237

Meeting ID: 971 006 237

One tap mobile

+16465588656,,971006237# US (New York)

+14086380968,,971006237# US (San Jose)

Dial by your location

+1 646 558 8656 US (New York)

+1 408 638 0968 US (San Jose)

Meeting ID: 971 006 237

Find your local number: https://zoom.com.cn/u/idwYt3asgU

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

View/Reply Online (#56917): https://edk2.groups.io/g/devel/message/56917
Mute This Topic: https://groups.io/mt/72740142/21656
Mute #cal-notice: https://groups.io/mk?hashtag=cal-notice=3846945
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] Upcoming Event: TianoCore Design Meeting - APAC/NAMO - Fri, 04/03/2020 9:30am-10:30am #cal-reminder

2020-04-02 Thread devel@edk2.groups.io Calendar
*Reminder:* TianoCore Design Meeting - APAC/NAMO

*When:* Friday, 3 April 2020, 9:30am to 10:30am, (GMT+08:00) Asia/Chongqing

*Where:* https://zoom.com.cn/j/971006237

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=700770 )

*Organizer:* Ray Ni ray...@intel.com ( 
ray...@intel.com?subject=Re:%20Event:%20TianoCore%20Design%20Meeting%20-%20APAC%2FNAMO
 )

*Description:*

*
TOPIC
*

* EDK2 Redfish Implementation Review (Abner Chang/HPE)

Slides: 
https://edk2.groups.io/g/devel/files/Designs/2020/0403/EDK2%20Redfish%20Implementation%20Review.pdf

-
Join Zoom Meeting
-

https://zoom.com.cn/j/971006237

Meeting ID: 971 006 237

One tap mobile

+16465588656,,971006237# US (New York)

+14086380968,,971006237# US (San Jose)

Dial by your location

   +1 646 558 8656 US (New York)

   +1 408 638 0968 US (San Jose)

Meeting ID: 971 006 237

Find your local number: https://zoom.com.cn/u/idwYt3asgU

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

View/Reply Online (#56916): https://edk2.groups.io/g/devel/message/56916
Mute This Topic: https://groups.io/mt/72739931/21656
Mute #cal-reminder: https://groups.io/mk?hashtag=cal-reminder=3846945
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] TianoCore Community Meeting tonight - Please note the time change reflecting daylight savings..

2020-04-02 Thread Soumya Guptha
Sorry, Correction.
The meeting is scheduled from 7.30pm-8.30pm (PST). Please note the time.
_
From: Guptha, Soumya K
Sent: Thursday, April 2, 2020 4:23 PM
To: 'annou...@edk2.groups.io' ; devel@edk2.groups.io
Subject: TianoCore Community Meeting tonight - Please note the time change 
reflecting daylight savings..


Dear Community Members,
Please note the time change on tonight's TianoCore Community meeting, 
reflecting the US daylight savings time change as we moved clocks an hour 
earlier during March.

The community meeting will start from 7.30pm-8.30pm (PST).
You can view the calendar here - 
https://edk2.groups.io/g/devel/viewevent?repeatid=23293=700773=2020-04-16
Or use the invite below.

Thanks,
Soumya

-Original Appointment-
From: Gao, Liming
Sent: Wednesday, April 1, 2020 8:05 PM
To: Gao, Liming; Guptha, Soumya K
Cc: EDKII Package Maintainers
Subject: TianoCore Community Meeting - APAC/NAMO
When: Friday, April 3, 2020 10:30 AM-11:30 AM (UTC+08:00) Beijing, Chongqing, 
Hong Kong, Urumqi.
Where: https://bluejeans.com/889357567?src=join_info


All edk2 package maintainers:
  This is the monthly open source meeting. This one is on APAC time zone. 
Another one is on US time zone. Soumya chairs them both. If you want to know 
the latest information on open source edk2 project and community, you can join 
this meeting.

Meeting URL
https://bluejeans.com/889357567?src=join_info

Meeting ID
889 357 567

Want to dial in from a phone?

Dial one of the following numbers:
+1.408.740.7256 (US (San Jose))
+1.408.317.9253 (US (Primary, San Jose))
(see all numbers - https://www.bluejeans.com/numbers)

Enter the meeting ID and passcode followed by #




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

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



[edk2-devel] TianoCore Community Meeting tonight - Please note the time change reflecting daylight savings..

2020-04-02 Thread Soumya Guptha
Dear Community Members,
Please note the time change on tonight's TianoCore Community meeting, 
reflecting the US daylight savings time change as we moved clocks an hour 
earlier during March.

The community meeting will start from 6.30pm-7.30pm (PST).
You can view the calendar here - 
https://edk2.groups.io/g/devel/viewevent?repeatid=23293=700773=2020-04-16
Or use the invite below.

Thanks,
Soumya

-Original Appointment-
From: Gao, Liming
Sent: Wednesday, April 1, 2020 8:05 PM
To: Gao, Liming; Guptha, Soumya K
Cc: EDKII Package Maintainers
Subject: TianoCore Community Meeting - APAC/NAMO
When: Friday, April 3, 2020 10:30 AM-11:30 AM (UTC+08:00) Beijing, Chongqing, 
Hong Kong, Urumqi.
Where: https://bluejeans.com/889357567?src=join_info


All edk2 package maintainers:
  This is the monthly open source meeting. This one is on APAC time zone. 
Another one is on US time zone. Soumya chairs them both. If you want to know 
the latest information on open source edk2 project and community, you can join 
this meeting.

Meeting URL
https://bluejeans.com/889357567?src=join_info

Meeting ID
889 357 567

Want to dial in from a phone?

Dial one of the following numbers:
+1.408.740.7256 (US (San Jose))
+1.408.317.9253 (US (Primary, San Jose))
(see all numbers - https://www.bluejeans.com/numbers)

Enter the meeting ID and passcode followed by #




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

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



Re: [edk2-devel] Need newer releases/tags added to TianoCore Bugzilla

2020-04-02 Thread Michael D Kinney
Rebecca,

Thanks for the reminder.  

I have updated the available values for that field.

Mike

> -Original Message-
> From: devel@edk2.groups.io  On
> Behalf Of Rebecca Cran
> Sent: Thursday, April 2, 2020 12:53 PM
> To: devel@edk2.groups.io; Kinney, Michael D
> 
> Subject: Re: [edk2-devel] Need newer releases/tags added
> to TianoCore Bugzilla
> 
> Okay, but the edk2-stable202002 release is also missing.
> 
> 
> --
> Rebecca Cran
> 
> 
> On 4/2/20 1:24 PM, Michael D Kinney wrote:
> > Rebecca,
> >
> > The current use of that field is to identify previous
> > releases that a bug fix needs to be propagated to.
> >
> > We do not know the exact release name for future
> releases
> > until we make the release.
> >
> > I recommend you use the "Deadline" field to provide
> > the date the feature must be implemented, reviewed,
> > and committed in order to make the release that is
> > targeted.
> >
> > In many cases the set of work items for a specific
> > target release need to have deadlines well before
> > the soft/hard freeze dates and will not have the
> > same deadline date.  Only providing the target release
> > name is not enough to properly plan tasks.
> >
> > Thanks,
> >
> > Mike
> >
> >> -Original Message-
> >> From: devel@edk2.groups.io  On
> >> Behalf Of Rebecca Cran
> >> Sent: Thursday, April 2, 2020 11:52 AM
> >> To: Kinney, Michael D ;
> >> devel@edk2.groups.io
> >> Subject: [edk2-devel] Need newer releases/tags added
> to
> >> TianoCore Bugzilla
> >>
> >> At least for the Feature Requests, the "Release(s) the
> >> issue is
> >> observed" and "Release(s) the issues must be fixed"
> >> fields are outdated,
> >> and missing newer tags.
> >>
> >> I haven't checked if the other areas such as bug
> reports
> >> also need updated.
> >>
> >>
> >> --
> >>
> >> Rebecca Cran
> >>
> >>
> >>
> >>
> >
> >
> >
> 
> 
> 


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

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



Re: [edk2-devel] Need newer releases/tags added to TianoCore Bugzilla

2020-04-02 Thread Rebecca Cran

Okay, but the edk2-stable202002 release is also missing.


--
Rebecca Cran


On 4/2/20 1:24 PM, Michael D Kinney wrote:

Rebecca,

The current use of that field is to identify previous
releases that a bug fix needs to be propagated to.

We do not know the exact release name for future releases
until we make the release.

I recommend you use the "Deadline" field to provide
the date the feature must be implemented, reviewed,
and committed in order to make the release that is
targeted.

In many cases the set of work items for a specific
target release need to have deadlines well before
the soft/hard freeze dates and will not have the
same deadline date.  Only providing the target release
name is not enough to properly plan tasks.

Thanks,

Mike


-Original Message-
From: devel@edk2.groups.io  On
Behalf Of Rebecca Cran
Sent: Thursday, April 2, 2020 11:52 AM
To: Kinney, Michael D ;
devel@edk2.groups.io
Subject: [edk2-devel] Need newer releases/tags added to
TianoCore Bugzilla

At least for the Feature Requests, the "Release(s) the
issue is
observed" and "Release(s) the issues must be fixed"
fields are outdated,
and missing newer tags.

I haven't checked if the other areas such as bug reports
also need updated.


--

Rebecca Cran











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

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



Re: [edk2-devel] Need newer releases/tags added to TianoCore Bugzilla

2020-04-02 Thread Michael D Kinney
Rebecca,

The current use of that field is to identify previous
releases that a bug fix needs to be propagated to.

We do not know the exact release name for future releases
until we make the release.

I recommend you use the "Deadline" field to provide
the date the feature must be implemented, reviewed,
and committed in order to make the release that is
targeted.  

In many cases the set of work items for a specific 
target release need to have deadlines well before 
the soft/hard freeze dates and will not have the 
same deadline date.  Only providing the target release
name is not enough to properly plan tasks.

Thanks,

Mike

> -Original Message-
> From: devel@edk2.groups.io  On
> Behalf Of Rebecca Cran
> Sent: Thursday, April 2, 2020 11:52 AM
> To: Kinney, Michael D ;
> devel@edk2.groups.io
> Subject: [edk2-devel] Need newer releases/tags added to
> TianoCore Bugzilla
> 
> At least for the Feature Requests, the "Release(s) the
> issue is
> observed" and "Release(s) the issues must be fixed"
> fields are outdated,
> and missing newer tags.
> 
> I haven't checked if the other areas such as bug reports
> also need updated.
> 
> 
> --
> 
> Rebecca Cran
> 
> 
> 
> 


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

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



[edk2-devel] Need newer releases/tags added to TianoCore Bugzilla

2020-04-02 Thread Rebecca Cran
At least for the Feature Requests, the "Release(s) the issue is 
observed" and "Release(s) the issues must be fixed" fields are outdated, 
and missing newer tags.


I haven't checked if the other areas such as bug reports also need updated.


--

Rebecca Cran



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

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



Re: [edk2-devel] Upcoming Event: TianoCore Community Meeting - EMEA/NAMO - Thu, 04/02/2020 9:00am-10:00am #cal-reminder

2020-04-02 Thread Rebecca Cran

On 4/2/20 9:45 AM, devel@edk2.groups.io Calendar wrote:


*Reminder:* TianoCore Community Meeting - EMEA/NAMO

*When:* Thursday, 2 April 2020, 9:00am to 10:00am, (GMT-07:00) 
America/Los Angeles




In relation to the discussion during the meeting, I've created 
https://bugzilla.tianocore.org/show_bug.cgi?id=2658 to add bhyve support 
to the edk2 tree.



--
Rebecca Cran


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

View/Reply Online (#56909): https://edk2.groups.io/g/devel/message/56909
Mute This Topic: https://groups.io/mt/72727733/21656
Mute #cal-reminder: https://groups.io/mk?hashtag=cal-reminder=3846945
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] Query about VS2012

2020-04-02 Thread Michael D Kinney
It would also be good to clearly document the status of all
tool chain tags in a few places:

https://github.com/tianocore/edk2/blob/master/BaseTools/Conf/tools_def.template
https://github.com/tianocore/edk2/blob/master/Readme.md

The status I can think of are:

1) Actively used by EDK II CI.  This is already implied by the
   "Build Status" table in Readme.md, but we need to make sure
   it is updated if EDK II CI adds/removes use of tool chain
   tags.
2) Actively supported by the community.  Meaning all reported
   bugs must be fixed.
3) Unsupported.  Meaning the tool chain tag is in tools_def.txt
   and developers are welcome to use it, but if something breaks,
   the developer that sees the issue can make the choice to fix
   it or not.

I think the specific question about VS2012 here is if anyone has
any objections if status of VS2012 is changed from Actively
Supported to Unsupported.

Thanks,

Mike


From: devel@edk2.groups.io  On Behalf Of Zhang, Shenglei
Sent: Wednesday, April 1, 2020 6:38 PM
To: devel@edk2.groups.io
Subject: [edk2-devel] Query about VS2012

Hi All,

We have a build failure with 
VS2012(https://bugzilla.tianocore.org/show_bug.cgi?id=2631).
If no body uses VS2012, I would like to ignore this issue. I send this mail to 
collect information whether you are using VS2012.

Thanks,
Shenglei


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

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



[edk2-devel] [PATCH v1 1/1] BaseTools: Update Edk2ToolsBuild.py to use multiple threads on Linux

2020-04-02 Thread Michael Kubacki
From: Sean Brogan 

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2640

Azure Pipelines agents have 2 threads. This commit has been shown to
reduce the build time in half on those agents.

Cc: Bob C Feng 
Cc: Liming Gao 
Signed-off-by: Michael Kubacki 
---
 BaseTools/Edk2ToolsBuild.py | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Edk2ToolsBuild.py b/BaseTools/Edk2ToolsBuild.py
index 057d2e9e0633..1ea8187de693 100644
--- a/BaseTools/Edk2ToolsBuild.py
+++ b/BaseTools/Edk2ToolsBuild.py
@@ -11,6 +11,7 @@ import os
 import sys
 import logging
 import argparse
+import multiprocessing
 from edk2toolext import edk2_logging
 from edk2toolext.environment import self_describing_environment
 from edk2toolext.base_abstract_invocable import BaseAbstractInvocable
@@ -141,7 +142,8 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
 return ret
 
 elif self.tool_chain_tag.lower().startswith("gcc"):
-ret = RunCmd("make", "-C .", 
workingdir=shell_env.get_shell_var("EDK_TOOLS_PATH"))
+cpu_count = self.GetCpuThreads()
+ret = RunCmd("make", f"-C .  -j {cpu_count}", 
workingdir=shell_env.get_shell_var("EDK_TOOLS_PATH"))
 if ret != 0:
 raise Exception("Failed to build.")
 
@@ -154,6 +156,18 @@ class Edk2ToolsBuild(BaseAbstractInvocable):
 logging.critical("Tool Chain not supported")
 return -1
 
+def GetCpuThreads(self) -> int:
+''' Function to return number of cpus. If error return 1'''
+cpus = 1
+try:
+cpus = multiprocessing.cpu_count()
+except:
+# from the internet there are cases where cpu_count is not 
implemented.
+# will handle error by just doing single proc build
+pass
+return cpus
+
+
 
 def main():
 Edk2ToolsBuild().Invoke()
-- 
2.16.3.windows.1


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

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



Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for archiving branch combos

2020-04-02 Thread Bjorge, Erik C
I will fix it next time.

-Erik

-Original Message-
From: Desimone, Nathaniel L  
Sent: Wednesday, April 1, 2020 10:59 PM
To: devel@edk2.groups.io; Bjorge, Erik C 
Cc: Desimone, Ashley E ; Pandya, Puja 
; Bret Barkelew ; Agyeman, 
Prince 
Subject: RE: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support 
for archiving branch combos

Erik,

Please remember to Cc: the reviewers on the cover letter as well next time.

For the series...
Reviewed-by: Nate DeSimone 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Bjorge, Erik C
Sent: Tuesday, March 31, 2020 3:42 PM
To: devel@edk2.groups.io
Subject: [edk2-devel] [edk2-staging/EdkRepo] [PATCH v1 0/7] Adding support for 
archiving branch combos

Adding the ability to mark a branch combination as archived.  This will remove 
it from the list of valid combinations by default.  It should not limit users 
from accessing the branch combination.  The archive flag will allow users to 
list archived branch combinations in the combo command.

Erik Bjorge (7):
  EdkRepo: Adding support for archiving combos
  EdkRepo: Added ability to display archived combinations
  EdkRepo: Update Checkout for archived combos
  EdkRepo: Update Sync for archived combos
  EdkRepo: Update Checkout Pin for archived combos
  EdkRepo: Update clone for archived combos
  EdkRepo: Update List Repos for archived combos

 edkrepo/commands/arguments/combo_args.py |  5 ++--  
edkrepo/commands/checkout_pin_command.py |  4 +--
 edkrepo/commands/clone_command.py|  6 ++--
 edkrepo/commands/combo_command.py| 19 ++--
 edkrepo/commands/list_repos_command.py   | 37 +---
 edkrepo/commands/sync_command.py | 16 +-
 edkrepo/common/common_repo_functions.py  | 10 +--  
edkrepo_manifest_parser/edk_manifest.py  | 10 ++-
 8 files changed, 76 insertions(+), 31 deletions(-)

--
2.21.0.windows.1






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

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



Re: [edk2-devel] [PATCH] BaseTools/Scripts: Add scripts to set PACKAGES_PATH environment

2020-04-02 Thread Sean via groups.io
I am not a fan of this.  The community and design meetings have had a few 
discussions about tools (PyTools has been presented twice) and a few brief 
discussions about common patterns to build platforms but I don't think there is 
real alignment.  Each "platform" has its own way of doing things.

As for this patch, I don't really want to see a bunch of scripts added to edk2 
basetools that are not aligned with a community agreed direction (or any clear 
direction).  It has also been brought up that basetools as a python 
package/project is a challenge to work with and has some fundamental problems.  
Adding more in a similar design pattern is not how we start fixing it.   As an 
example for edk2-pytools, an RFC was offered and even then it was added as its 
own repositories to avoid more directly to the edk2 repo.

@Mike K - Any progress on getting a tools subtream setup?  Any governance ideas 
to help align these efforts.

Thanks
Sean

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

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



[edk2-devel] Upcoming Event: TianoCore Community Meeting - EMEA/NAMO - Thu, 04/02/2020 9:00am-10:00am #cal-reminder

2020-04-02 Thread devel@edk2.groups.io Calendar
*Reminder:* TianoCore Community Meeting - EMEA/NAMO

*When:* Thursday, 2 April 2020, 9:00am to 10:00am, (GMT-07:00) America/Los 
Angeles

*Where:* https://bluejeans.com/889357567?src=join_info

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=700767 )

*Organizer:* Brian Richardson brian.richard...@intel.com ( 
brian.richard...@intel.com?subject=Re:%20Event:%20TianoCore%20Community%20Meeting%20-%20EMEA%2FNAMO
 )

*Description:*

Meeting URL

https://bluejeans.com/889357567?src=join_info

Meeting ID

889 357 567

Want to dial in from a phone?

Dial one of the following numbers:

+1.408.740.7256 (US (San Jose))

+1.408.317.9253 (US (Primary, San Jose))

(see all numbers - https://www.bluejeans.com/numbers )

Enter the meeting ID and passcode followed by #

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

View/Reply Online (#56904): https://edk2.groups.io/g/devel/message/56904
Mute This Topic: https://groups.io/mt/72727733/21656
Mute #cal-reminder: https://groups.io/mk?hashtag=cal-reminder=3846945
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] ArmVirtPkg/FdtPciHostBridgeLib: add extra roots for Arm.

2020-04-02 Thread Laszlo Ersek
Quick review comments only, for now:

On 04/02/20 14:08, Yubo Miao wrote:
> From: miaoyubo 
> 
> Add support for extra roots for arm, in this patch, we
> import the scan for extra root buses therefore the uefi
> could recognize multiply roots for arm.
> 
> The logic keeps the same with the logic in
> "OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c"
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: miaoyubo 
> ---
>  .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 264 +++---
>  .../FdtPciHostBridgeLib.inf   |   3 +
>  2 files changed, 230 insertions(+), 37 deletions(-)

(1) The "Contributed-under:" line is no longer necessary (even defined)
in the commit message.

(2) This code is way too large for my taste to duplicate between
ArmVirtPkg and OvmfPkg. I would strongly prefer if we could factor the
logic in OvmfPkg out to a separate library, and use that from both
consumer sites.

(3) Can you please provide a pointer to the QEMU-side work? In
particular, this logic depdens on the "etc/extra-pci-roots" fw_cfg file.
Where is that file being exposed by qemu-system-aarch64 / "virt"? In
general, the firmware code is merged after the QEMU work is merged. Has
the design been accepted for QEMU at least? (So that it make sense for
us to look at the interfacing ArmVirtPkg code.)

(4) Have you tested booting from PCI devices behind the "extra" root
bridges? In particular, have you tested the boot order manipulation via
the "bootindex" device properties? (OvmfPkg/Library/QemuBootOrderLib is
already being used by the ArmVirtQemu platform, so I'd expect no changes
related to boot order filtering / reordering -- but it should be tested.)

(5) I think this feature deserves a TianoCore Feature Request. Can you
please file one at ? Then the bugzilla
link should be referenced in the commit message.

(Preferably the bugzilla entry should summarize the present QEMU status
too, or provide further links to QEMU discussions etc.)

Thanks,
Laszlo

> 
> diff --git a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c 
> b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
> index 496b192d22..706efeb416 100644
> --- a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
> +++ b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
> @@ -14,6 +14,10 @@
>  #include 
>  #include 
>  #include 
> +#include 
> +#include 
> +#include 
> +#include 
>  
>  #include 
>  #include 
> @@ -306,7 +310,70 @@ ProcessPciHost (
>return Status;
>  }
>  
> -STATIC PCI_ROOT_BRIDGE mRootBridge;
> +EFI_STATUS
> +InitRootBridge (
> +  IN  UINT64   Supports,
> +  IN  UINT64   Attributes,
> +  IN  UINT64   AllocAttributes,
> +  IN  UINT8RootBusNumber,
> +  IN  UINT8MaxSubBusNumber,
> +  IN  PCI_ROOT_BRIDGE_APERTURE *Io,
> +  IN  PCI_ROOT_BRIDGE_APERTURE *Mem,
> +  IN  PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,
> +  IN  PCI_ROOT_BRIDGE_APERTURE *PMem,
> +  IN  PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G,
> +  OUT PCI_ROOT_BRIDGE  *RootBus
> +  )
> +{
> +  EFI_PCI_ROOT_BRIDGE_DEVICE_PATH *DevicePath;
> +
> +  //
> +  // Be safe if other fields are added to PCI_ROOT_BRIDGE later.
> +  //
> +  ZeroMem (RootBus, sizeof *RootBus);
> +
> +  RootBus->Segment = 0;
> +  RootBus->ResourceAssigned   = FALSE;
> +  RootBus->Supports   = Supports;
> +  RootBus->Attributes = Attributes;
> +
> +  RootBus->DmaAbove4G = TRUE;
> +
> +  RootBus->AllocationAttributes = AllocAttributes;
> +  RootBus->Bus.Base  = RootBusNumber;
> +  RootBus->Bus.Limit = MaxSubBusNumber;
> +  CopyMem (>Io, Io, sizeof (*Io));
> +  CopyMem (>Mem, Mem, sizeof (*Mem));
> +  CopyMem (>MemAbove4G, MemAbove4G, sizeof (*MemAbove4G));
> +  CopyMem (>PMem, PMem, sizeof (*PMem));
> +  CopyMem (>PMemAbove4G, PMemAbove4G, sizeof (*PMemAbove4G));
> +
> +  RootBus->NoExtendedConfigSpace = FALSE;
> +
> +  DevicePath = AllocateCopyPool (sizeof mEfiPciRootBridgeDevicePath,
> + );
> +  if (DevicePath == NULL) {
> +DEBUG ((EFI_D_ERROR, "%a: %r\n", __FUNCTION__, EFI_OUT_OF_RESOURCES));
> +return EFI_OUT_OF_RESOURCES;
> +  }
> +  DevicePath->AcpiDevicePath.UID = RootBusNumber;
> +  RootBus->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *)DevicePath;
> +
> +  DEBUG ((EFI_D_INFO,
> +"%a: populated root bus %d, with room for %d subordinate bus(es)\n",
> +__FUNCTION__, RootBusNumber, MaxSubBusNumber - RootBusNumber));
> +  return EFI_SUCCESS;
> +}
> +
> +STATIC
> +VOID
> +UninitRootBridge (
> +  IN PCI_ROOT_BRIDGE *RootBus
> +  )
> +{
> +  FreePool (RootBus->DevicePath);
> +}
> +
>  
>  /**
>Return all the root bridge instances in an array.
> @@ -323,11 +390,25 @@ PciHostBridgeGetRootBridges (
>UINTN *Count
>)
>  {
> -  UINT64  IoBase, IoSize;
> -  UINT64  Mmio32Base, Mmio32Size;
> -  UINT64  Mmio64Base, Mmio64Size;
> -  UINT32  

Re: [edk2-devel] [PATCH 1/5] ArmPkg/CpuDxe: use private copy of GetRootTranslationTableInfo()

2020-04-02 Thread Ard Biesheuvel

On 4/2/20 1:03 PM, Leif Lindholm wrote:

On Thu, Apr 02, 2020 at 12:29:30 +0200, Ard Biesheuvel wrote:

On 4/2/20 12:28 PM, Leif Lindholm wrote:

On Thu, Apr 02, 2020 at 12:20:54 +0200, Ard Biesheuvel wrote:

On 4/2/20 12:16 PM, Leif Lindholm via groups.io wrote:

On Sat, Mar 28, 2020 at 11:43:17 +0100, Ard Biesheuvel wrote:

Before getting rid of GetRootTranslationTableInfo() and the related
LookupAddresstoRootTable() in AARCH64's version of ArmMmuLib, add a
version of the former to CpuDxe, which will be its only remaining
user. While at it, simplify it a bit, since in the CpuDxe cases,
both OUT arguments are always provided.


Summary after discussing off-list:
This patch isn't *just* moving a public function private, but it's
replacing use of a function that was never meant to be public and had
a completely bonkers forward-declaration in a different module.

Ard has agreed to make the commit message more explicit on that point,
and I'm happy with that. So with that change, for the series:
Reviewed-by: Leif Lindholm 



Pushed, thanks.

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

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



[edk2-devel] [PATCH] ArmVirtPkg/FdtPciHostBridgeLib: add extra roots for Arm.

2020-04-02 Thread Yubo Miao
From: miaoyubo 

Add support for extra roots for arm, in this patch, we
import the scan for extra root buses therefore the uefi
could recognize multiply roots for arm.

The logic keeps the same with the logic in
"OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c"

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: miaoyubo 
---
 .../FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 264 +++---
 .../FdtPciHostBridgeLib.inf   |   3 +
 2 files changed, 230 insertions(+), 37 deletions(-)

diff --git a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c 
b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
index 496b192d22..706efeb416 100644
--- a/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
+++ b/ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
@@ -14,6 +14,10 @@
 #include 

 #include 

 #include 

+#include 

+#include 

+#include 

+#include 

 

 #include 

 #include 

@@ -306,7 +310,70 @@ ProcessPciHost (
   return Status;

 }

 

-STATIC PCI_ROOT_BRIDGE mRootBridge;

+EFI_STATUS

+InitRootBridge (

+  IN  UINT64   Supports,

+  IN  UINT64   Attributes,

+  IN  UINT64   AllocAttributes,

+  IN  UINT8RootBusNumber,

+  IN  UINT8MaxSubBusNumber,

+  IN  PCI_ROOT_BRIDGE_APERTURE *Io,

+  IN  PCI_ROOT_BRIDGE_APERTURE *Mem,

+  IN  PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,

+  IN  PCI_ROOT_BRIDGE_APERTURE *PMem,

+  IN  PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G,

+  OUT PCI_ROOT_BRIDGE  *RootBus

+  )

+{

+  EFI_PCI_ROOT_BRIDGE_DEVICE_PATH *DevicePath;

+

+  //

+  // Be safe if other fields are added to PCI_ROOT_BRIDGE later.

+  //

+  ZeroMem (RootBus, sizeof *RootBus);

+

+  RootBus->Segment = 0;

+  RootBus->ResourceAssigned   = FALSE;

+  RootBus->Supports   = Supports;

+  RootBus->Attributes = Attributes;

+

+  RootBus->DmaAbove4G = TRUE;

+

+  RootBus->AllocationAttributes = AllocAttributes;

+  RootBus->Bus.Base  = RootBusNumber;

+  RootBus->Bus.Limit = MaxSubBusNumber;

+  CopyMem (>Io, Io, sizeof (*Io));

+  CopyMem (>Mem, Mem, sizeof (*Mem));

+  CopyMem (>MemAbove4G, MemAbove4G, sizeof (*MemAbove4G));

+  CopyMem (>PMem, PMem, sizeof (*PMem));

+  CopyMem (>PMemAbove4G, PMemAbove4G, sizeof (*PMemAbove4G));

+

+  RootBus->NoExtendedConfigSpace = FALSE;

+

+  DevicePath = AllocateCopyPool (sizeof mEfiPciRootBridgeDevicePath,

+ );

+  if (DevicePath == NULL) {

+DEBUG ((EFI_D_ERROR, "%a: %r\n", __FUNCTION__, EFI_OUT_OF_RESOURCES));

+return EFI_OUT_OF_RESOURCES;

+  }

+  DevicePath->AcpiDevicePath.UID = RootBusNumber;

+  RootBus->DevicePath = (EFI_DEVICE_PATH_PROTOCOL *)DevicePath;

+

+  DEBUG ((EFI_D_INFO,

+"%a: populated root bus %d, with room for %d subordinate bus(es)\n",

+__FUNCTION__, RootBusNumber, MaxSubBusNumber - RootBusNumber));

+  return EFI_SUCCESS;

+}

+

+STATIC

+VOID

+UninitRootBridge (

+  IN PCI_ROOT_BRIDGE *RootBus

+  )

+{

+  FreePool (RootBus->DevicePath);

+}

+

 

 /**

   Return all the root bridge instances in an array.

@@ -323,11 +390,25 @@ PciHostBridgeGetRootBridges (
   UINTN *Count

   )

 {

-  UINT64  IoBase, IoSize;

-  UINT64  Mmio32Base, Mmio32Size;

-  UINT64  Mmio64Base, Mmio64Size;

-  UINT32  BusMin, BusMax;

-  EFI_STATUS  Status;

+  UINT64   IoBase, IoSize;

+  UINT64   Mmio32Base, Mmio32Size;

+  UINT64   Mmio64Base, Mmio64Size;

+  UINT32   BusMin, BusMax;

+  FIRMWARE_CONFIG_ITEM FwCfgItem;

+  UINTNFwCfgSize;

+  UINT64   ExtraRootBridges;

+  PCI_ROOT_BRIDGE  *Bridges;

+  UINTNInitialized;

+  UINTNLastRootBridgeNumber;

+  UINTNRootBridgeNumber;

+  UINT64   Attributes;

+  UINT64   AllocationAttributes;

+  EFI_STATUS   Status;

+  PCI_ROOT_BRIDGE_APERTURE Io;

+  PCI_ROOT_BRIDGE_APERTURE PMem;

+  PCI_ROOT_BRIDGE_APERTURE PMemAbove4G;

+  PCI_ROOT_BRIDGE_APERTURE Mem;

+  PCI_ROOT_BRIDGE_APERTURE MemAbove4G;

 

   if (PcdGet64 (PcdPciExpressBaseAddress) == 0) {

 DEBUG ((EFI_D_INFO, "%a: PCI host bridge not present\n", __FUNCTION__));

@@ -345,33 +426,27 @@ PciHostBridgeGetRootBridges (
 return NULL;

   }

 

-  *Count = 1;

+  ZeroMem (, sizeof (Io));

+  ZeroMem (, sizeof (Mem));

+  ZeroMem (, sizeof (MemAbove4G));

 

-  mRootBridge.Segment   = 0;

-  mRootBridge.Supports  = EFI_PCI_ATTRIBUTE_ISA_IO_16 |

-  EFI_PCI_ATTRIBUTE_ISA_MOTHERBOARD_IO |

-  EFI_PCI_ATTRIBUTE_VGA_IO_16  |

-  EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16;

-  mRootBridge.Attributes= mRootBridge.Supports;

+  Attributes = 

Re: [edk2-devel] [PATCH 5/5] ArmPkg/ArmMmuLib: drop unused TT_ATTR_INDX_INVALID CPP symbol

2020-04-02 Thread Ard Biesheuvel

On 4/2/20 12:57 PM, Leif Lindholm wrote:

On Thu, Apr 02, 2020 at 12:29:40 +0200, Ard Biesheuvel wrote:

On 4/2/20 12:23 PM, Leif Lindholm via groups.io wrote:

On Sat, Mar 28, 2020 at 11:43:21 +0100, Ard Biesheuvel wrote:

TT_ATTR_INDX_INVALID is #define'd but never used so drop it.

Signed-off-by: Ard Biesheuvel 
---
   ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c | 3 ---
   1 file changed, 3 deletions(-)

diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c 
b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
index a82596d290f1..222ff817956f 100644
--- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
+++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
@@ -19,9 +19,6 @@
   #include 
   #include 
-// We use this index definition to define an invalid block entry
-#define TT_ATTR_INDX_INVALID((UINT32)~0)
-


Since this is separately defined also in
ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c (£"$%^£"$?!?!?)
could this patch be tweaked to instead "consolidate" the definitions
to a central location, like ArmPkg/Include/Chipset/AArch64Mmu.h where
all of the other TT_ATTR_INDX_ definitions live?



That would imply that this value is somehow architected, which it is not.

ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c is the only remaining user of this
constant, and it only has meaning within the context of the routines
therein.


Hmm, ok. So all of those definitions should really move *out* of
ArmPkg/Include/Chipset/AArch64Mmu.h?

No, they can't, because some of the others are used in
ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c

So I'm still feeling that #defines using the same namespace should
live together in order to reduce risk of future screwups.
So, unrelated to this patch
(Reviewed-by: Leif Lindholm )
should the remaining TT_ATTR_INDX_INVALID be renamed, or should it be
moved to ArmPkg/Include/Chipset/AArch64Mmu.h?



It should simply be renamed. They are not part of the same namespace, it 
is simply a local hack in CpuDxe to distinguish between valid indexes 
into the MAIR table and an 'unknown' placeholder value.


CpuDxe is on my list of things I'd like to clean up as well.


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

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



Re: [edk2-devel] [PATCH 1/5] ArmPkg/CpuDxe: use private copy of GetRootTranslationTableInfo()

2020-04-02 Thread Leif Lindholm
On Thu, Apr 02, 2020 at 12:29:30 +0200, Ard Biesheuvel wrote:
> On 4/2/20 12:28 PM, Leif Lindholm wrote:
> > On Thu, Apr 02, 2020 at 12:20:54 +0200, Ard Biesheuvel wrote:
> > > On 4/2/20 12:16 PM, Leif Lindholm via groups.io wrote:
> > > > On Sat, Mar 28, 2020 at 11:43:17 +0100, Ard Biesheuvel wrote:
> > > > > Before getting rid of GetRootTranslationTableInfo() and the related
> > > > > LookupAddresstoRootTable() in AARCH64's version of ArmMmuLib, add a
> > > > > version of the former to CpuDxe, which will be its only remaining
> > > > > user. While at it, simplify it a bit, since in the CpuDxe cases,
> > > > > both OUT arguments are always provided.

Summary after discussing off-list:
This patch isn't *just* moving a public function private, but it's
replacing use of a function that was never meant to be public and had
a completely bonkers forward-declaration in a different module.

Ard has agreed to make the commit message more explicit on that point,
and I'm happy with that. So with that change, for the series:
Reviewed-by: Leif Lindholm 

> > > > So, this may be super picky, but:
> > > > Deleting the prototype without making the definition also STATIC would
> > > > cause build errors with -Wmissing-prototypes (which someone might be
> > > > enabling explicitly or implicitly if say doing some code hardening on
> > > > the side).
> > > > 
> > > > Now, it's a valid point to say that -Wmissing-prototypes isn't in our
> > > > current CFLAGS, but I think it would be a good habit to get into.
> > > > So you get a:
> > > > 
> > > > Reviewed-by: Leif Lindholm 
> > > > 
> > > > regardless, but I'd appreciate if you could sling a STATIC into
> > > > ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c as well before
> > > > pushing.
> > > > 
> > > 
> > > Well, while I see your point, please note that the prototype only exists 
> > > in
> > > a local header file that only gets included by CpuDxe, and not by any of 
> > > the
> > > other consumers of ArmMmuLib.
> > 
> > What I'm saying is that with -Wmissing-prototypes added, building
> > after applying this patch (but before applying the one that deletes
> > the function) gives:
> > 
> > "aarch64-linux-gnu-gcc"   -g -fshort-wchar -fno-builtin 
> > -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections 
> > -fdata-sections -include AutoGen.h -fno-common 
> > -DSTRING_ARRAY_NAME=ArmMmuBaseLibStrings -g -Os -fshort-wchar -fno-builtin 
> > -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h 
> > -fno-common -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char 
> > -ffunction-sections -fdata-sections -Wno-address 
> > -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie 
> > -ffixed-x18 -mcmodel=small -flto -Wno-unused-but-set-variable 
> > -Wno-unused-const-variable -DMDEPKG_NDEBUG 
> > -DDISABLE_NEW_DEPRECATED_INTERFACES -mstrict-align -mgeneral-regs-only -c 
> > -o 
> > /work/git/tianocore/Build/ArmVirtQemu-AARCH64/RELEASE_GCC5/AARCH64/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib/OUTPUT/AArch64/ArmMmuLibCore.obj
> >  -I/work/git/edk2/ArmPkg/Library/ArmMmuLib/AArch64 
> > -I/work/git/edk2/ArmPkg/Library/ArmMmuLib 
> > -I/work/git/tianocore/Build/ArmVirtQemu-AARCH64/RELEASE_GCC5/AARCH64/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib/DEBUG
> >  -I/work/git/edk2/ArmPkg -I/work/git/edk2/ArmPkg/Include 
> > -I/work/git/edk2/EmbeddedPkg -I/work/git/edk2/EmbeddedPkg/Include 
> > -I/work/git/edk2/MdePkg -I/work/git/edk2/MdePkg/Include 
> > -I/work/git/edk2/MdePkg/Include/AArch64 
> > /work/git/edk2/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
> > leif@vanye:/work/git/tianocore$ "aarch64-linux-gnu-gcc"   -g -fshort-wchar 
> > -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds 
> > -ffunction-sections -fdata-sections -include AutoGen.h -fno-common 
> > -DSTRING_ARRAY_NAME=ArmMmuBaseLibStrings -g -Os -fshort-wchar -fno-builtin 
> > -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h 
> > -fno-common -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char 
> > -ffunction-sections -fdata-sections -Wno-address 
> > -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie 
> > -ffixed-x18 -mcmodel=small -flto -Wno-unused-but-set-variable 
> > -Wno-unused-const-variable -DMDEPKG_NDEBUG 
> > -DDISABLE_NEW_DEPRECATED_INTERFACES -mstrict-align -mgeneral-regs-only -c 
> > -o 
> > /work/git/tianocore/Build/ArmVirtQemu-AARCH64/RELEASE_GCC5/AARCH64/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib/OUTPUT/AArch64/ArmMmuLibCore.obj
> >  -I/work/git/edk2/ArmPkg/Library/ArmMmuLib/AArch64 
> > -I/work/git/edk2/ArmPkg/Library/ArmMmuLib 
> > -I/work/git/tianocore/Build/ArmVirtQemu-AARCH64/RELEASE_GCC5/AARCH64/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib/DEBUG
> >  -I/work/git/edk2/ArmPkg -I/work/git/edk2/ArmPkg/Include 
> > -I/work/git/edk2/EmbeddedPkg -I/work/git/edk2/EmbeddedPkg/Include 
> > -I/work/git/edk2/MdePkg -I/work/git/edk2/MdePkg/Include 
> > -I/work/git/edk2/MdePkg/Include/AArch64 
> > 

Re: [edk2-devel] [PATCH 5/5] ArmPkg/ArmMmuLib: drop unused TT_ATTR_INDX_INVALID CPP symbol

2020-04-02 Thread Leif Lindholm
On Thu, Apr 02, 2020 at 12:29:40 +0200, Ard Biesheuvel wrote:
> On 4/2/20 12:23 PM, Leif Lindholm via groups.io wrote:
> > On Sat, Mar 28, 2020 at 11:43:21 +0100, Ard Biesheuvel wrote:
> > > TT_ATTR_INDX_INVALID is #define'd but never used so drop it.
> > > 
> > > Signed-off-by: Ard Biesheuvel 
> > > ---
> > >   ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c | 3 ---
> > >   1 file changed, 3 deletions(-)
> > > 
> > > diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c 
> > > b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
> > > index a82596d290f1..222ff817956f 100644
> > > --- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
> > > +++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
> > > @@ -19,9 +19,6 @@
> > >   #include 
> > >   #include 
> > > -// We use this index definition to define an invalid block entry
> > > -#define TT_ATTR_INDX_INVALID((UINT32)~0)
> > > -
> > 
> > Since this is separately defined also in
> > ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c (£"$%^£"$?!?!?)
> > could this patch be tweaked to instead "consolidate" the definitions
> > to a central location, like ArmPkg/Include/Chipset/AArch64Mmu.h where
> > all of the other TT_ATTR_INDX_ definitions live?
> > 
> 
> That would imply that this value is somehow architected, which it is not.
> 
> ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c is the only remaining user of this
> constant, and it only has meaning within the context of the routines
> therein.

Hmm, ok. So all of those definitions should really move *out* of
ArmPkg/Include/Chipset/AArch64Mmu.h?

No, they can't, because some of the others are used in
ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c

So I'm still feeling that #defines using the same namespace should
live together in order to reduce risk of future screwups.
So, unrelated to this patch
(Reviewed-by: Leif Lindholm )
should the remaining TT_ATTR_INDX_INVALID be renamed, or should it be
moved to ArmPkg/Include/Chipset/AArch64Mmu.h?

/
Leif

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

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



Re: [edk2-devel] [PATCH 5/5] ArmPkg/ArmMmuLib: drop unused TT_ATTR_INDX_INVALID CPP symbol

2020-04-02 Thread Ard Biesheuvel

On 4/2/20 12:23 PM, Leif Lindholm via groups.io wrote:

On Sat, Mar 28, 2020 at 11:43:21 +0100, Ard Biesheuvel wrote:

TT_ATTR_INDX_INVALID is #define'd but never used so drop it.

Signed-off-by: Ard Biesheuvel 
---
  ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c | 3 ---
  1 file changed, 3 deletions(-)

diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c 
b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
index a82596d290f1..222ff817956f 100644
--- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
+++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
@@ -19,9 +19,6 @@
  #include 
  #include 
  
-// We use this index definition to define an invalid block entry

-#define TT_ATTR_INDX_INVALID((UINT32)~0)
-


Since this is separately defined also in
ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c (£"$%^£"$?!?!?)
could this patch be tweaked to instead "consolidate" the definitions
to a central location, like ArmPkg/Include/Chipset/AArch64Mmu.h where
all of the other TT_ATTR_INDX_ definitions live?



That would imply that this value is somehow architected, which it is not.

ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c is the only remaining user of this 
constant, and it only has meaning within the context of the routines 
therein.



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

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



Re: [edk2-devel] [PATCH 1/5] ArmPkg/CpuDxe: use private copy of GetRootTranslationTableInfo()

2020-04-02 Thread Ard Biesheuvel

On 4/2/20 12:28 PM, Leif Lindholm wrote:

On Thu, Apr 02, 2020 at 12:20:54 +0200, Ard Biesheuvel wrote:

On 4/2/20 12:16 PM, Leif Lindholm via groups.io wrote:

On Sat, Mar 28, 2020 at 11:43:17 +0100, Ard Biesheuvel wrote:

Before getting rid of GetRootTranslationTableInfo() and the related
LookupAddresstoRootTable() in AARCH64's version of ArmMmuLib, add a
version of the former to CpuDxe, which will be its only remaining
user. While at it, simplify it a bit, since in the CpuDxe cases,
both OUT arguments are always provided.

Signed-off-by: Ard Biesheuvel 
---
   ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c | 15 +++
   ArmPkg/Drivers/CpuDxe/CpuDxe.h  |  7 ---
   2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c 
b/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
index 3b6c5e733709..24eb1c4221e3 100644
--- a/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
+++ b/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
@@ -15,6 +15,21 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
   #define TT_ATTR_INDX_INVALID((UINT32)~0)
+#define MIN_T0SZ16
+#define BITS_PER_LEVEL  9
+
+STATIC
+VOID
+GetRootTranslationTableInfo (
+  IN  UINTN T0SZ,
+  OUT UINTN *RootTableLevel,
+  OUT UINTN *RootTableEntryCount
+  )
+{
+  *RootTableLevel   = (T0SZ - MIN_T0SZ) / BITS_PER_LEVEL;
+  *RootTableEntryCount  = TT_ENTRY_COUNT >> (T0SZ - MIN_T0SZ) % BITS_PER_LEVEL;
+}
+
   STATIC
   UINT64
   GetFirstPageAttribute (
diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.h b/ArmPkg/Drivers/CpuDxe/CpuDxe.h
index b627c3c50ff8..3fe5c24d5e5b 100644
--- a/ArmPkg/Drivers/CpuDxe/CpuDxe.h
+++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.h
@@ -134,13 +134,6 @@ GetMemoryRegion (
 OUTUINTN   *RegionAttributes
 );
-VOID
-GetRootTranslationTableInfo (


So, this may be super picky, but:
Deleting the prototype without making the definition also STATIC would
cause build errors with -Wmissing-prototypes (which someone might be
enabling explicitly or implicitly if say doing some code hardening on
the side).

Now, it's a valid point to say that -Wmissing-prototypes isn't in our
current CFLAGS, but I think it would be a good habit to get into.
So you get a:

Reviewed-by: Leif Lindholm 

regardless, but I'd appreciate if you could sling a STATIC into
ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c as well before
pushing.



Well, while I see your point, please note that the prototype only exists in
a local header file that only gets included by CpuDxe, and not by any of the
other consumers of ArmMmuLib.


What I'm saying is that with -Wmissing-prototypes added, building
after applying this patch (but before applying the one that deletes
the function) gives:

"aarch64-linux-gnu-gcc"   -g -fshort-wchar -fno-builtin -fno-strict-aliasing 
-Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h 
-fno-common -DSTRING_ARRAY_NAME=ArmMmuBaseLibStrings -g -Os -fshort-wchar -fno-builtin 
-fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common 
-mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections 
-fdata-sections -Wno-address -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic 
-fno-pie -ffixed-x18 -mcmodel=small -flto -Wno-unused-but-set-variable 
-Wno-unused-const-variable -DMDEPKG_NDEBUG -DDISABLE_NEW_DEPRECATED_INTERFACES 
-mstrict-align -mgeneral-regs-only -c -o 
/work/git/tianocore/Build/ArmVirtQemu-AARCH64/RELEASE_GCC5/AARCH64/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib/OUTPUT/AArch64/ArmMmuLibCore.obj
 -I/work/git/edk2/ArmPkg/Library/ArmMmuLib/AArch64 
-I/work/git/edk2/ArmPkg/Library/ArmMmuLib 
-I/work/git/tianocore/Build/ArmVirtQemu-AARCH64/RELEASE_GCC5/AARCH64/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib/DEBUG
 -I/work/git/edk2/ArmPkg -I/work/git/edk2/ArmPkg/Include -I/work/git/edk2/EmbeddedPkg 
-I/work/git/edk2/EmbeddedPkg/Include -I/work/git/edk2/MdePkg 
-I/work/git/edk2/MdePkg/Include -I/work/git/edk2/MdePkg/Include/AArch64 
/work/git/edk2/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
leif@vanye:/work/git/tianocore$ "aarch64-linux-gnu-gcc"   -g -fshort-wchar 
-fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections 
-fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=ArmMmuBaseLibStrings 
-g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds 
-include AutoGen.h -fno-common -mlittle-endian -fno-short-enums -fverbose-asm 
-funsigned-char -ffunction-sections -fdata-sections -Wno-address 
-fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie -ffixed-x18 
-mcmodel=small -flto -Wno-unused-but-set-variable -Wno-unused-const-variable 
-DMDEPKG_NDEBUG -DDISABLE_NEW_DEPRECATED_INTERFACES -mstrict-align -mgeneral-regs-only -c 
-o 
/work/git/tianocore/Build/ArmVirtQemu-AARCH64/RELEASE_GCC5/AARCH64/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib/OUTPUT/AArch64/ArmMmuLibCore.obj
 -I/work/git/edk2/ArmPkg/Library/ArmMmuLib/AArch64 

Re: [edk2-devel] [PATCH 1/5] ArmPkg/CpuDxe: use private copy of GetRootTranslationTableInfo()

2020-04-02 Thread Leif Lindholm
On Thu, Apr 02, 2020 at 12:20:54 +0200, Ard Biesheuvel wrote:
> On 4/2/20 12:16 PM, Leif Lindholm via groups.io wrote:
> > On Sat, Mar 28, 2020 at 11:43:17 +0100, Ard Biesheuvel wrote:
> > > Before getting rid of GetRootTranslationTableInfo() and the related
> > > LookupAddresstoRootTable() in AARCH64's version of ArmMmuLib, add a
> > > version of the former to CpuDxe, which will be its only remaining
> > > user. While at it, simplify it a bit, since in the CpuDxe cases,
> > > both OUT arguments are always provided.
> > > 
> > > Signed-off-by: Ard Biesheuvel 
> > > ---
> > >   ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c | 15 +++
> > >   ArmPkg/Drivers/CpuDxe/CpuDxe.h  |  7 ---
> > >   2 files changed, 15 insertions(+), 7 deletions(-)
> > > 
> > > diff --git a/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c 
> > > b/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
> > > index 3b6c5e733709..24eb1c4221e3 100644
> > > --- a/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
> > > +++ b/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
> > > @@ -15,6 +15,21 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> > >   #define TT_ATTR_INDX_INVALID((UINT32)~0)
> > > +#define MIN_T0SZ16
> > > +#define BITS_PER_LEVEL  9
> > > +
> > > +STATIC
> > > +VOID
> > > +GetRootTranslationTableInfo (
> > > +  IN  UINTN T0SZ,
> > > +  OUT UINTN *RootTableLevel,
> > > +  OUT UINTN *RootTableEntryCount
> > > +  )
> > > +{
> > > +  *RootTableLevel   = (T0SZ - MIN_T0SZ) / BITS_PER_LEVEL;
> > > +  *RootTableEntryCount  = TT_ENTRY_COUNT >> (T0SZ - MIN_T0SZ) % 
> > > BITS_PER_LEVEL;
> > > +}
> > > +
> > >   STATIC
> > >   UINT64
> > >   GetFirstPageAttribute (
> > > diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.h 
> > > b/ArmPkg/Drivers/CpuDxe/CpuDxe.h
> > > index b627c3c50ff8..3fe5c24d5e5b 100644
> > > --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.h
> > > +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.h
> > > @@ -134,13 +134,6 @@ GetMemoryRegion (
> > > OUTUINTN   *RegionAttributes
> > > );
> > > -VOID
> > > -GetRootTranslationTableInfo (
> > 
> > So, this may be super picky, but:
> > Deleting the prototype without making the definition also STATIC would
> > cause build errors with -Wmissing-prototypes (which someone might be
> > enabling explicitly or implicitly if say doing some code hardening on
> > the side).
> > 
> > Now, it's a valid point to say that -Wmissing-prototypes isn't in our
> > current CFLAGS, but I think it would be a good habit to get into.
> > So you get a:
> > 
> > Reviewed-by: Leif Lindholm 
> > 
> > regardless, but I'd appreciate if you could sling a STATIC into
> > ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c as well before
> > pushing.
> > 
> 
> Well, while I see your point, please note that the prototype only exists in
> a local header file that only gets included by CpuDxe, and not by any of the
> other consumers of ArmMmuLib.

What I'm saying is that with -Wmissing-prototypes added, building
after applying this patch (but before applying the one that deletes
the function) gives:

"aarch64-linux-gnu-gcc"   -g -fshort-wchar -fno-builtin -fno-strict-aliasing 
-Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include 
AutoGen.h -fno-common -DSTRING_ARRAY_NAME=ArmMmuBaseLibStrings -g -Os 
-fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds 
-include AutoGen.h -fno-common -mlittle-endian -fno-short-enums -fverbose-asm 
-funsigned-char -ffunction-sections -fdata-sections -Wno-address 
-fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie 
-ffixed-x18 -mcmodel=small -flto -Wno-unused-but-set-variable 
-Wno-unused-const-variable -DMDEPKG_NDEBUG -DDISABLE_NEW_DEPRECATED_INTERFACES 
-mstrict-align -mgeneral-regs-only -c -o 
/work/git/tianocore/Build/ArmVirtQemu-AARCH64/RELEASE_GCC5/AARCH64/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib/OUTPUT/AArch64/ArmMmuLibCore.obj
 -I/work/git/edk2/ArmPkg/Library/ArmMmuLib/AArch64 
-I/work/git/edk2/ArmPkg/Library/ArmMmuLib 
-I/work/git/tianocore/Build/ArmVirtQemu-AARCH64/RELEASE_GCC5/AARCH64/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib/DEBUG
 -I/work/git/edk2/ArmPkg -I/work/git/edk2/ArmPkg/Include 
-I/work/git/edk2/EmbeddedPkg -I/work/git/edk2/EmbeddedPkg/Include 
-I/work/git/edk2/MdePkg -I/work/git/edk2/MdePkg/Include 
-I/work/git/edk2/MdePkg/Include/AArch64 
/work/git/edk2/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
leif@vanye:/work/git/tianocore$ "aarch64-linux-gnu-gcc"   -g -fshort-wchar 
-fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds 
-ffunction-sections -fdata-sections -include AutoGen.h -fno-common 
-DSTRING_ARRAY_NAME=ArmMmuBaseLibStrings -g -Os -fshort-wchar -fno-builtin 
-fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h 
-fno-common -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char 
-ffunction-sections -fdata-sections -Wno-address 
-fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie 
-ffixed-x18 -mcmodel=small -flto -Wno-unused-but-set-variable 

Re: [edk2-devel] [PATCH 5/5] ArmPkg/ArmMmuLib: drop unused TT_ATTR_INDX_INVALID CPP symbol

2020-04-02 Thread Leif Lindholm
On Sat, Mar 28, 2020 at 11:43:21 +0100, Ard Biesheuvel wrote:
> TT_ATTR_INDX_INVALID is #define'd but never used so drop it.
> 
> Signed-off-by: Ard Biesheuvel 
> ---
>  ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c 
> b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
> index a82596d290f1..222ff817956f 100644
> --- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
> +++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c
> @@ -19,9 +19,6 @@
>  #include 
>  #include 
>  
> -// We use this index definition to define an invalid block entry
> -#define TT_ATTR_INDX_INVALID((UINT32)~0)
> -

Since this is separately defined also in
ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c (£"$%^£"$?!?!?)
could this patch be tweaked to instead "consolidate" the definitions
to a central location, like ArmPkg/Include/Chipset/AArch64Mmu.h where
all of the other TT_ATTR_INDX_ definitions live?

/
Leif

>  STATIC
>  UINT64
>  ArmMemoryAttributeToPageAttribute (
> -- 
> 2.17.1
> 

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

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



Re: [edk2-devel] [PATCH 1/5] ArmPkg/CpuDxe: use private copy of GetRootTranslationTableInfo()

2020-04-02 Thread Ard Biesheuvel

On 4/2/20 12:16 PM, Leif Lindholm via groups.io wrote:

On Sat, Mar 28, 2020 at 11:43:17 +0100, Ard Biesheuvel wrote:

Before getting rid of GetRootTranslationTableInfo() and the related
LookupAddresstoRootTable() in AARCH64's version of ArmMmuLib, add a
version of the former to CpuDxe, which will be its only remaining
user. While at it, simplify it a bit, since in the CpuDxe cases,
both OUT arguments are always provided.

Signed-off-by: Ard Biesheuvel 
---
  ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c | 15 +++
  ArmPkg/Drivers/CpuDxe/CpuDxe.h  |  7 ---
  2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c 
b/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
index 3b6c5e733709..24eb1c4221e3 100644
--- a/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
+++ b/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
@@ -15,6 +15,21 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
  
  #define TT_ATTR_INDX_INVALID((UINT32)~0)
  
+#define MIN_T0SZ16

+#define BITS_PER_LEVEL  9
+
+STATIC
+VOID
+GetRootTranslationTableInfo (
+  IN  UINTN T0SZ,
+  OUT UINTN *RootTableLevel,
+  OUT UINTN *RootTableEntryCount
+  )
+{
+  *RootTableLevel   = (T0SZ - MIN_T0SZ) / BITS_PER_LEVEL;
+  *RootTableEntryCount  = TT_ENTRY_COUNT >> (T0SZ - MIN_T0SZ) % BITS_PER_LEVEL;
+}
+
  STATIC
  UINT64
  GetFirstPageAttribute (
diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.h b/ArmPkg/Drivers/CpuDxe/CpuDxe.h
index b627c3c50ff8..3fe5c24d5e5b 100644
--- a/ArmPkg/Drivers/CpuDxe/CpuDxe.h
+++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.h
@@ -134,13 +134,6 @@ GetMemoryRegion (
OUTUINTN   *RegionAttributes
);
  
-VOID

-GetRootTranslationTableInfo (


So, this may be super picky, but:
Deleting the prototype without making the definition also STATIC would
cause build errors with -Wmissing-prototypes (which someone might be
enabling explicitly or implicitly if say doing some code hardening on
the side).

Now, it's a valid point to say that -Wmissing-prototypes isn't in our
current CFLAGS, but I think it would be a good habit to get into.
So you get a:

Reviewed-by: Leif Lindholm 

regardless, but I'd appreciate if you could sling a STATIC into
ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c as well before
pushing.



Well, while I see your point, please note that the prototype only exists 
in a local header file that only gets included by CpuDxe, and not by any 
of the other consumers of ArmMmuLib.




-  IN  UINTNT0SZ,
-  OUT UINTN   *TableLevel,
-  OUT UINTN   *TableEntryCount
-  );
-
  EFI_STATUS
  SetGcdMemorySpaceAttributes (
IN EFI_GCD_MEMORY_SPACE_DESCRIPTOR*MemorySpaceMap,
--
2.17.1








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

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



Re: [edk2-devel] [PATCH 1/5] ArmPkg/CpuDxe: use private copy of GetRootTranslationTableInfo()

2020-04-02 Thread Leif Lindholm
On Sat, Mar 28, 2020 at 11:43:17 +0100, Ard Biesheuvel wrote:
> Before getting rid of GetRootTranslationTableInfo() and the related
> LookupAddresstoRootTable() in AARCH64's version of ArmMmuLib, add a
> version of the former to CpuDxe, which will be its only remaining
> user. While at it, simplify it a bit, since in the CpuDxe cases,
> both OUT arguments are always provided.
> 
> Signed-off-by: Ard Biesheuvel 
> ---
>  ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c | 15 +++
>  ArmPkg/Drivers/CpuDxe/CpuDxe.h  |  7 ---
>  2 files changed, 15 insertions(+), 7 deletions(-)
> 
> diff --git a/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c 
> b/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
> index 3b6c5e733709..24eb1c4221e3 100644
> --- a/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
> +++ b/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
> @@ -15,6 +15,21 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>  
>  #define TT_ATTR_INDX_INVALID((UINT32)~0)
>  
> +#define MIN_T0SZ16
> +#define BITS_PER_LEVEL  9
> +
> +STATIC
> +VOID
> +GetRootTranslationTableInfo (
> +  IN  UINTN T0SZ,
> +  OUT UINTN *RootTableLevel,
> +  OUT UINTN *RootTableEntryCount
> +  )
> +{
> +  *RootTableLevel   = (T0SZ - MIN_T0SZ) / BITS_PER_LEVEL;
> +  *RootTableEntryCount  = TT_ENTRY_COUNT >> (T0SZ - MIN_T0SZ) % 
> BITS_PER_LEVEL;
> +}
> +
>  STATIC
>  UINT64
>  GetFirstPageAttribute (
> diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.h b/ArmPkg/Drivers/CpuDxe/CpuDxe.h
> index b627c3c50ff8..3fe5c24d5e5b 100644
> --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.h
> +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.h
> @@ -134,13 +134,6 @@ GetMemoryRegion (
>OUTUINTN   *RegionAttributes
>);
>  
> -VOID
> -GetRootTranslationTableInfo (

So, this may be super picky, but:
Deleting the prototype without making the definition also STATIC would
cause build errors with -Wmissing-prototypes (which someone might be
enabling explicitly or implicitly if say doing some code hardening on
the side).

Now, it's a valid point to say that -Wmissing-prototypes isn't in our
current CFLAGS, but I think it would be a good habit to get into.
So you get a:

Reviewed-by: Leif Lindholm 

regardless, but I'd appreciate if you could sling a STATIC into
ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c as well before
pushing.

> -  IN  UINTNT0SZ,
> -  OUT UINTN   *TableLevel,
> -  OUT UINTN   *TableEntryCount
> -  );
> -
>  EFI_STATUS
>  SetGcdMemorySpaceAttributes (
>IN EFI_GCD_MEMORY_SPACE_DESCRIPTOR*MemorySpaceMap,
> -- 
> 2.17.1
> 

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

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



[edk2-devel] [edk2-staging][PATCH] BaseTools/Fmmt: Enhance for check input FD size

2020-04-02 Thread Feng, YunhuaX
Enhance for check input FD if empty file or not.

Cc: Bob Feng 
Cc: Liming Gao 
Signed-off-by: Yunhua Feng 
---
 BaseTools/Source/C/FMMT/FirmwareModuleManagement.c | 2 +-
 BaseTools/Source/C/FMMT/FmmtLib.c  | 5 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c 
b/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c
index db9b585541..4252c698aa 100644
--- a/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c
+++ b/BaseTools/Source/C/FMMT/FirmwareModuleManagement.c
@@ -833,11 +833,11 @@ FmmtImageView (
   }
 
   Status = LibFindFvInFd (InputFile, );
 
   if (EFI_ERROR(Status)) {
-Error("FMMT", 0, 1001, "Error while search FV in FD", "");
+Error("FMMT", 0, 1001, "Error while search FV in FD", FdInName);
 fclose (InputFile);
 return EFI_ABORTED;
   }
 
   CurrentFv = LocalFdData->Fv;
diff --git a/BaseTools/Source/C/FMMT/FmmtLib.c 
b/BaseTools/Source/C/FMMT/FmmtLib.c
index cdbee3d629..30deec532f 100644
--- a/BaseTools/Source/C/FMMT/FmmtLib.c
+++ b/BaseTools/Source/C/FMMT/FmmtLib.c
@@ -265,10 +265,15 @@ LibFindFvInFd (
   }
 
   FdBufferOri = FdBuffer;
   FdBufferEnd = FdBuffer + FdSize;
 
+  if (FdSize < sizeof(EFI_FIRMWARE_VOLUME_HEADER)) {
+Error ("FMMT", 0, 0002, "Error Check the input FD, Please make sure the FD 
is valid", "Check FD size error!");
+return EFI_ABORTED;
+  }
+
   while (FdBuffer <= FdBufferEnd - sizeof (EFI_FIRMWARE_VOLUME_HEADER)) {
 FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *) FdBuffer;
 //
 // Copy 4 bytes of fd data to check the _FVH signature
 //
-- 
2.12.2.windows.2


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

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

<>

[edk2-devel] [PATCH v2] NetworkPkg/Ip6Dxe: Fix ASSERT logic in Ip6ProcessRouterAdvertise()

2020-04-02 Thread Maciej Rabeda
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2655

This patch fixes reversed logic of recently added ASSERTs which should
ensure that Ip6IsNDOptionValid() implementation properly reacts to invalid
packets.

Cc: Jiaxin Wu 
Cc: Siyuan Fu 
Signed-off-by: Maciej Rabeda 
Reviewed-by: Siyuan Fu 
Tested-by: Laszlo Ersek 
Fixes: 9c20342eed70ec99ec50cd73cb81804299f05403
---
 NetworkPkg/Ip6Dxe/Ip6Nd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/NetworkPkg/Ip6Dxe/Ip6Nd.c b/NetworkPkg/Ip6Dxe/Ip6Nd.c
index fd7f60b2f92c..0780a98cb325 100644
--- a/NetworkPkg/Ip6Dxe/Ip6Nd.c
+++ b/NetworkPkg/Ip6Dxe/Ip6Nd.c
@@ -2111,7 +2111,7 @@ Ip6ProcessRouterAdvertise (
   // Option size validity ensured by Ip6IsNDOptionValid().
   //
   ASSERT (LinkLayerOption.Length != 0);
-  ASSERT (Offset + (UINT32) LinkLayerOption.Length * 8 >= (UINT32) 
Head->PayloadLength);
+  ASSERT (Offset + (UINT32) LinkLayerOption.Length * 8 <= (UINT32) 
Head->PayloadLength);
 
   ZeroMem (, sizeof (EFI_MAC_ADDRESS));
   CopyMem (, LinkLayerOption.EtherAddr, 6);
@@ -2164,7 +2164,7 @@ Ip6ProcessRouterAdvertise (
   // Option size validity ensured by Ip6IsNDOptionValid().
   //
   ASSERT (PrefixOption.Length == 4);
-  ASSERT (Offset + (UINT32) PrefixOption.Length * 8 >= (UINT32) 
Head->PayloadLength);
+  ASSERT (Offset + (UINT32) PrefixOption.Length * 8 <= (UINT32) 
Head->PayloadLength);
 
   PrefixOption.ValidLifetime = NTOHL (PrefixOption.ValidLifetime);
   PrefixOption.PreferredLifetime = NTOHL (PrefixOption.PreferredLifetime);
@@ -2334,7 +2334,7 @@ Ip6ProcessRouterAdvertise (
   // Option size validity ensured by Ip6IsNDOptionValid().
   //
   ASSERT (MTUOption.Length == 1);
-  ASSERT (Offset + (UINT32) MTUOption.Length * 8 >= (UINT32) 
Head->PayloadLength);
+  ASSERT (Offset + (UINT32) MTUOption.Length * 8 <= (UINT32) 
Head->PayloadLength);
 
   //
   // Use IPv6 minimum link MTU 1280 bytes as the maximum packet size in 
order
-- 
2.24.0.windows.2


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

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



Re: [edk2-devel] [PATCH 1/1] ShellPkg: Add support for input with separately reported modifiers

2020-04-02 Thread Gao, Zhichao
Summarize the issue, if anything incorrect, please help to correct it. Thanks.

Background:
Uefi spec ambiguous description:
> When interpreting the data from this function, it should be noted that if a 
> class
> of printable characters that are normally adjusted by shift modifiers (e.g. 
> Shift
> Key + "f" key) would be presented solely as a KeyData.Key.UnicodeChar without 
> the
> associated shift state. So in the previous example of a Shift Key + "f" key 
> being
> pressed, the only pertinent data returned would be KeyData.Key.UnicodeChar 
> with
> the value of "F". This of course would not typically be the case for 
> non-printable
> characters such as the pressing of the Right Shift Key + F10 key since the
> corresponding returned data would be reflected both in the
> KeyData.KeyState.KeyShiftState and KeyData.Key.ScanCode values.

Some firmware vendor see the “if” as an option to implement the keyboard driver 
and they choose to implement in the other way.
Ideal: shift + UnicodeKey/UnScancodeKey == report as ==> “shifted” 
UnicodeKey/UnScancodeKey
Ctrl + UnicodeKey == report as ==> UnicodeKey – ‘A’/’a’ + 1
Other way: shift + UnicodeKey/UnScancodeKey == report as ==> shift state + 
“shifted” UnicodeKey/UnScancodeKey
Ctrl + UnicodeKey == report as ==> ctrl state + UnicodeKey – 
‘A’/’a’ + 1
I.e. do not remove the shift state.
That would cause the shell edit/Hexedit missing handling the “shifted” key when 
run shell in such firmware.

Vitaly’s solution add the support the handle “other implementation”.

If we take Vitaly’s solution, we should fixed all the applications in edk2 not 
only in shell edit/Hexeidt function.
And when we catch another request same with this issue, we would follow the 
same progress.

Thanks,
Zhichao

From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Gao, 
Zhichao
Sent: Thursday, April 2, 2020 2:57 PM
To: devel@edk2.groups.io; vit9...@protonmail.com; Rothman, Michael A 

Cc: Andrew Fish ; Laszlo Ersek ; Marvin 
Häuser ; Kinney, Michael D ; 
Ni, Ray 
Subject: Re: [edk2-devel] [PATCH 1/1] ShellPkg: Add support for input with 
separately reported modifiers

Hi Micheal Rothman,

Can you help to review this issue? Because of the uefi spec issue, some 
firmware implemented the different behavior.
Should the edk2 code to handle such issue? If yes, here maybe the situation:

1.   Change for all apps -> uefi spec update and accept  such behavior with 
description -> Done.

2.   Change for all apps -> uefi spec update to remove the ambiguous and 
reject other behavior -> removal the change in first step.

Hi Vitaly,

I used to think it is an additional support for different implementation 
because of the spec. But if we approve this patch, all the app in edk2 using 
the combo key function should be update.
Using shell’s ctrl+’c’ as an example, it need to update at the same time. Same 
with SCT tool.

Thanks,
Zhichao

From: devel@edk2.groups.io 
[mailto:devel@edk2.groups.io] On Behalf Of Vitaly Cheptsov via Groups.Io
Sent: Friday, March 27, 2020 7:01 PM
To: Gao, Zhichao mailto:zhichao@intel.com>>
Cc: devel@edk2.groups.io; Andrew Fish 
mailto:af...@apple.com>>; Laszlo Ersek 
mailto:ler...@redhat.com>>; Marvin Häuser 
mailto:mhaeu...@outlook.de>>; Kinney, Michael D 
mailto:michael.d.kin...@intel.com>>; Ni, Ray 
mailto:ray...@intel.com>>
Subject: Re: [edk2-devel] [PATCH 1/1] ShellPkg: Add support for input with 
separately reported modifiers

Hello,

Requesting to merge this into edk2-stable202005 for the reasons explained in 
BZ[1]. I assume there is no real objection for this, only the approach we make 
such changes in the future, but this can be postponed as we encounter more of 
such problems.

Best regards,
Vitaly

[1] https://bugzilla.tianocore.org/show_bug.cgi?id=2510

20 февр. 2020 г., в 03:27, Gao, Zhichao 
mailto:zhichao@intel.com>> написал(а):

Sorry for my mistake. Then I have no other comments for this patch.
Reviewed-by: Zhichao Gao mailto:zhichao@intel.com>>

Thanks,
Zhichao

From: vit9696 mailto:vit9...@protonmail.com>>
Sent: Wednesday, February 19, 2020 8:15 PM
To: Gao, Zhichao mailto:zhichao@intel.com>>; 
devel@edk2.groups.io
Subject: RE: [edk2-devel] [PATCH 1/1] ShellPkg: Add support for input with 
separately reported modifiers

Zhichao,

Thanks for your review. The comment is correct, as ShiftOnlyState means the 
state where only shift (and no other modifiers) can be pressed or not.

Best wishes,
Vitaly

On Wed, Feb 19, 2020 at 09:55, Gao, Zhichao 
mailto:zhichao@intel.com>> wrote:
Hi Vitaly,

See the comment below:

> -Original Message-
> From: devel@edk2.groups.io 
> mailto:devel@edk2.groups.io>> On Behalf Of Vitaly
> Cheptsov via Groups.Io
> Sent: Monday, February 10, 2020 6:18 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH 

[edk2-devel] [PATCH] BaseTools/Scripts: Add scripts to set PACKAGES_PATH environment

2020-04-02 Thread Heng Luo
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2656

1. Add GetPackagesPath.py, it will be used to get package pathes from
  special directories. A sub directory is a qualified package path
  when an EDKII Package can be found under it.
2. Add SetPackagesPath.bat and SetPackagesPath.sh, these scripts call
  GetPackagesPath.py to collect all package paths under specified
  directories and append them to PACKAGES_PATH environment variable.

Cc: Ray Ni 
Cc: Eric Dong 
Cc: Liming Gao 
Cc: Bob Feng 
Cc: Amy Chan 
Signed-off-by: Heng Luo 
---
 BaseTools/Scripts/GetPackagesPath.py  | 94 
++
 BaseTools/Scripts/SetPackagesPath.bat | 33 +
 BaseTools/Scripts/SetPackagesPath.sh  | 40 

 3 files changed, 167 insertions(+)

diff --git a/BaseTools/Scripts/GetPackagesPath.py 
b/BaseTools/Scripts/GetPackagesPath.py
new file mode 100644
index 00..82d66a6106
--- /dev/null
+++ b/BaseTools/Scripts/GetPackagesPath.py
@@ -0,0 +1,94 @@
+## @file
+# Get all recursive package paths from special directories.
+#
+# Copyright (c) 2020, Intel Corporation. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+import os
+import glob
+import argparse
+
+#
+# Globals for help information
+#
+__prog__ = 'GetPackagesPath.py'
+__copyright__ = 'Copyright (c) 2020, Intel Corporation. All rights reserved.'
+__description__ = 'Gets all recursive package paths in specified directory.\n'
+
+def list_packages_path(root):
+""" Gets all recursive package paths in specified directory.
+A directory is a package path if it satisfies conditions below:
+1. it is a directory
+2. it is not an EDK II Package. An EDK II Package (directory) is
+   a directory that contains an EDK II package declaration (DEC) file.
+3. it contains at least one first level EDK II Package.
+Note: A directory is not package path but its subdirectory could be.
+Example: edk2-platforms/Features is not package path
+but edk2-platforms/Features/Intel is.
+
+:param root: The specified directory to find package paths in it
+:type root: String
+:returns: Return all recursive package paths
+:rtype: String list
+"""
+
+if (not os.path.exists(root)) or (not os.path.isdir(root)):
+ return []
+
+if glob.glob(os.path.join(root, '*.dec')):
+# it is an EDK II Package
+return []
+
+paths = []
+contain_package = False
+for filename in os.listdir(root):
+filepath = os.path.join(root, filename)
+if os.path.isdir(filepath):
+if glob.glob(os.path.join(filepath, '*.dec')):
+# it is an EDK II Package
+contain_package = True
+else:
+# gets package paths for subdirectory if it is not package
+paths = paths + list_packages_path(filepath)
+
+if contain_package:
+# root is a package path because it contains EDK II Package
+# in first level folder, inset it to head of list
+paths.insert(0, root)
+
+# return package paths
+return paths
+
+def get_packages_path(directories):
+""" For each direcory in directories, gets all recursive package paths
+in this directory and joins them into one string.
+
+:param directories: the list of directory
+:type directories: String list
+:returns: Return string of package paths
+:rtype: String
+"""
+
+packages_path = ''
+for directory in directories:
+directory = os.path.abspath(directory)
+paths = list_packages_path(directory)
+for path in paths:
+if packages_path == '':
+packages_path = path
+else:
+packages_path += os.pathsep + path
+return packages_path
+
+if __name__ == '__main__':
+# Create command line argument parser object
+parser = argparse.ArgumentParser(
+prog=__prog__,
+description=__description__ + __copyright__,
+conflict_handler='resolve'
+)
+parser.add_argument('directory', nargs='+',
+help='Specified directory where package packages are got from')
+args = parser.parse_args()
+print(get_packages_path(args.directory))
diff --git a/BaseTools/Scripts/SetPackagesPath.bat 
b/BaseTools/Scripts/SetPackagesPath.bat
new file mode 100644
index 00..a8c45612c9
--- /dev/null
+++ b/BaseTools/Scripts/SetPackagesPath.bat
@@ -0,0 +1,33 @@
+@REM @file
+@REM Windows batch file to set PACKAGES_PATH environment
+@REM
+@REM Copyright (c) 2020, Intel Corporation. All rights reserved.
+@REM SPDX-License-Identifier: BSD-2-Clause-Patent
+@REM
+@REM This script calls GetPackagesPath.py to collect all package paths under
+@REM specified directories and append them to PACKAGES_PATH environment

[edk2-devel] [PATCH v2] MdeModulePkg/RegularExpressionDxe: Make oniguruma a submodule in edk2.

2020-04-02 Thread Zhang, Shenglei
Use submodule way to access oniguruma. And upgrade oniguruma
version from v6.9.3 to v6.9.4_mark1.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2073

Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Liming Gao 
Signed-off-by: Shenglei Zhang 
---

v2:1.Update the inf file to make VS2019 build pass.
   2.Add ignore files in MdeModulePkg.ci.yaml.

The patch is too big, so I put the change on my forked tree.
https://github.com/shenglei10/edk2/tree/oniguruma

-- 
2.18.0.windows.1


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

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



Re: [edk2-devel] [PATCH 1/1] ShellPkg: Add support for input with separately reported modifiers

2020-04-02 Thread Gao, Zhichao
Hi Micheal Rothman,

Can you help to review this issue? Because of the uefi spec issue, some 
firmware implemented the different behavior.
Should the edk2 code to handle such issue? If yes, here maybe the situation:

1.  Change for all apps -> uefi spec update and accept  such behavior with 
description -> Done.

2.  Change for all apps -> uefi spec update to remove the ambiguous and 
reject other behavior -> removal the change in first step.

Hi Vitaly,

I used to think it is an additional support for different implementation 
because of the spec. But if we approve this patch, all the app in edk2 using 
the combo key function should be update.
Using shell’s ctrl+’c’ as an example, it need to update at the same time. Same 
with SCT tool.

Thanks,
Zhichao

From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Vitaly 
Cheptsov via Groups.Io
Sent: Friday, March 27, 2020 7:01 PM
To: Gao, Zhichao 
Cc: devel@edk2.groups.io; Andrew Fish ; Laszlo Ersek 
; Marvin Häuser ; Kinney, Michael D 
; Ni, Ray 
Subject: Re: [edk2-devel] [PATCH 1/1] ShellPkg: Add support for input with 
separately reported modifiers

Hello,

Requesting to merge this into edk2-stable202005 for the reasons explained in 
BZ[1]. I assume there is no real objection for this, only the approach we make 
such changes in the future, but this can be postponed as we encounter more of 
such problems.

Best regards,
Vitaly

[1] https://bugzilla.tianocore.org/show_bug.cgi?id=2510


20 февр. 2020 г., в 03:27, Gao, Zhichao 
mailto:zhichao@intel.com>> написал(а):

Sorry for my mistake. Then I have no other comments for this patch.
Reviewed-by: Zhichao Gao mailto:zhichao@intel.com>>

Thanks,
Zhichao

From: vit9696 mailto:vit9...@protonmail.com>>
Sent: Wednesday, February 19, 2020 8:15 PM
To: Gao, Zhichao mailto:zhichao@intel.com>>; 
devel@edk2.groups.io
Subject: RE: [edk2-devel] [PATCH 1/1] ShellPkg: Add support for input with 
separately reported modifiers

Zhichao,

Thanks for your review. The comment is correct, as ShiftOnlyState means the 
state where only shift (and no other modifiers) can be pressed or not.

Best wishes,
Vitaly

On Wed, Feb 19, 2020 at 09:55, Gao, Zhichao 
mailto:zhichao@intel.com>> wrote:
Hi Vitaly,

See the comment below:

> -Original Message-
> From: devel@edk2.groups.io 
> mailto:devel@edk2.groups.io>> On Behalf Of Vitaly
> Cheptsov via Groups.Io
> Sent: Monday, February 10, 2020 6:18 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH 1/1] ShellPkg: Add support for input with
> separately reported modifiers
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2510
>
> Some firmwares:
> - Report Shift modifier even when they report upper-case unicode letter.
> - Report Ctrl modifier with "shifted" UniChar (i.e. X - 'A' + 1).
>
> This change provides support for these firmwares preserving the compatibility
> with the previous input handling.
>
> Signed-off-by: Michael Belyaev mailto:usrs...@icloud.com>>
> Reviewed-by: Vitaly Cheptsov 
> mailto:vit9...@protonmail.com>>
> ---
> ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c | 37
> ++--
> ShellPkg/Library/UefiShellDebug1CommandsLib/EditInputBar.c | 28
> ++-
> ShellPkg/Library/UefiShellDebug1CommandsLib/EditMenuBar.c | 6 
> ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c | 11
> +++---
> 4 files changed, 58 insertions(+), 24 deletions(-)
>
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
> index df530f1119..9615a4dfbd 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
> +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
> @@ -1381,8 +1381,8 @@ MainCommandDisplayHelp (
> continue;
> }
>
> - if (((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) == 0) ||
> - (KeyData.KeyState.KeyShiftState == EFI_SHIFT_STATE_VALID)) {
> + if (((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) == 0)
> + || (KeyData.KeyState.KeyShiftState == EFI_SHIFT_STATE_VALID)) {
> //
> // For consoles that don't support/report shift state,
> // CTRL+W is translated to L'W' - L'A' + 1.
> @@ -1390,14 +1390,17 @@ MainCommandDisplayHelp (
> if (KeyData.Key.UnicodeChar == L'W' - L'A' + 1) {
> break;
> }
> - } else if (((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0)
> &&
> - ((KeyData.KeyState.KeyShiftState & (EFI_LEFT_CONTROL_PRESSED |
> EFI_RIGHT_CONTROL_PRESSED)) != 0) &&
> - ((KeyData.KeyState.KeyShiftState & ~(EFI_SHIFT_STATE_VALID |
> EFI_LEFT_CONTROL_PRESSED | EFI_RIGHT_CONTROL_PRESSED)) == 0)) {
> + } else if (((KeyData.KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0)
> + && ((KeyData.KeyState.KeyShiftState & (EFI_LEFT_CONTROL_PRESSED |
> EFI_RIGHT_CONTROL_PRESSED)) != 0)
> + && ((KeyData.KeyState.KeyShiftState &
> + 

Re: [edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Allow pin file to be checked out when combo is not in project manifest

2020-04-02 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: Desimone, Ashley E  
Sent: Tuesday, March 31, 2020 5:51 PM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L ; Pandya, Puja 
; Bjorge, Erik C ; Bret 
Barkelew ; Agyeman, Prince 

Subject: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Allow pin file to be checked 
out when combo is not in project manifest

When a pin file is based on a combo that is not in the project manifest file 
but otherwise matches the project print a warning instead of throwing and 
exception and allow the pin to be checked out.

Signed-off-by: Ashley E Desimone 
Cc: Nate DeSimone 
Cc: Puja Pandya 
Cc: Erik Bjorge 
Cc: Bret Barkelew 
Cc: Prince Agyeman 
---
 edkrepo/commands/checkout_pin_command.py   | 10 --
 edkrepo/commands/humble/checkout_pin_humble.py |  4 +++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/edkrepo/commands/checkout_pin_command.py 
b/edkrepo/commands/checkout_pin_command.py
index 619fcf8..72075bf 100644
--- a/edkrepo/commands/checkout_pin_command.py
+++ b/edkrepo/commands/checkout_pin_command.py
@@ -90,11 +90,17 @@ class CheckoutPinCommand(EdkrepoCommand):
 elif not set(pin.remotes).issubset(set(manifest.remotes)):
 raise EdkrepoProjectMismatchException(humble.MANIFEST_MISMATCH)
 elif pin.general_config.current_combo not in [c.name for c in 
manifest.combinations]:
-raise EdkrepoProjectMismatchException(humble.MANIFEST_MISMATCH)
+
+ print(humble.COMBO_NOT_FOUND.format(pin.general_config.current_combo))
 combo_name = pin.general_config.current_combo
 pin_sources = pin.get_repo_sources(combo_name)
 pin_root_remote = {source.root:source.remote_name for source in 
pin_sources}
-manifest_sources = manifest.get_repo_sources(combo_name)
+try:
+# If the pin and the project manifest have the same combo get the
+# repo sources from that combo. Otherwise get the default combo's
+# repo sources
+manifest_sources = manifest.get_repo_sources(combo_name)
+except ValueError:
+manifest_sources = 
+ manifest.get_repo_sources(manifest.general_config.default_combo)
 manifest_root_remote = {source.root:source.remote_name for source in 
manifest_sources}
 if 
set(pin_root_remote.items()).isdisjoint(set(manifest_root_remote.items())):
 raise EdkrepoProjectMismatchException(humble.MANIFEST_MISMATCH)
diff --git a/edkrepo/commands/humble/checkout_pin_humble.py 
b/edkrepo/commands/humble/checkout_pin_humble.py
index ac7467d..ec6938d 100644
--- a/edkrepo/commands/humble/checkout_pin_humble.py
+++ b/edkrepo/commands/humble/checkout_pin_humble.py
@@ -12,4 +12,6 @@ NOT_FOUND = 'The selected PIN file was not found.'
 MANIFEST_MISMATCH = ('The selected PIN file does not refer to the same project 
'
  'as the local manifest file. {}'.format(CHP_EXIT))  
COMMIT_NOT_FOUND = 'The commit referenced by the PIN file does not exist. 
{}'.format(CHP_EXIT) -PIN_COMBO = 'Pin: {}'
\ No newline at end of file
+PIN_COMBO = 'Pin: {}'
+COMBO_NOT_FOUND = ('Warning: The combo listed in PIN file: {} is no longer '
+   'listed in the project manifest file.')
\ No newline at end of file
--
2.16.2.windows.1


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

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