Re: [edk2-devel] [PATCH v2 1/1] BaseTools:Build cache cannot store the cache files for library package

2019-06-16 Thread Bob Feng
Reviewed-by: Bob Feng 

-Original Message-
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Steven Shi
Sent: Tuesday, June 11, 2019 2:33 PM
To: devel@edk2.groups.io
Cc: Gao, Liming ; Feng, Bob C ; 
Rodriguez, Christian ; Fan, ZhijuX 

Subject: [edk2-devel] [PATCH v2 1/1] BaseTools:Build cache cannot store the 
cache files for library package

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1867

Current build cache cannot store the cache for library package.
build -p MdePkg\MdePkg.dsc -a IA32 -b DEBUG -t VS2015x86 --hash 
--binary-destination=BinCache After build, the expected result is the BinCache 
folder is generated and the MdePkg build cache files (e.g. .hash and .lib) are 
stored in the BinCache folder. But the BinCache folder is not generated at all.

This patch is going to fix that issue.

Cc: Liming Gao 
Cc: Bob Feng 
Cc: Zhiju.Fan 
Signed-off-by: Steven Shi 
---
 BaseTools/Source/Python/AutoGen/AutoGen.py | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py 
b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 3f41fbb507..f59a8038d5 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -3569,8 +3569,11 @@ class ModuleAutoGen(AutoGen):
 if self.IsAsBuiltInfCreated:
 return
 
-# Skip the following code for libraries
+# Skip INF file generation for libraries
 if self.IsLibrary:
+# Only store the library cache if needed
+if GlobalData.gBinCacheDest:
+self.CopyModuleToCache()
 return
 
 # Skip the following code for modules with no source files
--
2.17.1.windows.2





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

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



Re: [edk2-devel] [PATCH 2/3 V2] Platform/Intel:Add build parameter to support Binary Cache

2019-06-16 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Fan, ZhijuX
> Sent: Monday, June 17, 2019 1:11 PM
> To: devel@edk2.groups.io
> Cc: Gao, Liming ; Feng, Bob C ;
> Shi, Steven ; Lu, Shifei A ; 
> Zhou,
> Bowen ; Oram, Isaac W ;
> Chiu, Chasel ; Kubacki, Michael A
> ; Desimone, Nathaniel L
> 
> Subject: [PATCH 2/3 V2] Platform/Intel:Add build parameter to support Binary
> Cache
> 
> Need extend the options in the Intel/build_bios.py file to support Binary 
> Cache.
> 
>  --hash:
>Enable hash-based caching during build process.
>  --binary-destination:
>Generate a cache of binary files in the specified directory.
>  --binary-source:
>Consume a cache of binary files from the specified directory.
> 
> Cc: Liming Gao 
> Cc: Bob Feng 
> Cc: Steven Shi 
> Cc: Shifei A Lu 
> Cc: Xiaohu Zhou 
> Cc: Isaac W Oram 
> Cc: Chasel Chiu 
> Cc: Michael Kubacki 
> Cc: Nate DeSimone 
> Signed-off-by: Zhiju.Fan 
> ---
>  Platform/Intel/build_bios.py | 27 +++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index
> 09eceddeff..c01b953d16 100644
> --- a/Platform/Intel/build_bios.py
> +++ b/Platform/Intel/build_bios.py
> @@ -343,6 +343,7 @@ def build(config):
>  print(" SILENT_MODE= ", config.get("SILENT_MODE"))
>  print(" REBUILD_MODE   = ", config.get("REBUILD_MODE"))
>  print(" BUILD_ROM_ONLY = ", config.get("BUILD_ROM_ONLY"))
> +print(" BINARY_CACHE_CMD_LINE = ", config.get("HASH"),
> + config.get("BINARY_CACHE_CMD_LINE"))
>  print("==")
> 
>  command = ["build", "-n", config["NUMBER_OF_PROCESSORS"]] @@
> -353,6 +354,10 @@ def build(config):
>  if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
>  command.append(config["EXT_BUILD_FLAGS"])
> 
> +if config.get('BINARY_CACHE_CMD_LINE'):
> +command.append(config['HASH'])
> +command.append(config['BINARY_CACHE_CMD_LINE'])
> +
>  if config.get("SILENT_MODE", "FALSE") == "TRUE":
>  command.append("--silent")
>  command.append("--quiet")
> @@ -858,6 +863,17 @@ def get_cmd_config_arguments(arguments):
>  if arguments.fspapi is True:
>  result["API_MODE_FSP_WRAPPER_BUILD"] = "TRUE"
> 
> +if not arguments.UseHashCache:
> +result['BINARY_CACHE_CMD_LINE'] = ''
> +elif arguments.BinCacheDest:
> +result['HASH'] = '--hash'
> +result['BINARY_CACHE_CMD_LINE'] = '--binary-destination=%s' %
> arguments.BinCacheDest
> +elif arguments.BinCacheSource:
> +result['HASH'] = '--hash'
> +result['BINARY_CACHE_CMD_LINE'] = '--binary-source=%s' %
> arguments.BinCacheSource
> +else:
> +result['BINARY_CACHE_CMD_LINE'] = ''
> +
>  return result
> 
> 
> @@ -934,6 +950,17 @@ def get_cmd_arguments(build_config):
>  parser.add_argument("--fspapi", help="API mode fsp wrapper build
> enabled",
>  action='store_true', dest="fspapi")
> 
> +parser.add_argument("--hash", action="store_true",
> dest="UseHashCache", default=False,
> +help="Enable hash-based caching during build
> + process.")
> +
> +parser.add_argument("--binary-destination", help="Generate a cache of
> binary \
> +files in the specified directory.",
> +action='store', dest="BinCacheDest")
> +
> +parser.add_argument("--binary-source", help="Consume a cache of binary
> files \
> +from the specified directory.",
> +action='store', dest="BinCacheSource")
> +
>  return parser.parse_args()
> 
> 
> --
> 2.14.1.windows.1


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

View/Reply Online (#42486): https://edk2.groups.io/g/devel/message/42486
Mute This Topic: https://groups.io/mt/32091878/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/3 V2] Intel/Readme.md:Add instructions about Binary Cache in Readme.md

2019-06-16 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Fan, ZhijuX
> Sent: Monday, June 17, 2019 1:10 PM
> To: devel@edk2.groups.io
> Cc: Gao, Liming ; Feng, Bob C ;
> Shi, Steven ; Lu, Shifei A ; 
> Zhou,
> Bowen ; Oram, Isaac W ;
> Chiu, Chasel ; Kubacki, Michael A
> ; Desimone, Nathaniel L
> 
> Subject: [PATCH 1/3 V2] Intel/Readme.md:Add instructions about Binary Cache
> in Readme.md
> 
> BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1784
> BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1785
> 
> Add detailed instructions about Binary Cache in Readme.md, Extend options to
> support Binary Cache in the Kabylake build bld.bat file, Purley build bld.bat 
> file,
> build_bios.py
> 
> Cc: Liming Gao 
> Cc: Bob Feng 
> Cc: Steven Shi 
> Cc: Shifei A Lu 
> Cc: Xiaohu Zhou 
> Cc: Isaac W Oram 
> Cc: Chasel Chiu 
> Cc: Michael Kubacki 
> Cc: Nate DeSimone 
> Signed-off-by: Zhiju.Fan 
> ---
>  Platform/Intel/Readme.md | 7 ++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/Platform/Intel/Readme.md b/Platform/Intel/Readme.md index
> cc0151066e..d95d0fa54e 100644
> --- a/Platform/Intel/Readme.md
> +++ b/Platform/Intel/Readme.md
> @@ -134,6 +134,9 @@ return back to the minimum platform caller.
>| --performance | performance build enabled   |
>| --fsp | fsp wrapper build enabled   |
>| --fspapi  | API mode fsp wrapper build enabled  |
> +  | --hash| Enable hash-based caching   |
> +  | --binary-destination  | create cache in specified directory |
> +  | --binary-source   | Consume cache from directory|
>| |
> 
>  * For more information on build options @@ -196,7 +199,9 @@ For
> PurleyOpenBoardPkg  2. Type "cd
> edk2-platforms\Platform\Intel\PurleyOpenBoardPkg\BoardMtOlympus".
>  3. Type "GitEdk2MinMtOlympus.bat" to setup GIT environment.
>  4. Type "bld" to build Purley Mt Olympus board UEFI firmware image, "bld
> release" for release build, "bld clean" to
> -   remove intermediate files.
> +   remove intermediate files."bld cache-produce" Generate a cache of binary
> files in the specified directory,
> +   "bld cache-consume" Consume a cache of binary files from the specified
> directory, BINARY_CACHE_PATH is empty,
> +   used "BinCache" as default path.
> 
>  The validated version of iasl compiler that can build MinPurley is 20180629.
> Older version may generate ACPI build  errors.
> --
> 2.14.1.windows.1


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

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



[edk2-devel] [edk2-platforms] [patch] Platform/Intel/DebugFeaturePkg: Update PCD type

2019-06-16 Thread Dandan Bi
Add PcdAcpiDebugEnable and PcdAcpiDebugBufferSize
into following section which platform can customize
the type by itself.
[PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic,PcdsDynamicEx]

Cc: Eric Dong 
Cc: Liming Gao 
Signed-off-by: Dandan Bi 
---
 Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dec | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dec 
b/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dec
index 7389d36a57..37ebe6da4d 100644
--- a/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dec
+++ b/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dec
@@ -49,10 +49,11 @@ [PcdsFixedAtBuild]
   ## This PCD sepcifies the start index in CMOS, it will occupy 1 bytes space.
   
gDebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugPortDeviceIndex|0x5A|UINT8|0x0007
   ## This PCD sepcifies the start index in CMOS, it will occupy 1 bytes space.
   
gDebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugPortFunctionIndex|0x5B|UINT8|0x0008
 
+[PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic,PcdsDynamicEx]
   ## This PCD specifies AcpiDebug feature is enable/disable.
   gDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugEnable|FALSE|BOOLEAN|0x0009
   ## This PCD specifies AcpiDebug buffer size.
   
gDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugBufferSize|0x1|UINT32|0x000A
 
-- 
2.18.0.windows.1


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

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



[edk2-devel] [PATCH 2/3 V2] Platform/Intel:Add build parameter to support Binary Cache

2019-06-16 Thread Fan, ZhijuX
Need extend the options in the Intel/build_bios.py file
to support Binary Cache.

 --hash:
   Enable hash-based caching during build process.
 --binary-destination:
   Generate a cache of binary files in the specified directory.
 --binary-source:
   Consume a cache of binary files from the specified directory.

Cc: Liming Gao 
Cc: Bob Feng 
Cc: Steven Shi 
Cc: Shifei A Lu 
Cc: Xiaohu Zhou 
Cc: Isaac W Oram 
Cc: Chasel Chiu 
Cc: Michael Kubacki 
Cc: Nate DeSimone 
Signed-off-by: Zhiju.Fan 
---
 Platform/Intel/build_bios.py | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py
index 09eceddeff..c01b953d16 100644
--- a/Platform/Intel/build_bios.py
+++ b/Platform/Intel/build_bios.py
@@ -343,6 +343,7 @@ def build(config):
 print(" SILENT_MODE= ", config.get("SILENT_MODE"))
 print(" REBUILD_MODE   = ", config.get("REBUILD_MODE"))
 print(" BUILD_ROM_ONLY = ", config.get("BUILD_ROM_ONLY"))
+print(" BINARY_CACHE_CMD_LINE = ", config.get("HASH"), 
config.get("BINARY_CACHE_CMD_LINE"))
 print("==")
 
 command = ["build", "-n", config["NUMBER_OF_PROCESSORS"]]
@@ -353,6 +354,10 @@ def build(config):
 if config["EXT_BUILD_FLAGS"] and config["EXT_BUILD_FLAGS"] != "":
 command.append(config["EXT_BUILD_FLAGS"])
 
+if config.get('BINARY_CACHE_CMD_LINE'):
+command.append(config['HASH'])
+command.append(config['BINARY_CACHE_CMD_LINE'])
+
 if config.get("SILENT_MODE", "FALSE") == "TRUE":
 command.append("--silent")
 command.append("--quiet")
@@ -858,6 +863,17 @@ def get_cmd_config_arguments(arguments):
 if arguments.fspapi is True:
 result["API_MODE_FSP_WRAPPER_BUILD"] = "TRUE"
 
+if not arguments.UseHashCache:
+result['BINARY_CACHE_CMD_LINE'] = ''
+elif arguments.BinCacheDest:
+result['HASH'] = '--hash'
+result['BINARY_CACHE_CMD_LINE'] = '--binary-destination=%s' % 
arguments.BinCacheDest
+elif arguments.BinCacheSource:
+result['HASH'] = '--hash'
+result['BINARY_CACHE_CMD_LINE'] = '--binary-source=%s' % 
arguments.BinCacheSource
+else:
+result['BINARY_CACHE_CMD_LINE'] = ''
+
 return result
 
 
@@ -934,6 +950,17 @@ def get_cmd_arguments(build_config):
 parser.add_argument("--fspapi", help="API mode fsp wrapper build enabled",
 action='store_true', dest="fspapi")
 
+parser.add_argument("--hash", action="store_true", dest="UseHashCache", 
default=False,
+help="Enable hash-based caching during build process.")
+
+parser.add_argument("--binary-destination", help="Generate a cache of 
binary \
+files in the specified directory.",
+action='store', dest="BinCacheDest")
+
+parser.add_argument("--binary-source", help="Consume a cache of binary 
files \
+from the specified directory.",
+action='store', dest="BinCacheSource")
+
 return parser.parse_args()
 
 
-- 
2.14.1.windows.1


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

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

<>

[edk2-devel] [PATCH 1/3 V2] Intel/Readme.md:Add instructions about Binary Cache in Readme.md

2019-06-16 Thread Fan, ZhijuX
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1784
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1785

Add detailed instructions about Binary Cache in Readme.md,
Extend options to support Binary Cache in the Kabylake
build bld.bat file, Purley build bld.bat file, build_bios.py

Cc: Liming Gao 
Cc: Bob Feng 
Cc: Steven Shi 
Cc: Shifei A Lu 
Cc: Xiaohu Zhou 
Cc: Isaac W Oram 
Cc: Chasel Chiu 
Cc: Michael Kubacki 
Cc: Nate DeSimone 
Signed-off-by: Zhiju.Fan 
---
 Platform/Intel/Readme.md | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/Readme.md b/Platform/Intel/Readme.md
index cc0151066e..d95d0fa54e 100644
--- a/Platform/Intel/Readme.md
+++ b/Platform/Intel/Readme.md
@@ -134,6 +134,9 @@ return back to the minimum platform caller.
   | --performance | performance build enabled   |
   | --fsp | fsp wrapper build enabled   |
   | --fspapi  | API mode fsp wrapper build enabled  |
+  | --hash| Enable hash-based caching   |
+  | --binary-destination  | create cache in specified directory |
+  | --binary-source   | Consume cache from directory|
   | |
 
 * For more information on build options
@@ -196,7 +199,9 @@ For PurleyOpenBoardPkg
 2. Type "cd edk2-platforms\Platform\Intel\PurleyOpenBoardPkg\BoardMtOlympus".
 3. Type "GitEdk2MinMtOlympus.bat" to setup GIT environment.
 4. Type "bld" to build Purley Mt Olympus board UEFI firmware image, "bld 
release" for release build, "bld clean" to
-   remove intermediate files.
+   remove intermediate files."bld cache-produce" Generate a cache of binary 
files in the specified directory,
+   "bld cache-consume" Consume a cache of binary files from the specified 
directory, BINARY_CACHE_PATH is empty,
+   used "BinCache" as default path.
 
 The validated version of iasl compiler that can build MinPurley is 20180629. 
Older version may generate ACPI build
 errors.
-- 
2.14.1.windows.1


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

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

<>

[edk2-devel] [PATCH 0/3] Makes binary cache available in Platform/Intel

2019-06-16 Thread Fan, ZhijuX
Add detailed instructions about Binary Cache in Readme.md,
Extend options to support Binary Cache in the Kabylake
build bld.bat file, Purley build bld.bat file, build_bios.py

Cc: Liming Gao 
Cc: Bob Feng 
Cc: Steven Shi 
Cc: Shifei A Lu 
Cc: Xiaohu Zhou 
Cc: Isaac W Oram 
Cc: Chasel Chiu 
Cc: Michael Kubacki 
Cc: Nate DeSimone 
Signed-off-by: Zhiju.Fan 

*** BLURB HERE ***

Fan, Zhiju (3):
  Intel/Readme.md:Add instructions about Binary Cache in Readme.md
  Platform/Intel:Add build parameter to support Binary Cache
  PurleyOpenBoardPkg:Extend options in bld.bat to support Binary Cache

 Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat  | 17 
+++--
 Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat |  4 ++--
 Platform/Intel/Readme.md  |  7 ++-
 Platform/Intel/build_bios.py  | 27 
+++
 4 files changed, 50 insertions(+), 5 deletions(-)

-- 
2.14.1.windows.1


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

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

<>

Re: [edk2-devel] [PATCH 3/6] MdeModulePkg/UefiBootManagerLib: Change performance code

2019-06-16 Thread Dandan Bi
> -Original Message-
> From: Wu, Hao A
> Sent: Friday, June 14, 2019 4:44 PM
> To: Gao, Zhichao ; devel@edk2.groups.io; Bi,
> Dandan ; Gao, Liming ; Ni,
> Ray 
> Cc: Bret Barkelew ; Wang, Jian J
> ; Zeng, Star 
> Subject: RE: [PATCH 3/6] MdeModulePkg/UefiBootManagerLib: Change
> performance code
> 
> > -Original Message-
> > From: Gao, Zhichao
> > Sent: Monday, June 10, 2019 3:29 PM
> > To: devel@edk2.groups.io
> > Cc: Bret Barkelew; Wang, Jian J; Wu, Hao A; Ni, Ray; Zeng, Star; Gao,
> > Liming
> > Subject: [PATCH 3/6] MdeModulePkg/UefiBootManagerLib: Change
> > performance code
> >
> > From: Bret Barkelew 
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1888
> >
> > Use PERF_INMODULE_BEGIN and PERF_INMODULE_END to replace
> > PERF_START_EX, PERF_CODE and PERF_END_EX.
> 
> 
> Hello Dandan & Liming,
> 
> May I know the reason for 'PERF_START_EX' & 'PERF_END_EX' macros are
> not
> being replaced in commit:
> 
> Revision: 67e9ab84ef042bd59c4297fdad7f6aece6b7bbca
> MdeModulePkg: Use new added Perf macros
> 
> Is there a special reason for this?
> ('OptionNumber' as the identifier?)

Hi Hao and Zhichao

The 'PERF_START_EX' & 'PERF_END_EX'  here specifies 'OptionNumber' as the 
identifier. We will miss the information of 'OptionNumber' if we replace it 
with new macros. It may impact current usage model. That's why we kept it 
before.
For other 'PERF_START_EX' & 'PERF_END_EX'  replacements in this patch series 
may have the similar issue.

Zhichao, please hold the patches that replace 'PERF_START_EX' & 'PERF_END_EX' 
firstly, I think it may need more discussion.

Liming, do you have any comments for this?


Thanks,
Dandan
> 
> 
> > Use PERF_CROSSMODULE_END and PERF_CROSSMODULE_BEGIN to get
> the
> > info
> > of one boot image's performance.
> 
> 
> Hello Zhichao,
> 
> May I know what kind of test has been done for this patch?
> Also, some inline comments below:
> 
> 
> >
> > Cc: Jian J Wang 
> > Cc: Hao A Wu 
> > Cc: Ray Ni 
> > Cc: Star Zeng 
> > Cc: Liming Gao 
> > Signed-off-by: Zhichao Gao 
> > ---
> >  MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 9 -
> >  1 file changed, 4 insertions(+), 5 deletions(-)
> >
> > diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > index 952033fc82..af1024cacd 100644
> > --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
> > @@ -1812,7 +1812,7 @@ EfiBootManagerBoot (
> >  BmRepairAllControllers (0);
> >}
> >
> > -  PERF_START_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32)
> > OptionNumber);
> > +  PERF_INMODULE_BEGIN ("BdsAttempt");
> >
> >//
> >// 5. Adjust the different type memory page number just before booting
> > @@ -1932,9 +1932,9 @@ EfiBootManagerBoot (
> >//
> >// Write boot to OS performance data for UEFI boot
> >//
> > -  PERF_CODE (
> > -BmEndOfBdsPerfCode (NULL, NULL);
> > -  );
> > +  PERF_INMODULE_END ("BdsAttempt");
> 
> 
> I think the patch missed to replace the below 'PERF_END_EX' macro:
> 
>   //
>   if ((DevicePathType (BootOption->FilePath) == BBS_DEVICE_PATH) &&
> (DevicePathSubType (BootOption->FilePath) == BBS_BBS_DP)) {
> ...
> 
> PERF_END_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32)
> OptionNumber);
> ^^^
> return;
>   }
> 
> 
> > +  PERF_CROSSMODULE_END ("BDS");
> > +  PERF_CROSSMODULE_BEGIN ("BDS");
> 
> 
> Could you help to introduce the purpose for the above
> 'PERF_CROSSMODULE_BEGIN' in more detail?
> 
> 
> >
> >REPORT_STATUS_CODE (EFI_PROGRESS_CODE, PcdGet32
> > (PcdProgressCodeOsLoaderStart));
> >
> > @@ -1947,7 +1947,6 @@ EfiBootManagerBoot (
> >  //
> >  BmReportLoadFailure (EFI_SW_DXE_BS_EC_BOOT_OPTION_FAILED,
> > Status);
> >}
> > -  PERF_END_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32)
> > OptionNumber);
> 
> 
> The patch excludes the time consumed by StartImage() from performance
> data
> for the "BdsAttempt" token.
> 
> If the image starts successfully, there will not be an matching PERF_END
> macro for the origin code.
> 
> Ray, do you think it is a reasonable change here?
> 
> Best Regards,
> Hao Wu
> 
> 
> >
> >//
> >// Destroy the RAM disk
> > --
> > 2.21.0.windows.1


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

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



Re: [edk2-devel] [PATCH] IntelFsp2Pkg: add TempRamExitPpi.h.

2019-06-16 Thread Chiu, Chasel


Hi Star,

Since FspmArchConfigPpi.h also having Ppi postfix, we would like to align this 
for TemPRamExitPpi.h in IntelFsp2Pkg.

Thanks!
Chasel


> -Original Message-
> From: Zeng, Star
> Sent: Monday, June 17, 2019 9:51 AM
> To: devel@edk2.groups.io; Chiu, Chasel 
> Cc: Desimone, Nathaniel L ; Zeng, Star
> 
> Subject: RE: [edk2-devel] [PATCH] IntelFsp2Pkg: add TempRamExitPpi.h.
> 
> And the 'Ppi' postfix seems not needed in the file name.
> 
> Thanks,
> Star
> 
> > -Original Message-
> > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> > Zeng, Star
> > Sent: Sunday, June 16, 2019 9:11 PM
> > To: Chiu, Chasel ; devel@edk2.groups.io
> > Cc: Desimone, Nathaniel L ; Zeng, Star
> > 
> > Subject: Re: [edk2-devel] [PATCH] IntelFsp2Pkg: add TempRamExitPpi.h.
> >
> > Hi Chasel,
> >
> > Two minor feedbacks.
> >
> > 1. The spec defines the return status below, should we follow it?
> >
> > EFI_SUCCESS FSP execution environment was initialized successfully.
> > EFI_INVALID_PARAMETER Input parameters are invalid.
> > EFI_UNSUPPORTED The FSP calling conditions were not met.
> > EFI_DEVICE_ERROR Temporary memory exit.
> >
> >
> > 2. The gFspTempRamExitPpiGuid should be added into IntelFsp2Pkg.dec,
> > right?
> >
> >
> > Thanks,
> > Star
> >
> > > -Original Message-
> > > From: Chiu, Chasel
> > > Sent: Friday, June 14, 2019 5:56 PM
> > > To: devel@edk2.groups.io
> > > Cc: Desimone, Nathaniel L ; Zeng,
> > > Star 
> > > Subject: [PATCH] IntelFsp2Pkg: add TempRamExitPpi.h.
> > >
> > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1883
> > >
> > > Add header file for FSP_TEMP_RAM_EXIT_PPI which is defined by FSP
> > > 2.1 spec.
> > >
> > > Test: Build successfully.
> > >
> > > Cc: Nate DeSimone 
> > > Cc: Star Zeng 
> > > Signed-off-by: Chasel Chiu 
> > > ---
> > >  IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h | 50
> > > ++
> > >  1 file changed, 50 insertions(+)
> > >
> > > diff --git a/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
> > > b/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
> > > new file mode 100644
> > > index 00..9e728a5d4d
> > > --- /dev/null
> > > +++ b/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
> > > @@ -0,0 +1,50 @@
> > > +/** @file
> > > +  This file defines the Silicon Temp Ram Exit PPI which implements
> > > +the
> > > +  required programming steps for disabling temporary memory.
> > > +
> > > +Copyright (c) 2019, Intel Corporation. All rights reserved.
> > > +SPDX-License-Identifier: BSD-2-Clause-Patent
> > > +
> > > +**/
> > > +
> > > +#ifndef _FSP_TEMP_RAM_EXIT_PPI_H_
> > > +#define _FSP_TEMP_RAM_EXIT_PPI_H_
> > > +
> > > +///
> > > +/// Global ID for the FSP_TEMP_RAM_EXIT_PPI.
> > > +///
> > > +#define FSP_TEMP_RAM_EXIT_GUID \
> > > +  { \
> > > +0xbc1cfbdb, 0x7e50, 0x42be, { 0xb4, 0x87, 0x22, 0xe0, 0xa9,
> > > +0x0c, 0xb0,
> > > 0x52 } \
> > > +  }
> > > +
> > > +//
> > > +// Forward declaration for the FSP_TEMP_RAM_EXIT_PPI.
> > > +//
> > > +typedef struct _FSP_TEMP_RAM_EXIT_PPI FSP_TEMP_RAM_EXIT_PPI;
> > > +
> > > +/**
> > > +  Silicon function for disabling temporary memory.
> > > +  @param[in] TempRamExitParamPtr - Pointer to the TempRamExit
> > > parameters structure.
> > > +   This structure is normally defined in 
> > > the
> Integration
> > > +   Guide. If it is not defined in the 
> > > Integration
> Guide,
> > > +   pass NULL.
> > > +  @retval EFI_SUCCESS- Execution was completed successfully.
> > > +  @retval Status - Error status reported by 
> > > sub-functions if
> > > implemented.
> > > +**/
> > > +typedef
> > > +EFI_STATUS
> > > +(EFIAPI *FSP_TEMP_RAM_EXIT) (
> > > +  IN  VOID*TempRamExitParamPtr
> > > +  );
> > > +
> > > +///
> > > +/// This PPI provides function to disable temporary memory.
> > > +///
> > > +struct _FSP_TEMP_RAM_EXIT_PPI {
> > > +  FSP_TEMP_RAM_EXIT   TempRamExit;
> > > +};
> > > +
> > > +extern EFI_GUID gFspTempRamExitPpiGuid;
> > > +
> > > +#endif // _FSP_TEMP_RAM_EXIT_PPI_H_
> > > --
> > > 2.13.3.windows.1
> >
> >
> > 


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

View/Reply Online (#42478): https://edk2.groups.io/g/devel/message/42478
Mute This Topic: https://groups.io/mt/32062194/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 1/1] BaseTools:Build Cache output notification message

2019-06-16 Thread Bob Feng
Reviewed-by: Bob Feng 

-Original Message-
From: Shi, Steven 
Sent: Friday, June 14, 2019 7:45 PM
To: devel@edk2.groups.io
Cc: Gao, Liming ; Feng, Bob C ; 
Rodriguez, Christian ; Fan, ZhijuX 

Subject: [PATCH v2 1/1] BaseTools:Build Cache output notification message

BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1868

Build need output the cache miss or hit notification message when consume the 
build cache. Current build does not output any message which is not clear for 
user to know whether the module built result is from cache or not.

This patch adds message about the cache miss or hit when build consumes the 
cache.

Cc: Liming Gao 
Cc: Bob Feng 
Cc: Zhiju.Fan 
Signed-off-by: Steven Shi 
---
 BaseTools/Source/Python/build/build.py | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/BaseTools/Source/Python/build/build.py 
b/BaseTools/Source/Python/build/build.py
index 0855d4561c..2dca3c7b34 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1815,7 +1815,12 @@ class Build():
 MaList.append(Ma)
 if Ma.CanSkipbyHash():
 self.HashSkipModules.append(Ma)
+if GlobalData.gBinCacheSource:
+EdkLogger.quiet("cache hit: %s[%s]" 
+ % (Ma.MetaFile.Path, Ma.Arch))
 continue
+else:
+if GlobalData.gBinCacheSource:
+EdkLogger.quiet("cache miss: 
+ %s[%s]" % (Ma.MetaFile.Path, Ma.Arch))
 # Not to auto-gen for targets 'clean', 'cleanlib', 
'cleanall', 'run', 'fds'
 if self.Target not in ['clean', 'cleanlib', 
'cleanall', 'run', 'fds']:
 # for target which must generate AutoGen code 
and makefile @@ -2004,7 +2009,12 @@ class Build():
 continue
 if Ma.CanSkipbyHash():
 self.HashSkipModules.append(Ma)
+if GlobalData.gBinCacheSource:
+EdkLogger.quiet("cache hit: %s[%s]" % 
+ (Ma.MetaFile.Path, Ma.Arch))
 continue
+else:
+if GlobalData.gBinCacheSource:
+EdkLogger.quiet("cache miss: %s[%s]" % 
+ (Ma.MetaFile.Path, Ma.Arch))
 
 # Not to auto-gen for targets 'clean', 'cleanlib', 
'cleanall', 'run', 'fds'
 if self.Target not in ['clean', 'cleanlib', 
'cleanall', 'run', 'fds']:
--
2.17.1.windows.2


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

View/Reply Online (#42477): https://edk2.groups.io/g/devel/message/42477
Mute This Topic: https://groups.io/mt/32062806/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] IntelFsp2Pkg: add TempRamExitPpi.h.

2019-06-16 Thread Ni, Ray
Chasel,
I found another instance of this PPI in 
edk2-platforms/Silicon/Intel/KabylakeSiliconPkg/Include/Ppi.
Will you remove that one after this is checked in?


Thanks,
Ray

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Chiu,
> Chasel
> Sent: Monday, June 17, 2019 10:42 AM
> To: devel@edk2.groups.io
> Cc: Desimone, Nathaniel L ; Zeng, Star
> 
> Subject: [edk2-devel] [PATCH v2] IntelFsp2Pkg: add TempRamExitPpi.h.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1883
> 
> Add header file for FSP_TEMP_RAM_EXIT_PPI which is defined by FSP 2.1
> spec.
> 
> Test: Build successfully.
> 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Signed-off-by: Chasel Chiu 
> ---
>  IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h | 52
> 
>  IntelFsp2Pkg/IntelFsp2Pkg.dec |  5 +
>  2 files changed, 57 insertions(+)
> 
> diff --git a/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
> b/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
> new file mode 100644
> index 00..0db54dfa45
> --- /dev/null
> +++ b/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
> @@ -0,0 +1,52 @@
> +/** @file
> +  This file defines the Silicon Temp Ram Exit PPI which implements the
> +  required programming steps for disabling temporary memory.
> +
> +Copyright (c) 2019, Intel Corporation. All rights reserved.
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef _FSP_TEMP_RAM_EXIT_PPI_H_
> +#define _FSP_TEMP_RAM_EXIT_PPI_H_
> +
> +///
> +/// Global ID for the FSP_TEMP_RAM_EXIT_PPI.
> +///
> +#define FSP_TEMP_RAM_EXIT_GUID \
> +  { \
> +0xbc1cfbdb, 0x7e50, 0x42be, { 0xb4, 0x87, 0x22, 0xe0, 0xa9, 0x0c,
> +0xb0, 0x52 } \
> +  }
> +
> +//
> +// Forward declaration for the FSP_TEMP_RAM_EXIT_PPI.
> +//
> +typedef struct _FSP_TEMP_RAM_EXIT_PPI FSP_TEMP_RAM_EXIT_PPI;
> +
> +/**
> +  Silicon function for disabling temporary memory.
> +  @param[in] TempRamExitParamPtr - Pointer to the TempRamExit
> parameters structure.
> +   This structure is normally defined in the 
> Integration
> +   Guide. If it is not defined in the 
> Integration Guide,
> +   pass NULL.
> +  @retval EFI_SUCCESS- FSP execution environment was initialized
> successfully.
> +  @retval EFI_INVALID_PARAMETER  - Input parameters are invalid.
> +  @retval EFI_UNSUPPORTED- The FSP calling conditions were not met.
> +  @retval EFI_DEVICE_ERROR   - Temporary memory exit.
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *FSP_TEMP_RAM_EXIT) (
> +  IN  VOID*TempRamExitParamPtr
> +  );
> +
> +///
> +/// This PPI provides function to disable temporary memory.
> +///
> +struct _FSP_TEMP_RAM_EXIT_PPI {
> +  FSP_TEMP_RAM_EXIT   TempRamExit;
> +};
> +
> +extern EFI_GUID gFspTempRamExitPpiGuid;
> +
> +#endif // _FSP_TEMP_RAM_EXIT_PPI_H_
> diff --git a/IntelFsp2Pkg/IntelFsp2Pkg.dec b/IntelFsp2Pkg/IntelFsp2Pkg.dec
> index cc17164742..ad2b7f7fb5 100644
> --- a/IntelFsp2Pkg/IntelFsp2Pkg.dec
> +++ b/IntelFsp2Pkg/IntelFsp2Pkg.dec
> @@ -49,6 +49,11 @@
>#
>gFspInApiModePpiGuid  = { 0xa1eeab87, 0xc859, 0x479d, 
> {0x89,
> 0xb5, 0x14, 0x61, 0xf4, 0x06, 0x1a, 0x3e}}
> 
> +  #
> +  # PPI to tear down the temporary memory set up by TempRamInit ().
> +  #
> +  gFspTempRamExitPpiGuid  = {0xbc1cfbdb, 0x7e50, 0x42be, {0xb4, 0x87,
> 0x22, 0xe0, 0xa9, 0x0c, 0xb0, 0x52}}
> +
>  [Guids]
>#
># GUID defined in package
> --
> 2.13.3.windows.1
> 
> 
> 


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

View/Reply Online (#42476): https://edk2.groups.io/g/devel/message/42476
Mute This Topic: https://groups.io/mt/32090494/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] IntelFsp2Pkg: add TempRamExitPpi.h.

2019-06-16 Thread Zeng, Star
Reviewed-by: Star Zeng 

-Original Message-
From: Chiu, Chasel 
Sent: Monday, June 17, 2019 10:42 AM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L ; Zeng, Star 

Subject: [PATCH v2] IntelFsp2Pkg: add TempRamExitPpi.h.

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

Add header file for FSP_TEMP_RAM_EXIT_PPI which is defined by FSP 2.1 spec.

Test: Build successfully.

Cc: Nate DeSimone 
Cc: Star Zeng 
Signed-off-by: Chasel Chiu 
---
 IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h | 52 

 IntelFsp2Pkg/IntelFsp2Pkg.dec |  5 +
 2 files changed, 57 insertions(+)

diff --git a/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h 
b/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
new file mode 100644
index 00..0db54dfa45
--- /dev/null
+++ b/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
@@ -0,0 +1,52 @@
+/** @file
+  This file defines the Silicon Temp Ram Exit PPI which implements the
+  required programming steps for disabling temporary memory.
+
+Copyright (c) 2019, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _FSP_TEMP_RAM_EXIT_PPI_H_
+#define _FSP_TEMP_RAM_EXIT_PPI_H_
+
+///
+/// Global ID for the FSP_TEMP_RAM_EXIT_PPI.
+///
+#define FSP_TEMP_RAM_EXIT_GUID \
+  { \
+0xbc1cfbdb, 0x7e50, 0x42be, { 0xb4, 0x87, 0x22, 0xe0, 0xa9, 0x0c, 
+0xb0, 0x52 } \
+  }
+
+//
+// Forward declaration for the FSP_TEMP_RAM_EXIT_PPI.
+//
+typedef struct _FSP_TEMP_RAM_EXIT_PPI FSP_TEMP_RAM_EXIT_PPI;
+
+/**
+  Silicon function for disabling temporary memory.
+  @param[in] TempRamExitParamPtr - Pointer to the TempRamExit parameters 
structure.
+   This structure is normally defined in the 
Integration
+   Guide. If it is not defined in the 
Integration Guide,
+   pass NULL.
+  @retval EFI_SUCCESS- FSP execution environment was initialized 
successfully.
+  @retval EFI_INVALID_PARAMETER  - Input parameters are invalid.
+  @retval EFI_UNSUPPORTED- The FSP calling conditions were not met.
+  @retval EFI_DEVICE_ERROR   - Temporary memory exit.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *FSP_TEMP_RAM_EXIT) (
+  IN  VOID*TempRamExitParamPtr
+  );
+
+///
+/// This PPI provides function to disable temporary memory.
+///
+struct _FSP_TEMP_RAM_EXIT_PPI {
+  FSP_TEMP_RAM_EXIT   TempRamExit;
+};
+
+extern EFI_GUID gFspTempRamExitPpiGuid;
+
+#endif // _FSP_TEMP_RAM_EXIT_PPI_H_
diff --git a/IntelFsp2Pkg/IntelFsp2Pkg.dec b/IntelFsp2Pkg/IntelFsp2Pkg.dec 
index cc17164742..ad2b7f7fb5 100644
--- a/IntelFsp2Pkg/IntelFsp2Pkg.dec
+++ b/IntelFsp2Pkg/IntelFsp2Pkg.dec
@@ -49,6 +49,11 @@
   #
   gFspInApiModePpiGuid  = { 0xa1eeab87, 0xc859, 0x479d, {0x89, 
0xb5, 0x14, 0x61, 0xf4, 0x06, 0x1a, 0x3e}}
 
+  #
+  # PPI to tear down the temporary memory set up by TempRamInit ().
+  #
+  gFspTempRamExitPpiGuid  = {0xbc1cfbdb, 0x7e50, 0x42be, {0xb4, 0x87, 
0x22, 0xe0, 0xa9, 0x0c, 0xb0, 0x52}}
+
 [Guids]
   #
   # GUID defined in package
--
2.13.3.windows.1


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

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



[edk2-devel] [PATCH v2] IntelFsp2Pkg: add TempRamExitPpi.h.

2019-06-16 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1883

Add header file for FSP_TEMP_RAM_EXIT_PPI which is
defined by FSP 2.1 spec.

Test: Build successfully.

Cc: Nate DeSimone 
Cc: Star Zeng 
Signed-off-by: Chasel Chiu 
---
 IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h | 52 

 IntelFsp2Pkg/IntelFsp2Pkg.dec |  5 +
 2 files changed, 57 insertions(+)

diff --git a/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h 
b/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
new file mode 100644
index 00..0db54dfa45
--- /dev/null
+++ b/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
@@ -0,0 +1,52 @@
+/** @file
+  This file defines the Silicon Temp Ram Exit PPI which implements the
+  required programming steps for disabling temporary memory.
+
+Copyright (c) 2019, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _FSP_TEMP_RAM_EXIT_PPI_H_
+#define _FSP_TEMP_RAM_EXIT_PPI_H_
+
+///
+/// Global ID for the FSP_TEMP_RAM_EXIT_PPI.
+///
+#define FSP_TEMP_RAM_EXIT_GUID \
+  { \
+0xbc1cfbdb, 0x7e50, 0x42be, { 0xb4, 0x87, 0x22, 0xe0, 0xa9, 0x0c, 0xb0, 
0x52 } \
+  }
+
+//
+// Forward declaration for the FSP_TEMP_RAM_EXIT_PPI.
+//
+typedef struct _FSP_TEMP_RAM_EXIT_PPI FSP_TEMP_RAM_EXIT_PPI;
+
+/**
+  Silicon function for disabling temporary memory.
+  @param[in] TempRamExitParamPtr - Pointer to the TempRamExit parameters 
structure.
+   This structure is normally defined in the 
Integration
+   Guide. If it is not defined in the 
Integration Guide,
+   pass NULL.
+  @retval EFI_SUCCESS- FSP execution environment was initialized 
successfully.
+  @retval EFI_INVALID_PARAMETER  - Input parameters are invalid.
+  @retval EFI_UNSUPPORTED- The FSP calling conditions were not met.
+  @retval EFI_DEVICE_ERROR   - Temporary memory exit.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *FSP_TEMP_RAM_EXIT) (
+  IN  VOID*TempRamExitParamPtr
+  );
+
+///
+/// This PPI provides function to disable temporary memory.
+///
+struct _FSP_TEMP_RAM_EXIT_PPI {
+  FSP_TEMP_RAM_EXIT   TempRamExit;
+};
+
+extern EFI_GUID gFspTempRamExitPpiGuid;
+
+#endif // _FSP_TEMP_RAM_EXIT_PPI_H_
diff --git a/IntelFsp2Pkg/IntelFsp2Pkg.dec b/IntelFsp2Pkg/IntelFsp2Pkg.dec
index cc17164742..ad2b7f7fb5 100644
--- a/IntelFsp2Pkg/IntelFsp2Pkg.dec
+++ b/IntelFsp2Pkg/IntelFsp2Pkg.dec
@@ -49,6 +49,11 @@
   #
   gFspInApiModePpiGuid  = { 0xa1eeab87, 0xc859, 0x479d, {0x89, 
0xb5, 0x14, 0x61, 0xf4, 0x06, 0x1a, 0x3e}}
 
+  #
+  # PPI to tear down the temporary memory set up by TempRamInit ().
+  #
+  gFspTempRamExitPpiGuid  = {0xbc1cfbdb, 0x7e50, 0x42be, {0xb4, 0x87, 
0x22, 0xe0, 0xa9, 0x0c, 0xb0, 0x52}}
+
 [Guids]
   #
   # GUID defined in package
-- 
2.13.3.windows.1


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

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



[edk2-devel] [PATCH] MdeModulePkg/NvmExpressPei: Produce NVM Express PassThru PPI

2019-06-16 Thread Maggie Chu
https://bugzilla.tianocore.org/show_bug.cgi?id=1879
This commit will add codes to produce the NVM Express PassThru PPI.

Signed-off-by: Maggie Chu 
Cc: Hao A Wu 
Cc: Jian J Wang 
Cc: Ray Ni 
Cc: Star Zeng 
---
 MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c |  26 +++
 MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.h |   8 +
 .../Bus/Pci/NvmExpressPei/NvmExpressPei.inf|   1 +
 .../Bus/Pci/NvmExpressPei/NvmExpressPeiBlockIo.c   |  27 +--
 .../Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c   |  74 ---
 .../Bus/Pci/NvmExpressPei/NvmExpressPeiPassThru.c  | 218 -
 .../Bus/Pci/NvmExpressPei/NvmExpressPeiPassThru.h  | 159 ++-
 .../NvmExpressPei/NvmExpressPeiStorageSecurity.c   |  24 +--
 8 files changed, 420 insertions(+), 117 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c 
b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c
index 0e79b29f82..987eed420e 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c
@@ -28,6 +28,12 @@ EFI_PEI_PPI_DESCRIPTOR  mNvmeStorageSecurityPpiListTemplate 
= {
   NULL
 };
 
+EFI_PEI_PPI_DESCRIPTOR  mNvmePassThruPpiListTemplate = {
+  (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
+  ,
+  NULL
+};
+
 EFI_PEI_NOTIFY_DESCRIPTOR  mNvmeEndOfPeiNotifyListTemplate = {
   (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | 
EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
   ,
@@ -392,6 +398,26 @@ NvmExpressPeimEntry (
 Private->BlkIo2PpiList.Ppi = >BlkIo2Ppi;
 PeiServicesInstallPpi (>BlkIoPpiList);
 
+//
+// Nvm Express Pass Thru PPI
+//
+Private->PassThruMode.Attributes= 
EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_PHYSICAL |
+  
EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_LOGICAL |
+  
EFI_NVM_EXPRESS_PASS_THRU_ATTRIBUTES_CMD_SET_NVM;
+Private->PassThruMode.IoAlign   = sizeof (UINTN);
+Private->PassThruMode.NvmeVersion   = 
EDKII_PEI_NVM_EXPRESS_PASS_THRU_PPI_REVISION;
+Private->NvmePassThruPpi.Mode   = >PassThruMode;
+Private->NvmePassThruPpi.GetDevicePath  = NvmePassThruGetDevicePath;
+Private->NvmePassThruPpi.GetNextNameSpace   = NvmePassThruGetNextNameSpace;
+Private->NvmePassThruPpi.PassThru   = NvmePassThru;
+CopyMem (
+  >NvmePassThruPpiList,
+  ,
+  sizeof (EFI_PEI_PPI_DESCRIPTOR)
+  );
+Private->NvmePassThruPpiList.Ppi= >NvmePassThruPpi;
+PeiServicesInstallPpi (>NvmePassThruPpiList);
+
 //
 // Check if the NVME controller supports the Security Receive/Send commands
 //
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.h 
b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.h
index 6b2e2f0326..8cd905191b 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.h
+++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.h
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -74,6 +75,8 @@ struct _PEI_NVME_NAMESPACE_INFO {
   PEI_NVME_CONTROLLER_PRIVATE_DATA  *Controller;
 };
 
+#define NVME_CONTROLLER_NSID0
+
 //
 // Unique signature for private data structure.
 //
@@ -85,15 +88,18 @@ struct _PEI_NVME_NAMESPACE_INFO {
 struct _PEI_NVME_CONTROLLER_PRIVATE_DATA {
   UINT32Signature;
   UINTN MmioBase;
+  EFI_NVM_EXPRESS_PASS_THRU_MODEPassThruMode;
   UINTN DevicePathLength;
   EFI_DEVICE_PATH_PROTOCOL  *DevicePath;
 
   EFI_PEI_RECOVERY_BLOCK_IO_PPI BlkIoPpi;
   EFI_PEI_RECOVERY_BLOCK_IO2_PPIBlkIo2Ppi;
   EDKII_PEI_STORAGE_SECURITY_CMD_PPIStorageSecurityPpi;
+  EDKII_PEI_NVM_EXPRESS_PASS_THRU_PPI   NvmePassThruPpi;
   EFI_PEI_PPI_DESCRIPTORBlkIoPpiList;
   EFI_PEI_PPI_DESCRIPTORBlkIo2PpiList;
   EFI_PEI_PPI_DESCRIPTORStorageSecurityPpiList;
+  EFI_PEI_PPI_DESCRIPTORNvmePassThruPpiList;
   EFI_PEI_NOTIFY_DESCRIPTOR EndOfPeiNotifyList;
 
   //
@@ -145,6 +151,8 @@ struct _PEI_NVME_CONTROLLER_PRIVATE_DATA {
   CR (a, PEI_NVME_CONTROLLER_PRIVATE_DATA, BlkIo2Ppi, 
NVME_PEI_CONTROLLER_PRIVATE_DATA_SIGNATURE)
 #define GET_NVME_PEIM_HC_PRIVATE_DATA_FROM_THIS_STROAGE_SECURITY(a)\
   CR (a, PEI_NVME_CONTROLLER_PRIVATE_DATA, StorageSecurityPpi, 
NVME_PEI_CONTROLLER_PRIVATE_DATA_SIGNATURE)
+#define GET_NVME_PEIM_HC_PRIVATE_DATA_FROM_THIS_NVME_PASSTHRU(a)   \
+  CR (a, PEI_NVME_CONTROLLER_PRIVATE_DATA, NvmePassThruPpi, 
NVME_PEI_CONTROLLER_PRIVATE_DATA_SIGNATURE)
 #define GET_NVME_PEIM_HC_PRIVATE_DATA_FROM_THIS_NOTIFY(a)  \
   CR (a, PEI_NVME_CONTROLLER_PRIVATE_DATA, EndOfPeiNotifyList, 
NVME_PEI_CONTROLLER_PRIVATE_DATA_SIGNATURE)
 
diff --git 

[edk2-devel] [PATCH] MdeModulePkg: Add definitions for NVM Express Passthru PPI

2019-06-16 Thread Maggie Chu
https://bugzilla.tianocore.org/show_bug.cgi?id=1879
This commit will add the definitions of Nvm Express PassThru PPI.
This PPI will provide services that allow NVM commands to be sent
to NVM Express devices during PEI phase.

More specifically, the PPI will provide services to:

* Sends an NVM Express Command Packet to an NVM Express controller
  or namespace (by service 'PassThru');
* Get the list of the attached namespaces on a controller
  (by services 'GetNextNameSpace');
* Get the identification information (DevicePath) of the underlying
  NVM Express host controller (by service 'GetDevicePath').

Signed-off-by: Maggie Chu 
Cc: Hao A Wu 
Cc: Jian J Wang 
Cc: Ray Ni 
Cc: Star Zeng 
---
 MdeModulePkg/Include/Ppi/NvmExpressPassThru.h | 156 ++
 MdeModulePkg/MdeModulePkg.dec |   3 +
 2 files changed, 159 insertions(+)
 create mode 100644 MdeModulePkg/Include/Ppi/NvmExpressPassThru.h

diff --git a/MdeModulePkg/Include/Ppi/NvmExpressPassThru.h 
b/MdeModulePkg/Include/Ppi/NvmExpressPassThru.h
new file mode 100644
index 00..cb5b3b3b18
--- /dev/null
+++ b/MdeModulePkg/Include/Ppi/NvmExpressPassThru.h
@@ -0,0 +1,156 @@
+/** @file
+
+  Copyright (c) 2019, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _EDKII_NVME_PASS_THRU_PPI_H_
+#define _EDKII_NVME_PASS_THRU_PPI_H_
+
+#include 
+#include 
+
+///
+/// Global ID for the EDKII_PEI_NVM_EXPRESS_PASS_THRU_PPI.
+///
+#define EDKII_PEI_NVM_EXPRESS_PASS_THRU_PPI_GUID \
+  { \
+0x6af31b2c, 0x3be, 0x46c1, { 0xb1, 0x2d, 0xea, 0x4a, 0x36, 0xdf, 0xa7, 
0x4c } \
+  }
+
+//
+// Forward declaration for the EDKII_PEI_NVM_EXPRESS_PASS_THRU_PPI.
+//
+typedef struct _EDKII_PEI_NVM_EXPRESS_PASS_THRU_PPI  
EDKII_PEI_NVM_EXPRESS_PASS_THRU_PPI;
+
+//
+// Revision The revision to which the Nvme Pass Thru PPI interface adheres.
+//  All future revisions must be backwards compatible.
+//  If a future version is not back wards compatible it is not the 
same GUID.
+//
+#define EDKII_PEI_NVM_EXPRESS_PASS_THRU_PPI_REVISION  0x0001
+
+/**
+  Gets the device path information of the underlying NVM Express host 
controller.
+
+  @param[in]  This The PPI instance pointer.
+  @param[out] DevicePathLength The length of the device path in bytes 
specified
+   by DevicePath.
+  @param[out] DevicePath   The device path of the underlying NVM 
Express
+   host controller.
+   This field re-uses EFI Device Path Protocol 
as
+   defined by Section 10.2 EFI Device Path 
Protocol
+   of UEFI 2.7 Specification.
+
+  @retval EFI_SUCCESS  The operation succeeds.
+  @retval EFI_INVALID_PARAMETERDevicePathLength or DevicePath is NULL.
+  @retval EFI_OUT_OF_RESOURCES The operation fails due to lack of 
resources.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EDKII_PEI_NVME_PASS_THRU_GET_DEVICE_PATH) (
+  IN  EDKII_PEI_NVM_EXPRESS_PASS_THRU_PPI   *This,
+  OUT UINTN *DevicePathLength,
+  OUT EFI_DEVICE_PATH_PROTOCOL  **DevicePath
+  );
+
+/**
+  Used to retrieve the next namespace ID for this NVM Express controller.
+
+  If on input the value pointed to by NamespaceId is 0x, then the first
+  valid namespace ID defined on the NVM Express controller is returned in the
+  location pointed to by NamespaceId and a status of EFI_SUCCESS is returned.
+
+  If on input the value pointed to by NamespaceId is an invalid namespace ID
+  other than 0x, then EFI_INVALID_PARAMETER is returned.
+
+  If on input the value pointed to by NamespaceId is a valid namespace ID, then
+  the next valid namespace ID on the NVM Express controller is returned in the
+  location pointed to by NamespaceId, and EFI_SUCCESS is returned.
+
+  If the value pointed to by NamespaceId is the namespace ID of the last
+  namespace on the NVM Express controller, then EFI_NOT_FOUND is returned.
+
+  @param[in] This  The PPI instance pointer.
+  @param[in,out] NamespaceId   On input, a pointer to a legal NamespaceId
+   for an NVM Express namespace present on the
+   NVM Express controller. On output, a pointer
+   to the next NamespaceId of an NVM Express
+   namespace on an NVM Express controller. An
+   input value of 0x retrieves the
+   first NamespaceId for an NVM Express
+   namespace present on an NVM Express
+   controller.
+
+  @retval EFI_SUCCESSThe Namespace ID of the next Namespace was
+ returned.
+  @retval EFI_NOT_FOUND  There 

Re: [edk2-devel] [PATCH] IntelFsp2Pkg: add TempRamExitPpi.h.

2019-06-16 Thread Zeng, Star
And the 'Ppi' postfix seems not needed in the file name.

Thanks,
Star

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Zeng, Star
> Sent: Sunday, June 16, 2019 9:11 PM
> To: Chiu, Chasel ; devel@edk2.groups.io
> Cc: Desimone, Nathaniel L ; Zeng, Star
> 
> Subject: Re: [edk2-devel] [PATCH] IntelFsp2Pkg: add TempRamExitPpi.h.
> 
> Hi Chasel,
> 
> Two minor feedbacks.
> 
> 1. The spec defines the return status below, should we follow it?
> 
> EFI_SUCCESS FSP execution environment was initialized successfully.
> EFI_INVALID_PARAMETER Input parameters are invalid.
> EFI_UNSUPPORTED The FSP calling conditions were not met.
> EFI_DEVICE_ERROR Temporary memory exit.
> 
> 
> 2. The gFspTempRamExitPpiGuid should be added into IntelFsp2Pkg.dec,
> right?
> 
> 
> Thanks,
> Star
> 
> > -Original Message-
> > From: Chiu, Chasel
> > Sent: Friday, June 14, 2019 5:56 PM
> > To: devel@edk2.groups.io
> > Cc: Desimone, Nathaniel L ; Zeng, Star
> > 
> > Subject: [PATCH] IntelFsp2Pkg: add TempRamExitPpi.h.
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1883
> >
> > Add header file for FSP_TEMP_RAM_EXIT_PPI which is defined by FSP 2.1
> > spec.
> >
> > Test: Build successfully.
> >
> > Cc: Nate DeSimone 
> > Cc: Star Zeng 
> > Signed-off-by: Chasel Chiu 
> > ---
> >  IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h | 50
> > ++
> >  1 file changed, 50 insertions(+)
> >
> > diff --git a/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
> > b/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
> > new file mode 100644
> > index 00..9e728a5d4d
> > --- /dev/null
> > +++ b/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
> > @@ -0,0 +1,50 @@
> > +/** @file
> > +  This file defines the Silicon Temp Ram Exit PPI which implements
> > +the
> > +  required programming steps for disabling temporary memory.
> > +
> > +Copyright (c) 2019, Intel Corporation. All rights reserved.
> > +SPDX-License-Identifier: BSD-2-Clause-Patent
> > +
> > +**/
> > +
> > +#ifndef _FSP_TEMP_RAM_EXIT_PPI_H_
> > +#define _FSP_TEMP_RAM_EXIT_PPI_H_
> > +
> > +///
> > +/// Global ID for the FSP_TEMP_RAM_EXIT_PPI.
> > +///
> > +#define FSP_TEMP_RAM_EXIT_GUID \
> > +  { \
> > +0xbc1cfbdb, 0x7e50, 0x42be, { 0xb4, 0x87, 0x22, 0xe0, 0xa9, 0x0c,
> > +0xb0,
> > 0x52 } \
> > +  }
> > +
> > +//
> > +// Forward declaration for the FSP_TEMP_RAM_EXIT_PPI.
> > +//
> > +typedef struct _FSP_TEMP_RAM_EXIT_PPI FSP_TEMP_RAM_EXIT_PPI;
> > +
> > +/**
> > +  Silicon function for disabling temporary memory.
> > +  @param[in] TempRamExitParamPtr - Pointer to the TempRamExit
> > parameters structure.
> > +   This structure is normally defined in 
> > the Integration
> > +   Guide. If it is not defined in the 
> > Integration Guide,
> > +   pass NULL.
> > +  @retval EFI_SUCCESS- Execution was completed successfully.
> > +  @retval Status - Error status reported by sub-functions 
> > if
> > implemented.
> > +**/
> > +typedef
> > +EFI_STATUS
> > +(EFIAPI *FSP_TEMP_RAM_EXIT) (
> > +  IN  VOID*TempRamExitParamPtr
> > +  );
> > +
> > +///
> > +/// This PPI provides function to disable temporary memory.
> > +///
> > +struct _FSP_TEMP_RAM_EXIT_PPI {
> > +  FSP_TEMP_RAM_EXIT   TempRamExit;
> > +};
> > +
> > +extern EFI_GUID gFspTempRamExitPpiGuid;
> > +
> > +#endif // _FSP_TEMP_RAM_EXIT_PPI_H_
> > --
> > 2.13.3.windows.1
> 
> 
> 


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

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



Re: [edk2-devel] [PATCH v3 4/4] OvmfPkg: Refer to Shell app via its declared GUID

2019-06-16 Thread Wu, Hao A
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Laszlo Ersek
> Sent: Saturday, June 15, 2019 4:33 AM
> To: devel@edk2.groups.io; Wu, Hao A
> Cc: Ni, Ray; Justen, Jordan L; Ard Biesheuvel
> Subject: Re: [edk2-devel] [PATCH v3 4/4] OvmfPkg: Refer to Shell app via its
> declared GUID
> 
> On 06/14/19 07:18, Wu, Hao A wrote:
> > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1843
> >
> > Currently, the file GUID reference of the UEFI Shell app is indirected
> > via the PCD gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile,
> > which is set to a fixed value for OvmfPkg.
> >
> > So instead, use the symbolic GUID in ShellPkg for this purpose, and drop
> > the reference to this PCD, and to the IntelFrameworkModulePkg package
> > entirely.
> >
> > Cc: Ray Ni 
> > Cc: Jordan Justen 
> > Cc: Laszlo Ersek 
> > Cc: Ard Biesheuvel 
> > Signed-off-by: Hao A Wu 
> > ---
> >  OvmfPkg/OvmfPkgIa32.dsc   | 2 --
> >  OvmfPkg/OvmfPkgIa32X64.dsc| 2 --
> >  OvmfPkg/OvmfPkgX64.dsc| 2 --
> >  OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf |
> 6 +++---
> >  OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c  | 4 ++--
> >  5 files changed, 5 insertions(+), 11 deletions(-)
> >
> > diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> > index 6830e361bf..473eaba246 100644
> > --- a/OvmfPkg/OvmfPkgIa32.dsc
> > +++ b/OvmfPkg/OvmfPkgIa32.dsc
> > @@ -503,8 +503,6 @@ [PcdsFixedAtBuild]
> >#
> >  !include NetworkPkg/NetworkPcds.dsc.inc
> >
> > -  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83,
> 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0,
> 0xB4, 0xD1 }
> > -
> >  !if $(SMM_REQUIRE) == TRUE
> >gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x4000
> >  !endif
> > diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc
> b/OvmfPkg/OvmfPkgIa32X64.dsc
> > index 372161365c..73f33b7218 100644
> > --- a/OvmfPkg/OvmfPkgIa32X64.dsc
> > +++ b/OvmfPkg/OvmfPkgIa32X64.dsc
> > @@ -509,8 +509,6 @@ [PcdsFixedAtBuild.X64]
> >#
> >  !include NetworkPkg/NetworkPcds.dsc.inc
> >
> > -  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83,
> 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0,
> 0xB4, 0xD1 }
> > -
> >  !if $(SMM_REQUIRE) == TRUE
> >gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x4000
> >  !endif
> > diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> > index e0c60bc5dc..39ac791565 100644
> > --- a/OvmfPkg/OvmfPkgX64.dsc
> > +++ b/OvmfPkg/OvmfPkgX64.dsc
> > @@ -508,8 +508,6 @@ [PcdsFixedAtBuild]
> >#
> >  !include NetworkPkg/NetworkPcds.dsc.inc
> >
> > -  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83,
> 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0,
> 0xB4, 0xD1 }
> > -
> >  !if $(SMM_REQUIRE) == TRUE
> >gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmStackSize|0x4000
> >  !endif
> > diff --git
> a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
> b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
> > index d25e0a417f..060a3ab4c5 100644
> > ---
> a/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
> > +++
> b/OvmfPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
> > @@ -1,7 +1,7 @@
> >  ## @file
> >  #  Platform BDS customizations library.
> >  #
> > -#  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
> > +#  Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
> >  #  SPDX-License-Identifier: BSD-2-Clause-Patent
> >  #
> >  ##
> > @@ -29,10 +29,10 @@ [Sources]
> >  [Packages]
> >MdePkg/MdePkg.dec
> >MdeModulePkg/MdeModulePkg.dec
> > -  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
> >SourceLevelDebugPkg/SourceLevelDebugPkg.dec
> >OvmfPkg/OvmfPkg.dec
> >SecurityPkg/SecurityPkg.dec
> > +  ShellPkg/ShellPkg.dec
> >
> >  [LibraryClasses]
> >BaseLib
> > @@ -60,7 +60,6 @@ [Pcd]
> >gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable
> >gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
> >gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut
> > -  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile
> >
> >  [Pcd.IA32, Pcd.X64]
> >gEfiMdePkgTokenSpaceGuid.PcdFSBClock
> > @@ -77,3 +76,4 @@ [Guids]
> >gEfiXenInfoGuid
> >gEfiEndOfDxeEventGroupGuid
> >gRootBridgesConnectedEventGroupGuid
> > +  gUefiShellFileGuid
> > diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
> b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
> > index 5b15d3bb12..797731a41c 100644
> > --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
> > +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
> > @@ -1,7 +1,7 @@
> >  /** @file
> >Platform BDS customizations.
> >
> > -  Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.

Re: [edk2-devel] [PATCH] SourceLevelDebugPkg: Add lacking instances for build only

2019-06-16 Thread Wu, Hao A
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Wu, Hao A
> Sent: Thursday, June 13, 2019 4:04 PM
> To: Gao, Zhichao; devel@edk2.groups.io
> Cc: Bret Barkelew; Gao, Liming; Sean Brogan; Michael Turner; Leif Lindholm
> Subject: Re: [edk2-devel] [PATCH] SourceLevelDebugPkg: Add lacking
> instances for build only
> 
> > -Original Message-
> > From: Gao, Zhichao
> > Sent: Wednesday, June 12, 2019 10:40 AM
> > To: devel@edk2.groups.io
> > Cc: Bret Barkelew; Wu, Hao A; Gao, Liming; Sean Brogan; Michael Turner;
> Leif
> > Lindholm; Gao, Zhichao
> > Subject: [PATCH] SourceLevelDebugPkg: Add lacking instances for build
> only
> 
> 
> With a similar suggestion at:
> https://edk2.groups.io/g/devel/topic/32037312#42319
> 
> handled:
> Reviewed-by: Hao A Wu 

Pushed via commit 34857c2ff9.

Best Regards,
Hao Wu

> 
> Best Regards,
> Hao Wu
> 
> 
> >
> > From: Bret Barkelew 
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1902
> >
> > Add the lacking instance to the [Components] of dsc file
> > for build only.
> >
> > Cc: Hao A Wu 
> > Cc: Liming Gao 
> > Cc: Sean Brogan 
> > Cc: Michael Turner 
> > Cc: Bret Barkelew 
> > Cc: Leif Lindholm 
> > Signed-off-by: Zhichao gao 
> > ---
> >  SourceLevelDebugPkg/SourceLevelDebugPkg.dsc | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
> > b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
> > index 8be6781296..a1a1b81d03 100644
> > --- a/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
> > +++ b/SourceLevelDebugPkg/SourceLevelDebugPkg.dsc
> > @@ -93,6 +93,8 @@
> >
> >
> ##
> > #
> >
> >  [Components.common]
> > +
> >
> SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommu
> > nicationLibUsb3Dxe.inf
> > +
> >
> SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommu
> > nicationLibUsb3Pei.inf
> >
> >
> SourceLevelDebugPkg/Library/DebugCommunicationLibSerialPort/DebugCo
> > mmunicationLibSerialPort.inf
> >
> >
> SourceLevelDebugPkg/Library/DebugCommunicationLibUsb/DebugCommun
> > icationLibUsb.inf
> >
> >
> SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActio
> > nLibDebug.inf
> > --
> > 2.21.0.windows.1
> 
> 
> 


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

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



Re: [edk2-devel] [edk2-discuss] WriteSections64()

2019-06-16 Thread Russell Peterson
Hi, Ard.

-bash-4.2$ readelf -S 
/x/edk2/Build/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
There are 25 section headers, starting at offset 0x2a940:

Section Headers:
  [Nr] Name  Type Address   Offset
   Size  EntSize  Flags  Link  Info  Align
  [ 0]   NULL   
        0 0 0
  [ 1] .text PROGBITS 0240  0240
   0320  0008  AX   0 0 32
  [ 2] .rela.textRELA   000175f8
   02d0  0018   I  22 1 8
  [ 3] .data PROGBITS 0560  0560
   0258    WA   0 0 32
  [ 4] .rela.dataRELA   000178c8
   0060  0018   I  22 3 8
  [ 5] .eh_frame PROGBITS 07c0  07c0
   0108     A   0 0 8
  [ 6] .rela.eh_frameRELA   00017928
   0120  0018   I  22 5 8
  [ 7] .eh_frame_hdr PROGBITS 08c8  08c8
   004c     A   0 0 4
  [ 8] .rela RELA 0918  0918
   0060  0018   0 0 8
  [ 9] .build-id PROGBITS 0978  0978
   0024     0 0 4
  [10] .debug_info   PROGBITS   099c
   bc4c     0 0 1
  [11] .rela.debug_info  RELA   00017a48
   00011220  0018   I  2210 8
  [12] .debug_abbrev PROGBITS   c5e8
   17d3     0 0 1
  [13] .debug_line   PROGBITS   ddbb
   31ed     0 0 1
  [14] .rela.debug_line  RELA   00028c68
   0120  0018   I  2213 8
  [15] .debug_strPROGBITS   00010fa8
   2cd3  0001  MS   0 0 1
  [16] .debug_locPROGBITS   00013c7b
   0ba1     0 0 1
  [17] .rela.debug_loc   RELA   00028d88
   13e0  0018   I  2216 8
  [18] .debug_arangesPROGBITS   0001481c
   00e0     0 0 1
  [19] .rela.debug_arang RELA   0002a168
   0138  0018   I  2218 8
  [20] .debug_ranges PROGBITS   000148fc
   0270     0 0 1
  [21] .rela.debug_range RELA   0002a2a0
   05d0  0018   I  2220 8
  [22] .symtab   SYMTAB     00014b70
   27a8  0018  23   402 8
  [23] .strtab   STRTAB     00017318
   02da     0 0 1
  [24] .shstrtab STRTAB     0002a870
   00d0     0 0 1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
  L (link order), O (extra OS processing required), G (group), T (TLS),
  C (compressed), x (unknown), o (OS specific), E (exclude),
  p (processor specific)

-Original Message-
From: Ard Biesheuvel  
Sent: Saturday, June 15, 2019 4:29 AM
To: Russell Peterson 
Cc: disc...@edk2.groups.io; edk2-devel-groups-io ; Laszlo 
Ersek 
Subject: Re: [edk2-devel] [edk2-discuss] WriteSections64()

On Sat, 15 Jun 2019 at 02:17, Russell Peterson  wrote:
>
> Here is a sample of the gcc command line:
>
> "/x/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc"
> -I/x/edk2/edk2/MlxPlatformPkg/Include -march=armv8-a+crc -g 
> -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror 
> -Wno-array-bounds -ffunction-sections -fdata-sections -incl\ ude 
> AutoGen.h -fno-common -DSTRING_ARRAY_NAME=BaseCryptLibStrings -g -Os 
> -fshort-wchar -fno-builtin -fno-stri\ ct-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-pic -fno-pie -ffixed-x18 -flto -Wno-unused-but-set-variable 

Re: [edk2-devel] [PATCH] IntelFsp2Pkg: add TempRamExitPpi.h.

2019-06-16 Thread Zeng, Star
Hi Chasel,

Two minor feedbacks.

1. The spec defines the return status below, should we follow it?

EFI_SUCCESS FSP execution environment was initialized successfully.
EFI_INVALID_PARAMETER Input parameters are invalid.
EFI_UNSUPPORTED The FSP calling conditions were not met.
EFI_DEVICE_ERROR Temporary memory exit.


2. The gFspTempRamExitPpiGuid should be added into IntelFsp2Pkg.dec, right?


Thanks,
Star

> -Original Message-
> From: Chiu, Chasel
> Sent: Friday, June 14, 2019 5:56 PM
> To: devel@edk2.groups.io
> Cc: Desimone, Nathaniel L ; Zeng, Star
> 
> Subject: [PATCH] IntelFsp2Pkg: add TempRamExitPpi.h.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1883
> 
> Add header file for FSP_TEMP_RAM_EXIT_PPI which is
> defined by FSP 2.1 spec.
> 
> Test: Build successfully.
> 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Signed-off-by: Chasel Chiu 
> ---
>  IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h | 50
> ++
>  1 file changed, 50 insertions(+)
> 
> diff --git a/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
> b/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
> new file mode 100644
> index 00..9e728a5d4d
> --- /dev/null
> +++ b/IntelFsp2Pkg/Include/Ppi/TempRamExitPpi.h
> @@ -0,0 +1,50 @@
> +/** @file
> +  This file defines the Silicon Temp Ram Exit PPI which implements the
> +  required programming steps for disabling temporary memory.
> +
> +Copyright (c) 2019, Intel Corporation. All rights reserved.
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef _FSP_TEMP_RAM_EXIT_PPI_H_
> +#define _FSP_TEMP_RAM_EXIT_PPI_H_
> +
> +///
> +/// Global ID for the FSP_TEMP_RAM_EXIT_PPI.
> +///
> +#define FSP_TEMP_RAM_EXIT_GUID \
> +  { \
> +0xbc1cfbdb, 0x7e50, 0x42be, { 0xb4, 0x87, 0x22, 0xe0, 0xa9, 0x0c, 0xb0,
> 0x52 } \
> +  }
> +
> +//
> +// Forward declaration for the FSP_TEMP_RAM_EXIT_PPI.
> +//
> +typedef struct _FSP_TEMP_RAM_EXIT_PPI FSP_TEMP_RAM_EXIT_PPI;
> +
> +/**
> +  Silicon function for disabling temporary memory.
> +  @param[in] TempRamExitParamPtr - Pointer to the TempRamExit
> parameters structure.
> +   This structure is normally defined in the 
> Integration
> +   Guide. If it is not defined in the 
> Integration Guide,
> +   pass NULL.
> +  @retval EFI_SUCCESS- Execution was completed successfully.
> +  @retval Status - Error status reported by sub-functions if
> implemented.
> +**/
> +typedef
> +EFI_STATUS
> +(EFIAPI *FSP_TEMP_RAM_EXIT) (
> +  IN  VOID*TempRamExitParamPtr
> +  );
> +
> +///
> +/// This PPI provides function to disable temporary memory.
> +///
> +struct _FSP_TEMP_RAM_EXIT_PPI {
> +  FSP_TEMP_RAM_EXIT   TempRamExit;
> +};
> +
> +extern EFI_GUID gFspTempRamExitPpiGuid;
> +
> +#endif // _FSP_TEMP_RAM_EXIT_PPI_H_
> --
> 2.13.3.windows.1


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

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