[edk2] [Patch] BaseTools build_rule.template: Update aslc rule for XCODE tool chain

2018-11-02 Thread Liming Gao
Update aslc rule to rename the temp output file from .efi to .pecoff.
This change can avoid the conflict .efi file name in output directory.
One is the driver image, another is aslc temp output file.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao 
Cc: Yonghong Zhu 
---
 BaseTools/Conf/build_rule.template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Conf/build_rule.template 
b/BaseTools/Conf/build_rule.template
index ed54a55..3ab5606 100755
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -478,8 +478,8 @@
 
 "$(ASLCC)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj  $(ASLCC_FLAGS) 
$(INC) ${src}
 "$(ASLDLINK)" -o $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll 
$(ASLDLINK_FLAGS) $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.obj
-"$(MTOC)" -subsystem $(MODULE_TYPE)  $(MTOC_FLAGS) 
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll 
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.efi
-"$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.efi 
$(GENFW_FLAGS)
+"$(MTOC)" -subsystem $(MODULE_TYPE)  $(MTOC_FLAGS) 
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.dll 
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.pecoff
+"$(GENFW)" -o ${dst} -c $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.pecoff 
$(GENFW_FLAGS)
   
   
 [Masm16-Code-File]
-- 
2.10.0.windows.1

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


Re: [edk2] [PATCH v2 3/5] Vlv2TbltDevicePkg: Remove EdkShellBinPkg with ShellPkg

2018-11-02 Thread Wei, David
Reviewed-by: David Wei 

Thanks,
David  Wei

Intel SSG/STO/UEFI BIOS 

-Original Message-
From: Zhang, Shenglei 
Sent: Thursday, November 1, 2018 2:27 PM
To: edk2-devel@lists.01.org
Cc: Wei, David ; Sun, Zailiang 
Subject: [PATCH v2 3/5] Vlv2TbltDevicePkg: Remove EdkShellBinPkg with ShellPkg

Replace EdkShellBinPkg with ShellPkg in PlatformPkg.fdf,
PlatformPkgGcc.fdf, PlatformPkgGccX64.dsc,
PlatformPkgIA32.dsc and PlatformPkgX64.dsc.
https://bugzilla.tianocore.org/show_bug.cgi?id=1108

Cc: David Wei 
Cc: zailiang sun 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: shenglei 
---
 Vlv2TbltDevicePkg/PlatformPkg.fdf   | 5 +
 Vlv2TbltDevicePkg/PlatformPkgGcc.fdf| 5 +
 Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 1 +
 Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 1 +
 Vlv2TbltDevicePkg/PlatformPkgX64.dsc| 1 +
 5 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf 
b/Vlv2TbltDevicePkg/PlatformPkg.fdf
index b7a0e584de..89c488372d 100644
--- a/Vlv2TbltDevicePkg/PlatformPkg.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf
@@ -709,10 +709,7 @@ INF FatPkg/EnhancedFatDxe/Fat.inf
 #
 # UEFI Shell
 #
-FILE APPLICATION = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile) 
{
-#SECTION PE32 = 
EdkShellBinPkg/FullShell/$(EDK_DXE_ARCHITECTURE)/Shell_Full.efi
-SECTION PE32 = ShellBinPkg/UefiShell/$(EDK_DXE_ARCHITECTURE)/Shell.efi
-  }
+INF  ShellPkg/Application/Shell/Shell.inf
 
 #
 # dp command
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf 
b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
index eca273e33f..e7bbda1a56 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
+++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
@@ -665,10 +665,7 @@ INF FatPkg/EnhancedFatDxe/Fat.inf
 #
 # UEFI Shell
 #
-FILE APPLICATION = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile) 
{
-#SECTION PE32 = 
EdkShellBinPkg/FullShell/$(EDK_DXE_ARCHITECTURE)/Shell_Full.efi
-SECTION PE32 = ShellBinPkg/UefiShell/$(EDK_DXE_ARCHITECTURE)/Shell.efi
-  }
+INF  ShellPkg/Application/Shell/Shell.inf
 
 #
 # dp command
diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc 
b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index 3e3522aee9..af2e701372 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
@@ -1462,6 +1462,7 @@ 
$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/fTPMInitPeim.inf
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
   FatPkg/EnhancedFatDxe/Fat.inf
+  ShellPkg/Application/Shell/Shell.inf
 !if $(SATA_ENABLE) == TRUE
   
$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataController.inf
 !endif
diff --git a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc 
b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index 55c873d565..38403f8f20 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -1450,6 +1450,7 @@ 
$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/fTPMInitPeim.inf
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
   FatPkg/EnhancedFatDxe/Fat.inf
+  ShellPkg/Application/Shell/Shell.inf
 !if $(SATA_ENABLE) == TRUE
   
$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataController.inf
 !endif
diff --git a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc 
b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index fa6aa63491..13499b7c9e 100644
--- a/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -1462,6 +1462,7 @@ 
$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/fTPMInitPeim.inf
   MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
   MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
   FatPkg/EnhancedFatDxe/Fat.inf
+  ShellPkg/Application/Shell/Shell.inf
 !if $(SATA_ENABLE) == TRUE
   
$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARCHITECTURE)/SataController.inf
 !endif
-- 
2.18.0.windows.1

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


Re: [edk2] [PATCH v2 3/4] MdeModulePkg/SdMmcPciHcDxe: Add SwitchClockFreqPost to SdMmcOverride

2018-11-02 Thread Wu, Hao A
> -Original Message-
> From: Marcin Wojtas [mailto:m...@semihalf.com]
> Sent: Friday, November 02, 2018 5:39 PM
> To: Wu, Hao A
> Cc: edk2-devel-01; Tomasz Michalec; nad...@marvell.com; Gao, Liming;
> Kinney, Michael D
> Subject: Re: [edk2] [PATCH v2 3/4] MdeModulePkg/SdMmcPciHcDxe: Add
> SwitchClockFreqPost to SdMmcOverride
> 
> Hi Hao,
> 
> czw., 1 lis 2018 o 08:06 Wu, Hao A  napisał(a):
> >
> > > -Original Message-
> > > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> > > Marcin Wojtas
> > > Sent: Friday, October 05, 2018 9:25 PM
> > > To: edk2-devel@lists.01.org
> > > Cc: Tian, Feng; t...@semihalf.com; Wu, Hao A; nad...@marvell.com; Gao,
> > > Liming; Kinney, Michael D
> > > Subject: [edk2] [PATCH v2 3/4] MdeModulePkg/SdMmcPciHcDxe: Add
> > > SwitchClockFreqPost to SdMmcOverride
> > >
> > > From: Tomasz Michalec 
> > >
> > > Some SD Host Controlers need to do additional opperations after clock
> > > frequency switch.
> > >
> > > This patch add new callback type to NotifyPhase of the SdMmcOverride
> > > protocol. It is called after EmmcSwitchClockFreq and SdMmcHcClockSupply.
> >
> > Hi Marcin,
> >
> > Just curious, I had a quick glance at the implementation of the
> > XenonSwitchClockFreqPost() in your platform part changes. Are those
> operations
> > within the function mandatory during the HC initialization? Are they mainly 
> > for
> > performance or stability consideration?
> 
> As for Marvellt he Xenon controller is pretty complicated IP, which
> consists of standard Sd/Mmc part and the dedicated PHY, that's
> responsible for signal integrity for all bus modes. It requires
> additional configuration, depending on the mode.

Got it.

> 
> >
> > I am wondering if this kind of customization is common among the SD &
> eMMC devices.
> 
> Well, in Linux this clock tuning after switching to certain bus mode.
> This driver simply does it in 'set_ios' callback, whose custom
> implementation (platform-specific code surrounding generic
> sdhci_set_ios call) is _very_ common among all drivers/mmc/host
> drivers.
> 
> Do you have any objections to the patch itself, given above explanation?

No, thanks for the detailed explanation.

Best Regards,
Hao Wu

> 
> Best regards,
> Marcin
> 
> >
> > Best Regards,
> > Hao Wu
> >
> > >
> > > Contributed-under: TianoCore Contribution Agreement 1.1
> > > Signed-off-by: Marcin Wojtas 
> > > ---
> > >  MdeModulePkg/Include/Protocol/SdMmcOverride.h   |  1 +
> > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c | 60
> > > 
> > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c   | 18 ++
> > >  3 files changed, 79 insertions(+)
> > >
> > > diff --git a/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > > b/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > > index 25db98a..d9daada 100644
> > > --- a/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > > +++ b/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > > @@ -33,6 +33,7 @@ typedef enum {
> > >EdkiiSdMmcInitHostPre,
> > >EdkiiSdMmcInitHostPost,
> > >EdkiiSdMmcUhsSignaling,
> > > +  EdkiiSdMmcSwitchClockFreqPost,
> > >  } EDKII_SD_MMC_PHASE_TYPE;
> > >
> > >  /**
> > > diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
> > > b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
> > > index 05bd4a0..7e75283 100755
> > > --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
> > > +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
> > > @@ -796,6 +796,27 @@ EmmcSwitchToHighSpeed (
> > >
> > >HsTiming = 1;
> > >Status = EmmcSwitchClockFreq (PciIo, PassThru, Slot, Rca, HsTiming,
> > > ClockFreq);
> > > +  if (EFI_ERROR (Status)) {
> > > +return Status;
> > > +  }
> > > +
> > > +  if (mOverride != NULL && mOverride->NotifyPhase != NULL) {
> > > +Status = mOverride->NotifyPhase (
> > > +  Private->ControllerHandle,
> > > +  Slot,
> > > +  EdkiiSdMmcSwitchClockFreqPost,
> > > +  
> > > +  );
> > > +if (EFI_ERROR (Status)) {
> > > +  DEBUG ((
> > > +DEBUG_ERROR,
> > > +"%a: SD/MMC switch clock freq post notifier callback failed - 
> > > %r\n",
> > > +__FUNCTION__,
> > > +Status
> > > +));
> > > +  return Status;
> > > +}
> > > +  }
> > >
> > >return Status;
> > >  }
> > > @@ -905,6 +926,24 @@ EmmcSwitchToHS200 (
> > >  return Status;
> > >}
> > >
> > > +  if (mOverride != NULL && mOverride->NotifyPhase != NULL) {
> > > +Status = mOverride->NotifyPhase (
> > > +  Private->ControllerHandle,
> > > +  Slot,
> > > +  EdkiiSdMmcSwitchClockFreqPost,
> > > +  
> > > +  );
> > > +if (EFI_ERROR (Status)) {
> > > +  DEBUG ((
> > > +DEBUG_ERROR,
> > > +"%a: SD/MMC switch clock freq post notifier callback failed - 
> > > 

Re: [edk2] [PATCH v2 2/4] MdeModulePkg/SdMmcPciHcDxe: Add UhsSignaling to SdMmcOverride protocol

2018-11-02 Thread Wu, Hao A
> -Original Message-
> From: Marcin Wojtas [mailto:m...@semihalf.com]
> Sent: Friday, November 02, 2018 8:17 PM
> To: Wu, Hao A
> Cc: edk2-devel-01; Kinney, Michael D; Gao, Liming; Leif Lindholm; Ard
> Biesheuvel; nad...@marvell.com; j...@semihalf.com; Tomasz Michalec
> Subject: Re: [PATCH v2 2/4] MdeModulePkg/SdMmcPciHcDxe: Add UhsSignaling
> to SdMmcOverride protocol
> 
> pt., 2 lis 2018 o 09:21 Marcin Wojtas  napisał(a):
> >
> > Hi Hao,
> >
> > czw., 1 lis 2018 o 08:06 Wu, Hao A  napisał(a):
> > >
> > > Hi Marcin,
> > >
> > > > -Original Message-
> > > > From: Marcin Wojtas [mailto:m...@semihalf.com]
> > > > Sent: Friday, October 05, 2018 9:25 PM
> > > > To: edk2-devel@lists.01.org
> > > > Cc: Tian, Feng; Kinney, Michael D; Gao, Liming; 
> > > > leif.lindh...@linaro.org;
> Wu,
> > > > Hao A; ard.biesheu...@linaro.org; nad...@marvell.com;
> > > > m...@semihalf.com; j...@semihalf.com; t...@semihalf.com
> > > > Subject: [PATCH v2 2/4] MdeModulePkg/SdMmcPciHcDxe: Add
> UhsSignaling
> > > > to SdMmcOverride protocol
> > > >
> > > > From: Tomasz Michalec 
> > > >
> > > > Some SD Host Controlers use different values in Host Control 2 Register
> > > > to select UHS Mode. This patch adds a new UhsSignaling type routine to
> > > > the NotifyPhase of the SdMmcOverride protocol.
> > > >
> > > > UHS signaling configuration is moved to a common, default routine
> > > > (SdMmcHcUhsSignaling), which is called when SdMmcOverride does not
> > > > cover this functionality.
> > > >
> > > > Contributed-under: TianoCore Contribution Agreement 1.1
> > > > Signed-off-by: Marcin Wojtas 
> > > > ---
> > > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h |  50 +++
> > > >  MdeModulePkg/Include/Protocol/SdMmcOverride.h|   2 +
> > > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c  | 153
> > > > 
> > > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c|  37 +++--
> > > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c |  69
> +
> > > >  5 files changed, 243 insertions(+), 68 deletions(-)
> > > >
> > > > diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > > > b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > > > index e389d52..a03160d 100644
> > > > --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > > > +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > > > @@ -63,6 +63,39 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF
> > > > ANY KIND, EITHER EXPRESS OR IMPLIED.
> > > >  #define SD_MMC_HC_CTRL_VER0xFE
> > > >
> > > >  //
> > > > +// SD Host Controler bits to HOST_CTRL2 register
> > > > +//
> > > > +#define SD_MMC_HC_CTRL_UHS_MASK   0x0007
> > > > +#define SD_MMC_HC_CTRL_UHS_SDR12  0x
> > > > +#define SD_MMC_HC_CTRL_UHS_SDR25  0x0001
> > > > +#define SD_MMC_HC_CTRL_UHS_SDR50  0x0002
> > > > +#define SD_MMC_HC_CTRL_UHS_SDR104 0x0003
> > > > +#define SD_MMC_HC_CTRL_UHS_DDR50  0x0004
> > > > +#define SD_MMC_HC_CTRL_MMC_DDR52  0x0004
> > > > +#define SD_MMC_HC_CTRL_MMC_SDR50  0x0002
> > >
> > > I think SD_MMC_HC_CTRL_MMC_SDR50 is not needed here.
> > >
> > > Since according to the SD Physical Layer Simplified Specification, max 
> > > clock
> > > frequency for SD bus mode SDR50 is 100MHz. And there is no eMMC bus
> mode whose
> > > max clock frequency is at 100MHz in Embedded Multi-Media Card Electrical
> > > Standard (5.1).
> >
> > Ok, will drop it.
> >
> > >
> > > > +#define SD_MMC_HC_CTRL_MMC_SDR25  0x0001
> > > > +#define SD_MMC_HC_CTRL_MMC_SDR12  0x
> > > > +#define SD_MMC_HC_CTRL_HS200  0x0003
> > > > +#define SD_MMC_HC_CTRL_HS400  0x0005
> > >
> > > How about the below renames & reorder?
> > >
> > > SD_MMC_HC_CTRL_MMC_LEGACY  0x
> > > SD_MMC_HC_CTRL_MMC_HS_SDR  0x0001
> > > SD_MMC_HC_CTRL_MMC_HS_DDR  0x0004
> > > SD_MMC_HC_CTRL_MMC_HS200  0x0003
> > > SD_MMC_HC_CTRL_MMC_HS400  0x0005
> >
> > Ok.
> >
> > >
> > > > +
> > > > +//
> > > > +// Timing modes for uhs
> > > > +//
> > > > +typedef enum {
> > > > +  SdMmcUhsSdr12,
> > > > +  SdMmcUhsSdr25,
> > > > +  SdMmcUhsSdr50,
> > > > +  SdMmcUhsSdr104,
> > > > +  SdMmcUhsDdr50,
> > > > +  SdMmcMmcDdr52,
> > > > +  SdMmcMmcSdr50,
> > > > +  SdMmcMmcSdr25,
> > > > +  SdMmcMmcSdr12,
> > > > +  SdMmcMmcHs200,
> > > > +  SdMmcMmcHs400,
> > > > +} SD_MMC_UHS_TIMING;
> > >
> > > Suggest a similar drop of 'SdMmcMmcSdr50' and rename according to the
> above
> > > comments upon HOST_CTRL2 register value definitions. Also, how about a
> rename
> > > for enum to SD_MMC_BUS_MODE?
> >
> > Ok.
> >
> > >
> > > > +
> > > > +//
> > > >  // The transfer modes supported by SD Host Controller
> > > >  // Simplified Spec 3.0 Table 1-2
> > > >  //
> > > > @@ -508,4 +541,21 @@ SdMmcHcInitTimeoutCtrl (
> > > >IN UINT8  Slot
> > > >);
> > > >
> > > > +/**
> > > > +  Set SD Host Controler control 2 registry according to selected speed.
> > > > +
> > > > +  @param[in] PciIo  The PCI IO 

Re: [edk2] [PATCH edk2-platforms 01/27] Platform/Microsoft: Add OpteeClientPkg dec

2018-11-02 Thread Chris Co via edk2-devel
Hi Sumit,

> -Original Message-
> From: Sumit Garg 
> Sent: Thursday, November 1, 2018 10:24 PM
> To: Chris Co 
> Cc: Leif Lindholm ; edk2-devel@lists.01.org; Ard
> Biesheuvel ; Michael D Kinney
> ; tee-...@lists.linaro.org
> Subject: Re: [PATCH edk2-platforms 01/27] Platform/Microsoft: Add
> OpteeClientPkg dec
> 
> + OP-TEE ML.
> 
> On Fri, 2 Nov 2018 at 06:11, Chris Co  wrote:
> >
> > Hi Sumit,
> >
> > Our full OpteeClientPkg has:
> > - Our OpteeClientAPI implementation. I was monitoring the merge progress
> on OpteeLib and will look into moving over now that it is available.
> > - The fTPM and AuthVar TA binaries. In our current design, the TA binaries
> are loaded at runtime. We could host the binaries themselves elsewhere on
> the filesystem, but we do not want these binaries as early/pseudo TAs. Is
> there a plan for OpteeLib to support loading full TAs?
> 
> Early TAs [1] are basically full TAs only, running in Secure EL0 mode.
> So instead of loading TA from normal world file-system, they are linked into a
> special data section in the OP-TEE core blob.
> 
> Also I don't think loading TAs dynamically especially during boot makes much
> sense due to following reasons:
> 1. Increased boot time.
> 2. Fixed TAs like in your case which could be linked as early TAs as well.
> 

We prefer to load TAs dynamically for a more flexible servicing story. My 
understanding is that Early TAs are coupled with the OP-TEE binary itself, so 
to update an Early TA, a new OP-TEE binary would need to be created and pushed. 
We want to avoid rolling a new OP-TEE and only update the TA binary in this 
scenario.

> And you mentioned filesystem, are you referring to root filesystem?
> 

We have not implemented this yet, but we were thinking to have the TA binaries 
present in the EFI partition.

> > - We have two client drivers: a firmware TPM TA driver and an
> authenticated variable TA driver. These talk through the tee-supplicant to
> their respective TAs.
> >
> 
> Here from tee-supplicant apart from loading TAs, what other services are you
> expecting? If you are looking for secure storage via RPMB, that could be an
> enhancement to OpteeLib adding corresponding RPC handling here [2].
> 

For RPC handling, we are looking for the following callback support:
- OPTEE_SMC_RPC_FUNC_ALLOC
- OPTEE_SMC_RPC_FUNC_FREE
- OPTEE_SMC_RPC_FUNC_CMD
- OPTEE_MSG_RPC_CMD_LOAD_TA
- OPTEE_MSG_RPC_CMD_RPMB
- OPTEE_MSG_RPC_CMD_GET_TIME
- OPTEE_MSG_RPC_CMD_SHM_ALLOC
- OPTEE_MSG_RPC_CMD_SHM_FREE
- OPTEE_MSG_RPC_CMD_WAIT_QUEUE

Thanks,
Chris

> [1]
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
> om%2FOP-
> TEE%2Foptee_os%2Fblob%2Fmaster%2Fdocumentation%2Foptee_design.md
> %23early-trusted-
> applicationsdata=02%7C01%7CChristopher.Co%40microsoft.com%7C4a
> 7d8c01e4804365f4eb08d640837a15%7C72f988bf86f141af91ab2d7cd011db47%
> 7C1%7C0%7C636767330779998429sdata=yaDWw5Z6yuux1o89kxzbknVp
> b%2B1OHUagbB%2FOGS4dAcU%3Dreserved=0
> [2]
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
> om%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FArmPkg%2FLibrary%2FOpteeL
> ib%2FOptee.c%23L147data=02%7C01%7CChristopher.Co%40microsoft.c
> om%7C4a7d8c01e4804365f4eb08d640837a15%7C72f988bf86f141af91ab2d7cd
> 011db47%7C1%7C0%7C636767330779998429sdata=Lsplb1L7Ugd2C6cXG
> 8gBo40Ei8UQPtIA7fNEDL1t%2Fbg%3Dreserved=0
> 
> Regards,
> Sumit
> 
> > Chris
> >
> > > -Original Message-
> > > From: Sumit Garg 
> > > Sent: Thursday, November 1, 2018 3:55 AM
> > > To: Chris Co ; Leif Lindholm
> > > 
> > > Cc: edk2-devel@lists.01.org; Ard Biesheuvel
> > > ; Michael D Kinney
> > > 
> > > Subject: Re: [PATCH edk2-platforms 01/27] Platform/Microsoft: Add
> > > OpteeClientPkg dec
> > >
> > > Hi Christopher,
> > >
> > > Optee Client library has recently been merged to edk2 source code.
> > > It tries to provide a generic interface [1] to OP-TEE based trusted
> > > applications (pseudo/early).
> > >
> > > AFAIK, you don't need any platform specific hook in client interface
> > > to work with upstream OP-TEE. So instead you should use Optee library.
> > >
> > > [1]
> > > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit
> > > hub.c
> > >
> om%2Ftianocore%2Fedk2%2Fblob%2Fmaster%2FArmPkg%2FInclude%2FLibrary
> > >
> %2FOpteeLib.hdata=02%7C01%7CChristopher.Co%40microsoft.com%7C
> > >
> c19b84ef7f8f4213424108d63fe88f66%7C72f988bf86f141af91ab2d7cd011db47
> > >
> %7C1%7C0%7C63675404786500sdata=m24akbKtoyCERVN77meoSU
> > > H6E%2Bpf8W2P5MF7nvU5y7I%3Dreserved=0
> > >
> > > Regards,
> > > Sumit
> > >
> > > On Thu, 1 Nov 2018 at 02:13, Leif Lindholm 
> wrote:
> > > >
> > > > +Sumit (just to loop you two together). Is there anything
> > > > +Microsoft
> > > > platform specific about what will go in here?
> > > >
> > > > /
> > > > Leif
> > > >
> > > > On Fri, Sep 21, 2018 at 08:25:53AM +, Chris Co wrote:
> > > > > On Windows IoT Core devices with ARM TrustZone 

Re: [edk2] [PATCH 1/1] MdePkg/Base.h: Implement BASE_CR() via OFFSET_OF().

2018-11-02 Thread Andrew Fish
+1

Reviewed-by: Andrew Fish 

> On Nov 2, 2018, at 10:28 AM, Kinney, Michael D  
> wrote:
> 
> Marvin,
> 
> Thanks.  This is a good improvement.
> 
> Reviewed-by: Michael D Kinney 
> 
> Mike
> 
>> -Original Message-
>> From: Gao, Liming
>> Sent: Thursday, November 1, 2018 6:33 PM
>> To: marvin.haeu...@outlook.com; edk2-devel@lists.01.org
>> Cc: Kinney, Michael D 
>> Subject: RE: [PATCH 1/1] MdePkg/Base.h: Implement
>> BASE_CR() via OFFSET_OF().
>> 
>> The change is good. Reviewed-by: Liming Gao
>> 
>> 
>>> -Original Message-
>>> From: edk2-devel [mailto:edk2-devel-
>> boun...@lists.01.org] On Behalf Of
>>> Marvin H?user
>>> Sent: Thursday, November 01, 2018 4:09 AM
>>> To: edk2-devel@lists.01.org
>>> Cc: Kinney, Michael D ;
>> Gao, Liming
>>> 
>>> Subject: [edk2] [PATCH 1/1] MdePkg/Base.h: Implement
>> BASE_CR() via
>>> OFFSET_OF().
>>> 
>>> Replace the current NULL pointer dereference to
>> retrieve Field's
>>> offset with a call to OFFSET_OF().  This is implemented
>> via
>>> __builtin_offsetof for GCC and Clang, which eliminates
>> UB caught by
>>> Clang UndefinedBehaviorSanitizer.
>>> 
>>> Contributed-under: TianoCore Contribution Agreement 1.1
>>> Signed-off-by: Marvin Haeuser
>> 
>>> ---
>>> MdePkg/Include/Base.h | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>> 
>>> diff --git a/MdePkg/Include/Base.h
>> b/MdePkg/Include/Base.h
>>> index 523192fd79fc..bc877d8125a5 100644
>>> --- a/MdePkg/Include/Base.h
>>> +++ b/MdePkg/Include/Base.h
>>> @@ -869,7 +869,7 @@ typedef UINTN  *BASE_LIST;
>>>  @return  A pointer to the structure from one of it's
>> elements.
>>> 
>>> **/
>>> -#define BASE_CR(Record, TYPE, Field)  ((TYPE *)
>> ((CHAR8 *) (Record) -
>>> (CHAR8 *) &(((TYPE *) 0)->Field)))
>>> +#define BASE_CR(Record, TYPE, Field)  ((TYPE *)
>> ((CHAR8 *) (Record) -
>>> OFFSET_OF (TYPE, Field)))
>>> 
>>> /**
>>>  Rounds a value up to the next boundary using a
>> specified alignment.
>>> --
>>> 2.19.1.windows.1
>>> 
>>> ___
>>> edk2-devel mailing list
>>> edk2-devel@lists.01.org
>>> https://lists.01.org/mailman/listinfo/edk2-devel
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

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


Re: [edk2] [PATCH 1/1] MdePkg/Base.h: Implement BASE_CR() via OFFSET_OF().

2018-11-02 Thread Kinney, Michael D
Marvin,

Thanks.  This is a good improvement.

Reviewed-by: Michael D Kinney 

Mike

> -Original Message-
> From: Gao, Liming
> Sent: Thursday, November 1, 2018 6:33 PM
> To: marvin.haeu...@outlook.com; edk2-devel@lists.01.org
> Cc: Kinney, Michael D 
> Subject: RE: [PATCH 1/1] MdePkg/Base.h: Implement
> BASE_CR() via OFFSET_OF().
> 
> The change is good. Reviewed-by: Liming Gao
> 
> 
> >-Original Message-
> >From: edk2-devel [mailto:edk2-devel-
> boun...@lists.01.org] On Behalf Of
> >Marvin H?user
> >Sent: Thursday, November 01, 2018 4:09 AM
> >To: edk2-devel@lists.01.org
> >Cc: Kinney, Michael D ;
> Gao, Liming
> >
> >Subject: [edk2] [PATCH 1/1] MdePkg/Base.h: Implement
> BASE_CR() via
> >OFFSET_OF().
> >
> >Replace the current NULL pointer dereference to
> retrieve Field's
> >offset with a call to OFFSET_OF().  This is implemented
> via
> >__builtin_offsetof for GCC and Clang, which eliminates
> UB caught by
> >Clang UndefinedBehaviorSanitizer.
> >
> >Contributed-under: TianoCore Contribution Agreement 1.1
> >Signed-off-by: Marvin Haeuser
> 
> >---
> > MdePkg/Include/Base.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/MdePkg/Include/Base.h
> b/MdePkg/Include/Base.h
> >index 523192fd79fc..bc877d8125a5 100644
> >--- a/MdePkg/Include/Base.h
> >+++ b/MdePkg/Include/Base.h
> >@@ -869,7 +869,7 @@ typedef UINTN  *BASE_LIST;
> >   @return  A pointer to the structure from one of it's
> elements.
> >
> > **/
> >-#define BASE_CR(Record, TYPE, Field)  ((TYPE *)
> ((CHAR8 *) (Record) -
> >(CHAR8 *) &(((TYPE *) 0)->Field)))
> >+#define BASE_CR(Record, TYPE, Field)  ((TYPE *)
> ((CHAR8 *) (Record) -
> >OFFSET_OF (TYPE, Field)))
> >
> > /**
> >   Rounds a value up to the next boundary using a
> specified alignment.
> >--
> >2.19.1.windows.1
> >
> >___
> >edk2-devel mailing list
> >edk2-devel@lists.01.org
> >https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH edk2-platforms 5/5] Platform/ARM/Sgi: Add platform support for SGI-Clark.Helios

2018-11-02 Thread Chandni Cherukuri
Platform support for SGI-Clark.Helios platform has been added.

Change-Id: Iaf7962334b6366d35a195e4c94341d1972783a81
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chandni Cherukuri 
---
 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c | 3 +++
 Platform/ARM/SgiPkg/Include/SgiPlatform.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c 
b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
index 1c56f65..cf085f8 100644
--- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
+++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
@@ -51,6 +51,9 @@ ArmSgiPkgEntryPoint (
   } else if ((PartNum == SGI_CLARK_PART_NUM) &&
  (ConfigId == SGI_CLARKA_CONF_NUM)) {
 Status = LocateAndInstallAcpiFromFv ();
+  } else if ((PartNum == SGI_CLARK_PART_NUM) &&
+ (ConfigId == SGI_CLARKH_CONF_NUM)) {
+Status = LocateAndInstallAcpiFromFv ();
   } else {
 Status = EFI_UNSUPPORTED;
   }
diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h 
b/Platform/ARM/SgiPkg/Include/SgiPlatform.h
index b84709e..7b0bb4a 100644
--- a/Platform/ARM/SgiPkg/Include/SgiPlatform.h
+++ b/Platform/ARM/SgiPkg/Include/SgiPlatform.h
@@ -75,6 +75,7 @@
 //SGI-Clark Platform Identification values
 #define SGI_CLARK_PART_NUM0x786
 #define SGI_CLARKA_CONF_NUM   0x1
+#define SGI_CLARKH_CONF_NUM   0x2
 
 #define SGI_CONFIG_MASK   0x0F
 #define SGI_CONFIG_SHIFT  0x1C
-- 
2.7.4

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


[edk2] [PATCH edk2-platforms 4/5] Platform/ARM/Sgi: Add ACPI tables for SGI-Clark.Helios platform

2018-11-02 Thread Chandni Cherukuri
Added ACPI tables and GUID name 'gSgiClarkHeliosAcpiTablesFileGuid'
for SGI-Clark.Helios platform.

Change-Id: Ib212c0b27ad1f9f709385ac92e5e06b1bd33bfc0
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chandni Cherukuri 
---
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/AcpiTables.inf |  58 +
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Dbg2.aslc  |  90 +++
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Dsdt.asl   | 262 
+++
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Fadt.aslc  |  87 +++
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Gtdt.aslc  | 152 +++
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Iort.aslc  | 106 
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Madt.aslc  | 266 

 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Mcfg.aslc  |  61 +
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Spcr.aslc  |  77 ++
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Ssdt.asl   |  95 +++
 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf |   1 +
 Platform/ARM/SgiPkg/SgiPlatform.dec |   1 +
 Platform/ARM/SgiPkg/SgiPlatform.dsc |   1 +
 Platform/ARM/SgiPkg/SgiPlatform.fdf |   1 +
 14 files changed, 1258 insertions(+)

diff --git a/Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/AcpiTables.inf 
b/Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/AcpiTables.inf
new file mode 100644
index 000..63ebf55
--- /dev/null
+++ b/Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/AcpiTables.inf
@@ -0,0 +1,58 @@
+## @file
+#  ACPI table data and ASL sources required to boot the platform.
+#
+#  Copyright (c) 2018, ARM Ltd. All rights reserved.
+#
+#  This program and the accompanying materials are licensed and made available
+#  under the terms and conditions of the BSD License which accompanies this
+#  distribution.  The full text of the license may be found at
+#  http://opensource.org/licenses/bsd-license.php
+#
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
+#
+##
+
+[Defines]
+  INF_VERSION= 0x0001001A
+  BASE_NAME  = SgiClarkHeliosAcpiTables
+  FILE_GUID  = 2af40815-a84e-4de9-8c38-9140b3544073
+  MODULE_TYPE= USER_DEFINED
+  VERSION_STRING = 1.0
+
+[Sources]
+  Dbg2.aslc
+  Dsdt.asl
+  Fadt.aslc
+  Gtdt.aslc
+  Iort.aslc
+  Madt.aslc
+  Mcfg.aslc
+  Spcr.aslc
+  Ssdt.asl
+
+[Packages]
+  ArmPkg/ArmPkg.dec
+  ArmPlatformPkg/ArmPlatformPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
+  MdePkg/MdePkg.dec
+  Platform/ARM/SgiPkg/SgiPlatform.dec
+
+[FixedPcd]
+  gArmPlatformTokenSpaceGuid.PcdCoreCount
+  gArmPlatformTokenSpaceGuid.PcdClusterCount
+  gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
+  gArmPlatformTokenSpaceGuid.PL011UartInterrupt
+
+  gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
+  gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
+  gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum
+  gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum
+  gArmTokenSpaceGuid.PcdGicDistributorBase
+  gArmTokenSpaceGuid.PcdGicRedistributorsBase
+  gArmTokenSpaceGuid.PcdGenericWatchdogControlBase
+  gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase
+  gArmTokenSpaceGuid.PcdPciBusMin
+  gArmTokenSpaceGuid.PcdPciBusMax
+
+  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
diff --git a/Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Dbg2.aslc 
b/Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Dbg2.aslc
new file mode 100644
index 000..3970461
--- /dev/null
+++ b/Platform/ARM/SgiPkg/AcpiTables/SgiClarkH/Dbg2.aslc
@@ -0,0 +1,90 @@
+/** @file
+*  Debug Port Table 2 (DBG2)
+*
+*  Copyright (c) 2018, ARM Limited. All rights reserved.
+*
+*  This program and the accompanying materials are licensed and made available
+*  under the terms and conditions of the BSD License which accompanies this
+*  distribution. The full text of the license may be found at
+*  http://opensource.org/licenses/bsd-license.php
+*
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
+*
+**/
+
+#include "SgiAcpiHeader.h"
+#include 
+#include 
+#include 
+
+#define SGI_DBG2_NUM_DEBUG_PORTS   1
+#define SGI_DBG2_NUM_GAS   1
+#define SGI_DBG2_NS_STR_LENGTH 8
+#define SGI_PL011_REGISTER_SPACE   0x1000
+
+#define NAME_STR_UART1 {'C', 'O', 'M', '1', '\0', '\0', '\0', '\0'}
+
+#pragma pack(1)
+
+typedef struct {
+  EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT Dbg2Device;
+  EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTUREBaseAddressRegister;
+  UINT32AddressSize;
+  UINT8 
NameSpaceString[SGI_DBG2_NS_STR_LENGTH];
+} DBG2_DEBUG_DEVICE_INFORMATION;
+
+typedef struct {
+  EFI_ACPI_DEBUG_PORT_2_DESCRIPTION_TABLE   Description;
+  

[edk2] [PATCH edk2-platforms 3/5] Platform/ARM/Sgi: Add support for SGI-Clark.Ares platform

2018-11-02 Thread Chandni Cherukuri
Platform support for SGI-Clark.Ares platform has been added

Change-Id: I3bb15950963f1ccbf3c099894e90ef730dfc3f8e
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chandni Cherukuri 
---
 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c | 16 +---
 Platform/ARM/SgiPkg/Include/SgiPlatform.h |  4 
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c 
b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
index 5ccd01d..1c56f65 100644
--- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
+++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c
@@ -48,14 +48,16 @@ ArmSgiPkgEntryPoint (
 
   if ((PartNum == SGI575_PART_NUM) && (ConfigId == SGI575_CONF_NUM)) {
 Status = LocateAndInstallAcpiFromFv ();
-if (EFI_ERROR (Status)) {
-  DEBUG ((DEBUG_ERROR, "%a: Failed to install ACPI tables\n",
-__FUNCTION__));
-  return Status;
-}
+  } else if ((PartNum == SGI_CLARK_PART_NUM) &&
+ (ConfigId == SGI_CLARKA_CONF_NUM)) {
+Status = LocateAndInstallAcpiFromFv ();
   } else {
-DEBUG ((DEBUG_ERROR, "PlatformDxe: Unsupported Platform Id\n"));
-return EFI_UNSUPPORTED;
+Status = EFI_UNSUPPORTED;
+  }
+
+  if (EFI_ERROR (Status)) {
+DEBUG ((DEBUG_ERROR, "%a: Failed to install ACPI tables\n", __FUNCTION__));
+return Status;
   }
 
   Status = EFI_REQUEST_UNLOAD_IMAGE;
diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h 
b/Platform/ARM/SgiPkg/Include/SgiPlatform.h
index 1454018..b84709e 100644
--- a/Platform/ARM/SgiPkg/Include/SgiPlatform.h
+++ b/Platform/ARM/SgiPkg/Include/SgiPlatform.h
@@ -72,6 +72,10 @@
 #define SGI575_CONF_NUM   0x3
 #define SGI575_PART_NUM   0x783
 
+//SGI-Clark Platform Identification values
+#define SGI_CLARK_PART_NUM0x786
+#define SGI_CLARKA_CONF_NUM   0x1
+
 #define SGI_CONFIG_MASK   0x0F
 #define SGI_CONFIG_SHIFT  0x1C
 #define SGI_PART_NUM_MASK 0xFFF
-- 
2.7.4

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


[edk2] [PATCH edk2-platforms 2/5] Platform/ARM/Sgi: Add ACPI tables for SGI-Clark.Ares platform

2018-11-02 Thread Chandni Cherukuri
Added ACPI tables and GUID name 'gSgiClarkAresAcpiTablesFileGuid'
for SGI-Clark.Ares platform.

Change-Id: Ic58fdc4cdd5919b59ca7752ab3468b41cb79d0f0
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chandni Cherukuri 
---
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/AcpiTables.inf |  58 +++
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/Dbg2.aslc  |  90 +++
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/Dsdt.asl   | 116 +
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/Fadt.aslc  |  87 ++
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/Gtdt.aslc  | 152 +
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/Iort.aslc  | 106 
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/Madt.aslc  | 171 

 Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/Mcfg.aslc  |  61 +++
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/Spcr.aslc  |  77 +
 Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/Ssdt.asl   |  95 +++
 Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf |   1 +
 Platform/ARM/SgiPkg/SgiPlatform.dec |   1 +
 Platform/ARM/SgiPkg/SgiPlatform.dsc |   1 +
 Platform/ARM/SgiPkg/SgiPlatform.fdf |   1 +
 14 files changed, 1017 insertions(+)

diff --git a/Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/AcpiTables.inf 
b/Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/AcpiTables.inf
new file mode 100644
index 000..3787ab4
--- /dev/null
+++ b/Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/AcpiTables.inf
@@ -0,0 +1,58 @@
+## @file
+#  ACPI table data and ASL sources required to boot the platform.
+#
+#  Copyright (c) 2018, ARM Ltd. All rights reserved.
+#
+#  This program and the accompanying materials are licensed and made available
+#  under the terms and conditions of the BSD License which accompanies this
+#  distribution.  The full text of the license may be found at
+#  http://opensource.org/licenses/bsd-license.php
+#
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
+#
+##
+
+[Defines]
+  INF_VERSION= 0x0001001A
+  BASE_NAME  = SgiClarkAresAcpiTables
+  FILE_GUID  = 4b0b91d0-4a05-45c4-88a7-88e170e76694
+  MODULE_TYPE= USER_DEFINED
+  VERSION_STRING = 1.0
+
+[Sources]
+  Dbg2.aslc
+  Dsdt.asl
+  Fadt.aslc
+  Gtdt.aslc
+  Iort.aslc
+  Madt.aslc
+  Mcfg.aslc
+  Spcr.aslc
+  Ssdt.asl
+
+[Packages]
+  ArmPkg/ArmPkg.dec
+  ArmPlatformPkg/ArmPlatformPkg.dec
+  EmbeddedPkg/EmbeddedPkg.dec
+  MdePkg/MdePkg.dec
+  Platform/ARM/SgiPkg/SgiPlatform.dec
+
+[FixedPcd]
+  gArmPlatformTokenSpaceGuid.PcdCoreCount
+  gArmPlatformTokenSpaceGuid.PcdClusterCount
+  gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase
+  gArmPlatformTokenSpaceGuid.PL011UartInterrupt
+
+  gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum
+  gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
+  gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum
+  gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum
+  gArmTokenSpaceGuid.PcdGicDistributorBase
+  gArmTokenSpaceGuid.PcdGicRedistributorsBase
+  gArmTokenSpaceGuid.PcdGenericWatchdogControlBase
+  gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase
+  gArmTokenSpaceGuid.PcdPciBusMin
+  gArmTokenSpaceGuid.PcdPciBusMax
+
+  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
diff --git a/Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/Dbg2.aslc 
b/Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/Dbg2.aslc
new file mode 100644
index 000..3970461
--- /dev/null
+++ b/Platform/ARM/SgiPkg/AcpiTables/SgiClarkA/Dbg2.aslc
@@ -0,0 +1,90 @@
+/** @file
+*  Debug Port Table 2 (DBG2)
+*
+*  Copyright (c) 2018, ARM Limited. All rights reserved.
+*
+*  This program and the accompanying materials are licensed and made available
+*  under the terms and conditions of the BSD License which accompanies this
+*  distribution. The full text of the license may be found at
+*  http://opensource.org/licenses/bsd-license.php
+*
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
+*
+**/
+
+#include "SgiAcpiHeader.h"
+#include 
+#include 
+#include 
+
+#define SGI_DBG2_NUM_DEBUG_PORTS   1
+#define SGI_DBG2_NUM_GAS   1
+#define SGI_DBG2_NS_STR_LENGTH 8
+#define SGI_PL011_REGISTER_SPACE   0x1000
+
+#define NAME_STR_UART1 {'C', 'O', 'M', '1', '\0', '\0', '\0', '\0'}
+
+#pragma pack(1)
+
+typedef struct {
+  EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT Dbg2Device;
+  EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTUREBaseAddressRegister;
+  UINT32AddressSize;
+  UINT8 
NameSpaceString[SGI_DBG2_NS_STR_LENGTH];
+} DBG2_DEBUG_DEVICE_INFORMATION;
+
+typedef struct {
+  EFI_ACPI_DEBUG_PORT_2_DESCRIPTION_TABLE   Description;
+  

[edk2] [PATCH edk2-platforms 1/5] Platform/ARM/Sgi: Adapt to changes in system-id DT node.

2018-11-02 Thread Chandni Cherukuri
The 'system-id' node of HW_CONFIG device tree has been updated to have
a new property 'config-id' to hold the platform configuration value.
Prior to this, configuration ID value was represented by the the upper
four bits of the 'platform ID' property value but it now has a seperate
property of its own in the 'system-id' node. So adapt to these changes
in the 'system-id' node.

Change-Id: Ia15e31df50f2f43746231e5c4352035a13510bba
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chandni Cherukuri 
---
 Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c | 241 
+++-
 1 file changed, 129 insertions(+), 112 deletions(-)

diff --git a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c 
b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c
index 081d329..ba980e0 100644
--- a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c
+++ b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c
@@ -1,112 +1,129 @@
-/** @file
-*
-*  Copyright (c) 2018, ARM Limited. All rights reserved.
-*
-*  This program and the accompanying materials are licensed and made available
-*  under the terms and conditions of the BSD License which accompanies this
-*  distribution.  The full text of the license may be found at
-*  http://opensource.org/licenses/bsd-license.php
-*
-*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
-*
-**/
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-/**
-
-  This function returns the Platform ID of the platform
-
-  This functions locates the HwConfig PPI and gets the base address of HW 
CONFIG
-  DT from which the platform ID is obtained using FDT helper functions
-
-  @return returns the platform ID on success else returns 0 on error
-
-**/
-
-STATIC
-UINT32
-GetSgiPlatformId (
- VOID
-)
-{
-  CONST UINT32  *Property;
-  INT32 Offset;
-  CONST VOID*HwCfgDtBlob;
-  SGI_HW_CONFIG_INFO_PPI*HwConfigInfoPpi;
-  EFI_STATUSStatus;
-
-  Status = PeiServicesLocatePpi (, 0, NULL,
- (VOID**));
-  if (EFI_ERROR (Status)) {
-DEBUG ((DEBUG_ERROR,
-  "PeiServicesLocatePpi failed with error %r\n", Status));
-return 0;
-  }
-
-  HwCfgDtBlob = (VOID *)(UINTN)HwConfigInfoPpi->HwConfigDtAddr;
-  if (fdt_check_header (HwCfgDtBlob) != 0) {
-DEBUG ((DEBUG_ERROR, "Invalid DTB file %p passed\n", HwCfgDtBlob));
-return 0;
-  }
-
-  Offset = fdt_subnode_offset (HwCfgDtBlob, 0, "system-id");
-  if (Offset == -FDT_ERR_NOTFOUND) {
-DEBUG ((DEBUG_ERROR, "Invalid DTB : system-id node not found\n"));
-return 0;
-  }
-
-  Property = fdt_getprop (HwCfgDtBlob, Offset, "platform-id", NULL);
-  if (Property == NULL) {
-DEBUG ((DEBUG_ERROR, "Platform Id is NULL\n"));
-return 0;
-  }
-
-  return fdt32_to_cpu (*Property);
-}
-
-/**
-
- This function creates a Platform ID HOB and assigns PlatformId as the
- HobData
-
- @return asserts on error and returns EFI_INVALID_PARAMETER. On success
- returns EFI_SUCCESS
-
-**/
-EFI_STATUS
-EFIAPI
-SgiPlatformPeim (
- IN   EFI_PEI_FILE_HANDLE  FileHandle,
- IN CONST EFI_PEI_SERVICES **PeiServices
-)
-{
-  SGI_PLATFORM_DESCRIPTOR   *HobData;
-
-  // Create platform descriptor HOB
-  HobData = (SGI_PLATFORM_DESCRIPTOR *)BuildGuidHob (
- ,
- sizeof (SGI_PLATFORM_DESCRIPTOR));
-
-  // Get the platform id from the platform specific hw_config device tree
-  if (HobData == NULL) {
-DEBUG ((DEBUG_ERROR, "Platform HOB is NULL\n"));
-ASSERT (FALSE);
-return EFI_OUT_OF_RESOURCES;
-  }
-
-  HobData->PlatformId = GetSgiPlatformId ();
-  if (HobData->PlatformId == 0) {
-ASSERT (FALSE);
-return EFI_INVALID_PARAMETER;
-  }
-
-  return EFI_SUCCESS;
-}
+/** @file
+*
+*  Copyright (c) 2018, ARM Limited. All rights reserved.
+*
+*  This program and the accompanying materials are licensed and made available
+*  under the terms and conditions of the BSD License which accompanies this
+*  distribution.  The full text of the license may be found at
+*  http://opensource.org/licenses/bsd-license.php
+*
+*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
+*
+**/
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/**
+
+  This function returns the Platform ID of the platform
+
+  This functions locates the HwConfig PPI and gets the base address of HW 
CONFIG
+  DT from which the platform ID is obtained using FDT helper functions
+
+  @return returns the platform ID on success else returns 0 on error
+
+**/
+
+STATIC
+UINT32
+GetSgiPlatformId (
+ VOID
+)
+{
+  CONST UINT32  *Property;
+  INT32 Offset;
+ 

[edk2] [PATCH edk2-platforms 0/5] Add platform support for SGI-Clark platforms

2018-11-02 Thread Chandni Cherukuri
Rest of the patches add support for SGI-Clark.Ares and SGI-Clark.Helios
platforms.

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


Re: [edk2] [PATCH v2 1/5] CorebootPayloadPkg: Remove EdkShellBinPkg in FDF

2018-11-02 Thread Ma, Maurice
Hi, Shenglei,

Thank you for the patch.

I saw many other references in CorebootPayloadPkg DSC files for FULL_BIN.   I 
think we should remove all of them from both DSC and FDF at the same time.

The current SHELL_TYPE defined in DSC file is  FULL_BIN.  It needs to be 
changed to UEFI_BIN.   Otherwise, the final image will not have any Shell 
module included since FULL_BIN is removed in FDF. 

Thanks
Maurice

-Original Message-
From: Zhang, Shenglei 
Sent: Wednesday, October 31, 2018 23:27
To: edk2-devel@lists.01.org
Cc: Ma, Maurice ; Agyeman, Prince 
; You, Benjamin 
Subject: [PATCH v2 1/5] CorebootPayloadPkg: Remove EdkShellBinPkg in FDF

Remove EdkShellBinPkg in CorebootPayloadPkg.fdf.
https://bugzilla.tianocore.org/show_bug.cgi?id=1108

Cc: Maurice Ma 
Cc: Prince Agyeman 
Cc: Benjamin You 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: shenglei 
---
 CorebootPayloadPkg/CorebootPayloadPkg.fdf | 8 
 1 file changed, 8 deletions(-)

diff --git a/CorebootPayloadPkg/CorebootPayloadPkg.fdf 
b/CorebootPayloadPkg/CorebootPayloadPkg.fdf
index 7994f0c949..741a5c232e 100644
--- a/CorebootPayloadPkg/CorebootPayloadPkg.fdf
+++ b/CorebootPayloadPkg/CorebootPayloadPkg.fdf
@@ -185,14 +185,6 @@ INF 
ShellPkg/DynamicCommand/DpDynamicCommand/DpDynamicCommand.inf
 INF ShellPkg/Application/Shell/Shell.inf
 !endif
 
-!if $(SHELL_TYPE) == FULL_BIN
-!if $(ARCH) == IA32
-INF  RuleOverride = BINARY USE = IA32 EdkShellBinPkg/FullShell/FullShell.inf
-!else
-INF  RuleOverride = BINARY USE = X64 EdkShellBinPkg/FullShell/FullShell.inf
-!endif
-!endif
-
 !if $(SHELL_TYPE) == MIN_BIN
 !if $(ARCH) == IA32
 INF  RuleOverride = BINARY USE = IA32 ShellBinPkg/MinUefiShell/MinUefiShell.inf
-- 
2.18.0.windows.1

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


Re: [edk2] Reminder for deleting 3 network drivers in MdeModulePkg

2018-11-02 Thread Andrew Fish



> On Nov 1, 2018, at 2:01 AM, Leif Lindholm  wrote:
> 
> On Thu, Nov 01, 2018 at 06:01:31AM +, Gao, Liming wrote:
>> Leif:
>>  If all Stewards agree this change to remove MdeModulePkg
>>  Tcp4Dxe/UefiPxeBcDxe/IScsiDxe, we will try to include it in
>>  edk2-stable201811 stable tag.
>> 
>> Andrew and Mike:
>>  Do you agree this change to happen in near edk2-stable201811
>>  stable tag?
> 
> No no no. I was suggesting deleting them immediately _after_ the
> stable tag (if review is complete by then).
> 

Sounds good to me too.

Thanks,

Andrew Fish

> Regards,
> 
> Leif
> 
>> 
>> Thanks
>> Liming
>>> -Original Message-
>>> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Leif
>>> Lindholm
>>> Sent: Wednesday, October 31, 2018 6:50 PM
>>> To: Fu, Siyuan 
>>> Cc: edk2-devel@lists.01.org
>>> Subject: Re: [edk2] Reminder for deleting 3 network drivers in
>>> MdeModulePkg
>>> 
>>> Hi Fu Siyuan,
>>> 
>>> That is fine too.
>>> But I expect the change to be one to go in the week after a stable tag
>>> has been made.
>>> 
>>> (My own philosophy is that one can be quite aggressive with removals,
>>> because if it turns out to have been a bad idea, git revert can
>>> quickly restore the tree to the state it was.)
>>> 
>>> Best Regards,
>>> 
>>> Leif
>>> 
>>> On Wed, Oct 31, 2018 at 02:58:47AM +, Fu, Siyuan wrote:
 Hi, Leif
 
 Just notice that you are saying edk2-stable201811 tag.
 
 We need more time to collect community/marketing feedback on
 deleting these driver, so it may won't be able to catch the stable
 tag in next month.
 
 BestRegards
 Fu Siyuan
 
 
> -Original Message-
> From: Fu, Siyuan
> Sent: Wednesday, October 31, 2018 8:49 AM
> To: Leif Lindholm 
> Cc: edk2-devel@lists.01.org
> Subject: RE: [edk2] Reminder for deleting 3 network drivers in
> MdeModulePkg
> 
> Hi, Leif
> 
> I think checking the branch is a little better than the tag, because we
> may still have critical bug fixes after the official release.
> 
> While any of them are not recommended, always using the NetworkPkg
>>> version
> driver is the best choice.
> 
> I will modify the edk2 network wiki page for an updated sample DSC/FDF
> section, if this patch could pass review w/o objection.
> https://github.com/tianocore/tianocore.github.io/wiki/NetworkPkg-
>>> Getting-
> Started-Guide
> 
> 
> BestRegards
> Fu Siyuan
> 
> 
>> -Original Message-
>> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf
>>> Of
>> Leif Lindholm
>> Sent: Tuesday, October 30, 2018 6:47 PM
>> To: Fu, Siyuan 
>> Cc: edk2-devel@lists.01.org
>> Subject: Re: [edk2] Reminder for deleting 3 network drivers in
>> MdeModulePkg
>> 
>> Hi Fu Siyan,
>> 
>> On Tue, Oct 30, 2018 at 08:11:52AM +, Fu, Siyuan wrote:
>>> People who want to continue use these deleted drivers could go to
>>> edk2/UDK2018 branch to get them, but it's *highly not recommended*.
>> 
>> They should also be able to use edk2-stable201811, right?
>> 
>>> *If you have any opposition on deleting these drivers, please let me
>>> know before this weekend, thanks.*
>> 
>> I am all for this change. The diffstat is very nice :)
>> 
>> Best Regards,
>> 
>> Leif
>> ___
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
>>> ___
>>> edk2-devel mailing list
>>> edk2-devel@lists.01.org
>>> https://lists.01.org/mailman/listinfo/edk2-devel

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


Re: [edk2] [Patch V3] BaseTools: Use common cc flag for building PcdValueInit.

2018-11-02 Thread Gao, Liming
Reviewed-by: Liming Gao 

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of BobCF
> Sent: Friday, November 2, 2018 1:57 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming 
> Subject: [edk2] [Patch V3] BaseTools: Use common cc flag for building 
> PcdValueInit.
> 
> V3:
> 
> Update the patch to avoid "reduce" function fail.
> 
> V2:
> Support to extract the common cc flag from a
> combined cc flag string. For example
> MSFT:*_*_IA32_CC_FLAGS = /D DISABLE_NEW_DEPRECATED_INTERFACES /DDEF_IA32
> MSFT:*_*_X64_CC_FLAGS  = /DDEF_X64 /D DISABLE_NEW_DEPRECATED_INTERFACES
> 
> V1:
> Use common cc flags for building PcdValueInit. The common
> cc flags include the cc flag which is under common arch and
> under all build arches.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Bob Feng 
> Cc: Liming Gao 
> ---
>  .../Source/Python/Workspace/DscBuildData.py   | 55 +++
>  1 file changed, 31 insertions(+), 24 deletions(-)
> 
> diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py 
> b/BaseTools/Source/Python/Workspace/DscBuildData.py
> index 6d596b2b54..11aa63fb26 100644
> --- a/BaseTools/Source/Python/Workspace/DscBuildData.py
> +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
> @@ -2182,10 +2182,23 @@ class DscBuildData(PlatformBuildClassObject):
>  for key in OverrideValues:
>  if OverrideValues[key]:
>  return False
>  return True
> 
> +def ParseCCFlags(self, ccflag):
> +ccflags = set()
> +flag = ""
> +for ch in ccflag:
> +if ch in (r"/", "-"):
> +if flag.strip():
> +ccflags.add(flag.strip())
> +flag = ch
> +else:
> +flag += ch
> +if flag.strip():
> +ccflags.add(flag.strip())
> +return ccflags
>  def GenerateByteArrayValue (self, StructuredPcds):
>  #
>  # Generate/Compile/Run C application to determine if there are any 
> flexible array members
>  #
>  if not StructuredPcds:
> @@ -2298,38 +2311,32 @@ class DscBuildData(PlatformBuildClassObject):
>  if Family and Family != self.ToolChainFamily:
>  continue
>  Target, Tag, Arch, Tool, Attr = Options[1].split("_")
>  if Tool != 'CC':
>  continue
> -
> +if Attr != "FLAGS":
> +continue
>  if Target == "*" or Target == self._Target:
>  if Tag == "*" or Tag == self._Toolchain:
> +if 'COMMON' not in BuildOptions:
> +BuildOptions['COMMON'] = set()
>  if Arch == "*":
> -if Tool not in BuildOptions:
> -BuildOptions[Tool] = OrderedDict()
> -if Attr != "FLAGS" or Attr not in BuildOptions[Tool] 
> or self.BuildOptions[Options].startswith('='):
> -BuildOptions[Tool][Attr] = 
> self.BuildOptions[Options]
> -else:
> -# append options for the same tool except PATH
> -if Attr != 'PATH':
> -BuildOptions[Tool][Attr] += " " + 
> self.BuildOptions[Options]
> -else:
> -BuildOptions[Tool][Attr] = 
> self.BuildOptions[Options]
> +
> BuildOptions['COMMON'].add(self.BuildOptions[Options])
> +if Arch in self.SupArchList:
> +if Arch not in BuildOptions:
> +BuildOptions[Arch] = set()
> +BuildOptions[Arch] |= 
> self.ParseCCFlags(self.BuildOptions[Options])
> +
>  if BuildOptions:
> -for Tool in BuildOptions:
> -for Attr in BuildOptions[Tool]:
> -if Attr == "FLAGS":
> -Value = BuildOptions[Tool][Attr]
> -ValueList = Value.split()
> -if ValueList:
> -for Id, Item in enumerate(ValueList):
> -if Item in ['-D', '/D', '-U', '/U']:
> -CC_FLAGS += ' ' + Item
> -if Id + 1 < len(ValueList):
> -CC_FLAGS += ' ' + ValueList[Id + 1]
> -elif Item.startswith(('-D', '/D', '-U', 
> '/U')):
> -CC_FLAGS += ' ' + Item
> +ArchBuildOptions = {arch:flags for arch,flags in 
> BuildOptions.items() if arch != 'COMMON'}
> +if len(ArchBuildOptions.keys()) == 1:
> +BuildOptions['COMMON'] |= (ArchBuildOptions.values()[0])
> +elif len(ArchBuildOptions.keys()) > 1:
> +CommonBuildOptions = 

Re: [edk2] Plan to move all network components to NetworkPkg

2018-11-02 Thread Gao, Liming
Siyuan:
  Could you list the mapping between current location and new location of 
Network IPv4 stack? It will be easy to be understood. 

  And, I prefer to change the platform DSC/FDF per each BZ. That means I expect 
two commits in DSC/FDF. One is for BZ 1278, another is for 1293. The different 
commit is for the different change. 

Thanks
Liming
> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Fu, 
> Siyuan
> Sent: Friday, November 2, 2018 4:10 PM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu ; Wu, Jiaxin ; Zeng, 
> Star ; Ye, Ting 
> Subject: [edk2] Plan to move all network components to NetworkPkg
> 
> Hi, All
> 
> The edk2 Bugzilla #1278 "Delete IPv4 only TCP/iSCSI/PXE drivers in 
> MdeModulePkg" has been confirmed to be included in
> edk2-stable201903 tag, so platform DSC/FDF need to be updated to adopt the 
> change by that time. I think might be an opportunity
> moment to make a little more - move all edk2 network related 
> drivers/libraries into one single package - that what we want to do for a
> long time.
> 
> In current edk2, the network stack components are located mainly in 2 
> different places, the MdeModulePkg and NetworkPkg, due to
> some historical reasons. The MdeModulePkg contains most of the IPv4 stack 
> drivers (in MdeModulePkg/Universal/Network directory),
> and all the network libraries. The NetworkPkg contains all the IPv6 stack 
> drivers and also some dual stack drivers (like TcpDxe). The
> PCDs related to network configuration are also defined in different packages: 
> PcdTftpBlockSize is in MdeModulePkg.dec and others are
> in NetworkPkg.dec. There are also drivers in these 2 packages have a same 
> name (like UefiPxeBcDxe).
> 
> We can see these codes are not well organized, so I'd like to take this 
> opportunity to change this situation, to move all network
> components to NetworkPkg, which will make the edk2 network stack code easier 
> to use and maintain in the future.
> 
> I have created Bugzilla #1293 for this proposal, and I will send some patches 
> for the detail changes. I hope it could be done together
> with #1278 so the platform only need to update their DSC/FDF file for one 
> time. Please let me know if you have any comments on this,
> thanks.
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=1293
> 
> BestRegards
> Fu Siyuan
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] UnixPkg: Remove UnixPkg and update Maintainers.txt

2018-11-02 Thread Gao, Liming
Reviewed-by: Liming Gao 

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Leif 
> Lindholm
> Sent: Friday, November 2, 2018 7:20 PM
> To: Zhang, Shenglei 
> Cc: Kinney, Michael D ; edk2-devel@lists.01.org; 
> Laszlo Ersek 
> Subject: Re: [edk2] [PATCH] UnixPkg: Remove UnixPkg and update Maintainers.txt
> 
> On Fri, Nov 02, 2018 at 10:46:30AM +0800, Shenglei Zhang wrote:
> > UnixPkg is deprecated.
> > The same functionality is supported using the EmulatorPkg.
> > Please see EmulatorPkg/README for more information about
> > EmulatorPkg.
> > https://bugzilla.tianocore.org/show_bug.cgi?id=1291
> >
> > Cc: Andrew Fish 
> > Cc: Laszlo Ersek 
> > Cc: Leif Lindholm 
> > Cc: Michael D Kinney 
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Shenglei Zhang 
> 
> Sounds good to me.
> Reviewed-by: Leif Lindholm 
> 
> > ---
> >  Maintainers.txt| 4 
> >  UnixPkg/Deprecated.txt | 5 -
> >  2 files changed, 9 deletions(-)
> >  delete mode 100644 UnixPkg/Deprecated.txt
> >
> > diff --git a/Maintainers.txt b/Maintainers.txt
> > index 36c6689afd..b127caf6b6 100644
> > --- a/Maintainers.txt
> > +++ b/Maintainers.txt
> > @@ -261,10 +261,6 @@ W: 
> > https://github.com/tianocore/tianocore.github.io/wiki/UefiCpuPkg
> >  M: Eric Dong 
> >  R: Laszlo Ersek 
> >
> > -UnixPkg
> > -W: https://github.com/tianocore/tianocore.github.io/wiki/UnixPkg
> > -S: Obsolete (Use EmulatorPkg instead)
> > -
> >  Vlv2DeviceRefCodePkg
> >  M: David Wei 
> >  M: Mang Guo 
> > diff --git a/UnixPkg/Deprecated.txt b/UnixPkg/Deprecated.txt
> > deleted file mode 100644
> > index 5ffad5fd25..00
> > --- a/UnixPkg/Deprecated.txt
> > +++ /dev/null
> > @@ -1,5 +0,0 @@
> > -UnixPkg is deprecated.
> > -
> > -The same functionality is supported using the EmulatorPkg.
> > -Please see EmulatorPkg/README for more information about EmulatorPkg.
> > -
> > --
> > 2.18.0.windows.1
> >
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] Reminder for deleting 3 network drivers in MdeModulePkg

2018-11-02 Thread Gao, Liming
This plan is OK to me. 

Thanks
Liming
> -Original Message-
> From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> Sent: Thursday, November 1, 2018 5:02 PM
> To: Gao, Liming 
> Cc: Fu, Siyuan ; af...@apple.com; Kinney, Michael D 
> ; edk2-devel@lists.01.org
> Subject: Re: [edk2] Reminder for deleting 3 network drivers in MdeModulePkg
> 
> On Thu, Nov 01, 2018 at 06:01:31AM +, Gao, Liming wrote:
> > Leif:
> >   If all Stewards agree this change to remove MdeModulePkg
> >   Tcp4Dxe/UefiPxeBcDxe/IScsiDxe, we will try to include it in
> >   edk2-stable201811 stable tag.
> >
> > Andrew and Mike:
> >   Do you agree this change to happen in near edk2-stable201811
> >   stable tag?
> 
> No no no. I was suggesting deleting them immediately _after_ the
> stable tag (if review is complete by then).
> 
> Regards,
> 
> Leif
> 
> >
> > Thanks
> > Liming
> > >-Original Message-
> > >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Leif
> > >Lindholm
> > >Sent: Wednesday, October 31, 2018 6:50 PM
> > >To: Fu, Siyuan 
> > >Cc: edk2-devel@lists.01.org
> > >Subject: Re: [edk2] Reminder for deleting 3 network drivers in
> > >MdeModulePkg
> > >
> > >Hi Fu Siyuan,
> > >
> > >That is fine too.
> > >But I expect the change to be one to go in the week after a stable tag
> > >has been made.
> > >
> > >(My own philosophy is that one can be quite aggressive with removals,
> > >because if it turns out to have been a bad idea, git revert can
> > >quickly restore the tree to the state it was.)
> > >
> > >Best Regards,
> > >
> > >Leif
> > >
> > >On Wed, Oct 31, 2018 at 02:58:47AM +, Fu, Siyuan wrote:
> > >> Hi, Leif
> > >>
> > >> Just notice that you are saying edk2-stable201811 tag.
> > >>
> > >> We need more time to collect community/marketing feedback on
> > >> deleting these driver, so it may won't be able to catch the stable
> > >> tag in next month.
> > >>
> > >> BestRegards
> > >> Fu Siyuan
> > >>
> > >>
> > >> > -Original Message-
> > >> > From: Fu, Siyuan
> > >> > Sent: Wednesday, October 31, 2018 8:49 AM
> > >> > To: Leif Lindholm 
> > >> > Cc: edk2-devel@lists.01.org
> > >> > Subject: RE: [edk2] Reminder for deleting 3 network drivers in
> > >> > MdeModulePkg
> > >> >
> > >> > Hi, Leif
> > >> >
> > >> > I think checking the branch is a little better than the tag, because we
> > >> > may still have critical bug fixes after the official release.
> > >> >
> > >> > While any of them are not recommended, always using the NetworkPkg
> > >version
> > >> > driver is the best choice.
> > >> >
> > >> > I will modify the edk2 network wiki page for an updated sample DSC/FDF
> > >> > section, if this patch could pass review w/o objection.
> > >> > https://github.com/tianocore/tianocore.github.io/wiki/NetworkPkg-
> > >Getting-
> > >> > Started-Guide
> > >> >
> > >> >
> > >> > BestRegards
> > >> > Fu Siyuan
> > >> >
> > >> >
> > >> > > -Original Message-
> > >> > > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf
> > >Of
> > >> > > Leif Lindholm
> > >> > > Sent: Tuesday, October 30, 2018 6:47 PM
> > >> > > To: Fu, Siyuan 
> > >> > > Cc: edk2-devel@lists.01.org
> > >> > > Subject: Re: [edk2] Reminder for deleting 3 network drivers in
> > >> > > MdeModulePkg
> > >> > >
> > >> > > Hi Fu Siyan,
> > >> > >
> > >> > > On Tue, Oct 30, 2018 at 08:11:52AM +, Fu, Siyuan wrote:
> > >> > > > People who want to continue use these deleted drivers could go to
> > >> > > > edk2/UDK2018 branch to get them, but it's *highly not recommended*.
> > >> > >
> > >> > > They should also be able to use edk2-stable201811, right?
> > >> > >
> > >> > > > *If you have any opposition on deleting these drivers, please let 
> > >> > > > me
> > >> > > > know before this weekend, thanks.*
> > >> > >
> > >> > > I am all for this change. The diffstat is very nice :)
> > >> > >
> > >> > > Best Regards,
> > >> > >
> > >> > > Leif
> > >> > > ___
> > >> > > edk2-devel mailing list
> > >> > > edk2-devel@lists.01.org
> > >> > > https://lists.01.org/mailman/listinfo/edk2-devel
> > >___
> > >edk2-devel mailing list
> > >edk2-devel@lists.01.org
> > >https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 2/6] IntelFrameworkModulePkg: fix build for AARCH64/ARM

2018-11-02 Thread Gao, Liming
That's good. Thanks!

> -Original Message-
> From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> Sent: Friday, November 2, 2018 6:15 PM
> To: Gao, Liming 
> Cc: edk2-devel@lists.01.org
> Subject: Re: [PATCH 2/6] IntelFrameworkModulePkg: fix build for AARCH64/ARM
> 
> On Fri, Nov 02, 2018 at 01:39:24AM +, Gao, Liming wrote:
> > Leif:
> >   There is one mistake in comments  >+  #^M. Could you clean it?
> >   With this change, Reviewed-by: Liming Gao .
> 
> Whoops, thanks for spotting.
> Will do.
> 
> >   Besides, have you verified  AARCH64 GCC build?
> 
> AARCH64 and ARM, GCC5 and CLANG38.
> 
> Several modules from this package are already used by ARM/AARCH64
> platforms, it was just not working to build only the package.
> 
> Regards,
> 
> Leif
> 
> > Thanks
> > Liming
> > >-Original Message-
> > >From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> > >Sent: Thursday, November 01, 2018 11:37 PM
> > >To: edk2-devel@lists.01.org
> > >Cc: Gao, Liming 
> > >Subject: [PATCH 2/6] IntelFrameworkModulePkg: fix build for AARCH64/ARM
> > >
> > >Contrary to what the name suggests, some modules in this package are used
> > >on other architecture. ARM is already listed in SUPPORTED_ARCHITECTURES
> > >in the .dsc, but AARCH64 was never added.
> > >
> > >Add that, and force inclusion of CompilerIntrinsicsLib and
> > >BaseStackCheckLib for AARCH64/ARM to make the build successful.
> > >
> > >Cc: Liming Gao 
> > >Contributed-under: TianoCore Contribution Agreement 1.1
> > >Signed-off-by: Leif Lindholm 
> > >---
> > > IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc | 13
> > >-
> > > 1 file changed, 12 insertions(+), 1 deletion(-)
> > >
> > >diff --git a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
> > >b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
> > >index 894c5340a0..14bef5356e 100644
> > >--- a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
> > >+++ b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
> > >@@ -25,7 +25,7 @@ [Defines]
> > >   PLATFORM_VERSION   = 0.96
> > >   DSC_SPECIFICATION  = 0x00010005
> > >   OUTPUT_DIRECTORY   = Build/IntelFrameworkModuleAll
> > >-  SUPPORTED_ARCHITECTURES= IA32|X64|EBC|ARM
> > >+  SUPPORTED_ARCHITECTURES= IA32|X64|EBC|ARM|AARCH64
> > >   BUILD_TARGETS  = DEBUG|RELEASE|NOOPT
> > >   SKUID_IDENTIFIER   = DEFAULT
> > >
> > >@@ -76,6 +76,17 @@ [LibraryClasses]
> > >   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
> > >   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
> > >
> > >+[LibraryClasses.ARM, LibraryClasses.AARCH64]
> > >+  #
> > >+  # It is not possible to prevent the ARM compiler for generic intrinsic
> > >functions.
> > >+  # This library provides the instrinsic functions generate by a given 
> > >compiler.
> > >+  # And NULL mean link this library into all ARM images.
> > >+  #^M
> > >+  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> > >+
> > >+  # Add support for GCC stack protector
> > >+  NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
> > >+
> > > [LibraryClasses.common.PEIM]
> > >   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> > >   PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
> > >--
> > >2.11.0
> >
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 2/4] MdeModulePkg/SdMmcPciHcDxe: Add UhsSignaling to SdMmcOverride protocol

2018-11-02 Thread Marcin Wojtas
pt., 2 lis 2018 o 09:21 Marcin Wojtas  napisał(a):
>
> Hi Hao,
>
> czw., 1 lis 2018 o 08:06 Wu, Hao A  napisał(a):
> >
> > Hi Marcin,
> >
> > > -Original Message-
> > > From: Marcin Wojtas [mailto:m...@semihalf.com]
> > > Sent: Friday, October 05, 2018 9:25 PM
> > > To: edk2-devel@lists.01.org
> > > Cc: Tian, Feng; Kinney, Michael D; Gao, Liming; leif.lindh...@linaro.org; 
> > > Wu,
> > > Hao A; ard.biesheu...@linaro.org; nad...@marvell.com;
> > > m...@semihalf.com; j...@semihalf.com; t...@semihalf.com
> > > Subject: [PATCH v2 2/4] MdeModulePkg/SdMmcPciHcDxe: Add UhsSignaling
> > > to SdMmcOverride protocol
> > >
> > > From: Tomasz Michalec 
> > >
> > > Some SD Host Controlers use different values in Host Control 2 Register
> > > to select UHS Mode. This patch adds a new UhsSignaling type routine to
> > > the NotifyPhase of the SdMmcOverride protocol.
> > >
> > > UHS signaling configuration is moved to a common, default routine
> > > (SdMmcHcUhsSignaling), which is called when SdMmcOverride does not
> > > cover this functionality.
> > >
> > > Contributed-under: TianoCore Contribution Agreement 1.1
> > > Signed-off-by: Marcin Wojtas 
> > > ---
> > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h |  50 +++
> > >  MdeModulePkg/Include/Protocol/SdMmcOverride.h|   2 +
> > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c  | 153
> > > 
> > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c|  37 +++--
> > >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c |  69 +
> > >  5 files changed, 243 insertions(+), 68 deletions(-)
> > >
> > > diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > > b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > > index e389d52..a03160d 100644
> > > --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > > +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > > @@ -63,6 +63,39 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF
> > > ANY KIND, EITHER EXPRESS OR IMPLIED.
> > >  #define SD_MMC_HC_CTRL_VER0xFE
> > >
> > >  //
> > > +// SD Host Controler bits to HOST_CTRL2 register
> > > +//
> > > +#define SD_MMC_HC_CTRL_UHS_MASK   0x0007
> > > +#define SD_MMC_HC_CTRL_UHS_SDR12  0x
> > > +#define SD_MMC_HC_CTRL_UHS_SDR25  0x0001
> > > +#define SD_MMC_HC_CTRL_UHS_SDR50  0x0002
> > > +#define SD_MMC_HC_CTRL_UHS_SDR104 0x0003
> > > +#define SD_MMC_HC_CTRL_UHS_DDR50  0x0004
> > > +#define SD_MMC_HC_CTRL_MMC_DDR52  0x0004
> > > +#define SD_MMC_HC_CTRL_MMC_SDR50  0x0002
> >
> > I think SD_MMC_HC_CTRL_MMC_SDR50 is not needed here.
> >
> > Since according to the SD Physical Layer Simplified Specification, max clock
> > frequency for SD bus mode SDR50 is 100MHz. And there is no eMMC bus mode 
> > whose
> > max clock frequency is at 100MHz in Embedded Multi-Media Card Electrical
> > Standard (5.1).
>
> Ok, will drop it.
>
> >
> > > +#define SD_MMC_HC_CTRL_MMC_SDR25  0x0001
> > > +#define SD_MMC_HC_CTRL_MMC_SDR12  0x
> > > +#define SD_MMC_HC_CTRL_HS200  0x0003
> > > +#define SD_MMC_HC_CTRL_HS400  0x0005
> >
> > How about the below renames & reorder?
> >
> > SD_MMC_HC_CTRL_MMC_LEGACY  0x
> > SD_MMC_HC_CTRL_MMC_HS_SDR  0x0001
> > SD_MMC_HC_CTRL_MMC_HS_DDR  0x0004
> > SD_MMC_HC_CTRL_MMC_HS200  0x0003
> > SD_MMC_HC_CTRL_MMC_HS400  0x0005
>
> Ok.
>
> >
> > > +
> > > +//
> > > +// Timing modes for uhs
> > > +//
> > > +typedef enum {
> > > +  SdMmcUhsSdr12,
> > > +  SdMmcUhsSdr25,
> > > +  SdMmcUhsSdr50,
> > > +  SdMmcUhsSdr104,
> > > +  SdMmcUhsDdr50,
> > > +  SdMmcMmcDdr52,
> > > +  SdMmcMmcSdr50,
> > > +  SdMmcMmcSdr25,
> > > +  SdMmcMmcSdr12,
> > > +  SdMmcMmcHs200,
> > > +  SdMmcMmcHs400,
> > > +} SD_MMC_UHS_TIMING;
> >
> > Suggest a similar drop of 'SdMmcMmcSdr50' and rename according to the above
> > comments upon HOST_CTRL2 register value definitions. Also, how about a 
> > rename
> > for enum to SD_MMC_BUS_MODE?
>
> Ok.
>
> >
> > > +
> > > +//
> > >  // The transfer modes supported by SD Host Controller
> > >  // Simplified Spec 3.0 Table 1-2
> > >  //
> > > @@ -508,4 +541,21 @@ SdMmcHcInitTimeoutCtrl (
> > >IN UINT8  Slot
> > >);
> > >
> > > +/**
> > > +  Set SD Host Controler control 2 registry according to selected speed.
> > > +
> > > +  @param[in] PciIo  The PCI IO protocol instance.
> > > +  @param[in] Slot   The slot number of the SD card to send the
> > > command to.
> > > +  @param[in] Timing The timing to select.
> > > +
> > > +  @retval EFI_SUCCESS   The timing is set successfully.
> > > +  @retval OthersThe timing isn't set successfully.
> > > +**/
> > > +EFI_STATUS
> > > +SdMmcHcUhsSignaling (
> > > +  IN EFI_PCI_IO_PROTOCOL*PciIo,
> > > +  IN UINT8  Slot,
> > > +  IN SD_MMC_UHS_TIMING  Timing
> > > +  );
> > > +
> > >  #endif
> > > diff --git a/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > > 

Re: [edk2] [PATCH] UnixPkg: Remove UnixPkg and update Maintainers.txt

2018-11-02 Thread Leif Lindholm
On Fri, Nov 02, 2018 at 10:46:30AM +0800, Shenglei Zhang wrote:
> UnixPkg is deprecated.
> The same functionality is supported using the EmulatorPkg.
> Please see EmulatorPkg/README for more information about
> EmulatorPkg.
> https://bugzilla.tianocore.org/show_bug.cgi?id=1291
> 
> Cc: Andrew Fish 
> Cc: Laszlo Ersek 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Shenglei Zhang 

Sounds good to me.
Reviewed-by: Leif Lindholm 

> ---
>  Maintainers.txt| 4 
>  UnixPkg/Deprecated.txt | 5 -
>  2 files changed, 9 deletions(-)
>  delete mode 100644 UnixPkg/Deprecated.txt
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index 36c6689afd..b127caf6b6 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -261,10 +261,6 @@ W: 
> https://github.com/tianocore/tianocore.github.io/wiki/UefiCpuPkg
>  M: Eric Dong 
>  R: Laszlo Ersek 
>  
> -UnixPkg
> -W: https://github.com/tianocore/tianocore.github.io/wiki/UnixPkg
> -S: Obsolete (Use EmulatorPkg instead)
> -
>  Vlv2DeviceRefCodePkg
>  M: David Wei 
>  M: Mang Guo 
> diff --git a/UnixPkg/Deprecated.txt b/UnixPkg/Deprecated.txt
> deleted file mode 100644
> index 5ffad5fd25..00
> --- a/UnixPkg/Deprecated.txt
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -UnixPkg is deprecated.
> -
> -The same functionality is supported using the EmulatorPkg.
> -Please see EmulatorPkg/README for more information about EmulatorPkg.
> -
> -- 
> 2.18.0.windows.1
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v2] AppPkg: fix webserver build for !Ia32/X64

2018-11-02 Thread Leif Lindholm
The WebServer application is not meant to be Ia32/X64 specific, and would
build for other architectures, if it wasn't for the
  #include 
in WebServer.h. Move that statement to Mtrr.c instead, which is the only
consumer, and is already being filtered out for other architectures.

Cc: Daryl McDaniel 
Cc: Jaben Carsey 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm 
---

Resending only 1/6, since the others got R-b already.
Looking at PageList.c, the app was clearly intended to be portable,
so updated commit message to reflect this.

 AppPkg/Applications/Sockets/WebServer/WebServer.h | 1 -
 AppPkg/Applications/Sockets/WebServer/Mtrr.c  | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/AppPkg/Applications/Sockets/WebServer/WebServer.h 
b/AppPkg/Applications/Sockets/WebServer/WebServer.h
index 21b07b63df..16c30c8d6d 100644
--- a/AppPkg/Applications/Sockets/WebServer/WebServer.h
+++ b/AppPkg/Applications/Sockets/WebServer/WebServer.h
@@ -20,7 +20,6 @@
 
 #include 
 
-#include 
 #include 
 #include 
 #include 
diff --git a/AppPkg/Applications/Sockets/WebServer/Mtrr.c 
b/AppPkg/Applications/Sockets/WebServer/Mtrr.c
index 54356bde64..4b8482d4e2 100644
--- a/AppPkg/Applications/Sockets/WebServer/Mtrr.c
+++ b/AppPkg/Applications/Sockets/WebServer/Mtrr.c
@@ -15,6 +15,7 @@
 
 #include 
 #include 
+#include 
 
 #define VARIABLE_MTRR_VALID 0x800
 
-- 
2.11.0

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


Re: [edk2] Capsules and versions

2018-11-02 Thread Tomas Pilar (tpilar)
Hi Sean,

This solves my problem, thank you very much!

Cheers,
Tom

On 01/11/2018 16:43, Sean Brogan wrote:
> Tom,
>
> Short answer:  It is tool dependent. 
>
> On Windows where the ESRT and FMP have been used for years there is another 
> file that contains that information (Capsules are just driver packages so 
> there is an INF and CAT file along with the BIN).  
> Once the firmware gets to processing the actual payload (after stripping all 
> the standard headers/structures) our firmware implementation makes use of a 
> EDK2 defined header that contains this information as well as lowest 
> supported version.   See here.  
> https://github.com/tianocore/edk2/blob/master/FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h
>   
>
> Hope that helps. 
>
> Thanks
> Sean
>
>
>
> -Original Message-
> From: edk2-devel  On Behalf Of Tomas Pilar 
> (tpilar)
> Sent: Thursday, November 1, 2018 7:22 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] Capsules and versions
>
> Hi,
>
> I am trying to implement FMP in our IHV UEFI driver so that we can update 
> firmware and the driver using capsules. I get the ESRT populated by the 
> platform EsrtFmpDxe, that's all great.
>
> However, it seems that EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER does not 
> contain any version information about the firmware blob (neither Version nor 
> ImageId). How is the OS tool that stages capsules supposed to know whether 
> the capsule contains firmware that has been in fact already applied?
>
> Cheers,
> Tom
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.01.org%2Fmailman%2Flistinfo%2Fedk2-develdata=02%7C01%7Csean.brogan%40microsoft.com%7Cdbe4babaafe84ee0a01c08d6400699cd%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636766794429049806sdata=CaAhG3UhI2%2BqSA6ml7USrFpGjuENBMNS4HK5xKuUGec%3Dreserved=0

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


Re: [edk2] [PATCH v2 0/4] SdMmcOverride extension

2018-11-02 Thread Marcin Wojtas
Hao,

czw., 1 lis 2018 o 08:11 Wu, Hao A  napisał(a):
>
> Hi Marcin and Ard,
>
> > -Original Message-
> > From: Marcin Wojtas [mailto:m...@semihalf.com]
> > Sent: Friday, October 05, 2018 9:25 PM
> > To: edk2-devel@lists.01.org
> > Cc: Tian, Feng; Kinney, Michael D; Gao, Liming; leif.lindh...@linaro.org; 
> > Wu,
> > Hao A; ard.biesheu...@linaro.org; nad...@marvell.com;
> > m...@semihalf.com; j...@semihalf.com; t...@semihalf.com
> > Subject: [PATCH v2 0/4] SdMmcOverride extension
> >
> > Hi,
> >
> > This is the second version of the patchset. Initial one was
> > interleaved with the fixes, which after split got already merged.
> > The biggest change is - resigning from the new callbacks
> > and extending parameter lists of both NotifyPhase and Capability
> > routines.
> >
> > Patches are available in the github:
> > https://github.com/MarvellEmbeddedProcessors/edk2-open-
> > platform/commits/sdmmc-override-upstream-r20181005
> >
> > Please note that extending SdMmcOverride protocol was impacting
> > so far the only user of it (Synquacer controller). In paralel
> > edk2-platforms patchset, a patch can be found:
> > ("Silicon/SynQuacer/PlatformDxe: adjust to updated SdMmcOverride")
> > which immunizes for above and future extensions of the protocol:
> > https://github.com/MarvellEmbeddedProcessors/edk2-open-
> > platform/commits/xenon-upstream-r20181005
> >
> > I'm looking forward to the comments and remarks.
>
> Since there are protocol service interface changes, maybe a version change
> (macro EDKII_SD_MMC_OVERRIDE_PROTOCOL_VERSION) for the SdMmc Override Protocol
> is needed.
>
> Please share your thoughts on this one. Thanks.

IMO such change is justified. I can add it in a separate on top, you
can decide later with Ard, if it's good to merge it.

Best regards,
Marcin

>
> Best Regards,
> Hao Wu
>
> >
> > Best regards,
> > Marcin
> >
> > Changelog:
> > v1 -> v2
> > * Rebase onto newest master
> > * 1/4 [new patch] - preparation for extending NotifyPhase
> > * 2/4 - UhsSignaling as a part of NotifyPhase
> > * 3/4 - SwitchClockFreqPost as a part of NotifyPhase
> > * 4/4 - Allow updating BaseClkFreq via Capability instead of the
> > independent callback.
> >
> > Marcin Wojtas (2):
> >   MdeModulePkg/SdMmcPciHcDxe: Add an optional parameter in
> > NotifyPhase
> >   MdeModulePkg/SdMmcPciHcDxe: Allow overriding base clock frequency
> >
> > Tomasz Michalec (2):
> >   MdeModulePkg/SdMmcPciHcDxe: Add UhsSignaling to SdMmcOverride
> > protocol
> >   MdeModulePkg/SdMmcPciHcDxe: Add SwitchClockFreqPost to
> > SdMmcOverride
> >
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h |   6 +
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h   |  62 +-
> >  MdeModulePkg/Include/Protocol/SdMmcOverride.h  |  12 +-
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c| 215
> > ++--
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c  |  57 +-
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c |  18 +-
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c   | 108 -
> > -
> >  7 files changed, 383 insertions(+), 95 deletions(-)
> >
> > --
> > 2.7.4
>
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 2/6] IntelFrameworkModulePkg: fix build for AARCH64/ARM

2018-11-02 Thread Leif Lindholm
On Fri, Nov 02, 2018 at 01:39:24AM +, Gao, Liming wrote:
> Leif:
>   There is one mistake in comments  >+  #^M. Could you clean it?
>   With this change, Reviewed-by: Liming Gao .

Whoops, thanks for spotting.
Will do.

>   Besides, have you verified  AARCH64 GCC build? 

AARCH64 and ARM, GCC5 and CLANG38.

Several modules from this package are already used by ARM/AARCH64
platforms, it was just not working to build only the package.

Regards,

Leif

> Thanks
> Liming
> >-Original Message-
> >From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> >Sent: Thursday, November 01, 2018 11:37 PM
> >To: edk2-devel@lists.01.org
> >Cc: Gao, Liming 
> >Subject: [PATCH 2/6] IntelFrameworkModulePkg: fix build for AARCH64/ARM
> >
> >Contrary to what the name suggests, some modules in this package are used
> >on other architecture. ARM is already listed in SUPPORTED_ARCHITECTURES
> >in the .dsc, but AARCH64 was never added.
> >
> >Add that, and force inclusion of CompilerIntrinsicsLib and
> >BaseStackCheckLib for AARCH64/ARM to make the build successful.
> >
> >Cc: Liming Gao 
> >Contributed-under: TianoCore Contribution Agreement 1.1
> >Signed-off-by: Leif Lindholm 
> >---
> > IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc | 13
> >-
> > 1 file changed, 12 insertions(+), 1 deletion(-)
> >
> >diff --git a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
> >b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
> >index 894c5340a0..14bef5356e 100644
> >--- a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
> >+++ b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
> >@@ -25,7 +25,7 @@ [Defines]
> >   PLATFORM_VERSION   = 0.96
> >   DSC_SPECIFICATION  = 0x00010005
> >   OUTPUT_DIRECTORY   = Build/IntelFrameworkModuleAll
> >-  SUPPORTED_ARCHITECTURES= IA32|X64|EBC|ARM
> >+  SUPPORTED_ARCHITECTURES= IA32|X64|EBC|ARM|AARCH64
> >   BUILD_TARGETS  = DEBUG|RELEASE|NOOPT
> >   SKUID_IDENTIFIER   = DEFAULT
> >
> >@@ -76,6 +76,17 @@ [LibraryClasses]
> >   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
> >   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
> >
> >+[LibraryClasses.ARM, LibraryClasses.AARCH64]
> >+  #
> >+  # It is not possible to prevent the ARM compiler for generic intrinsic
> >functions.
> >+  # This library provides the instrinsic functions generate by a given 
> >compiler.
> >+  # And NULL mean link this library into all ARM images.
> >+  #^M
> >+  NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
> >+
> >+  # Add support for GCC stack protector
> >+  NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
> >+
> > [LibraryClasses.common.PEIM]
> >   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
> >   PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
> >--
> >2.11.0
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 4/4] MdeModulePkg/SdMmcPciHcDxe: Allow overriding base clock frequency

2018-11-02 Thread Marcin Wojtas
Hi Hao,


czw., 1 lis 2018 o 08:11 Wu, Hao A  napisał(a):
>
> Hi Marcin,
>
> > -Original Message-
> > From: Marcin Wojtas [mailto:m...@semihalf.com]
> > Sent: Friday, October 05, 2018 9:25 PM
> > To: edk2-devel@lists.01.org
> > Cc: Tian, Feng; Kinney, Michael D; Gao, Liming; leif.lindh...@linaro.org; 
> > Wu,
> > Hao A; ard.biesheu...@linaro.org; nad...@marvell.com;
> > m...@semihalf.com; j...@semihalf.com; t...@semihalf.com
> > Subject: [PATCH v2 4/4] MdeModulePkg/SdMmcPciHcDxe: Allow overriding
> > base clock frequency
> >
> > Some SdMmc host controllers are run by clocks with different
> > frequency than it is reflected in Capabilities Register 1.
> > It is allowed by SDHCI specification ver. 4.2 - if BaseClkFreq
> > field value of the Capability Register 1 is zero, the clock
> > frequency must be obtained via another method.
> >
> > Because the bitfield is only 8 bits wide, a maximum value
> > that could be obtained from hardware is 255MHz.
> > In case the actual frequency exceeds 255MHz, the 8-bit BaseClkFreq
> > member of SD_MMC_HC_SLOT_CAP structure occurs to be not sufficient
> > to be used for setting the clock speed in SdMmcHcClockSupply
> > function.
> >
> > This patch adds new UINT32 array ('BaseClkFreq[]') to
> > SD_MMC_HC_PRIVATE_DATA structure for specifying
> > the input clock speed for each slot of the host controller.
> > All routines that are used for clock configuration are
> > updated accordingly.
> >
> > This patch also adds new IN OUT BaseClockFreq field
> > in the Capability callback of the SdMmcOverride,
> > protocol which allows to update BaseClkFreq value.
> >
> > The patch reuses original commit from edk2-platforms:
> > 20f6f144d3a8 ("Marvell/Drivers: XenonDxe: Allow overriding base clock
> > frequency")
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Marcin Wojtas 
> > ---
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h |  6 +
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h   | 12 +
> >  MdeModulePkg/Include/Protocol/SdMmcOverride.h  |  5 +++-
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c|  4 +--
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c  |  4 +--
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c | 18
> > +++--
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c   | 27
> > +++-
> >  7 files changed, 52 insertions(+), 24 deletions(-)
> >
> > diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h
> > b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h
> > index c683600..8c1a589 100644
> > --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h
> > +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h
> > @@ -118,6 +118,12 @@ typedef struct {
> >UINT64  MaxCurrent[SD_MMC_HC_MAX_SLOT];
> >
> >UINT32  ControllerVersion;
> > +
> > +  //
> > +  // Some controllers may require to override base clock frequency
> > +  // value stored in Capabilities Register 1.
> > +  //
> > +  UINT32  BaseClkFreq[SD_MMC_HC_MAX_SLOT];
> >  } SD_MMC_HC_PRIVATE_DATA;
> >
> >  #define SD_MMC_HC_TRB_SIG SIGNATURE_32 ('T', 'R', 'B', 'T')
> > diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > index a03160d..f01ba21 100644
> > --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > @@ -173,12 +173,14 @@ typedef struct {
> >
> >@param[in]  SlotThe slot number of the SD card to send the
> > command to.
> >@param[in]  Capability  The buffer to store the capability data.
> > +  @param[in]  BaseClkFreq The base clock frequency of host controller 
> > in
> > MHz.
> >
> >  **/
> >  VOID
> >  DumpCapabilityReg (
> >IN UINT8Slot,
> > -  IN SD_MMC_HC_SLOT_CAP   *Capability
> > +  IN SD_MMC_HC_SLOT_CAP   *Capability,
> > +  IN UINT32   BaseClkFreq
> >);
> >
> >  /**
> > @@ -431,7 +433,7 @@ SdMmcHcStopClock (
> >@param[in] PciIo  The PCI IO protocol instance.
> >@param[in] Slot   The slot number of the SD card to send the
> > command to.
> >@param[in] ClockFreq  The max clock frequency to be set. The unit is 
> > KHz.
> > -  @param[in] Capability The capability of the slot.
> > +  @param[in] BaseClkFreqThe base clock frequency of host controller in
> > MHz.
> >
> >@retval EFI_SUCCESS   The clock is supplied successfully.
> >@retval OthersThe clock isn't supplied successfully.
> > @@ -442,7 +444,7 @@ SdMmcHcClockSupply (
> >IN EFI_PCI_IO_PROTOCOL*PciIo,
> >IN UINT8  Slot,
> >IN UINT64 ClockFreq,
> > -  IN SD_MMC_HC_SLOT_CAP Capability
> > +  IN UINT32 BaseClkFreq
> >);
> >
> >  /**
> > @@ -490,7 +492,7 @@ SdMmcHcSetBusWidth (
> >
> >@param[in] PciIo   

Re: [edk2] [PATCH v2 3/4] MdeModulePkg/SdMmcPciHcDxe: Add SwitchClockFreqPost to SdMmcOverride

2018-11-02 Thread Marcin Wojtas
Hi Hao,

czw., 1 lis 2018 o 08:06 Wu, Hao A  napisał(a):
>
> > -Original Message-
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> > Marcin Wojtas
> > Sent: Friday, October 05, 2018 9:25 PM
> > To: edk2-devel@lists.01.org
> > Cc: Tian, Feng; t...@semihalf.com; Wu, Hao A; nad...@marvell.com; Gao,
> > Liming; Kinney, Michael D
> > Subject: [edk2] [PATCH v2 3/4] MdeModulePkg/SdMmcPciHcDxe: Add
> > SwitchClockFreqPost to SdMmcOverride
> >
> > From: Tomasz Michalec 
> >
> > Some SD Host Controlers need to do additional opperations after clock
> > frequency switch.
> >
> > This patch add new callback type to NotifyPhase of the SdMmcOverride
> > protocol. It is called after EmmcSwitchClockFreq and SdMmcHcClockSupply.
>
> Hi Marcin,
>
> Just curious, I had a quick glance at the implementation of the
> XenonSwitchClockFreqPost() in your platform part changes. Are those operations
> within the function mandatory during the HC initialization? Are they mainly 
> for
> performance or stability consideration?

As for Marvellt he Xenon controller is pretty complicated IP, which
consists of standard Sd/Mmc part and the dedicated PHY, that's
responsible for signal integrity for all bus modes. It requires
additional configuration, depending on the mode.

>
> I am wondering if this kind of customization is common among the SD & eMMC 
> devices.

Well, in Linux this clock tuning after switching to certain bus mode.
This driver simply does it in 'set_ios' callback, whose custom
implementation (platform-specific code surrounding generic
sdhci_set_ios call) is _very_ common among all drivers/mmc/host
drivers.

Do you have any objections to the patch itself, given above explanation?

Best regards,
Marcin

>
> Best Regards,
> Hao Wu
>
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Marcin Wojtas 
> > ---
> >  MdeModulePkg/Include/Protocol/SdMmcOverride.h   |  1 +
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c | 60
> > 
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c   | 18 ++
> >  3 files changed, 79 insertions(+)
> >
> > diff --git a/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > b/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > index 25db98a..d9daada 100644
> > --- a/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > +++ b/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > @@ -33,6 +33,7 @@ typedef enum {
> >EdkiiSdMmcInitHostPre,
> >EdkiiSdMmcInitHostPost,
> >EdkiiSdMmcUhsSignaling,
> > +  EdkiiSdMmcSwitchClockFreqPost,
> >  } EDKII_SD_MMC_PHASE_TYPE;
> >
> >  /**
> > diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
> > b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
> > index 05bd4a0..7e75283 100755
> > --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
> > +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
> > @@ -796,6 +796,27 @@ EmmcSwitchToHighSpeed (
> >
> >HsTiming = 1;
> >Status = EmmcSwitchClockFreq (PciIo, PassThru, Slot, Rca, HsTiming,
> > ClockFreq);
> > +  if (EFI_ERROR (Status)) {
> > +return Status;
> > +  }
> > +
> > +  if (mOverride != NULL && mOverride->NotifyPhase != NULL) {
> > +Status = mOverride->NotifyPhase (
> > +  Private->ControllerHandle,
> > +  Slot,
> > +  EdkiiSdMmcSwitchClockFreqPost,
> > +  
> > +  );
> > +if (EFI_ERROR (Status)) {
> > +  DEBUG ((
> > +DEBUG_ERROR,
> > +"%a: SD/MMC switch clock freq post notifier callback failed - 
> > %r\n",
> > +__FUNCTION__,
> > +Status
> > +));
> > +  return Status;
> > +}
> > +  }
> >
> >return Status;
> >  }
> > @@ -905,6 +926,24 @@ EmmcSwitchToHS200 (
> >  return Status;
> >}
> >
> > +  if (mOverride != NULL && mOverride->NotifyPhase != NULL) {
> > +Status = mOverride->NotifyPhase (
> > +  Private->ControllerHandle,
> > +  Slot,
> > +  EdkiiSdMmcSwitchClockFreqPost,
> > +  
> > +  );
> > +if (EFI_ERROR (Status)) {
> > +  DEBUG ((
> > +DEBUG_ERROR,
> > +"%a: SD/MMC switch clock freq post notifier callback failed - 
> > %r\n",
> > +__FUNCTION__,
> > +Status
> > +));
> > +  return Status;
> > +}
> > +  }
> > +
> >Status = EmmcTuningClkForHs200 (PciIo, PassThru, Slot, BusWidth);
> >
> >return Status;
> > @@ -989,6 +1028,27 @@ EmmcSwitchToHS400 (
> >
> >HsTiming = 3;
> >Status = EmmcSwitchClockFreq (PciIo, PassThru, Slot, Rca, HsTiming,
> > ClockFreq);
> > +  if (EFI_ERROR (Status)) {
> > +return Status;
> > +  }
> > +
> > +  if (mOverride != NULL && mOverride->NotifyPhase != NULL) {
> > +Status = mOverride->NotifyPhase (
> > +  Private->ControllerHandle,
> > +  Slot,
> > +

Re: [edk2] [PATCH] Maintainers.txt: Change package maintainer of IntelSiliconPkg

2018-11-02 Thread Yao, Jiewen
reviewed by:jiewen@intel.com

thank you!
Yao, Jiewen


> 在 2018年11月2日,下午5:19,Ni, Ruiyu  写道:
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ruiyu Ni 
> Cc: Jiewen Yao 
> ---
> Maintainers.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index 36c6689afd..937aedc664 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -172,7 +172,7 @@ M: Jiewen Yao 
> 
> IntelSiliconPkg
> W: https://github.com/tianocore/tianocore.github.io/wiki/IntelSiliconPkg
> -M: Jiewen Yao 
> +M: Ruiyu Ni 
> M: Rangasai V Chaganty 
> 
> MdeModulePkg
> -- 
> 2.16.1.windows.1
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH] Maintainers.txt: Change package maintainer of UefiCpuPkg

2018-11-02 Thread Ruiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni 
Cc: Eric Dong 
---
 Maintainers.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Maintainers.txt b/Maintainers.txt
index 937aedc664..29d1e10c73 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -259,6 +259,7 @@ M: Jaben Carsey 
 UefiCpuPkg
 W: https://github.com/tianocore/tianocore.github.io/wiki/UefiCpuPkg
 M: Eric Dong 
+M: Ruiyu Ni 
 R: Laszlo Ersek 
 
 UnixPkg
-- 
2.16.1.windows.1

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


[edk2] [PATCH] Maintainers.txt: Change package maintainer of IntelSiliconPkg

2018-11-02 Thread Ruiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni 
Cc: Jiewen Yao 
---
 Maintainers.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Maintainers.txt b/Maintainers.txt
index 36c6689afd..937aedc664 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -172,7 +172,7 @@ M: Jiewen Yao 
 
 IntelSiliconPkg
 W: https://github.com/tianocore/tianocore.github.io/wiki/IntelSiliconPkg
-M: Jiewen Yao 
+M: Ruiyu Ni 
 M: Rangasai V Chaganty 
 
 MdeModulePkg
-- 
2.16.1.windows.1

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


Re: [edk2] [PATCH] BaseTools: Check the max size for string PCD.

2018-11-02 Thread Feng, Bob C
Reviewed-by: Bob Feng 

-Original Message-
From: Zhao, ZhiqiangX 
Sent: Wednesday, October 31, 2018 6:36 PM
To: edk2-devel@lists.01.org
Cc: Zhao, ZhiqiangX ; Gao, Liming 
; Zhu, Yonghong ; Feng, Bob C 

Subject: [PATCH] BaseTools: Check the max size for string PCD.

According to PCD_DATABASE_INIT in
edk2\MdeModulePkg\Include\Guid\PcdDataBaseSignatureGuid.h,
the max size for string PCD should not exceed USHRT_MAX 65535(0x).

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: ZhiqiangX Zhao 
Cc: Liming Gao 
Cc: Yonghong Zhu 
Cc: Bob Feng 
---
 BaseTools/Source/Python/AutoGen/AutoGen.py | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py 
b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 9c3759c0f5..33f7e6471d 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -1397,6 +1397,13 @@ class PlatformAutoGen(AutoGen):
 self.VariableInfo = self.CollectVariables(self._DynamicPcdList)
 vardump = self.VariableInfo.dump()
 if vardump:
+#
+#According to PCD_DATABASE_INIT in 
edk2\MdeModulePkg\Include\Guid\PcdDataBaseSignatureGuid.h,
+#the max size for string PCD should not exceed USHRT_MAX 
65535(0x).
+#typedef UINT16 SIZE_INFO;
+#//SIZE_INFO  SizeTable[];
+if len(vardump.split(",")) > 0x:
+EdkLogger.error("build", RESOURCE_OVERFLOW, 'The 
current length of PCD %s value is %d, it exceeds to the max size of String 
PCD.' 
%(".".join([PcdNvStoreDfBuffer.TokenSpaceGuidCName,PcdNvStoreDfBuffer.TokenCName])
 ,len(vardump.split(","
 PcdNvStoreDfBuffer.DefaultValue = vardump
 for skuname in PcdNvStoreDfBuffer.SkuInfoList:
 PcdNvStoreDfBuffer.SkuInfoList[skuname].DefaultValue = 
vardump
-- 
2.14.1.windows.1

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


[edk2] [Patch] UefiCpuPkg/MpInitLib: Rollback old change 2a5997f8.

2018-11-02 Thread Eric Dong
In some special cases, after BSP send Init-sipi-sipi signal
AP need more time to start the Ap procedure. In this case
BSP may think AP has finish its task but truly AP not begin
yet.

Rollback former change to keep the status which only used
when AP truly finished task.

Cc: Ruiyu Ni 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong 
---
 UefiCpuPkg/Library/MpInitLib/MpLib.c | 10 ++
 UefiCpuPkg/Library/MpInitLib/MpLib.h |  1 +
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c 
b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index 85ca4a2946..7f4d6e60bd 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
@@ -696,7 +696,7 @@ ApWakeupFunction (
 }
   }
 }
-SetApState (>CpuData[ProcessorNumber], CpuStateIdle);
+SetApState (>CpuData[ProcessorNumber], CpuStateFinished);
   }
 }
 
@@ -1370,10 +1370,11 @@ CheckThisAP (
   //
   // If the AP finishes for StartupThisAP(), return EFI_SUCCESS.
   //
-  if (GetApState(CpuData) == CpuStateIdle) {
+  if (GetApState(CpuData) == CpuStateFinished) {
 if (CpuData->Finished != NULL) {
   *(CpuData->Finished) = TRUE;
 }
+SetApState (CpuData, CpuStateIdle);
 return EFI_SUCCESS;
   } else {
 //
@@ -1434,9 +1435,10 @@ CheckAllAPs (
 // Only BSP and corresponding AP access this unit of CPU Data. This means 
the AP will not modify the
 // value of state after setting the it to CpuStateIdle, so BSP can safely 
make use of its value.
 //
-if (GetApState(CpuData) == CpuStateIdle) {
+if (GetApState(CpuData) == CpuStateFinished) {
   CpuMpData->RunningCount --;
   CpuMpData->CpuData[ProcessorNumber].Waiting = FALSE;
+  SetApState(CpuData, CpuStateIdle);
 
   //
   // If in Single Thread mode, then search for the next waiting AP for 
execution.
@@ -1937,7 +1939,7 @@ SwitchBSPWorker (
   //
   // Wait for old BSP finished AP task
   //
-  while (GetApState (>CpuData[CallerNumber]) != CpuStateIdle) {
+  while (GetApState (>CpuData[CallerNumber]) != CpuStateFinished) {
 CpuPause ();
   }
 
diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h 
b/UefiCpuPkg/Library/MpInitLib/MpLib.h
index 773db76b61..5f6986c240 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.h
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.h
@@ -89,6 +89,7 @@ typedef enum {
   CpuStateIdle,
   CpuStateReady,
   CpuStateBusy,
+  CpuStateFinished,
   CpuStateDisabled
 } CPU_STATE;
 
-- 
2.15.0.windows.1

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


Re: [edk2] [PATCH v2 2/4] MdeModulePkg/SdMmcPciHcDxe: Add UhsSignaling to SdMmcOverride protocol

2018-11-02 Thread Marcin Wojtas
Hi Hao,

czw., 1 lis 2018 o 08:06 Wu, Hao A  napisał(a):
>
> Hi Marcin,
>
> > -Original Message-
> > From: Marcin Wojtas [mailto:m...@semihalf.com]
> > Sent: Friday, October 05, 2018 9:25 PM
> > To: edk2-devel@lists.01.org
> > Cc: Tian, Feng; Kinney, Michael D; Gao, Liming; leif.lindh...@linaro.org; 
> > Wu,
> > Hao A; ard.biesheu...@linaro.org; nad...@marvell.com;
> > m...@semihalf.com; j...@semihalf.com; t...@semihalf.com
> > Subject: [PATCH v2 2/4] MdeModulePkg/SdMmcPciHcDxe: Add UhsSignaling
> > to SdMmcOverride protocol
> >
> > From: Tomasz Michalec 
> >
> > Some SD Host Controlers use different values in Host Control 2 Register
> > to select UHS Mode. This patch adds a new UhsSignaling type routine to
> > the NotifyPhase of the SdMmcOverride protocol.
> >
> > UHS signaling configuration is moved to a common, default routine
> > (SdMmcHcUhsSignaling), which is called when SdMmcOverride does not
> > cover this functionality.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Marcin Wojtas 
> > ---
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h |  50 +++
> >  MdeModulePkg/Include/Protocol/SdMmcOverride.h|   2 +
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c  | 153
> > 
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c|  37 +++--
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c |  69 +
> >  5 files changed, 243 insertions(+), 68 deletions(-)
> >
> > diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > index e389d52..a03160d 100644
> > --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h
> > @@ -63,6 +63,39 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF
> > ANY KIND, EITHER EXPRESS OR IMPLIED.
> >  #define SD_MMC_HC_CTRL_VER0xFE
> >
> >  //
> > +// SD Host Controler bits to HOST_CTRL2 register
> > +//
> > +#define SD_MMC_HC_CTRL_UHS_MASK   0x0007
> > +#define SD_MMC_HC_CTRL_UHS_SDR12  0x
> > +#define SD_MMC_HC_CTRL_UHS_SDR25  0x0001
> > +#define SD_MMC_HC_CTRL_UHS_SDR50  0x0002
> > +#define SD_MMC_HC_CTRL_UHS_SDR104 0x0003
> > +#define SD_MMC_HC_CTRL_UHS_DDR50  0x0004
> > +#define SD_MMC_HC_CTRL_MMC_DDR52  0x0004
> > +#define SD_MMC_HC_CTRL_MMC_SDR50  0x0002
>
> I think SD_MMC_HC_CTRL_MMC_SDR50 is not needed here.
>
> Since according to the SD Physical Layer Simplified Specification, max clock
> frequency for SD bus mode SDR50 is 100MHz. And there is no eMMC bus mode whose
> max clock frequency is at 100MHz in Embedded Multi-Media Card Electrical
> Standard (5.1).

Ok, will drop it.

>
> > +#define SD_MMC_HC_CTRL_MMC_SDR25  0x0001
> > +#define SD_MMC_HC_CTRL_MMC_SDR12  0x
> > +#define SD_MMC_HC_CTRL_HS200  0x0003
> > +#define SD_MMC_HC_CTRL_HS400  0x0005
>
> How about the below renames & reorder?
>
> SD_MMC_HC_CTRL_MMC_LEGACY  0x
> SD_MMC_HC_CTRL_MMC_HS_SDR  0x0001
> SD_MMC_HC_CTRL_MMC_HS_DDR  0x0004
> SD_MMC_HC_CTRL_MMC_HS200  0x0003
> SD_MMC_HC_CTRL_MMC_HS400  0x0005

Ok.

>
> > +
> > +//
> > +// Timing modes for uhs
> > +//
> > +typedef enum {
> > +  SdMmcUhsSdr12,
> > +  SdMmcUhsSdr25,
> > +  SdMmcUhsSdr50,
> > +  SdMmcUhsSdr104,
> > +  SdMmcUhsDdr50,
> > +  SdMmcMmcDdr52,
> > +  SdMmcMmcSdr50,
> > +  SdMmcMmcSdr25,
> > +  SdMmcMmcSdr12,
> > +  SdMmcMmcHs200,
> > +  SdMmcMmcHs400,
> > +} SD_MMC_UHS_TIMING;
>
> Suggest a similar drop of 'SdMmcMmcSdr50' and rename according to the above
> comments upon HOST_CTRL2 register value definitions. Also, how about a rename
> for enum to SD_MMC_BUS_MODE?

Ok.

>
> > +
> > +//
> >  // The transfer modes supported by SD Host Controller
> >  // Simplified Spec 3.0 Table 1-2
> >  //
> > @@ -508,4 +541,21 @@ SdMmcHcInitTimeoutCtrl (
> >IN UINT8  Slot
> >);
> >
> > +/**
> > +  Set SD Host Controler control 2 registry according to selected speed.
> > +
> > +  @param[in] PciIo  The PCI IO protocol instance.
> > +  @param[in] Slot   The slot number of the SD card to send the
> > command to.
> > +  @param[in] Timing The timing to select.
> > +
> > +  @retval EFI_SUCCESS   The timing is set successfully.
> > +  @retval OthersThe timing isn't set successfully.
> > +**/
> > +EFI_STATUS
> > +SdMmcHcUhsSignaling (
> > +  IN EFI_PCI_IO_PROTOCOL*PciIo,
> > +  IN UINT8  Slot,
> > +  IN SD_MMC_UHS_TIMING  Timing
> > +  );
> > +
> >  #endif
> > diff --git a/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > b/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > index 178945f..25db98a 100644
> > --- a/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > +++ b/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > @@ -17,6 +17,7 @@
> >  #ifndef __SD_MMC_OVERRIDE_H__
> >  #define __SD_MMC_OVERRIDE_H__
> >
> > +#include 
>
> Please do not expose a module private header file here.
>
> One 

[edk2] Plan to move all network components to NetworkPkg

2018-11-02 Thread Fu, Siyuan
Hi, All

The edk2 Bugzilla #1278 "Delete IPv4 only TCP/iSCSI/PXE drivers in 
MdeModulePkg" has been confirmed to be included in edk2-stable201903 tag, so 
platform DSC/FDF need to be updated to adopt the change by that time. I think 
might be an opportunity moment to make a little more - move all edk2 network 
related drivers/libraries into one single package - that what we want to do for 
a long time.

In current edk2, the network stack components are located mainly in 2 different 
places, the MdeModulePkg and NetworkPkg, due to some historical reasons. The 
MdeModulePkg contains most of the IPv4 stack drivers (in 
MdeModulePkg/Universal/Network directory), and all the network libraries. The 
NetworkPkg contains all the IPv6 stack drivers and also some dual stack drivers 
(like TcpDxe). The PCDs related to network configuration are also defined in 
different packages: PcdTftpBlockSize is in MdeModulePkg.dec and others are in 
NetworkPkg.dec. There are also drivers in these 2 packages have a same name 
(like UefiPxeBcDxe).

We can see these codes are not well organized, so I'd like to take this 
opportunity to change this situation, to move all network components to 
NetworkPkg, which will make the edk2 network stack code easier to use and 
maintain in the future.

I have created Bugzilla #1293 for this proposal, and I will send some patches 
for the detail changes. I hope it could be done together with #1278 so the 
platform only need to update their DSC/FDF file for one time. Please let me 
know if you have any comments on this, thanks.

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

BestRegards
Fu Siyuan

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


[edk2] [edk2-test][Patch] uefi-sct/SctPkg:The Lun display order issue in iSCSI device path text

2018-11-02 Thread Eric Jin
The LUN is an 8 byte array that is displayed in hexadecimal
format with byte 0 first (i.e., on the left) and byte 7 last
(i.e, on the right).

Cc: Supreeth Venkatesh 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Jin 
---
 .../BlackBoxTest/DevicePathFromTextBBTestCoverage.c | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c
index fc099d8..96cd84f 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackBoxTest/DevicePathFromTextBBTestCoverage.c
@@ -1,7 +1,7 @@
 /** @file
 
   Copyright 2006 - 2017 Unified EFI, Inc.
-  Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
@@ -1445,6 +1445,7 @@ CreateiScsiDeviceNode (
   UINT64  LunNum;
   ISCSI_DEVICE_PATH_WITH_NAME *iSCSI;
 
+  LunNum= 0;
   NameStr   = SctSplitStr (, L',');
   PortalGroupStr= SctSplitStr (, L',');
   LunStr= SctSplitStr (, L',');
@@ -1459,7 +1460,7 @@ CreateiScsiDeviceNode (
 );
   SctUnicodeToAscii (iSCSI->iSCSITargetName, NameStr, SctStrLen (NameStr));
   iSCSI->TargetPortalGroupTag = (UINT16) SctStrToUInt (PortalGroupStr);
-  SctStrToUInt64 (LunStr, );
+  StrToUInt8Array(LunStr, );
   iSCSI->Lun = LunNum;
 
   Options = 0x;
@@ -2846,12 +2847,12 @@ DevicePathFromTextConvertTextToDeviceNodeCoverageTest (
 (UINTN)__LINE__
 );
   //
-  // TDS 3.10.1.2.26
+  // TDS 3.10.1.2.26   In Lun 0x00567800, byte 3 is 0x56 and byte4 is 
0x78
   //
-  SctStrCpy (text, L"MyTargetName,0x12AB,5678,CRC32C,None,CHAP_BI,TCP");
+  SctStrCpy (text, 
L"MyTargetName,0x12AB,0x00567800,CRC32C,None,CHAP_BI,TCP");
   pDevicePath = CreateiScsiDeviceNode(text);
 
-  SctStrCpy (text, L"iSCSI(MyTargetName,0x12AB,5678,CRC32C,None,CHAP_BI,TCP)");
+  SctStrCpy (text, 
L"iSCSI(MyTargetName,0x12AB,0x00567800,CRC32C,None,CHAP_BI,TCP)");
   pReDevicePath = DevicePathFromText->ConvertTextToDeviceNode (text);
   if (SctCompareMem (pDevicePath, pReDevicePath, SctDevicePathNodeLength 
((EFI_DEVICE_PATH_PROTOCOL *) pReDevicePath)) == 0) {
 AssertionType = EFI_TEST_ASSERTION_PASSED;
@@ -2866,7 +2867,7 @@ DevicePathFromTextConvertTextToDeviceNodeCoverageTest (
 AssertionType,
 gDevicePathFromTextBBTestFunctionAssertionGuid114,
 L"EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL - ConvertDeviceNodeToText 
must correctly recover the converting ConvertTextToDeviceNode has acted on the 
device node string",
-L"%a:%d, Convert 
iSCSI(MyTargetName,0x12AB,5678,CRC32C,None,CHAP_BI,TCP)",
+L"%a:%d, Convert 
iSCSI(MyTargetName,0x12AB,0x00567800,CRC32C,None,CHAP_BI,TCP)",
 __FILE__,
 (UINTN)__LINE__
 );
-- 
2.9.0.windows.1

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


Re: [edk2] [PATCH 2/2] MdeModulePkg/BaseSortLib: Enable for all module types

2018-11-02 Thread Gao, Liming
Yes. I will wait for another patch in this patch set to be reviewed. 

>-Original Message-
>From: Zeng, Star
>Sent: Friday, November 02, 2018 1:00 PM
>To: Gao, Liming ; Jeff Brasen ;
>Ni, Ruiyu ; edk2-devel@lists.01.org
>Cc: Kinney, Michael D ; Gao, Liming
>; Zeng, Star 
>Subject: RE: [edk2] [PATCH 2/2] MdeModulePkg/BaseSortLib: Enable for all
>module types
>
>Liming,
>
>Will you help push the patch series?
>
>
>Thanks,
>Star
>
>-Original Message-
>From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Gao,
>Liming
>Sent: Thursday, November 1, 2018 9:31 PM
>To: Jeff Brasen ; Ni, Ruiyu ; edk2-
>de...@lists.01.org
>Cc: Kinney, Michael D ; Gao, Liming
>
>Subject: Re: [edk2] [PATCH 2/2] MdeModulePkg/BaseSortLib: Enable for all
>module types
>
>Jeff:
>  Thanks for your case. PrePiMemoryAllocationLib is a MemoryAllocationLib
>implementation that doesn't depend on PEI or DXE service. So,
>MemoryAllocationLib may be used in BASE type. And, I find
>MdeModulePkg\Library\BaseBmpSupportLib\BaseBmpSupportLib.inf is BASE
>type and consumes MemoryAllocationLib. So, I think your change is OK.
>Reviewed-by: Liming Gao 
>
>Thanks
>Liming
>From: Jeff Brasen [mailto:jbra...@nvidia.com]
>Sent: Thursday, November 1, 2018 2:25 PM
>To: Ni, Ruiyu ; edk2-devel@lists.01.org
>Cc: Gao, Liming ; Kinney, Michael D
>
>Subject: Re: [edk2] [PATCH 2/2] MdeModulePkg/BaseSortLib: Enable for all
>module types
>
>
>For defining it as a BASE type i changed that to that as there is a
>MemoryAllocationLib defined for the various phases. For example, SEC uses
>EmbeddedPkg/Library/PrePiMemoryAllocationLib (other patch in this series
>implements the AllocateZeroPool that is needed for this).
>
>
>
>I am not opposed to an allocation-less SortLib but was trying to enable this
>capability without impact to other users of this library.
>
>
>
>Thanks,
>
>Jeff
>
>
>From: Ni, Ruiyu mailto:ruiyu...@intel.com>>
>Sent: Wednesday, October 31, 2018 2:56:42 AM
>To: Jeff Brasen; edk2-devel@lists.01.org
>Cc: Gao, Liming; Kinney, Michael D
>Subject: RE: [edk2] [PATCH 2/2] MdeModulePkg/BaseSortLib: Enable for all
>module types
>
>SortLib depends on MemoryAllocationLib.
>How can it be a BASE type library?
>
>Can we do it in two options?
>1. Change the SortLib API to accept a temporary buffer from caller. So the
>MemoryAllocationlIb dependency can be removed.
>2. Do not change SortLibAPI but uses a fixed-size temporary buffer internally.
>E.g.: UINT8 Buffer[MAX_ELEMENT_SIZE];
>
>
>Thanks/Ray
>
>> -Original Message-
>> From: edk2-devel
>> mailto:edk2-devel-boun...@lists.01.or
>> g>> On Behalf Of Jeff Brasen
>> Sent: Wednesday, October 31, 2018 5:31 AM
>> To: edk2-devel@lists.01.org
>> Cc: Jeff Brasen mailto:jbra...@nvidia.com>>
>> Subject: [edk2] [PATCH 2/2] MdeModulePkg/BaseSortLib: Enable for all
>> module types
>>
>> Expose BaseSortLib for use in SEC and PEI phases.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Jeff Brasen
>> mailto:jbra...@nvidia.com>>
>> ---
>>  MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
>> b/MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
>> index f807cd7..5bd1aa1 100644
>> --- a/MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
>> +++ b/MdeModulePkg/Library/BaseSortLib/BaseSortLib.inf
>> @@ -18,9 +18,9 @@
>>BASE_NAME  = BaseSortLib
>>MODULE_UNI_FILE= BaseSortLib.uni
>>FILE_GUID  = 03F3331B-F12D-494f-BF37-E55A657F2497
>> -  MODULE_TYPE= UEFI_DRIVER
>> +  MODULE_TYPE= BASE
>>VERSION_STRING = 1.0
>> -  LIBRARY_CLASS  = SortLib|DXE_DRIVER DXE_RUNTIME_DRIVER
>> UEFI_APPLICATION UEFI_DRIVER
>> +  LIBRARY_CLASS  = SortLib
>>
>>  #
>>  #  VALID_ARCHITECTURES   = IA32 X64 EBC
>> --
>> 2.7.4
>>
>> ___
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
>
>This email message is for the sole use of the intended recipient(s) and may
>contain confidential information.  Any unauthorized review, use, disclosure or
>distribution is prohibited.  If you are not the intended recipient, please 
>contact
>the sender by reply email and destroy all copies of the original message.
>
>___
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] uefi-sct/SctPkg:The Lun display order issue in iSCSI device path text

2018-11-02 Thread Jin, Eric
Hi Supreeth,

The intention of the patch is to fix the LUN display issue in the iSCSI device 
path text.
In the UEFI spec, the according definition is clarified as " The LUN is an 8 
byte array 
that is displayed in hexadecimal format with byte 0 first (i.e., on the left) 
and byte 7 
last (i.e, on the right), and is required. "

The current test has the mistake and need make sure the display order is 
correct.
The input is required to check the TEXT to binary system format, vice versa. 
It is the reason for the magic string 
"iSCSI(MyTargetName,0x12AB,0x00567800,CRC32C,None,CHAP_BI,TCP)"
And the text format defined in the UEFI spec is:
iSCSI(TargetName, PortalGroup, LUN, HeaderDigest, DataDigest, Authentication, 
Protocol)

I will generate the new patch to do definition at first and then do 
initialization. Thank you for this comment.

Best Regards
Eric

-Original Message-
From: Supreeth Venkatesh  
Sent: Monday, October 15, 2018 10:23 AM
To: Jin, Eric ; edk2-devel@lists.01.org
Cc: Wu, Jiaxin 
Subject: Re: [PATCH] uefi-sct/SctPkg:The Lun display order issue in iSCSI 
device path text



On 10/13/2018 05:33 PM, Eric Jin wrote:
> Cc: Supreeth Venkatesh 
> Cc: Jiaxin Wu 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Eric Jin 
> ---
>   .../BlackBoxTest/DevicePathFromTextBBTestCoverage.c  | 12 ++--
>   1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git 
> a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackB
> oxTest/DevicePathFromTextBBTestCoverage.c 
> b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackB
> oxTest/DevicePathFromTextBBTestCoverage.c
> index fc099d8e..6f97924a 100644
> --- 
> a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/BlackB
> oxTest/DevicePathFromTextBBTestCoverage.c
> +++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/DevicePathFromText/Bl
> +++ ackBoxTest/DevicePathFromTextBBTestCoverage.c
> @@ -1,7 +1,7 @@
>   /** @file
>   
> Copyright 2006 - 2017 Unified EFI, Inc.
> -  Copyright (c) 2010 - 2017, Intel Corporation. All rights 
> reserved.
> +  Copyright (c) 2010 - 2018, Intel Corporation. All rights 
> + reserved.
>   
> This program and the accompanying materials
> are licensed and made available under the terms and conditions of 
> the BSD License @@ -1442,7 +1442,7 @@ CreateiScsiDeviceNode (
> CHAR16  *DataDigestStr;
> CHAR16  *AuthenticationStr;
> CHAR16  *ProtocolStr;
> -  UINT64  LunNum;
> +  UINT64  LunNum = 0;
EFI coding convention does not allow initialization during definition.
> ISCSI_DEVICE_PATH_WITH_NAME *iSCSI;
>   
> NameStr   = SctSplitStr (, L',');
> @@ -1459,7 +1459,7 @@ CreateiScsiDeviceNode (
>   );
> SctUnicodeToAscii (iSCSI->iSCSITargetName, NameStr, SctStrLen (NameStr));
> iSCSI->TargetPortalGroupTag = (UINT16) SctStrToUInt 
> (PortalGroupStr);
> -  SctStrToUInt64 (LunStr, );
> +  StrToUInt8Array(LunStr, );
> iSCSI->Lun = LunNum;
>   
> Options = 0x;
> @@ -2846,12 +2846,12 @@ DevicePathFromTextConvertTextToDeviceNodeCoverageTest 
> (
>   (UINTN)__LINE__
>   );
> //
> -  // TDS 3.10.1.2.26
> +  // TDS 3.10.1.2.26   0x5678 - byte 3 is 0x56 and byte4 is 0x78
> //
> -  SctStrCpy (text, 
> L"MyTargetName,0x12AB,5678,CRC32C,None,CHAP_BI,TCP");
> +  SctStrCpy (text, 
> + L"MyTargetName,0x12AB,0x00567800,CRC32C,None,CHAP_BI,TCP");
Magic String.
> pDevicePath = CreateiScsiDeviceNode(text);
>   
> -  SctStrCpy (text, 
> L"iSCSI(MyTargetName,0x12AB,5678,CRC32C,None,CHAP_BI,TCP)");
> +  SctStrCpy (text, 
> + L"iSCSI(MyTargetName,0x12AB,0x00567800,CRC32C,None,CHAP_BI,T
> + CP)");
Magic String.
> pReDevicePath = DevicePathFromText->ConvertTextToDeviceNode (text);
> if (SctCompareMem (pDevicePath, pReDevicePath, SctDevicePathNodeLength 
> ((EFI_DEVICE_PATH_PROTOCOL *) pReDevicePath)) == 0) {
>   AssertionType = EFI_TEST_ASSERTION_PASSED;

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


Re: [edk2] [Patch 1/1] BaseTools tools_def.template: Add GCC link script in X86 ASLDLINK_FLAGS

2018-11-02 Thread Zhu, Yonghong
Reviewed-by: Yonghong Zhu  

Best Regards,
Zhu Yonghong


-Original Message-
From: Gao, Liming 
Sent: Thursday, November 01, 2018 10:47 PM
To: edk2-devel@lists.01.org
Cc: Zhu, Yonghong 
Subject: [Patch 1/1] BaseTools tools_def.template: Add GCC link script in X86 
ASLDLINK_FLAGS

This fix refers to commit 14ca435fb6c059eaeb7fe6eedbe4738ffaf336d0.
GCC link script is used to discard the unused section data from ELF image.
ASLDLINK_FLAGS requires it to remove the unnecessary section data, then GenFw 
can be used to retrieve the correct data section from ELF image.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao 
Cc: Yonghong Zhu 
---
 BaseTools/Conf/tools_def.template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index a22b96c0b8..e0e68fd7fb 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -4253,7 +4253,7 @@ DEFINE GCC48_AARCH64_ASLDLINK_FLAGS  = 
DEF(GCC47_AARCH64_ASLDLINK_FLAGS)
 DEFINE GCC49_IA32_CC_FLAGS   = DEF(GCC48_IA32_CC_FLAGS)
 DEFINE GCC49_X64_CC_FLAGS= DEF(GCC48_X64_CC_FLAGS)
 DEFINE GCC49_IA32_X64_DLINK_COMMON   = -nostdlib -Wl,-n,-q,--gc-sections -z 
common-page-size=0x40
-DEFINE GCC49_IA32_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) 
-Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
+DEFINE GCC49_IA32_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) 
+-Wl,--defsym=PECOFF_HEADER_SIZE=0 DEF(GCC_DLINK2_FLAGS_COMMON) 
+-Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
 DEFINE GCC49_IA32_X64_DLINK_FLAGS= DEF(GCC49_IA32_X64_DLINK_COMMON) 
-Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) 
-Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive
 DEFINE GCC49_IA32_DLINK2_FLAGS   = DEF(GCC48_IA32_DLINK2_FLAGS)
 DEFINE GCC49_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS) 
-Wl,-melf_x86_64,--oformat=elf64-x86-64,-pie
--
2.16.2.windows.1

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