Re: [edk2] [PATCH 1/1] MdeModulePkg/Gcd: Fix bug of attribute conversion

2018-04-01 Thread Zeng, Star
Pushed at 5b91bf82c67b586b9588cbe4bbffa1588f6b5926.

Thanks,
Star
-Original Message-
From: Heyi Guo [mailto:heyi@linaro.org] 
Sent: Thursday, March 29, 2018 4:20 PM
To: edk2-devel@lists.01.org
Cc: Heyi Guo ; Yi Li ; Renhao 
Liang ; Zeng, Star ; Dong, Eric 
; Kinney, Michael D ; Gao, 
Liming ; Wang, Jian J ; Ni, Ruiyu 

Subject: [PATCH 1/1] MdeModulePkg/Gcd: Fix bug of attribute conversion

For gDS->SetMemorySpaceAttributes(), when user passes a combined memory 
attribute including CPU arch attribute and other attributes, like 
EFI_MEMORY_RUNTIME, ConverToCpuArchAttributes() will return 
INVALID_CPU_ARCH_ATTRIBUTES and skip setting page/cache attribute for the 
specified memory space.

We don't see any reason to forbid combining CPU arch attributes and 
non-CPU-arch attributes when calling gDS->SetMemorySpaceAttributes(), so we 
remove the check code in ConverToCpuArchAttributes(); the remaining code is 
enough to grab the interested bits for
Cpu->SetMemoryAttributes().

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Heyi Guo 
Signed-off-by: Yi Li 
Signed-off-by: Renhao Liang 
Cc: Star Zeng 
Cc: Eric Dong 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Jian J Wang 
Cc: Ruiyu Ni 
---
 MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c 
index 77f4adb4bc01..907245a3f512 100644
--- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
+++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
@@ -673,11 +673,6 @@ ConverToCpuArchAttributes (  {
   UINT64  CpuArchAttributes;
 
-  if ((Attributes & ~(EXCLUSIVE_MEMORY_ATTRIBUTES |
-  NONEXCLUSIVE_MEMORY_ATTRIBUTES)) != 0) {
-return INVALID_CPU_ARCH_ATTRIBUTES;
-  }
-
   CpuArchAttributes = Attributes & NONEXCLUSIVE_MEMORY_ATTRIBUTES;
 
   if ( (Attributes & EFI_MEMORY_UC) == EFI_MEMORY_UC) {
--
2.7.4

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


[edk2] [Patch] Build spec: Add some clarification and clean up for build report

2018-04-01 Thread Yonghong Zhu
Add some clarification and clean up for build report section.

Cc: Liming Gao 
Cc: Michael Kinney 
Cc: Kevin W Shaw 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu 
---
 13_build_reports/134_platform_summary.md   | 44 +++---
 13_build_reports/136_global_pcd_section.md |  7 +++--
 13_build_reports/138_module_section.md | 11 +---
 3 files changed, 27 insertions(+), 35 deletions(-)

diff --git a/13_build_reports/134_platform_summary.md 
b/13_build_reports/134_platform_summary.md
index 09b8db6..23964af 100644
--- a/13_build_reports/134_platform_summary.md
+++ b/13_build_reports/134_platform_summary.md
@@ -1,9 +1,9 @@
 

[edk2] [Patch] BaseTools: Pcds in [Components] are not display correct in the report

2018-04-01 Thread Yonghong Zhu
The Pcd used in [Components] section, the PCD value is displayed
incorrect in the build report because the PCD default value was not
override.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu 
---
 BaseTools/Source/Python/build/BuildReport.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/BaseTools/Source/Python/build/BuildReport.py 
b/BaseTools/Source/Python/build/BuildReport.py
index 6a79e23..e06c352 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -969,10 +969,11 @@ class PcdReport(object):
 PcdValue = DscDefaultValue
 if ModulePcdSet is not None:
 if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName, Type) not 
in ModulePcdSet:
 continue
 InfDefault, PcdValue = ModulePcdSet[Pcd.TokenCName, 
Pcd.TokenSpaceGuidCName, Type]
+Pcd.DefaultValue = PcdValue
 if InfDefault == "":
 InfDefault = None
 
 BuildOptionMatch = False
 if GlobalData.BuildOptionPcd:
-- 
2.6.1.windows.1

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


[edk2] [Patch] BaseTools: Pcd not used info should not in Module PCD section

2018-04-01 Thread Yonghong Zhu
Pcds in Conditional Directives and Pcds not used are Platform Level
info, it should not display in Module PCD Section.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu 
---
 BaseTools/Source/Python/build/BuildReport.py | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/BaseTools/Source/Python/build/BuildReport.py 
b/BaseTools/Source/Python/build/BuildReport.py
index 966a2aa..6a79e23 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -875,14 +875,15 @@ class PcdReport(object):
 DscDefaultValue = Pa.Platform.Pcds[(TokenCName, 
TokenSpaceGuidCName)].DscDefaultValue
 if DscDefaultValue:
 self.DscPcdDefault[(TokenCName, TokenSpaceGuidCName)] = 
DscDefaultValue
 
 def GenerateReport(self, File, ModulePcdSet):
-if self.ConditionalPcds:
-self.GenerateReportDetail(File, ModulePcdSet, 1)
-if self.UnusedPcds:
-self.GenerateReportDetail(File, ModulePcdSet, 2)
+if not ModulePcdSet:
+if self.ConditionalPcds:
+self.GenerateReportDetail(File, ModulePcdSet, 1)
+if self.UnusedPcds:
+self.GenerateReportDetail(File, ModulePcdSet, 2)
 self.GenerateReportDetail(File, ModulePcdSet)
 
 ##
 # Generate report for PCD information
 #
@@ -902,11 +903,11 @@ class PcdReport(object):
 if ReportSubType == 1:
 PcdDict = self.ConditionalPcds
 elif ReportSubType == 2:
 PcdDict = self.UnusedPcds
 
-if ModulePcdSet is None:
+if not ModulePcdSet:
 FileWrite(File, gSectionStart)
 if ReportSubType == 1:
 FileWrite(File, "Conditional Directives used by the build 
system")
 elif ReportSubType == 2:
 FileWrite(File, "PCDs not used by modules or in conditional 
directives")
-- 
2.6.1.windows.1

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


Re: [edk2] [PATCH 2/2] Hisilicon/D0x: Enable tftp command by default

2018-04-01 Thread Guo Heyi
Hi Ray and Leif,

Any comments?


On Mon, Mar 26, 2018 at 05:03:10PM +0800, Guo Heyi wrote:
> Thanks Ray.
> 
> Does that mean we need build the dynamic command driver separately and store 
> it
> in other media instead of UEFI fd image? Right now if I include the driver 
> into
> the fd image, it will be automatically added to EFI Shell command list; we 
> don't
> need to run the load command.
> 
> Hi Leif,
> 
> Is the policy to forbid including dynamic command driver into UEFI fd image?
> 
> If we need other media to store tftp command driver, then the command will
> become less useful, because it is mainly used to download something else. If 
> we
> have other media like USB disk, we can use this "other media" instead of 
> network
> download to store the final target.
> 
> Thanks,
> Heyi
> 
> On Fri, Mar 23, 2018 at 12:51:45PM +0800, Ni, Ruiyu wrote:
> > On 3/20/2018 8:15 PM, Guo Heyi wrote:
> > >I've no idea about how to use Driver; let me spend some time to learn 
> > >first
> > >:)
> > 
> > Heyi,
> > you could use "load xxxDriver.efi" to load the dynamic command in shell.
> > After that, you can run "tftp" in shell just as running an internal command.
> > 
> > >
> > >Regards,
> > >
> > >Heyi
> > >
> > >On Tue, Mar 20, 2018 at 09:51:32AM +, Leif Lindholm wrote:
> > >>Ah, apologies.
> > >>
> > >>I would be reluctant to add commands not covered by the UEFI Shell
> > >>Specification by default.
> > >>
> > >>Since it is now a dynamic command, is there any way of loading this
> > >>dynamically (perhaps via DRIVER) where you feel the need for it?
> > >>
> > >>/
> > >> Leif
> > >>
> > >>On Tue, Mar 20, 2018 at 03:54:46PM +0800, Guo Heyi wrote:
> > >>>Ping :)
> > >>>
> > >>>
> > >>>On Wed, Mar 07, 2018 at 04:02:30PM +, Ard Biesheuvel wrote:
> > On 7 March 2018 at 03:03, Heyi Guo  wrote:
> > >Since D0x platforms always have network enabled, we would like to
> > >enable tftp command by default so that we can download something in
> > >EFI Shell.
> > >
> > >Contributed-under: TianoCore Contribution Agreement 1.1
> > >Signed-off-by: Heyi Guo 
> > >Cc: Ard Biesheuvel 
> > >Cc: Leif Lindholm 
> > 
> > The first patch looks fine to me, but I would like to give Leif a
> > chance to comment on the policy side of this patch.
> > 
> > Please ping us by the end of next week if we haven't responded by then.
> > 
> > >---
> > >  Platform/Hisilicon/D03/D03.dsc | 2 ++
> > >  Platform/Hisilicon/D05/D05.dsc | 1 +
> > >  2 files changed, 3 insertions(+)
> > >
> > >diff --git a/Platform/Hisilicon/D03/D03.dsc 
> > >b/Platform/Hisilicon/D03/D03.dsc
> > >index cb0669d639d1..fce1e60b1275 100644
> > >--- a/Platform/Hisilicon/D03/D03.dsc
> > >+++ b/Platform/Hisilicon/D03/D03.dsc
> > >@@ -29,6 +29,8 @@ [Defines]
> > >SKUID_IDENTIFIER   = DEFAULT
> > >FLASH_DEFINITION   = 
> > > Platform/Hisilicon/$(PLATFORM_NAME)/$(PLATFORM_NAME).fdf
> > >
> > >+  DEFINE INCLUDE_TFTP_COMMAND= TRUE
> > >+
> > >  !include Silicon/Hisilicon/Hisilicon.dsc.inc
> > >
> > >  [LibraryClasses.common]
> > >diff --git a/Platform/Hisilicon/D05/D05.dsc 
> > >b/Platform/Hisilicon/D05/D05.dsc
> > >index 8373a821a496..f007f3d2d7e8 100644
> > >--- a/Platform/Hisilicon/D05/D05.dsc
> > >+++ b/Platform/Hisilicon/D05/D05.dsc
> > >@@ -29,6 +29,7 @@ [Defines]
> > >SKUID_IDENTIFIER   = DEFAULT
> > >FLASH_DEFINITION   = 
> > > Platform/Hisilicon/$(PLATFORM_NAME)/$(PLATFORM_NAME).fdf
> > >DEFINE EDK2_SKIP_PEICORE=0
> > >+  DEFINE INCLUDE_TFTP_COMMAND= TRUE
> > >DEFINE NETWORK_IP6_ENABLE  = FALSE
> > >DEFINE HTTP_BOOT_ENABLE= FALSE
> > >
> > >--
> > >2.7.4
> > >
> > >___
> > >edk2-devel mailing list
> > >edk2-devel@lists.01.org
> > >https://lists.01.org/mailman/listinfo/edk2-devel
> > >
> > 
> > 
> > -- 
> > Thanks,
> > Ray
> > ___
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel