Re: [edk2] DHCP Process Starts Even there is NO Media Connected
Hi Jiaxin, Please find my below comments/suggestions. 1. Yes, Current DHCP4/6 Start() implementation doesn't check for Media Status. It will be better to implement it in order to sync with UEFI spec. 2. DHCP process may be initiated by HTTP/PXE/ISCSI or Assigning IP (SetData) from Shell or using BIOS setup page. HTTP,PXE and ISCSI is already Checking Media Presence before DHCP Start, So it will have NO effect if we do implementation in DHCP4/6 Start(). 3. Current implementation of EFI_IP4_CONFIG2_SET_DATA, also NOT handling checking Media Status. a. UEFI Spec NOT defines EFI_NO_MEDIA status code for EFI_IP4_CONFIG2_SET_DATA, I'm NOT sure what's reason behind it or might be missing. b. UEFI Spec defines EFI_DEVICE_ERROR status code for EFI_IP4_CONFIG2_SET_DATA, If we can use the same status for Media presence then no issues. c. When there is No Media connected and if we try to assign IP over DHCP(SetData), I guess there is no need to proceed further in EfiIp4Config2SetData and we can return with EFI_DEVICE_ERROR. Based on above points(1 & 3.c ), I've updated the suggested changes and attached the same (CheckMediaStatus_V2.rar) Could you please review and provide your comments. Please correct if anything wrong. Thank You, Karunakar From: Wu, Jiaxin [mailto:jiaxin...@intel.com] Sent: Wednesday, November 29, 2017 11:57 AM To: Karunakar P; Fu, Siyuan; Ye, Ting Subject: RE: DHCP Process Starts Even there is NO Media Connected Hi Karunakar, After talk with Siyuan, we agree it's reasonable to check the Media status before starting DHCP process, but we'd better check it in DHCP layer since the UEFI spec defines EFI_NO_MEDIA status code for DHCP4/6.Start(), but our current implementation doesn't check it. What do you think? Thanks, Jiaxin From: Karunakar P [mailto:karunak...@amiindia.co.in] Sent: Tuesday, November 28, 2017 11:18 PM To: Wu, Jiaxin mailto:jiaxin...@intel.com>>; Fu, Siyuan mailto:siyuan...@intel.com>>; Ye, Ting mailto:ting...@intel.com>> Subject: RE: DHCP Process Starts Even there is NO Media Connected Could you please review the attachment changes for this support. Thanks, Karunakar From: Karunakar P Sent: Monday, November 27, 2017 12:53 PM To: 'Wu, Jiaxin'; 'Fu, Siyuan'; 'Ye, Ting' Subject: RE: DHCP Process Starts Even there is NO Media Connected Could you please provide your comments... Thank You, Karunakar From: Karunakar P Sent: Thursday, November 23, 2017 2:05 PM To: 'Wu, Jiaxin'; Fu, Siyuan; Ye, Ting Subject: DHCP Process Starts Even there is NO Media Connected Hello All, When we try to Assign IP to SUT using ifconfig command from Shell or IPv4 Network Configuration BIOS setup page DHCP process start even there is no LAN cable connected to specific port. Can we add a Media presence condition check before starting DHCP service? Could you please correct if anything is wrong. Thanks, Karunakar ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH edk2-platforms] Platform/ARM: move to new TFTP Shell command implementation
Upstream EDK2 has refactored the implementation of the TFTP Shell command so update the ARM platforms accordingly. Instead of having to add the new module to all .FDF files under Platform/ARM, add it to the 'networking FDF' include file and include that everywhere. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Platform/ARM/JunoPkg/ArmJuno.fdf| 13 ++--- Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf | 13 ++--- Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc | 5 + Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc| 2 +- 4 files changed, 10 insertions(+), 23 deletions(-) diff --git a/Platform/ARM/JunoPkg/ArmJuno.fdf b/Platform/ARM/JunoPkg/ArmJuno.fdf index 52586135b525..72771b1170b0 100644 --- a/Platform/ARM/JunoPkg/ArmJuno.fdf +++ b/Platform/ARM/JunoPkg/ArmJuno.fdf @@ -183,17 +183,8 @@ [FV.FvMain] # # Networking stack # - INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf - INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf - INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf - INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf - INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf - INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf - INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf - INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf - INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf - INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf - INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf +!include Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc + INF EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf !if 0 INF OptionRomPkg/MarvellYukonDxe/MarvellYukonDxe.inf diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf index 46e4b9ac6758..3c75a51570b8 100644 --- a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf +++ b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf @@ -148,17 +148,8 @@ [FV.FvMain] # # Networking stack # - INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf - INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf - INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf - INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf - INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf - INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf - INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf - INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf - INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf - INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf - INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf +!include Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc + INF EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf # diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc b/Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc index 57af0f70eee8..b0107f2bbabd 100644 --- a/Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc +++ b/Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc @@ -25,3 +25,8 @@ INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf + + # + # TFTP Shell command + # + INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc index d4c38747b33f..3f6aa31ec434 100644 --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc @@ -477,11 +477,11 @@ [Components.common] NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf - NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf } + ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf [Components.ARM] -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] Silicon/AMD Silicon/Hisilicon: remove -ArmGetCpuCountPerCluster()
On 28 November 2017 at 20:18, Leif Lindholm wrote: > On Tue, Nov 28, 2017 at 05:35:26PM +, Ard Biesheuvel wrote: >> The function ArmGetCpuCountPerCluster () was moved out of ArmPlatformLib >> because it was unused (except internally by one of the implementations) >> So remove the remaining implementations from edk2-platforms. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel > > Reviewed-by: Leif Lindholm > Thanks. Pushed as 7c4b47ff8212 >> --- >> Silicon/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S | 6 >> -- >> Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c | 6 >> -- >> Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/AArch64/Helper.S | 6 >> -- >> Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c | 5 - >> 4 files changed, 23 deletions(-) >> >> diff --git a/Silicon/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S >> b/Silicon/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S >> index b7ec02f0e69f..19a2fc07f3d7 100644 >> --- a/Silicon/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S >> +++ b/Silicon/AMD/Styx/Library/AmdStyxLib/AArch64/Helper.S >> @@ -47,12 +47,6 @@ ASM_FUNC(ArmPlatformGetPrimaryCoreMpId) >>ldr w0, PrimaryCoreMpid >>ret >> >> -# IN None >> -# OUT x0 = number of cores present in the system >> -ASM_FUNC(ArmGetCpuCountPerCluster) >> - MOV32 (w0, FixedPcdGet32 (PcdCoreCount)) >> - ret >> - >> //UINTN >> //ArmPlatformIsPrimaryCore ( >> // IN UINTN MpId >> diff --git a/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c >> b/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c >> index f17a960d60ad..facfd61ca230 100644 >> --- a/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c >> +++ b/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c >> @@ -45,12 +45,6 @@ >> extern EFI_GUID gAmdStyxMpCoreInfoGuid; >> >> >> -UINTN >> -ArmGetCpuCountPerCluster ( >> - VOID >> - ); >> - >> - >> /** >>Return the current Boot Mode >> >> diff --git >> a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/AArch64/Helper.S >> b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/AArch64/Helper.S >> index 3422df279c73..74e4aeeffc31 100644 >> --- a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/AArch64/Helper.S >> +++ b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/AArch64/Helper.S >> @@ -29,12 +29,6 @@ ASM_FUNC(ArmPlatformGetPrimaryCoreMpId) >>MOV32 (w0, FixedPcdGet32(PcdArmPrimaryCore)) >>ret >> >> -# IN None >> -# OUT x0 = number of cores present in the system >> -ASM_FUNC(ArmGetCpuCountPerCluster) >> - MOV32 (w0, FixedPcdGet32(PcdCoreCount)) >> - ret >> - >> //UINTN >> //ArmPlatformIsPrimaryCore ( >> // IN UINTN MpId >> diff --git >> a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c >> b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c >> index 07ab0d1dc271..b59b9f027573 100644 >> --- a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c >> +++ b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c >> @@ -23,11 +23,6 @@ >> >> #include >> >> -UINTN >> -ArmGetCpuCountPerCluster ( >> - VOID >> - ); >> - >> extern EFI_STATUS MemInitEntry (VOID); >> >> /** >> -- >> 2.11.0 >> ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v2] PeiLib : Inform UEFI memory to Linux
Hi Ard, Sorry for coming back late on this Are you ok to apply this patch in edk2 Thx Udit > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Sakar > Arora > Sent: Wednesday, September 20, 2017 1:50 PM > To: Ard Biesheuvel > Cc: edk2-devel@lists.01.org; leif.lindh...@linaro.org > Subject: Re: [edk2] [PATCH v2] PeiLib : Inform UEFI memory to Linux > > Thanks for the information. Seems my understanding was not correct in this > context. I have no other doubts on this change. > > -Original Message- > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] > Sent: Wednesday, September 20, 2017 12:02 PM > To: Sakar Arora > Cc: Meenakshi Aggarwal ; edk2- > de...@lists.01.org; leif.lindh...@linaro.org > Subject: Re: [edk2] [PATCH v2] PeiLib : Inform UEFI memory to Linux > > On 19 September 2017 at 22:32, Sakar Arora wrote: > > The DXE core dispatcher relies on the available memory to allocate space for > loading the rest of the modules from the UEFI image. If we declare the UEFI > image memory space (from which DXE dispatcher reads the efi modules) open to > allocation, it might lead to data corruption, depending on the location of > UEFI > image and cumulative size of uncompressed EFI modules. > > > > Also, since UEFI allows unloading and loading of drivers at runtime, IMO, > > there > is a need to preserve the UEFI image even after all the modules have been > decompressed and loaded in the boot sequence. > > > > None of this is relevant. The uncompressed firmware volume containing DXE > core and everything else is preserved as before. The only thing that gets > discarded is the outer FV, which only contains the PrePi SEC module, and the > compressed FV, neither of which is ever touched again after DXE core has > started executing. So we should not register the FV in the first place, and > not > reserve the memory so we don't lose it. > > If you still think this may break anything, could you please elaborate? > > > > > -Original Message- > > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] > > Sent: Tuesday, September 19, 2017 6:18 PM > > To: Sakar Arora > > Cc: Meenakshi Aggarwal ; > > edk2-devel@lists.01.org; leif.lindh...@linaro.org > > Subject: Re: [edk2] [PATCH v2] PeiLib : Inform UEFI memory to Linux > > > > On 19 September 2017 at 01:07, Sakar Arora wrote: > >> This change will create the possibility for memory space holding the UEFI > image to be over-written by the DXE core code, since this space will then be > available for allocation. > > > > Yes. But why does this matter after the entire payload has been decompressed > into memory already? > > > > > >> Any such change, if required, should be done just before booting the OS. > >> > >> -Original Message- > >> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf > >> Of Meenakshi Aggarwal > >> Sent: Tuesday, September 19, 2017 6:02 PM > >> To: edk2-devel@lists.01.org; leif.lindh...@linaro.org; > >> ard.biesheu...@linaro.org > >> Subject: [edk2] [PATCH v2] PeiLib : Inform UEFI memory to Linux > >> > >> While creating Hob list, ArmPlatformPkg is hiding UEFI memory. > >> whereas this memory can be used by OS. > >> > >> This patch, allows OS to use UEFI code area. > >> > >> Contributed-under: TianoCore Contribution Agreement 1.1 > >> Signed-off-by: Udit Kumar > >> Signed-off-by: Meenakshi Aggarwal > >> --- > >> ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c | 69 > >> - > >> 1 file changed, 69 deletions(-) > >> > >> diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c > >> b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c > >> index 2feb11f..d03214b 100644 > >> --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c > >> +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c > >> @@ -70,11 +70,7 @@ MemoryPeim ( > >> { > >>ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable; > >>EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttributes; > >> - UINT64 ResourceLength; > >>EFI_PEI_HOB_POINTERS NextHob; > >> - EFI_PHYSICAL_ADDRESS FdTop; > >> - EFI_PHYSICAL_ADDRESS SystemMemoryTop; > >> - EFI_PHYSICAL_ADDRESS ResourceTop; > >>BOOLEAN Found; > >> > >>// Get Virtual Memory Map from the Platform Library @@ -121,71 +117,6 > @@ MemoryPeim ( > >> ); > >>} > >> > >> - // > >> - // Reserved the memory space occupied by the firmware volume > >> - // > >> - > >> - SystemMemoryTop = (EFI_PHYSICAL_ADDRESS)PcdGet64 > >> (PcdSystemMemoryBase) + (EFI_PHYSICAL_ADDRESS)PcdGet64 > >> (PcdSystemMemorySize); > >> - FdTop = (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdFdBaseAddress) + > >> (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdFdSize); > >> - > >> - // EDK2 does not have the concept of boot firmware copied into > >> DRAM. To avoid the DXE > >> - // core to overwrite this area we must mark the region with the > >> attribute non-present > >> - if ((PcdGet
[edk2] [PATCH v2 0/2] quirks handling for SDHCI controllers
Many SDHCI implementations exist that are almost spec complicant, and could be driven by the generic SD/MMC host controller driver except for some minimal necessary init time tweaks. Adding such tweaks to the generic driver is undesirable. On the other hand, forking the driver for every platform that has such a SDHCI controller is problematic when it comes to upstreaming and ongoing maintenance (which is arguably the point of upstreaming in the first place). So these patches propose a workaround that is minimally invasive on the EDK2 side, but gives platforms a lot of leeway when it comes to applying SDHCI quirks. Changes since RFC/v1: - add EFI_SD_MMC_PASS_THRU_PROTOCOL* member to override methods - use UINT64* not VOID* to pass capability structure (which is alwys 64 bits in size) Ard Biesheuvel (2): MdeModulePkg: introduce SD/MMC override protocol MdeModulePkg/SdMmcPciHcDxe: allow HC capabilities to be overridden MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c | 116 +++- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h | 6 + MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf | 2 + MdeModulePkg/Include/Protocol/SdMmcOverride.h| 103 + MdeModulePkg/MdeModulePkg.dec| 3 + 5 files changed, 225 insertions(+), 5 deletions(-) create mode 100644 MdeModulePkg/Include/Protocol/SdMmcOverride.h -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 1/2] MdeModulePkg: introduce SD/MMC override protocol
Many ARM based SoCs have integrated SDHCI controllers, and often, these implementations deviate in subtle ways from the pertinent specifications. On the one hand, these deviations are quite easy to work around, but on the other hand, having a collection of SoC specific workarounds in the generic driver stack is undesirable. So let's introduce an optional SD/MMC override protocol that we can invoke at the appropriate moments in the device initialization. That way, the workaround itself remains platform specific, but we can still use the generic driver stack on such platforms. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- MdeModulePkg/Include/Protocol/SdMmcOverride.h | 103 MdeModulePkg/MdeModulePkg.dec | 3 + 2 files changed, 106 insertions(+) diff --git a/MdeModulePkg/Include/Protocol/SdMmcOverride.h b/MdeModulePkg/Include/Protocol/SdMmcOverride.h new file mode 100644 index ..5a5c393896f4 --- /dev/null +++ b/MdeModulePkg/Include/Protocol/SdMmcOverride.h @@ -0,0 +1,103 @@ +/** @file + Protocol to describe overrides required to support non-standard SDHCI + implementations + + Copyright (c) 2017, Linaro, Ltd. All rights reserved. + + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#ifndef __SD_MMC_OVERRIDE_H__ +#define __SD_MMC_OVERRIDE_H__ + +#include + +#define EDKII_SD_MMC_OVERRIDE_PROTOCOL_GUID \ + { 0xeaf9e3c1, 0xc9cd, 0x46db, { 0xa5, 0xe5, 0x5a, 0x12, 0x4c, 0x83, 0x23, 0x23 } } + +#define EDKII_SD_MMC_OVERRIDE_PROTOCOL_VERSION0x1 + +typedef struct _SD_MMC_OVERRIDE SD_MMC_OVERRIDE; + +typedef enum { + SD_MMC_OVERRIDE_RESET_PRE_HOOK, + SD_MMC_OVERRIDE_RESET_POST_HOOK, + SD_MMC_OVERRIDE_INIT_HOST_PRE_HOOK, + SD_MMC_OVERRIDE_INIT_HOST_POST_HOOK, +} SD_MMC_OVERRIDE_HOOK; + +/** + + Override function for SDHCI capability bits + + @param[in] PassThru A pointer to the +EFI_SD_MMC_PASS_THRU_PROTOCOL instance. + @param[in] ControllerHandle The EFI_HANDLE of the controller. + @param[in] Slot The 0 based slot index. + @param[in,out] SdMmcHcSlotCapability The SDHCI capability structure. + + @retval EFI_SUCCESS The override function completed successfully. + @retval EFI_NOT_FOUND The specified controller or slot does not exist. + @retval EFI_INVALID_PARAMETER SdMmcHcSlotCapability is NULL + +**/ +typedef +EFI_STATUS +(EFIAPI * SD_MMC_OVERRIDE_CAPABILITY) ( + IN EFI_SD_MMC_PASS_THRU_PROTOCOL *PassThru, + IN EFI_HANDLE ControllerHandle, + IN UINT8 Slot, + IN OUT UINT64 *SdMmcHcSlotCapability + ); + +/** + + Override function for SDHCI controller operations + + @param[in] PassThru A pointer to the +EFI_SD_MMC_PASS_THRU_PROTOCOL instance. + @param[in] ControllerHandle The EFI_HANDLE of the controller. + @param[in] Slot The 0 based slot index. + @param[in,out] HookType The type of operation and whether the +hook is invoked right before (pre) or +right after (post) + + @retval EFI_SUCCESS The override function completed successfully. + @retval EFI_NOT_FOUND The specified controller or slot does not exist. + @retval EFI_INVALID_PARAMETER HookType is invalid + +**/ +typedef +EFI_STATUS +(EFIAPI * SD_MMC_OVERRIDE_INVOKE_HOOK) ( + IN EFI_SD_MMC_PASS_THRU_PROTOCOL *PassThru, + IN EFI_HANDLE ControllerHandle, + IN UINT8 Slot, + IN SD_MMC_OVERRIDE_HOOKHookType + ); + +struct _SD_MMC_OVERRIDE { + // + // Protocol version of this implementation + // + UINTN Version; + // + // Callback to override SD/MMC host controller capability bits + // + SD_MMC_OVERRIDE_CAPABILITY OverrideCapability; + // + // Callback to invoke SD/MMC override hooks + // + SD_MMC_OVERRIDE_INVOKE_HOOK InvokeHook; +}; + +extern EFI_GUID gEdkiiSdMmcOverrideProtocolGuid; + +#endif diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 856d67aceb21..64ceea029f94 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -562,6 +562,9 @@ [Protocols] ## Include/Protocol/SmmMemoryAttribute.h gEdkiiSmmMemoryAttributeProtocolGuid = { 0x69b792ea, 0x39ce, 0x402d, { 0xa2, 0xa6, 0x
[edk2] [PATCH v2 2/2] MdeModulePkg/SdMmcPciHcDxe: allow HC capabilities to be overridden
Invoke the newly introduced SD/MMC override protocol to override the capabilities register after reading it from the device registers, and to call the pre/post host init and reset hooks at the appropriate times. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c | 116 +++- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h | 6 + MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf | 2 + 3 files changed, 119 insertions(+), 5 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c index 0be8828abfcc..61f64285807d 100644 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c @@ -60,7 +60,8 @@ SD_MMC_HC_PRIVATE_DATA gSdMmcPciHcTemplate = { { // MaxCurrent 0, }, - 0 // ControllerVersion + 0,// ControllerVersion + NULL // Override }; SD_DEVICE_PATHmSdDpTemplate = { @@ -213,6 +214,92 @@ Done: return; } +STATIC +EFI_STATUS +SdMmcPciHcResetHost ( + IN SD_MMC_HC_PRIVATE_DATA *Private, + IN UINT8 Slot + ) +{ + EFI_STATUSStatus; + + if (Private->Override != NULL && + Private->Override->InvokeHook != NULL) { +Status = Private->Override->InvokeHook ( + &Private->PassThru, + Private->ControllerHandle, + Slot, + SD_MMC_OVERRIDE_RESET_PRE_HOOK); +if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_WARN, "%a: SD/MMC pre reset hook failed - %r\n", +__FUNCTION__, Status)); + return Status; +} + } + + Status = SdMmcHcReset (Private->PciIo, Slot); + if (EFI_ERROR (Status)) { +return Status; + } + + if (Private->Override != NULL && + Private->Override->InvokeHook != NULL) { +Status = Private->Override->InvokeHook ( + &Private->PassThru, + Private->ControllerHandle, + Slot, + SD_MMC_OVERRIDE_RESET_POST_HOOK); +if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_WARN, "%a: SD/MMC post reset hook failed - %r\n", +__FUNCTION__, Status)); +} + } + return Status; +} + +STATIC +EFI_STATUS +SdMmcPciHcInitHost ( + IN SD_MMC_HC_PRIVATE_DATA *Private, + IN UINT8 Slot + ) +{ + EFI_STATUSStatus; + + if (Private->Override != NULL && + Private->Override->InvokeHook != NULL) { +Status = Private->Override->InvokeHook ( + &Private->PassThru, + Private->ControllerHandle, + Slot, + SD_MMC_OVERRIDE_INIT_HOST_PRE_HOOK); +if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_WARN, "%a: SD/MMC pre init hook failed - %r\n", +__FUNCTION__, Status)); + return Status; +} + } + + Status = SdMmcHcInitHost (Private->PciIo, Slot, Private->Capability[Slot]); + if (EFI_ERROR (Status)) { +return Status; + } + + if (Private->Override != NULL && + Private->Override->InvokeHook != NULL) { +Status = Private->Override->InvokeHook ( + &Private->PassThru, + Private->ControllerHandle, + Slot, + SD_MMC_OVERRIDE_INIT_HOST_POST_HOOK); +if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_WARN, "%a: SD/MMC post init hook failed - %r\n", +__FUNCTION__, Status)); +} + } + return Status; +} + /** Sd removable device enumeration callback function when the timer event is signaled. @@ -281,14 +368,14 @@ SdMmcPciHcEnumerateDevice ( // // Reset the specified slot of the SD/MMC Pci Host Controller // -Status = SdMmcHcReset (Private->PciIo, Slot); +Status = SdMmcPciHcResetHost (Private, Slot); if (EFI_ERROR (Status)) { continue; } // // Reinitialize slot and restart identification process for the new attached device // -Status = SdMmcHcInitHost (Private->PciIo, Slot, Private->Capability[Slot]); +Status = SdMmcPciHcInitHost (Private, Slot); if (EFI_ERROR (Status)) { continue; } @@ -601,6 +688,12 @@ SdMmcPciHcDriverBindingStart ( goto Done; } + Status = gBS->HandleProtocol (Controller, &gEdkiiSdMmcOverrideProtocolGuid, + (VOID **)&Private->Override); + if (!EFI_ERROR (Status)) { +DEBUG ((DEBUG_INFO, "%a: using SD/MMC override protocol\n", __FUNCTION__)); + } + Support64BitDma = TRUE;
[edk2] [PATCH] EmbeddedPkg: remove nonexistent FLASH_DEFINITION from package .dsc
For whatever reason, EmbeddedPkg.dsc included a FLASH_DEFINITION entry pointing to a nonexistent EmbeddedPkg.fdf. This used to be silently ignored, but recent BaseTools changes 5e9256cd7f54 ("BaseTools: Guid.xref contain information from FILE statements in FDF") now caused builds against EmbeddedPkg.dsc to fail. So delete the redundant entry. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm --- EmbeddedPkg/EmbeddedPkg.dsc | 1 - 1 file changed, 1 deletion(-) diff --git a/EmbeddedPkg/EmbeddedPkg.dsc b/EmbeddedPkg/EmbeddedPkg.dsc index 9ec24f7fa8..073a156884 100644 --- a/EmbeddedPkg/EmbeddedPkg.dsc +++ b/EmbeddedPkg/EmbeddedPkg.dsc @@ -30,7 +30,6 @@ [Defines] SUPPORTED_ARCHITECTURES= IA32|X64|IPF|ARM|AARCH64 BUILD_TARGETS = DEBUG|RELEASE SKUID_IDENTIFIER = DEFAULT - FLASH_DEFINITION = EmbeddedPkg/EmbeddedPkg.fdf -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] EmbeddedPkg: remove nonexistent FLASH_DEFINITION from package .dsc
On 30 November 2017 at 10:21, Leif Lindholm wrote: > For whatever reason, EmbeddedPkg.dsc included a FLASH_DEFINITION entry > pointing to a nonexistent EmbeddedPkg.fdf. > > This used to be silently ignored, but recent BaseTools changes > 5e9256cd7f54 ("BaseTools: Guid.xref contain information from FILE statements > in FDF") > now caused builds against EmbeddedPkg.dsc to fail. > So delete the redundant entry. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Leif Lindholm Reviewed-by: Ard Biesheuvel > --- > EmbeddedPkg/EmbeddedPkg.dsc | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/EmbeddedPkg/EmbeddedPkg.dsc b/EmbeddedPkg/EmbeddedPkg.dsc > index 9ec24f7fa8..073a156884 100644 > --- a/EmbeddedPkg/EmbeddedPkg.dsc > +++ b/EmbeddedPkg/EmbeddedPkg.dsc > @@ -30,7 +30,6 @@ [Defines] >SUPPORTED_ARCHITECTURES= IA32|X64|IPF|ARM|AARCH64 >BUILD_TARGETS = DEBUG|RELEASE >SKUID_IDENTIFIER = DEFAULT > - FLASH_DEFINITION = EmbeddedPkg/EmbeddedPkg.fdf > > > > > -- > 2.11.0 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] EmbeddedPkg: remove nonexistent FLASH_DEFINITION from package .dsc
On Thu, Nov 30, 2017 at 10:22:42AM +, Ard Biesheuvel wrote: > On 30 November 2017 at 10:21, Leif Lindholm wrote: > > For whatever reason, EmbeddedPkg.dsc included a FLASH_DEFINITION entry > > pointing to a nonexistent EmbeddedPkg.fdf. > > > > This used to be silently ignored, but recent BaseTools changes > > 5e9256cd7f54 ("BaseTools: Guid.xref contain information from FILE > > statements in FDF") > > now caused builds against EmbeddedPkg.dsc to fail. > > So delete the redundant entry. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Leif Lindholm > > Reviewed-by: Ard Biesheuvel Thanks! Pushed as 97eaeaa199. > > --- > > EmbeddedPkg/EmbeddedPkg.dsc | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/EmbeddedPkg/EmbeddedPkg.dsc b/EmbeddedPkg/EmbeddedPkg.dsc > > index 9ec24f7fa8..073a156884 100644 > > --- a/EmbeddedPkg/EmbeddedPkg.dsc > > +++ b/EmbeddedPkg/EmbeddedPkg.dsc > > @@ -30,7 +30,6 @@ [Defines] > >SUPPORTED_ARCHITECTURES= IA32|X64|IPF|ARM|AARCH64 > >BUILD_TARGETS = DEBUG|RELEASE > >SKUID_IDENTIFIER = DEFAULT > > - FLASH_DEFINITION = EmbeddedPkg/EmbeddedPkg.fdf > > > > > > > > > > -- > > 2.11.0 > > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH edk2-platforms] Platform/Hisilicon: drop BdsLib inclusion from HiKey .dsc
The ArmPkg BdsLib has been dropped from EDK2, and is no longer required by the Android*Boot applications - so delete the reference to fix the resulting build failure. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm --- Platform/Hisilicon/HiKey/HiKey.dsc | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc b/Platform/Hisilicon/HiKey/HiKey.dsc index 97811eb8d9..957e4d4a9e 100644 --- a/Platform/Hisilicon/HiKey/HiKey.dsc +++ b/Platform/Hisilicon/HiKey/HiKey.dsc @@ -411,10 +411,7 @@ [Components.common] # # Fastboot # - EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf { - - BdsLib|ArmPkg/Library/BdsLib/BdsLib.inf - } + EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf # -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms] Platform/ARM: move to new TFTP Shell command implementation
On Thu, Nov 30, 2017 at 09:07:21AM +, Ard Biesheuvel wrote: > Upstream EDK2 has refactored the implementation of the TFTP Shell > command so update the ARM platforms accordingly. > > Instead of having to add the new module to all .FDF files under > Platform/ARM, add it to the 'networking FDF' include file and > include that everywhere. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel > --- > Platform/ARM/JunoPkg/ArmJuno.fdf| 13 ++--- > Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf | 13 ++--- > Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc | 5 + > Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc| 2 +- > 4 files changed, 10 insertions(+), 23 deletions(-) > > diff --git a/Platform/ARM/JunoPkg/ArmJuno.fdf > b/Platform/ARM/JunoPkg/ArmJuno.fdf > index 52586135b525..72771b1170b0 100644 > --- a/Platform/ARM/JunoPkg/ArmJuno.fdf > +++ b/Platform/ARM/JunoPkg/ArmJuno.fdf > @@ -183,17 +183,8 @@ [FV.FvMain] ># ># Networking stack ># > - INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf > - INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf > - INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf > - INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf > - INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf > - INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf > - INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf > - INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf > - INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > - INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf > - INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf > +!include Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc > + >INF EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf > !if 0 >INF OptionRomPkg/MarvellYukonDxe/MarvellYukonDxe.inf > diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf > b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf > index 46e4b9ac6758..3c75a51570b8 100644 > --- a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf > +++ b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf > @@ -148,17 +148,8 @@ [FV.FvMain] ># ># Networking stack ># > - INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf > - INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf > - INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf > - INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf > - INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf > - INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf > - INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf > - INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf > - INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf > - INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf > - INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf > +!include Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc > + >INF EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf > ># > diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc > b/Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc > index 57af0f70eee8..b0107f2bbabd 100644 > --- a/Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc > +++ b/Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc > @@ -25,3 +25,8 @@ >INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf >INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf >INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf > + > + # > + # TFTP Shell command > + # > + INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf Could you wrap this inside a !ifdef $(INCLUDE_TFTP_COMMAND) ? > diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc > b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc > index d4c38747b33f..3f6aa31ec434 100644 > --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc > +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc > @@ -477,11 +477,11 @@ [Components.common] > > NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf > > NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf > > NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf > - > NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf > > HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf >PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf > > BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf >} > + ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf And this one? If you're happy to do that, and fold it in: Reviewed-by: Leif Lindholm > [Components.ARM] > > -- > 2.11.0 > ___
Re: [edk2] [PATCH 0/4] Add USED_SIZE FV_EXT_TYPE support
Reviewed-by: Liming Gao > -Original Message- > From: Zeng, Star > Sent: Wednesday, November 29, 2017 6:15 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Gao, Liming > Subject: [PATCH 0/4] Add USED_SIZE FV_EXT_TYPE support > > V2: > The first version did not adjust ExtEntryList in the while loop > of [PATCH 2/4] and [PATCH 4/4], it is a bug and fixed in this V2. > > The USED_SIZE FV_EXT_TYPE is introduced by PI 1.6 spec. > > The EFI_FIRMWARE_VOLUME_EXT_ENTRY_USED_SIZE_TYPE can be used to find > out how many EFI_FVB2_ERASE_POLARITY bytes are at the end of the FV. > > When the FV gets shadowed into memory you only need to copy the used > bytes into memory and fill the rest of the memory buffer with the > erase value. > > Cc: Liming Gao > > Star Zeng (4): > MdePkg PiFirmwareVolume.h: Add USED_SIZE FV_EXT_TYPE definitions > MdeModulePkg PeiCore: Support USED_SIZE FV_EXT_TYPE > MdeModulePkg DxeCore: Check FvImage alignment > MdeModulePkg DxeCore: Support USED_SIZE FV_EXT_TYPE > > MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c | 115 > +++--- > MdeModulePkg/Core/Pei/FwVol/FwVol.c | 91 +++- > MdePkg/Include/Pi/PiFirmwareVolume.h | 23 +- > 3 files changed, 211 insertions(+), 18 deletions(-) > > -- > 2.7.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms] Platform/Hisilicon: drop BdsLib inclusion from HiKey .dsc
> On 30 Nov 2017, at 10:46, Leif Lindholm wrote: > > The ArmPkg BdsLib has been dropped from EDK2, and is no longer > required by the Android*Boot applications - so delete the > reference to fix the resulting build failure. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Leif Lindholm Reviewed-by: Ard Biesheuvel > --- > Platform/Hisilicon/HiKey/HiKey.dsc | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc > b/Platform/Hisilicon/HiKey/HiKey.dsc > index 97811eb8d9..957e4d4a9e 100644 > --- a/Platform/Hisilicon/HiKey/HiKey.dsc > +++ b/Platform/Hisilicon/HiKey/HiKey.dsc > @@ -411,10 +411,7 @@ [Components.common] > # > # Fastboot > # > - EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf { > - > - BdsLib|ArmPkg/Library/BdsLib/BdsLib.inf > - } > + EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf > > > # > -- > 2.11.0 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH edk2-platforms] Platform, Silicon: Update Hisilicon Shell tftp command config
EDK2 changed the tftp shell command from a library to a dynamic command. Update configuration files to reflect this. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm --- Platform/Hisilicon/D02/Pv660D02.dsc | 6 +++--- Platform/Hisilicon/D02/Pv660D02.fdf | 3 +++ Platform/Hisilicon/D03/D03.dsc | 6 +++--- Platform/Hisilicon/D03/D03.fdf | 3 +++ Platform/Hisilicon/D05/D05.dsc | 6 +++--- Platform/Hisilicon/D05/D05.fdf | 3 +++ Platform/Hisilicon/HiKey/HiKey.dsc | 4 +++- Platform/Hisilicon/HiKey/HiKey.fdf | 3 +++ Silicon/Hisilicon/Hisilicon.dsc.inc | 7 --- 9 files changed, 28 insertions(+), 13 deletions(-) diff --git a/Platform/Hisilicon/D02/Pv660D02.dsc b/Platform/Hisilicon/D02/Pv660D02.dsc index d5eb963e8f..ab7c7ba7b7 100644 --- a/Platform/Hisilicon/D02/Pv660D02.dsc +++ b/Platform/Hisilicon/D02/Pv660D02.dsc @@ -434,12 +434,12 @@ [Components.common] !ifdef $(INCLUDE_DP) NULL|ShellPkg/Library/UefiDpLib/UefiDpLib.inf !endif #$(INCLUDE_DP) -!ifdef $(INCLUDE_TFTP_COMMAND) - NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf -!endif #$(INCLUDE_TFTP_COMMAND) gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000 } +!ifdef $(INCLUDE_TFTP_COMMAND) + ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf +!endif #$(INCLUDE_TFTP_COMMAND) diff --git a/Platform/Hisilicon/D02/Pv660D02.fdf b/Platform/Hisilicon/D02/Pv660D02.fdf index e0bb0ab273..f0934a86f4 100644 --- a/Platform/Hisilicon/D02/Pv660D02.fdf +++ b/Platform/Hisilicon/D02/Pv660D02.fdf @@ -266,6 +266,9 @@ [FV.FvMain] # Build Shell from latest source code instead of prebuilt binary # INF ShellPkg/Application/Shell/Shell.inf +!ifdef $(INCLUDE_TFTP_COMMAND) + INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf +!endif #$(INCLUDE_TFTP_COMMAND) # # Bds diff --git a/Platform/Hisilicon/D03/D03.dsc b/Platform/Hisilicon/D03/D03.dsc index 6b141dcdcb..00b459ab35 100644 --- a/Platform/Hisilicon/D03/D03.dsc +++ b/Platform/Hisilicon/D03/D03.dsc @@ -499,12 +499,12 @@ [Components.common] !ifdef $(INCLUDE_DP) NULL|ShellPkg/Library/UefiDpLib/UefiDpLib.inf !endif #$(INCLUDE_DP) -!ifdef $(INCLUDE_TFTP_COMMAND) - NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf -!endif #$(INCLUDE_TFTP_COMMAND) gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000 } +!ifdef $(INCLUDE_TFTP_COMMAND) + ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf +!endif #$(INCLUDE_TFTP_COMMAND) diff --git a/Platform/Hisilicon/D03/D03.fdf b/Platform/Hisilicon/D03/D03.fdf index 37a7e2827d..0b38eb48fa 100644 --- a/Platform/Hisilicon/D03/D03.fdf +++ b/Platform/Hisilicon/D03/D03.fdf @@ -279,6 +279,9 @@ [FV.FvMain] # Build Shell from latest source code instead of prebuilt binary # INF ShellPkg/Application/Shell/Shell.inf +!ifdef $(INCLUDE_TFTP_COMMAND) + INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf +!endif #$(INCLUDE_TFTP_COMMAND) # # Bds diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc index 00cf0f20d2..41cd3c8680 100644 --- a/Platform/Hisilicon/D05/D05.dsc +++ b/Platform/Hisilicon/D05/D05.dsc @@ -647,12 +647,12 @@ [Components.common] !ifdef $(INCLUDE_DP) NULL|ShellPkg/Library/UefiDpLib/UefiDpLib.inf !endif #$(INCLUDE_DP) -!ifdef $(INCLUDE_TFTP_COMMAND) - NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf -!endif #$(INCLUDE_TFTP_COMMAND) gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000 } +!ifdef $(INCLUDE_TFTP_COMMAND) + ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf +!endif #$(INCLUDE_TFTP_COMMAND) diff --git a/Platform/Hisilicon/D05/D05.fdf b/Platform/Hisilicon/D05/D05.fdf index a5e6546748..78ab0c89e6 100644 --- a/Platform/Hisilicon/D05/D05.fdf +++ b/Platform/Hisilicon/D05/D05.fdf @@ -300,6 +300,9 @@ [FV.FvMain] # Build Shell from latest source code instead of prebuilt binary # INF ShellPkg/Application/Shell/Shell.inf +!ifdef $(INCLUDE_TFTP_COMMAND) + INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf +!endif #$(INCLUDE_TFTP_COMMAND) # # Bds diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc b/Platform/Hisilicon/HiKey/HiKey.dsc index 957e4d4a9e..0c8ef813ee 100644 --- a/Platform/Hisilicon/HiKey/HiKey.dsc +++ b/Platform/Hisilicon/HiKey/HiKey.dsc @@ -464,7 +464,6 @@ [Components.common] NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf NULL|ShellPkg/Library/UefiShellInstal
Re: [edk2] [PATCH edk2-platforms] Platform/Hisilicon: drop BdsLib inclusion from HiKey .dsc
On Thu, Nov 30, 2017 at 11:13:49AM +, Ard Biesheuvel wrote: > > > > On 30 Nov 2017, at 10:46, Leif Lindholm wrote: > > > > The ArmPkg BdsLib has been dropped from EDK2, and is no longer > > required by the Android*Boot applications - so delete the > > reference to fix the resulting build failure. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Leif Lindholm > > Reviewed-by: Ard Biesheuvel Thanks, pushed as 53a3ad49a9. / Leif ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v4 2/3] ArmVirtPkg: Fix build failure due to Tftp library removal
On 11/29/17 14:53, Laszlo Ersek wrote: > Ray, > > On 11/29/17 11:14, Ruiyu Ni wrote: >> The TFTP command was converted from a NULL class library >> instance to a dynamic shell command in commit 0961002352e9. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ruiyu Ni >> Reviewed-by: Laszlo Ersek >> Cc: Ard Biesheuvel >> Cc: Julien Grall >> --- >> ArmVirtPkg/ArmVirt.dsc.inc | 11 +++ >> ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 3 ++- >> ArmVirtPkg/ArmVirtXen.fdf| 3 ++- >> 3 files changed, 11 insertions(+), 6 deletions(-) > > Can you please incorporate points (2) and (3) as well, from my v3 review? > > https://lists.01.org/pipermail/edk2-devel/2017-November/018191.html I fixed up the commit message as described above. I also test-built the ArmVirtQemu, ArmVirtQemuKernel and ArmVirtXen platforms, with the patch applied, for ARM and AARCH64. [ler...@redhat.com: extend commit message] Reviewed-by: Laszlo Ersek Build-tested-by: Laszlo Ersek Commit 59fcf0706bf4. Thanks Laszlo ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v4 3/3] BeagleBoardPkg: Fix build failure due to Tftp library removal
On 11/29/17 12:30, Leif Lindholm wrote: > On Wed, Nov 29, 2017 at 06:15:00PM +0800, Ruiyu Ni wrote: >> The TFTP command was converted from a NULL class library >> instance to a dynamic shell command in commit 0961002352e9. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ruiyu Ni >> Cc: Leif Lindholm >> Reviewed-by: Ard Biesheuvel > > Reviewed-by: Leif Lindholm Commit ef1b70ff08ed. Thanks Laszlo ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v4 2/3] ArmVirtPkg: Fix build failure due to Tftp library removal
On 30 November 2017 at 12:22, Laszlo Ersek wrote: > On 11/29/17 14:53, Laszlo Ersek wrote: >> Ray, >> >> On 11/29/17 11:14, Ruiyu Ni wrote: >>> The TFTP command was converted from a NULL class library >>> instance to a dynamic shell command in commit 0961002352e9. >>> >>> Contributed-under: TianoCore Contribution Agreement 1.1 >>> Signed-off-by: Ruiyu Ni >>> Reviewed-by: Laszlo Ersek >>> Cc: Ard Biesheuvel >>> Cc: Julien Grall >>> --- >>> ArmVirtPkg/ArmVirt.dsc.inc | 11 +++ >>> ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 3 ++- >>> ArmVirtPkg/ArmVirtXen.fdf| 3 ++- >>> 3 files changed, 11 insertions(+), 6 deletions(-) >> >> Can you please incorporate points (2) and (3) as well, from my v3 review? >> >> https://lists.01.org/pipermail/edk2-devel/2017-November/018191.html > > I fixed up the commit message as described above. > > I also test-built the ArmVirtQemu, ArmVirtQemuKernel and ArmVirtXen > platforms, with the patch applied, for ARM and AARCH64. > > [ler...@redhat.com: extend commit message] > Reviewed-by: Laszlo Ersek > Build-tested-by: Laszlo Ersek > > Commit 59fcf0706bf4. > Thanks for taking care of this. The build had been broken long enough ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms] Platform, Silicon: Update Hisilicon Shell tftp command config
On 30 November 2017 at 12:00, Leif Lindholm wrote: > EDK2 changed the tftp shell command from a library to a > dynamic command. Update configuration files to reflect this. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Leif Lindholm Reviewed-by: Ard Biesheuvel > --- > Platform/Hisilicon/D02/Pv660D02.dsc | 6 +++--- > Platform/Hisilicon/D02/Pv660D02.fdf | 3 +++ > Platform/Hisilicon/D03/D03.dsc | 6 +++--- > Platform/Hisilicon/D03/D03.fdf | 3 +++ > Platform/Hisilicon/D05/D05.dsc | 6 +++--- > Platform/Hisilicon/D05/D05.fdf | 3 +++ > Platform/Hisilicon/HiKey/HiKey.dsc | 4 +++- > Platform/Hisilicon/HiKey/HiKey.fdf | 3 +++ > Silicon/Hisilicon/Hisilicon.dsc.inc | 7 --- > 9 files changed, 28 insertions(+), 13 deletions(-) > > diff --git a/Platform/Hisilicon/D02/Pv660D02.dsc > b/Platform/Hisilicon/D02/Pv660D02.dsc > index d5eb963e8f..ab7c7ba7b7 100644 > --- a/Platform/Hisilicon/D02/Pv660D02.dsc > +++ b/Platform/Hisilicon/D02/Pv660D02.dsc > @@ -434,12 +434,12 @@ [Components.common] > !ifdef $(INCLUDE_DP) >NULL|ShellPkg/Library/UefiDpLib/UefiDpLib.inf > !endif #$(INCLUDE_DP) > -!ifdef $(INCLUDE_TFTP_COMMAND) > - > NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf > -!endif #$(INCLUDE_TFTP_COMMAND) > > >gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF >gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE >gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000 >} > +!ifdef $(INCLUDE_TFTP_COMMAND) > + ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf > +!endif #$(INCLUDE_TFTP_COMMAND) > diff --git a/Platform/Hisilicon/D02/Pv660D02.fdf > b/Platform/Hisilicon/D02/Pv660D02.fdf > index e0bb0ab273..f0934a86f4 100644 > --- a/Platform/Hisilicon/D02/Pv660D02.fdf > +++ b/Platform/Hisilicon/D02/Pv660D02.fdf > @@ -266,6 +266,9 @@ [FV.FvMain] ># Build Shell from latest source code instead of prebuilt binary ># >INF ShellPkg/Application/Shell/Shell.inf > +!ifdef $(INCLUDE_TFTP_COMMAND) > + INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf > +!endif #$(INCLUDE_TFTP_COMMAND) > ># ># Bds > diff --git a/Platform/Hisilicon/D03/D03.dsc b/Platform/Hisilicon/D03/D03.dsc > index 6b141dcdcb..00b459ab35 100644 > --- a/Platform/Hisilicon/D03/D03.dsc > +++ b/Platform/Hisilicon/D03/D03.dsc > @@ -499,12 +499,12 @@ [Components.common] > !ifdef $(INCLUDE_DP) >NULL|ShellPkg/Library/UefiDpLib/UefiDpLib.inf > !endif #$(INCLUDE_DP) > -!ifdef $(INCLUDE_TFTP_COMMAND) > - > NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf > -!endif #$(INCLUDE_TFTP_COMMAND) > > >gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF >gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE >gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000 >} > +!ifdef $(INCLUDE_TFTP_COMMAND) > + ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf > +!endif #$(INCLUDE_TFTP_COMMAND) > diff --git a/Platform/Hisilicon/D03/D03.fdf b/Platform/Hisilicon/D03/D03.fdf > index 37a7e2827d..0b38eb48fa 100644 > --- a/Platform/Hisilicon/D03/D03.fdf > +++ b/Platform/Hisilicon/D03/D03.fdf > @@ -279,6 +279,9 @@ [FV.FvMain] ># Build Shell from latest source code instead of prebuilt binary ># >INF ShellPkg/Application/Shell/Shell.inf > +!ifdef $(INCLUDE_TFTP_COMMAND) > + INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf > +!endif #$(INCLUDE_TFTP_COMMAND) > ># ># Bds > diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc > index 00cf0f20d2..41cd3c8680 100644 > --- a/Platform/Hisilicon/D05/D05.dsc > +++ b/Platform/Hisilicon/D05/D05.dsc > @@ -647,12 +647,12 @@ [Components.common] > !ifdef $(INCLUDE_DP) >NULL|ShellPkg/Library/UefiDpLib/UefiDpLib.inf > !endif #$(INCLUDE_DP) > -!ifdef $(INCLUDE_TFTP_COMMAND) > - > NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf > -!endif #$(INCLUDE_TFTP_COMMAND) > > >gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF >gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE >gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000 >} > +!ifdef $(INCLUDE_TFTP_COMMAND) > + ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf > +!endif #$(INCLUDE_TFTP_COMMAND) > diff --git a/Platform/Hisilicon/D05/D05.fdf b/Platform/Hisilicon/D05/D05.fdf > index a5e6546748..78ab0c89e6 100644 > --- a/Platform/Hisilicon/D05/D05.fdf > +++ b/Platform/Hisilicon/D05/D05.fdf > @@ -300,6 +300,9 @@ [FV.FvMain] ># Build Shell from latest source code instead of prebuilt binary ># >INF ShellPkg/Application/Shell/Shell.inf > +!ifdef $(INCLUDE_TFTP_COMMAND) > + INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf > +!endif #$(INCLUDE_TFTP_COMMAND) > ># ># Bds > diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc > b/Pl
Re: [edk2] [PATCH edk2-platforms] Platform/ARM: move to new TFTP Shell command implementation
On 30 November 2017 at 11:28, Joakim Bech wrote: > On Thu, Nov 30, 2017 at 10:56:20AM +, Leif Lindholm wrote: >> On Thu, Nov 30, 2017 at 09:07:21AM +, Ard Biesheuvel wrote: >> > Upstream EDK2 has refactored the implementation of the TFTP Shell >> > command so update the ARM platforms accordingly. >> > >> > Instead of having to add the new module to all .FDF files under >> > Platform/ARM, add it to the 'networking FDF' include file and >> > include that everywhere. >> > >> > Contributed-under: TianoCore Contribution Agreement 1.1 >> > Signed-off-by: Ard Biesheuvel >> > --- >> > Platform/ARM/JunoPkg/ArmJuno.fdf| 13 ++--- >> > Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf | 13 ++--- >> > Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc | 5 + >> > Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc| 2 +- >> > 4 files changed, 10 insertions(+), 23 deletions(-) >> > >> > diff --git a/Platform/ARM/JunoPkg/ArmJuno.fdf >> > b/Platform/ARM/JunoPkg/ArmJuno.fdf >> > index 52586135b525..72771b1170b0 100644 >> > --- a/Platform/ARM/JunoPkg/ArmJuno.fdf >> > +++ b/Platform/ARM/JunoPkg/ArmJuno.fdf >> > @@ -183,17 +183,8 @@ [FV.FvMain] >> ># >> ># Networking stack >> ># >> > - INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf >> > - INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf >> > - INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf >> > - INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf >> > - INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf >> > - INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf >> > - INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf >> > - INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf >> > - INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf >> > - INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf >> > - INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf >> > +!include Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc >> > + >> >INF EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf >> > !if 0 >> >INF OptionRomPkg/MarvellYukonDxe/MarvellYukonDxe.inf >> > diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf >> > b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf >> > index 46e4b9ac6758..3c75a51570b8 100644 >> > --- a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf >> > +++ b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.fdf >> > @@ -148,17 +148,8 @@ [FV.FvMain] >> ># >> ># Networking stack >> ># >> > - INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf >> > - INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf >> > - INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf >> > - INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf >> > - INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf >> > - INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf >> > - INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf >> > - INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf >> > - INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf >> > - INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf >> > - INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf >> > +!include Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc >> > + >> >INF EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.inf >> > >> ># >> > diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc >> > b/Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc >> > index 57af0f70eee8..b0107f2bbabd 100644 >> > --- a/Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc >> > +++ b/Platform/ARM/VExpressPkg/ArmVExpress-networking.fdf.inc >> > @@ -25,3 +25,8 @@ >> >INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf >> >INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf >> >INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf >> > + >> > + # >> > + # TFTP Shell command >> > + # >> > + INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf >> >> Could you wrap this inside a >> !ifdef $(INCLUDE_TFTP_COMMAND) >> ? >> >> > diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc >> > b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc >> > index d4c38747b33f..3f6aa31ec434 100644 >> > --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc >> > +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc >> > @@ -477,11 +477,11 @@ [Components.common] >> > >> > NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf >> > >> > NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf >> > >> > NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf >> > - >> > NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf >> > >> > HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf >
[edk2] [PATCH edk2-platforms] Platform: remove gArmPlatformTokenSpaceGuid.PcdSystemMemoryInitializeInSec
Remove references to the ArmPlatformPkg PCD PcdSystemMemoryInitializeInSec, which is only used on PrePeiCore platforms anyway, and which has no effect whatsoever given that it decides when ArmPlatformInitializeSystemMemory() is called, which is implemented as an empty function by all these platforms anyway. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Platform/ARM/JunoPkg/ArmJuno.dsc | 2 -- Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc | 1 - Platform/Hisilicon/D05/D05.dsc| 1 - Platform/Hisilicon/HiKey/HiKey.dsc| 2 -- 4 files changed, 6 deletions(-) diff --git a/Platform/ARM/JunoPkg/ArmJuno.dsc b/Platform/ARM/JunoPkg/ArmJuno.dsc index 115609180263..2844c91813d4 100644 --- a/Platform/ARM/JunoPkg/ArmJuno.dsc +++ b/Platform/ARM/JunoPkg/ArmJuno.dsc @@ -78,8 +78,6 @@ [BuildOptions] [PcdsFeatureFlag.common] - gArmPlatformTokenSpaceGuid.PcdSystemMemoryInitializeInSec|TRUE - ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe. # It could be set FALSE to save size. gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc index b2eb4b14da0b..98513b282fa7 100644 --- a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc +++ b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc @@ -86,7 +86,6 @@ [BuildOptions] [PcdsFeatureFlag.common] gArmTokenSpaceGuid.PcdNormalMemoryNonshareableOverride|TRUE - gArmPlatformTokenSpaceGuid.PcdSystemMemoryInitializeInSec|TRUE gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores|TRUE ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe. diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc index 00cf0f20d23f..1daac38e1152 100644 --- a/Platform/Hisilicon/D05/D05.dsc +++ b/Platform/Hisilicon/D05/D05.dsc @@ -113,7 +113,6 @@ [BuildOptions] [PcdsFeatureFlag.common] !if $(EDK2_SKIP_PEICORE) == 1 - gArmPlatformTokenSpaceGuid.PcdSystemMemoryInitializeInSec|TRUE gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores|TRUE !endif diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc b/Platform/Hisilicon/HiKey/HiKey.dsc index 957e4d4a9e4c..8322ab53c020 100644 --- a/Platform/Hisilicon/HiKey/HiKey.dsc +++ b/Platform/Hisilicon/HiKey/HiKey.dsc @@ -192,8 +192,6 @@ [PcdsFeatureFlag.common] gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob|TRUE - gArmPlatformTokenSpaceGuid.PcdSystemMemoryInitializeInSec|TRUE - ## If TRUE, Graphics Output Protocol will be installed on virtual handle created by ConsplitterDxe. # It could be set FALSE to save size. gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|FALSE -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] edk2 interface deprecation policy
Does edk2 have a policy regarding deprecation of interface definition headers? I can see that definition of the UgaDraw protocol that was deprecated years ago (I believe in UEFI 2.0) is still part of the code base; yet, definition of the SMM Communication ACPI Table that was deprecated this year in UEFI 2.6B has already been removed. Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends, Inc. This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 2/2] BeagleBoardPkg: add CapsuleLib resolution
Commit 4bbcc285d5f7 ("ArmPkg/PlatformBootManagerLib: process pending capsules") added a dependency on CapsuleLib. Add DxeCapsuleLibNull resolution to BeagleBoardPkg.dsc to resolve this. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm --- BeagleBoardPkg/BeagleBoardPkg.dsc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BeagleBoardPkg/BeagleBoardPkg.dsc b/BeagleBoardPkg/BeagleBoardPkg.dsc index d67ccf377e..2837ef3c06 100644 --- a/BeagleBoardPkg/BeagleBoardPkg.dsc +++ b/BeagleBoardPkg/BeagleBoardPkg.dsc @@ -135,6 +135,8 @@ [LibraryClasses.common] FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf + CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf + [LibraryClasses.common.SEC] PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf ReportStatusCodeLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 1/2] Omap35xxPkg: add GetTimeInNanoSecond implementation
Commit a63be426f8e3 ("ArmPlatformPkg: Store initial timer value") caused BeagleBoard to stop building, due to Omap35xxTimerLib lacking an implementation of GetTimeInNanoSecond (). So add one. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm --- Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c | 24 1 file changed, 24 insertions(+) diff --git a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c index 652c47b6f6..33b314922b 100644 --- a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c +++ b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c @@ -131,3 +131,27 @@ GetPerformanceCounterProperties ( return PcdGet64(PcdEmbeddedPerformanceCounterFrequencyInHz); } + +/** + Converts elapsed ticks of performance counter to time in nanoseconds. + + This function converts the elapsed ticks of running performance counter to + time value in unit of nanoseconds. + + @param Ticks The number of elapsed ticks of running performance counter. + + @return The elapsed time in nanoseconds. + +**/ +UINT64 +EFIAPI +GetTimeInNanoSecond ( + IN UINT64 Ticks + ) +{ + UINT32 Period; + + Period = PcdGet32 (PcdEmbeddedPerformanceCounterPeriodInNanoseconds); + + return (GetPerformanceCounter () * Period); +} -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 1/2] Omap35xxPkg: add GetTimeInNanoSecond implementation
On 30 November 2017 at 14:07, Leif Lindholm wrote: > Commit a63be426f8e3 ("ArmPlatformPkg: Store initial timer value") caused > BeagleBoard to stop building, due to Omap35xxTimerLib lacking an > implementation of GetTimeInNanoSecond (). So add one. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Leif Lindholm > --- > Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c | 24 > 1 file changed, 24 insertions(+) > > diff --git a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > index 652c47b6f6..33b314922b 100644 > --- a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > +++ b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > @@ -131,3 +131,27 @@ GetPerformanceCounterProperties ( > >return PcdGet64(PcdEmbeddedPerformanceCounterFrequencyInHz); > } > + > +/** > + Converts elapsed ticks of performance counter to time in nanoseconds. > + > + This function converts the elapsed ticks of running performance counter to > + time value in unit of nanoseconds. > + > + @param Ticks The number of elapsed ticks of running performance > counter. > + > + @return The elapsed time in nanoseconds. > + > +**/ > +UINT64 > +EFIAPI > +GetTimeInNanoSecond ( > + IN UINT64 Ticks > + ) > +{ > + UINT32 Period; > + > + Period = PcdGet32 (PcdEmbeddedPerformanceCounterPeriodInNanoseconds); > + > + return (GetPerformanceCounter () * Period); Shouldn't this use 'Ticks' anywhere? > +} > -- > 2.11.0 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 2/2] BeagleBoardPkg: add CapsuleLib resolution
On 30 November 2017 at 14:07, Leif Lindholm wrote: > Commit 4bbcc285d5f7 ("ArmPkg/PlatformBootManagerLib: process pending > capsules") added a dependency on CapsuleLib. Add DxeCapsuleLibNull > resolution to BeagleBoardPkg.dsc to resolve this. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Leif Lindholm Reviewed-by: Ard Biesheuvel > --- > BeagleBoardPkg/BeagleBoardPkg.dsc | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/BeagleBoardPkg/BeagleBoardPkg.dsc > b/BeagleBoardPkg/BeagleBoardPkg.dsc > index d67ccf377e..2837ef3c06 100644 > --- a/BeagleBoardPkg/BeagleBoardPkg.dsc > +++ b/BeagleBoardPkg/BeagleBoardPkg.dsc > @@ -135,6 +135,8 @@ [LibraryClasses.common] >FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf >DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf > > + CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf > + > [LibraryClasses.common.SEC] >PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf > > ReportStatusCodeLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf > -- > 2.11.0 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] Enabling boot menu via serial & PXE boot in CorebootPayloadPkg
Hi Benjamin, Thanks for the pointers. >> On networking, you might refer to the Minnow Board v3 source tree, at >> https://github.com/tianocore/edk2-platforms/tree/devel-MinnowBoard3- >> UDK2017 >> >> Minnow Board v3 uses the same SOC as Leaf Hill. You might look at >> Platform/BroxtonPlatformPkg/PlatformPkg.fdf file for a reference on >> which components are used for network / PXE. Network boot/PXE is now functioning, I just had to link in the UNDI driver in edk2 rather than loading via USB. It's just the serial boot menu I'm trying to get working now. >BTW, please use debug build for Coreboot Payload, such that debug >information can be shown in serial console from the very early stage in the >Payload's execution. This would help validating the functioning of serial. Interestingly, my debug build was complaining that it ran out of room when attempting to fit everything in the UEFIPAYLOAD. When I strip out the network additions and keep DEBUG on, Tianocore builds but errors at runtime: ``` Failed to add memory space :0xFEE0 0x10 ``` I'm guessing I can increase the size of a region somewhere to avoid this issue? >> Have you seen serial output info during Coreboot? If the answer is no, >> then Coreboot should be tweaked. If the answer is yes, but you cannot >> see serial output in Coreboot Payload, then probably the above call >> sequence needs to be checked. If you do not have a debugger, one way >> to trace code flow is to insert raw serial outputs in the code flow. I get serial output from coreboot and edk2, just not the boot menu. >> This should be doable since Coreboot already does serial output. Once >> the serial output functions correctly in the Coreboot Payload, Boot >> Menu / UI through serial should be automatically supported. That's not happening in my case. I'm currently trying to get the debug build to run. Cheers, Cameron Cameron Craig | Graduate Software Engineer | Exterity Limited tel: +44 1383 828 250 | fax: | mobile: e: cameron.cr...@exterity.com | w: www.exterity.com __ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com __ ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 5/7] ArmPlatformPkg: move internal PL061 header into driver directory
Move the internal PL061 GPIO header file into the driver directory. It shouldn't be referenced directly by other modules anyway. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c | 3 ++- ArmPlatformPkg/{Include/Drivers => Drivers/PL061GpioDxe}/PL061Gpio.h | 0 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c b/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c index 81b9f6daece8..9b36df9daa28 100644 --- a/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c +++ b/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c @@ -27,7 +27,8 @@ #include #include -#include + +#include "PL061Gpio.h" PLATFORM_GPIO_CONTROLLER *mPL061PlatformGpio; diff --git a/ArmPlatformPkg/Include/Drivers/PL061Gpio.h b/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.h similarity index 100% rename from ArmPlatformPkg/Include/Drivers/PL061Gpio.h rename to ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.h -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 6/7] ArmPlatformPkg: move internal SP805 header into driver directory
Move the internal SP805 watchdog header file into the driver directory. It shouldn't be referenced directly by other modules anyway. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c | 3 ++- ArmPlatformPkg/{Include/Drivers => Drivers/SP805WatchdogDxe}/SP805Watchdog.h | 0 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c b/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c index c78d2b9ff99f..0a9f64095bf8 100644 --- a/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c +++ b/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c @@ -25,7 +25,8 @@ #include #include -#include + +#include "SP805Watchdog.h" EFI_EVENT EfiExitBootServicesEvent = (EFI_EVENT)NULL; diff --git a/ArmPlatformPkg/Include/Drivers/SP805Watchdog.h b/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.h similarity index 100% rename from ArmPlatformPkg/Include/Drivers/SP805Watchdog.h rename to ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.h -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 7/7] ArmPlatformPkg: move internal PL031 header into driver directory
Move the internal PL031 RTC header file into the driver directory. It shouldn't be referenced directly by other modules anyway. While at it, sort the includes as well. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/{Include/Drivers => Library/PL031RealTimeClockLib}/PL031RealTimeClock.h | 0 ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c | 19 +-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ArmPlatformPkg/Include/Drivers/PL031RealTimeClock.h b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClock.h similarity index 100% rename from ArmPlatformPkg/Include/Drivers/PL031RealTimeClock.h rename to ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClock.h diff --git a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c index 1334ad446cd9..1d787cf5df2c 100644 --- a/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c +++ b/ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c @@ -14,28 +14,27 @@ **/ -#include #include + +#include +#include + #include #include -#include +#include #include -#include #include #include -#include +#include +#include #include +#include #include #include #include -#include -#include - -#include - -#include +#include "PL031RealTimeClock.h" STATIC BOOLEANmPL031Initialized = FALSE; STATIC EFI_EVENT mRtcVirtualAddrChangeEvent; -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 0/7] ArmPlatformPkg cleanup - phase II
Proceed with removing junk from ArmPlatformPkg, and tidying up the bits we want to keep. While we make up our minds how to proceed with the migration of ArmVExpressPkg, and the dependent BootMonFs and ShellCmdRunAxf modules, this series removes the outdated documentation and CTA9x4 code, moves some header files out of Include/Drivers, and removes some unused stuff from ArmPlatformLib. Ard Biesheuvel (7): ArmPlatformPkg/Documentation: remove outdated porting manual ArmPlatformPkg: remove unused ArmVExpressLibCTA9x4 code ArmPlatformPkg/ArmPlatformLib: remove ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR ArmPlatformPkg: remove ArmPlatformInitializeSystemMemory ArmPlatformPkg: move internal PL061 header into driver directory ArmPlatformPkg: move internal SP805 header into driver directory ArmPlatformPkg: move internal PL031 header into driver directory ArmPlatformPkg/ArmPlatformPkg.dec | 1 - ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h | 121 ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7.c | 13 -- ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLib.inf | 57 -- ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLibSec.inf | 54 -- ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c | 198 ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.S | 49 - ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.asm | 63 --- ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Mem.c | 119 ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c | 14 -- ArmPlatformPkg/Documentation/ARM-EDK2-Overview.png | Bin 54500 -> 0 bytes ArmPlatformPkg/Documentation/ArmPlatformLib-2nd-Stage.png | Bin 56506 -> 0 bytes ArmPlatformPkg/Documentation/ArmPlatformLib-Full-Boot.png | Bin 79676 -> 0 bytes ArmPlatformPkg/Documentation/ArmPlatformPkg.txt | 74 ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c | 3 +- ArmPlatformPkg/{Include/Drivers => Drivers/PL061GpioDxe}/PL061Gpio.h | 0 ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c | 3 +- ArmPlatformPkg/{Include/Drivers => Drivers/SP805WatchdogDxe}/SP805Watchdog.h | 0 ArmPlatformPkg/Include/Library/ArmPlatformLib.h | 24 --- ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.c | 14 -- ArmPlatformPkg/{Include/Drivers => Library/PL031RealTimeClockLib}/PL031RealTimeClock.h | 0 ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c | 19 +- ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c | 8 - ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf | 1 - BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c | 14 -- 25 files changed, 13 insertions(+), 836 deletions(-) delete mode 100644 ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h delete mode 100644 ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLib.inf delete mode 100644 ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLibSec.inf delete mode 100644 ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c delete mode 100644 ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.S delete mode 100644 ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.asm delete mode 100644 ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Mem.c delete mode 100644 ArmPlatformPkg/Documentation/ARM-EDK2-Overview.png delete mode 100644 ArmPlatformPkg/Documentation/ArmPlatformLib-2nd-Stage.png delete mode 100644 ArmPlatformPkg/Documentation/ArmPlatformLib-Full-Boot.png delete mode 100644 ArmPlatformPkg/Documentation/ArmPlatformPkg.txt rename ArmPlatformPkg/{Include/Drivers => Drivers/PL061GpioDxe}/PL061Gpio.h (100%) rename ArmPlatformPkg/{Include/Drivers => Drivers/SP805WatchdogDxe}/SP805Watchdog.h (100%) rename ArmPlatformPkg/{Include/Drivers => Library/PL031RealTimeClockLib}/PL031RealTimeClock.h (100%) -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 2/7] ArmPlatformPkg: remove unused ArmVExpressLibCTA9x4 code
ArmVExpressLibCTA9x4 is unused, and rather outdated, given that it is the last ArmPlatformLib implementation that executes both in the secure and non-secure worlds, which is a model we no longer support for ARM systems. So remove it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h | 121 ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLib.inf | 57 -- ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLibSec.inf | 54 -- ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c | 198 ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.S | 49 - ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.asm | 63 --- ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Mem.c | 119 7 files changed, 661 deletions(-) diff --git a/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h b/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h deleted file mode 100644 index b692b168cb0d.. --- a/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h +++ /dev/null @@ -1,121 +0,0 @@ -/** @file -* Header defining Versatile Express constants (Base addresses, sizes, flags) -* -* Copyright (c) 2011, 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. -* -**/ - -#ifndef __ARM_VEXPRESS_H__ -#define __ARM_VEXPRESS_H__ - -#include -#include - -/*** -// Platform Memory Map -/ - -// Can be NOR0, NOR1, DRAM -#define ARM_VE_REMAP_BASE 0x -#define ARM_VE_REMAP_SZ SIZE_64MB - -// Motherboard Peripheral and On-chip peripheral -#define ARM_VE_SMB_MB_ON_CHIP_PERIPH_BASE 0x1000 -#define ARM_VE_SMB_MB_ON_CHIP_PERIPH_SZ SIZE_256MB -#define ARM_VE_BOARD_PERIPH_BASE0x1000 -#define ARM_VE_CHIP_PERIPH_BASE 0x1002 - -// SMC -#define ARM_VE_SMC_BASE 0x4000 -#define ARM_VE_SMC_SZ 0x1C00 - -// NOR Flash 1 -#define ARM_VE_SMB_NOR0_BASE0x4000 -#define ARM_VE_SMB_NOR0_SZ SIZE_64MB -// NOR Flash 2 -#define ARM_VE_SMB_NOR1_BASE0x4400 -#define ARM_VE_SMB_NOR1_SZ SIZE_64MB -// SRAM -#define ARM_VE_SMB_SRAM_BASE0x4800 -#define ARM_VE_SMB_SRAM_SZ SIZE_32MB -// USB, Ethernet, VRAM -#define ARM_VE_SMB_PERIPH_BASE 0x4C00 -#define PL111_CLCD_VRAM_MOTHERBOARD_BASEARM_VE_SMB_PERIPH_BASE -#define ARM_VE_SMB_PERIPH_SZSIZE_64MB - -// DRAM -#define ARM_VE_DRAM_BASEPcdGet64 (PcdSystemMemoryBase) -#define ARM_VE_DRAM_SZ PcdGet64 (PcdSystemMemorySize) -// Inside the DRAM we allocate a section for the VRAM (Video RAM) -#define LCD_VRAM_CORE_TILE_BASE 0x6400 - -// External AXI between daughterboards (Logic Tile) -#define ARM_VE_EXT_AXI_BASE 0xE000 -#define ARM_VE_EXT_AXI_SZ 0x2000 /* 512 MB */ - - -/*** - Core Tile memory-mapped Peripherals -/ - -// PL111 Colour LCD Controller - core tile -#define PL111_CLCD_CORE_TILE_BASE (ARM_VE_BOARD_PERIPH_BASE + 0x2) -#define PL111_CLCD_SITE ARM_VE_DAUGHTERBOARD_1_SITE - -// PL341 Dynamic Memory Controller Base -#define ARM_VE_DMC_BASE (ARM_VE_BOARD_PERIPH_BASE + 0xE) - -// PL354 Static Memory Controller Base -#define ARM_VE_SMC_CTRL_BASE(ARM_VE_BOARD_PERIPH_BASE + 0xE1000) - -// System Configuration Controller register Base addresses -#define ARM_VE_SYS_CFG_CTRL_BASE(ARM_VE_BOARD_PERIPH_BASE + 0xE2000) -#define ARM_VE_SCC_BASE ARM_VE_SYS_CFG_CTRL_BASE -#define ARM_VE_SYS_CFGRW0_REG (ARM_VE_BOARD_PERIPH_BASE + 0xE2000) -#define ARM_VE_SYS_CFGRW1_REG (ARM_VE_BOARD_PERIPH_B
[edk2] [PATCH 4/7] ArmPlatformPkg: remove ArmPlatformInitializeSystemMemory
The function ArmPlatformInitializeSystemMemory() is defined by ArmPlatformLib, but is only ever called when using the PrePeiCore flavor of the startup code. Also, none of the remaining upstream platforms actually implement anything in that function in the first place. So let's just remove it altogether. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmPlatformPkg.dec | 1 - ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7.c | 13 - ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c | 14 -- ArmPlatformPkg/Include/Library/ArmPlatformLib.h | 11 --- ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.c | 14 -- ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c | 8 ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf | 1 - BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c | 14 -- 8 files changed, 76 deletions(-) diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatformPkg.dec index e282e76667b1..9d47e459eadc 100644 --- a/ArmPlatformPkg/ArmPlatformPkg.dec +++ b/ArmPlatformPkg/ArmPlatformPkg.dec @@ -48,7 +48,6 @@ [PcdsFeatureFlag.common] gArmPlatformTokenSpaceGuid.PcdNorFlashRemapping|FALSE|BOOLEAN|0x0012 gArmPlatformTokenSpaceGuid.PcdStandalone|TRUE|BOOLEAN|0x0001 - gArmPlatformTokenSpaceGuid.PcdSystemMemoryInitializeInSec|FALSE|BOOLEAN|0x0002 gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores|FALSE|BOOLEAN|0x0004 gArmPlatformTokenSpaceGuid.PcdNorFlashCheckBlockLocked|FALSE|BOOLEAN|0x003C diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7.c b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7.c index 93f4d82f1988..a6ddd1b792c9 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7.c +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7.c @@ -149,19 +149,6 @@ ArmPlatformInitialize ( return RETURN_SUCCESS; } -/** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ) -{ -} - EFI_STATUS PrePeiCoreGetMpCoreInfo ( OUT UINTN *CoreCount, diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c index 11dd7ff1bfb0..7760e8252125 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c @@ -155,20 +155,6 @@ ArmPlatformInitialize ( return RETURN_SUCCESS; } -/** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ) -{ - // Nothing to do here -} - EFI_STATUS PrePeiCoreGetMpCoreInfo ( OUT UINTN *CoreCount, diff --git a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h index c74d53506fee..3ad4c16066b6 100644 --- a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h +++ b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h @@ -112,17 +112,6 @@ ArmPlatformInitialize ( ); /** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ); - -/** Return the Virtual Memory Map of your platform This Virtual Memory Map is used by MemoryInitPei Module to initialize the MMU on your platform. diff --git a/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.c b/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.c index f80a276a04d6..038e955db50a 100644 --- a/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.c +++ b/ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.c @@ -106,20 +106,6 @@ ArmPlatformInitialize ( return RETURN_SUCCESS; } -/** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ) -{ - //TODO: Implement me -} - EFI_STATUS PrePeiCoreGetMpCoreInfo ( OUT UINTN *CoreCount, diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c index e7880d30b1c8..389a2e6f1abd 100644 --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c @@ -103,14 +103,6 @@ InitializeMemory ( DEBUG ((EFI_D_LOAD | EFI_D_INFO, "Memory Init PEIM Loaded\n")); - // - // Initialize the System Memory (DRAM) - // - if (!Fea
[edk2] [PATCH 3/7] ArmPlatformPkg/ArmPlatformLib: remove ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR
The ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR struct type is defined but never used anywhere. So remove it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/Include/Library/ArmPlatformLib.h | 13 - 1 file changed, 13 deletions(-) diff --git a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h index 77561a3d05b3..c74d53506fee 100644 --- a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h +++ b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h @@ -28,19 +28,6 @@ #include /** - This structure is used to describe a region of the EFI memory map - - Every EFI regions of the system memory described by their physical start address and their size - can have different attributes. Some regions can be tested and other untested. - -**/ -typedef struct { - EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute; - EFI_PHYSICAL_ADDRESS PhysicalStart; - UINT64 NumberOfBytes; -} ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR; - -/** Return the core position from the value of its MpId register This function returns the core position from the position 0 in the processor. -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 1/2] Omap35xxPkg: add GetTimeInNanoSecond implementation
On Thu, Nov 30, 2017 at 02:09:33PM +, Ard Biesheuvel wrote: > On 30 November 2017 at 14:07, Leif Lindholm wrote: > > Commit a63be426f8e3 ("ArmPlatformPkg: Store initial timer value") caused > > BeagleBoard to stop building, due to Omap35xxTimerLib lacking an > > implementation of GetTimeInNanoSecond (). So add one. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Leif Lindholm > > --- > > Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c | 24 > > > > 1 file changed, 24 insertions(+) > > > > diff --git a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > > b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > > index 652c47b6f6..33b314922b 100644 > > --- a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > > +++ b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > > @@ -131,3 +131,27 @@ GetPerformanceCounterProperties ( > > > >return PcdGet64(PcdEmbeddedPerformanceCounterFrequencyInHz); > > } > > + > > +/** > > + Converts elapsed ticks of performance counter to time in nanoseconds. > > + > > + This function converts the elapsed ticks of running performance counter > > to > > + time value in unit of nanoseconds. > > + > > + @param Ticks The number of elapsed ticks of running performance > > counter. > > + > > + @return The elapsed time in nanoseconds. > > + > > +**/ > > +UINT64 > > +EFIAPI > > +GetTimeInNanoSecond ( > > + IN UINT64 Ticks > > + ) > > +{ > > + UINT32 Period; > > + > > + Period = PcdGet32 (PcdEmbeddedPerformanceCounterPeriodInNanoseconds); > > + > > + return (GetPerformanceCounter () * Period); > > Shouldn't this use 'Ticks' anywhere? *Goes to grab coffee* v2 coming up. / Leif ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2] Omap35xxPkg: add GetTimeInNanoSecond implementation
Commit a63be426f8e3 ("ArmPlatformPkg: Store initial timer value") caused BeagleBoard to stop building, due to Omap35xxTimerLib lacking an implementation of GetTimeInNanoSecond (). So add one. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm --- Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c | 24 1 file changed, 24 insertions(+) diff --git a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c index 652c47b6f6..a6f79ddd57 100644 --- a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c +++ b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c @@ -131,3 +131,27 @@ GetPerformanceCounterProperties ( return PcdGet64(PcdEmbeddedPerformanceCounterFrequencyInHz); } + +/** + Converts elapsed ticks of performance counter to time in nanoseconds. + + This function converts the elapsed ticks of running performance counter to + time value in unit of nanoseconds. + + @param Ticks The number of elapsed ticks of running performance counter. + + @return The elapsed time in nanoseconds. + +**/ +UINT64 +EFIAPI +GetTimeInNanoSecond ( + IN UINT64 Ticks + ) +{ + UINT32 Period; + + Period = PcdGet32 (PcdEmbeddedPerformanceCounterPeriodInNanoseconds); + + return (Ticks * Period); +} -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v2] Omap35xxPkg: add GetTimeInNanoSecond implementation
On 30 November 2017 at 14:22, Leif Lindholm wrote: > Commit a63be426f8e3 ("ArmPlatformPkg: Store initial timer value") caused > BeagleBoard to stop building, due to Omap35xxTimerLib lacking an > implementation of GetTimeInNanoSecond (). So add one. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Leif Lindholm > --- > Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c | 24 > 1 file changed, 24 insertions(+) > > diff --git a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > index 652c47b6f6..a6f79ddd57 100644 > --- a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > +++ b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > @@ -131,3 +131,27 @@ GetPerformanceCounterProperties ( > >return PcdGet64(PcdEmbeddedPerformanceCounterFrequencyInHz); > } > + > +/** > + Converts elapsed ticks of performance counter to time in nanoseconds. > + > + This function converts the elapsed ticks of running performance counter to > + time value in unit of nanoseconds. > + > + @param Ticks The number of elapsed ticks of running performance > counter. > + > + @return The elapsed time in nanoseconds. > + > +**/ > +UINT64 > +EFIAPI > +GetTimeInNanoSecond ( > + IN UINT64 Ticks > + ) > +{ > + UINT32 Period; > + > + Period = PcdGet32 (PcdEmbeddedPerformanceCounterPeriodInNanoseconds); > + > + return (Ticks * Period); > +} > -- > 2.11.0 > Reviewed-by: Ard Biesheuvel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms] Platform, Silicon: Update Hisilicon Shell tftp command config
On Thu, Nov 30, 2017 at 01:30:45PM +, Ard Biesheuvel wrote: > On 30 November 2017 at 12:00, Leif Lindholm wrote: > > EDK2 changed the tftp shell command from a library to a > > dynamic command. Update configuration files to reflect this. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Leif Lindholm > > Reviewed-by: Ard Biesheuvel Thanks - pushed as 0f947b1119. ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms] Platform: remove gArmPlatformTokenSpaceGuid.PcdSystemMemoryInitializeInSec
On Thu, Nov 30, 2017 at 01:59:47PM +, Ard Biesheuvel wrote: > Remove references to the ArmPlatformPkg PCD PcdSystemMemoryInitializeInSec, > which is only used on PrePeiCore platforms anyway, and which has no effect > whatsoever given that it decides when ArmPlatformInitializeSystemMemory() > is called, which is implemented as an empty function by all these platforms > anyway. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm > --- > Platform/ARM/JunoPkg/ArmJuno.dsc | 2 -- > Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc | 1 - > Platform/Hisilicon/D05/D05.dsc| 1 - > Platform/Hisilicon/HiKey/HiKey.dsc| 2 -- > 4 files changed, 6 deletions(-) > > diff --git a/Platform/ARM/JunoPkg/ArmJuno.dsc > b/Platform/ARM/JunoPkg/ArmJuno.dsc > index 115609180263..2844c91813d4 100644 > --- a/Platform/ARM/JunoPkg/ArmJuno.dsc > +++ b/Platform/ARM/JunoPkg/ArmJuno.dsc > @@ -78,8 +78,6 @@ [BuildOptions] > > > > [PcdsFeatureFlag.common] > - gArmPlatformTokenSpaceGuid.PcdSystemMemoryInitializeInSec|TRUE > - >## If TRUE, Graphics Output Protocol will be installed on virtual handle > created by ConsplitterDxe. ># It could be set FALSE to save size. >gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE > diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc > b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc > index b2eb4b14da0b..98513b282fa7 100644 > --- a/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc > +++ b/Platform/ARM/VExpressPkg/ArmVExpress-CTA15-A7.dsc > @@ -86,7 +86,6 @@ [BuildOptions] > > [PcdsFeatureFlag.common] >gArmTokenSpaceGuid.PcdNormalMemoryNonshareableOverride|TRUE > - gArmPlatformTokenSpaceGuid.PcdSystemMemoryInitializeInSec|TRUE >gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores|TRUE > >## If TRUE, Graphics Output Protocol will be installed on virtual handle > created by ConsplitterDxe. > diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc > index 00cf0f20d23f..1daac38e1152 100644 > --- a/Platform/Hisilicon/D05/D05.dsc > +++ b/Platform/Hisilicon/D05/D05.dsc > @@ -113,7 +113,6 @@ [BuildOptions] > [PcdsFeatureFlag.common] > > !if $(EDK2_SKIP_PEICORE) == 1 > - gArmPlatformTokenSpaceGuid.PcdSystemMemoryInitializeInSec|TRUE >gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores|TRUE > !endif > > diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc > b/Platform/Hisilicon/HiKey/HiKey.dsc > index 957e4d4a9e4c..8322ab53c020 100644 > --- a/Platform/Hisilicon/HiKey/HiKey.dsc > +++ b/Platform/Hisilicon/HiKey/HiKey.dsc > @@ -192,8 +192,6 @@ [PcdsFeatureFlag.common] > >gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob|TRUE > > - gArmPlatformTokenSpaceGuid.PcdSystemMemoryInitializeInSec|TRUE > - >## If TRUE, Graphics Output Protocol will be installed on virtual handle > created by ConsplitterDxe. ># It could be set FALSE to save size. >gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|FALSE > -- > 2.11.0 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v2] PeiLib : Inform UEFI memory to Linux
On 30 November 2017 at 10:07, Udit Kumar wrote: > Hi Ard, > Sorry for coming back late on this > Are you ok to apply this patch in edk2 > Actually, I recently discovered why this code exists in the first place (I think) The following libraries EmbeddedPkg/Library/LzmaHobCustomDecompressLib EmbeddedPkg/Library/DxeHobPeCoffLib expose code that is part of the PrePi module via HOBs. This was implemented for BeagleBoardPkg, which apparently couldn't keep two copies of that code in its flash. So we can only remove this code if we first clone the existing version into BeagleBoardPkg as a special case. Thanks, Ard. >> -Original Message- >> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Sakar >> Arora >> Sent: Wednesday, September 20, 2017 1:50 PM >> To: Ard Biesheuvel >> Cc: edk2-devel@lists.01.org; leif.lindh...@linaro.org >> Subject: Re: [edk2] [PATCH v2] PeiLib : Inform UEFI memory to Linux >> >> Thanks for the information. Seems my understanding was not correct in this >> context. I have no other doubts on this change. >> >> -Original Message- >> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] >> Sent: Wednesday, September 20, 2017 12:02 PM >> To: Sakar Arora >> Cc: Meenakshi Aggarwal ; edk2- >> de...@lists.01.org; leif.lindh...@linaro.org >> Subject: Re: [edk2] [PATCH v2] PeiLib : Inform UEFI memory to Linux >> >> On 19 September 2017 at 22:32, Sakar Arora wrote: >> > The DXE core dispatcher relies on the available memory to allocate space >> > for >> loading the rest of the modules from the UEFI image. If we declare the UEFI >> image memory space (from which DXE dispatcher reads the efi modules) open to >> allocation, it might lead to data corruption, depending on the location of >> UEFI >> image and cumulative size of uncompressed EFI modules. >> > >> > Also, since UEFI allows unloading and loading of drivers at runtime, IMO, >> > there >> is a need to preserve the UEFI image even after all the modules have been >> decompressed and loaded in the boot sequence. >> > >> >> None of this is relevant. The uncompressed firmware volume containing DXE >> core and everything else is preserved as before. The only thing that gets >> discarded is the outer FV, which only contains the PrePi SEC module, and the >> compressed FV, neither of which is ever touched again after DXE core has >> started executing. So we should not register the FV in the first place, and >> not >> reserve the memory so we don't lose it. >> >> If you still think this may break anything, could you please elaborate? >> >> >> >> > -Original Message- >> > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] >> > Sent: Tuesday, September 19, 2017 6:18 PM >> > To: Sakar Arora >> > Cc: Meenakshi Aggarwal ; >> > edk2-devel@lists.01.org; leif.lindh...@linaro.org >> > Subject: Re: [edk2] [PATCH v2] PeiLib : Inform UEFI memory to Linux >> > >> > On 19 September 2017 at 01:07, Sakar Arora wrote: >> >> This change will create the possibility for memory space holding the UEFI >> image to be over-written by the DXE core code, since this space will then be >> available for allocation. >> > >> > Yes. But why does this matter after the entire payload has been >> > decompressed >> into memory already? >> > >> > >> >> Any such change, if required, should be done just before booting the OS. >> >> >> >> -Original Message- >> >> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf >> >> Of Meenakshi Aggarwal >> >> Sent: Tuesday, September 19, 2017 6:02 PM >> >> To: edk2-devel@lists.01.org; leif.lindh...@linaro.org; >> >> ard.biesheu...@linaro.org >> >> Subject: [edk2] [PATCH v2] PeiLib : Inform UEFI memory to Linux >> >> >> >> While creating Hob list, ArmPlatformPkg is hiding UEFI memory. >> >> whereas this memory can be used by OS. >> >> >> >> This patch, allows OS to use UEFI code area. >> >> >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> >> Signed-off-by: Udit Kumar >> >> Signed-off-by: Meenakshi Aggarwal >> >> --- >> >> ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c | 69 >> >> - >> >> 1 file changed, 69 deletions(-) >> >> >> >> diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c >> >> b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c >> >> index 2feb11f..d03214b 100644 >> >> --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c >> >> +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c >> >> @@ -70,11 +70,7 @@ MemoryPeim ( >> >> { >> >>ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable; >> >>EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttributes; >> >> - UINT64 ResourceLength; >> >>EFI_PEI_HOB_POINTERS NextHob; >> >> - EFI_PHYSICAL_ADDRESS FdTop; >> >> - EFI_PHYSICAL_ADDRESS SystemMemoryTop; >> >> - EFI_PHYSICAL_ADDRESS ResourceTop; >> >>BOOLEAN Found; >> >> >> >>// Get Virtual Memory Map from the Platform Library @@ -121,71 +1
Re: [edk2] [PATCH v2] Omap35xxPkg: add GetTimeInNanoSecond implementation
On Thu, Nov 30, 2017 at 02:24:24PM +, Ard Biesheuvel wrote: > On 30 November 2017 at 14:22, Leif Lindholm wrote: > > Commit a63be426f8e3 ("ArmPlatformPkg: Store initial timer value") caused > > BeagleBoard to stop building, due to Omap35xxTimerLib lacking an > > implementation of GetTimeInNanoSecond (). So add one. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Leif Lindholm > > --- > > Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c | 24 > > > > 1 file changed, 24 insertions(+) > > > > diff --git a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > > b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > > index 652c47b6f6..a6f79ddd57 100644 > > --- a/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > > +++ b/Omap35xxPkg/Library/Omap35xxTimerLib/TimerLib.c > > @@ -131,3 +131,27 @@ GetPerformanceCounterProperties ( > > > >return PcdGet64(PcdEmbeddedPerformanceCounterFrequencyInHz); > > } > > + > > +/** > > + Converts elapsed ticks of performance counter to time in nanoseconds. > > + > > + This function converts the elapsed ticks of running performance counter > > to > > + time value in unit of nanoseconds. > > + > > + @param Ticks The number of elapsed ticks of running performance > > counter. > > + > > + @return The elapsed time in nanoseconds. > > + > > +**/ > > +UINT64 > > +EFIAPI > > +GetTimeInNanoSecond ( > > + IN UINT64 Ticks > > + ) > > +{ > > + UINT32 Period; > > + > > + Period = PcdGet32 (PcdEmbeddedPerformanceCounterPeriodInNanoseconds); > > + > > + return (Ticks * Period); > > +} > > -- > > 2.11.0 > > > > Reviewed-by: Ard Biesheuvel Thanks. These two BeagleBoard/Omap fixes pushed as ef1b70ff08..f0d9d2b617. ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms] Platform: remove gArmPlatformTokenSpaceGuid.PcdSystemMemoryInitializeInSec
On 30 November 2017 at 14:31, Leif Lindholm wrote: > On Thu, Nov 30, 2017 at 01:59:47PM +, Ard Biesheuvel wrote: >> Remove references to the ArmPlatformPkg PCD PcdSystemMemoryInitializeInSec, >> which is only used on PrePeiCore platforms anyway, and which has no effect >> whatsoever given that it decides when ArmPlatformInitializeSystemMemory() >> is called, which is implemented as an empty function by all these platforms >> anyway. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel > > Reviewed-by: Leif Lindholm > Thanks. Pushed as 362fe44d406313eb1f5e7d0e92182d3cf484f5d5 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH edk2-platforms] Platform: drop tftp shell support from remaining platforms
Cello, Overdrive, Overdrive1000 and Armada still include the now-defunct library implementation of the Shell tftp command. Since the command is a nonstandard one anyway, just remove it from the build for these platforms. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Leif Lindholm --- Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 1 - Platform/LeMaker/CelloBoard/CelloBoard.dsc | 1 - Platform/Marvell/Armada/Armada.dsc.inc | 1 - Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc | 1 - 4 files changed, 4 deletions(-) diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc index 2cc71d499e..51d823892b 100644 --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc @@ -745,7 +745,6 @@ [Components.common] NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf - NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf diff --git a/Platform/LeMaker/CelloBoard/CelloBoard.dsc b/Platform/LeMaker/CelloBoard/CelloBoard.dsc index 33e9ebee32..fb9155ce3a 100644 --- a/Platform/LeMaker/CelloBoard/CelloBoard.dsc +++ b/Platform/LeMaker/CelloBoard/CelloBoard.dsc @@ -667,7 +667,6 @@ [Components.common] NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf - NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf diff --git a/Platform/Marvell/Armada/Armada.dsc.inc b/Platform/Marvell/Armada/Armada.dsc.inc index 0c873fb112..95268ac587 100644 --- a/Platform/Marvell/Armada/Armada.dsc.inc +++ b/Platform/Marvell/Armada/Armada.dsc.inc @@ -489,7 +489,6 @@ [Components.common] NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf - NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf NULL|Platform/Marvell/Applications/EepromCmd/EepromCmd.inf NULL|Platform/Marvell/Applications/SpiTool/SpiFlashCmd.inf NULL|Platform/Marvell/Applications/FirmwareUpdate/FUpdate.inf diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc index 5352fc4e55..0abec8120a 100644 --- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc +++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc @@ -684,7 +684,6 @@ [Components.common] NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf - NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] DHCP Process Starts Even there is NO Media Connected
We saw some problems running Linux UEFI Validation (LUV) at the last UEFI Plugfest that are probably related to this issue. At the time we asked the LUV team to investigate it as a test issue, but it may actually be a stack problem based on this information. Have you filed a tracker in TianoCore Bugzilla for this issue? Thanks ... br --- Brian Richardson, Senior Technical Marketing Engineer, Intel Software brian.richard...@intel.com -- @intel_brian (Twitter & WeChat) https://software.intel.com/en-us/meet-the-developers/evangelists/team/brian-richardson -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Karunakar P Sent: Thursday, November 30, 2017 3:59 AM To: Wu, Jiaxin ; Fu, Siyuan ; Ye, Ting ; 'edk2-devel@lists.01.org' Subject: Re: [edk2] DHCP Process Starts Even there is NO Media Connected Hi Jiaxin, Please find my below comments/suggestions. 1. Yes, Current DHCP4/6 Start() implementation doesn't check for Media Status. It will be better to implement it in order to sync with UEFI spec. 2. DHCP process may be initiated by HTTP/PXE/ISCSI or Assigning IP (SetData) from Shell or using BIOS setup page. HTTP,PXE and ISCSI is already Checking Media Presence before DHCP Start, So it will have NO effect if we do implementation in DHCP4/6 Start(). 3. Current implementation of EFI_IP4_CONFIG2_SET_DATA, also NOT handling checking Media Status. a. UEFI Spec NOT defines EFI_NO_MEDIA status code for EFI_IP4_CONFIG2_SET_DATA, I'm NOT sure what's reason behind it or might be missing. b. UEFI Spec defines EFI_DEVICE_ERROR status code for EFI_IP4_CONFIG2_SET_DATA, If we can use the same status for Media presence then no issues. c. When there is No Media connected and if we try to assign IP over DHCP(SetData), I guess there is no need to proceed further in EfiIp4Config2SetData and we can return with EFI_DEVICE_ERROR. Based on above points(1 & 3.c ), I've updated the suggested changes and attached the same (CheckMediaStatus_V2.rar) Could you please review and provide your comments. Please correct if anything wrong. Thank You, Karunakar From: Wu, Jiaxin [mailto:jiaxin...@intel.com] Sent: Wednesday, November 29, 2017 11:57 AM To: Karunakar P; Fu, Siyuan; Ye, Ting Subject: RE: DHCP Process Starts Even there is NO Media Connected Hi Karunakar, After talk with Siyuan, we agree it's reasonable to check the Media status before starting DHCP process, but we'd better check it in DHCP layer since the UEFI spec defines EFI_NO_MEDIA status code for DHCP4/6.Start(), but our current implementation doesn't check it. What do you think? Thanks, Jiaxin From: Karunakar P [mailto:karunak...@amiindia.co.in] Sent: Tuesday, November 28, 2017 11:18 PM To: Wu, Jiaxin mailto:jiaxin...@intel.com>>; Fu, Siyuan mailto:siyuan...@intel.com>>; Ye, Ting mailto:ting...@intel.com>> Subject: RE: DHCP Process Starts Even there is NO Media Connected Could you please review the attachment changes for this support. Thanks, Karunakar From: Karunakar P Sent: Monday, November 27, 2017 12:53 PM To: 'Wu, Jiaxin'; 'Fu, Siyuan'; 'Ye, Ting' Subject: RE: DHCP Process Starts Even there is NO Media Connected Could you please provide your comments... Thank You, Karunakar From: Karunakar P Sent: Thursday, November 23, 2017 2:05 PM To: 'Wu, Jiaxin'; Fu, Siyuan; Ye, Ting Subject: DHCP Process Starts Even there is NO Media Connected Hello All, When we try to Assign IP to SUT using ifconfig command from Shell or IPv4 Network Configuration BIOS setup page DHCP process start even there is no LAN cable connected to specific port. Can we add a Media presence condition check before starting DHCP service? Could you please correct if anything is wrong. Thanks, Karunakar ___ 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 edk2-platforms] Platform: drop tftp shell support from remaining platforms
On 30 November 2017 at 15:01, Leif Lindholm wrote: > Cello, Overdrive, Overdrive1000 and Armada still include the > now-defunct library implementation of the Shell tftp command. > Since the command is a nonstandard one anyway, just remove > it from the build for these platforms. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Leif Lindholm Reviewed-by: Ard Biesheuvel > --- > Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 1 - > Platform/LeMaker/CelloBoard/CelloBoard.dsc | 1 - > Platform/Marvell/Armada/Armada.dsc.inc | 1 - > Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc | 1 - > 4 files changed, 4 deletions(-) > > diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc > b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc > index 2cc71d499e..51d823892b 100644 > --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc > +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc > @@ -745,7 +745,6 @@ [Components.common] > > NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf > > NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf > > NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf > - > NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf > > HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf >PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf > > BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf > diff --git a/Platform/LeMaker/CelloBoard/CelloBoard.dsc > b/Platform/LeMaker/CelloBoard/CelloBoard.dsc > index 33e9ebee32..fb9155ce3a 100644 > --- a/Platform/LeMaker/CelloBoard/CelloBoard.dsc > +++ b/Platform/LeMaker/CelloBoard/CelloBoard.dsc > @@ -667,7 +667,6 @@ [Components.common] > > NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf > > NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf > > NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf > - > NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf > > HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf >PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf > > BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf > diff --git a/Platform/Marvell/Armada/Armada.dsc.inc > b/Platform/Marvell/Armada/Armada.dsc.inc > index 0c873fb112..95268ac587 100644 > --- a/Platform/Marvell/Armada/Armada.dsc.inc > +++ b/Platform/Marvell/Armada/Armada.dsc.inc > @@ -489,7 +489,6 @@ [Components.common] > > NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf > > NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf > > NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf > - > NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf >NULL|Platform/Marvell/Applications/EepromCmd/EepromCmd.inf >NULL|Platform/Marvell/Applications/SpiTool/SpiFlashCmd.inf >NULL|Platform/Marvell/Applications/FirmwareUpdate/FUpdate.inf > diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc > b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc > index 5352fc4e55..0abec8120a 100644 > --- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc > +++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc > @@ -684,7 +684,6 @@ [Components.common] > > NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf > > NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf > > NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf > - > NULL|ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.inf > > HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf >PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf > > BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf > -- > 2.11.0 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms] Platform: drop tftp shell support from remaining platforms
On Thu, Nov 30, 2017 at 03:02:47PM +, Ard Biesheuvel wrote: > On 30 November 2017 at 15:01, Leif Lindholm wrote: > > Cello, Overdrive, Overdrive1000 and Armada still include the > > now-defunct library implementation of the Shell tftp command. > > Since the command is a nonstandard one anyway, just remove > > it from the build for these platforms. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Leif Lindholm > > Reviewed-by: Ard Biesheuvel Thanks! Pushed as 4fe276ea64. / Leif ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 1/7] EmbeddedPkg BeagleBoardPkg: move special HOB reuse libraries into platform
The BeagleBoard platform uses PeCoffLib and CustomDecompressLib implementations that invoke the library code that resides in the PrePi module via pointers exposed via special GUIDed HOBs. This is a nice hack, but not necessarily something we want to carry in reference code. So as a first step, move the libraries that expose this reused code into BeagleBoardPkg, and remove it from EmbeddedPkg. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- BeagleBoardPkg/BeagleBoardPkg.dsc | 6 +++--- {EmbeddedPkg => BeagleBoardPkg}/Library/DxeHobPeCoffLib/DxeHobPeCoff.c | 0 {EmbeddedPkg => BeagleBoardPkg}/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf | 0 {EmbeddedPkg => BeagleBoardPkg}/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.c | 0 {EmbeddedPkg => BeagleBoardPkg}/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.inf | 0 EmbeddedPkg/EmbeddedPkg.dsc | 2 -- 6 files changed, 3 insertions(+), 5 deletions(-) diff --git a/BeagleBoardPkg/BeagleBoardPkg.dsc b/BeagleBoardPkg/BeagleBoardPkg.dsc index 2837ef3c0639..f74e58399989 100644 --- a/BeagleBoardPkg/BeagleBoardPkg.dsc +++ b/BeagleBoardPkg/BeagleBoardPkg.dsc @@ -172,7 +172,7 @@ [LibraryClasses.common.DXE_CORE] UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf # PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf - PeCoffLib|EmbeddedPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf + PeCoffLib|BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf PerformanceLib|MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf @@ -203,7 +203,7 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] ReportStatusCodeLib|IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf # PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf - PeCoffLib|EmbeddedPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf + PeCoffLib|BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf [LibraryClasses.ARM] @@ -386,7 +386,7 @@ [Components.common] PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf - NULL|EmbeddedPkg/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.inf + NULL|BeagleBoardPkg/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.inf } ArmPkg/Drivers/CpuDxe/CpuDxe.inf diff --git a/EmbeddedPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c b/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c similarity index 100% rename from EmbeddedPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c rename to BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c diff --git a/EmbeddedPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf b/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf similarity index 100% rename from EmbeddedPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf rename to BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf diff --git a/EmbeddedPkg/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.c b/BeagleBoardPkg/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.c similarity index 100% rename from EmbeddedPkg/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.c rename to BeagleBoardPkg/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.c diff --git a/EmbeddedPkg/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.inf b/BeagleBoardPkg/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.inf similarity index 100% rename from EmbeddedPkg/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.inf rename to BeagleBoardPkg/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.inf diff --git a/EmbeddedPkg/EmbeddedPkg.dsc b/EmbeddedPkg/EmbeddedPkg.dsc index 073a1568844c..af965c2036cb 100644 --- a/EmbeddedPkg/EmbeddedPkg.dsc +++ b/EmbeddedPkg/EmbeddedPkg.dsc @@ -241,7 +241,6 @@ [Components.common] EmbeddedPkg/Library/PrePiLib/PrePiLib.inf EmbeddedPkg/Library/TemplateResetSystemLib/TemplateResetSystemLib.inf EmbeddedPkg/Library/TemplateRealTimeClockLib/TemplateRealTimeClockLib.inf - EmbeddedPkg/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.inf EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.inf EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf EmbeddedPkg/Library/DxeDtPlatformDtbLoaderLibDefault/DxeDtPlatformDtbLoaderLibDefault.inf @@ -263,7 +262,6 @@ [Components.common] EmbeddedPkg/Library/AcpiLib/AcpiLib.inf EmbeddedPkg/Library/DebugAgentTimerLibNull/DebugAgentTimerLibNull.inf - EmbeddedPkg/Libr
[edk2] [PATCH 2/7] BeagleBoardPkg: create private PrePi implementation
Clone the PrePi implementation for BeagleBoardPkg, so we can start removing some of the awkward optimizations that we'd rather not keep in reference code. Note that we only clone the unicore ARM flavor, which is all we need for BeagleBoard. In the case of PrePi, it involves libraries included by the SEC startup code that are exposed to DXE core via HOBs containing function pointers, which forces us to keep the primary FV reserved in memory. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- BeagleBoardPkg/BeagleBoardPkg.dsc | 6 +- BeagleBoardPkg/BeagleBoardPkg.fdf | 2 +- BeagleBoardPkg/PrePi/Arm/ArchPrePi.c | 29 +++ BeagleBoardPkg/PrePi/Arm/ModuleEntryPoint.S | 130 + BeagleBoardPkg/PrePi/Arm/ModuleEntryPoint.asm | 148 +++ BeagleBoardPkg/PrePi/LzmaDecompress.h | 103 ++ BeagleBoardPkg/PrePi/MainUniCore.c| 39 BeagleBoardPkg/PrePi/PeiUniCore.inf | 104 ++ BeagleBoardPkg/PrePi/PrePi.c | 198 BeagleBoardPkg/PrePi/PrePi.h | 90 + 10 files changed, 846 insertions(+), 3 deletions(-) diff --git a/BeagleBoardPkg/BeagleBoardPkg.dsc b/BeagleBoardPkg/BeagleBoardPkg.dsc index f74e58399989..a1715593770a 100644 --- a/BeagleBoardPkg/BeagleBoardPkg.dsc +++ b/BeagleBoardPkg/BeagleBoardPkg.dsc @@ -142,7 +142,6 @@ [LibraryClasses.common.SEC] ReportStatusCodeLib|MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf - LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf @@ -377,7 +376,10 @@ [Components.common] # # SEC # - ArmPlatformPkg/PrePi/PeiUniCore.inf + BeagleBoardPkg/PrePi/PeiUniCore.inf { + + NULL|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf + } # # DXE diff --git a/BeagleBoardPkg/BeagleBoardPkg.fdf b/BeagleBoardPkg/BeagleBoardPkg.fdf index 71249c7eb3d7..83d85fce4070 100644 --- a/BeagleBoardPkg/BeagleBoardPkg.fdf +++ b/BeagleBoardPkg/BeagleBoardPkg.fdf @@ -209,7 +209,7 @@ [FV.FVMAIN_COMPACT] READ_LOCK_CAP = TRUE READ_LOCK_STATUS = TRUE - INF ArmPlatformPkg/PrePi/PeiUniCore.inf + INF BeagleBoardPkg/PrePi/PeiUniCore.inf FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE { diff --git a/BeagleBoardPkg/PrePi/Arm/ArchPrePi.c b/BeagleBoardPkg/PrePi/Arm/ArchPrePi.c new file mode 100644 index ..075eb89e1b03 --- /dev/null +++ b/BeagleBoardPkg/PrePi/Arm/ArchPrePi.c @@ -0,0 +1,29 @@ +/** @file +* +* Copyright (c) 2011 - 2013, 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 "PrePi.h" + +VOID +ArchInitialize ( + VOID + ) +{ + // Enable program flow prediction, if supported. + ArmEnableBranchPrediction (); + + if (FixedPcdGet32 (PcdVFPEnabled)) { +ArmEnableVFP (); + } +} + diff --git a/BeagleBoardPkg/PrePi/Arm/ModuleEntryPoint.S b/BeagleBoardPkg/PrePi/Arm/ModuleEntryPoint.S new file mode 100644 index ..212cab62d44b --- /dev/null +++ b/BeagleBoardPkg/PrePi/Arm/ModuleEntryPoint.S @@ -0,0 +1,130 @@ +// +// Copyright (c) 2011-2015, 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 + +ASM_FUNC(_ModuleEntryPoint) + // Do early platform specific actions + blASM_PFX(ArmPlatformPeiBootAction) + + // Get ID of this CPU in Multicore system + blASM_PFX(ArmReadMpidr) + // Keep a copy of the MpId register value + mov r8, r0 + +_SetSVCMode: + // Enter SVC mode, Disable FIQ and IRQ + mov r1, #(CPSR_MODE_SVC | CPSR_IRQ | CPSR_FIQ) + msr CPSR_c, r1 + +// Check if we can install the stack at the top of the System Memory or if we need +// to install the stacks at the bottom of the Fi
[edk2] [PATCH 3/7] BeagleBoardPkg: clone MemoryInitPeiLib
The common MemoryInitPeiLib implementation preserves the primary FV holding the PrePi module and the compressed secondary FV, and removes the memory it occupies from the memory map, hiding it from the OS. The only platform that actual requires this is BeagleBoardPkg, since it exposes the PeCoff and LZMA libraries in PrePi to DXE core via special HOBs. So let's give BeagleBoard its own MemoryInitPeiLib, so that we can clean up the generic version. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- BeagleBoardPkg/BeagleBoardPkg.dsc| 2 +- BeagleBoardPkg/Library/MemoryInitPeiLib/MemoryInitPeiLib.c | 198 BeagleBoardPkg/Library/MemoryInitPeiLib/MemoryInitPeiLib.inf | 64 +++ 3 files changed, 263 insertions(+), 1 deletion(-) diff --git a/BeagleBoardPkg/BeagleBoardPkg.dsc b/BeagleBoardPkg/BeagleBoardPkg.dsc index a1715593770a..5d87ee389124 100644 --- a/BeagleBoardPkg/BeagleBoardPkg.dsc +++ b/BeagleBoardPkg/BeagleBoardPkg.dsc @@ -150,7 +150,7 @@ [LibraryClasses.common.SEC] MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf - MemoryInitPeiLib|ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.inf + MemoryInitPeiLib|BeagleBoardPkg/Library/MemoryInitPeiLib/MemoryInitPeiLib.inf # 1/123 faster than Stm or Vstm version BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf diff --git a/BeagleBoardPkg/Library/MemoryInitPeiLib/MemoryInitPeiLib.c b/BeagleBoardPkg/Library/MemoryInitPeiLib/MemoryInitPeiLib.c new file mode 100644 index ..2feb11f21d5d --- /dev/null +++ b/BeagleBoardPkg/Library/MemoryInitPeiLib/MemoryInitPeiLib.c @@ -0,0 +1,198 @@ +/** @file +* +* Copyright (c) 2011-2015, 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 + +VOID +BuildMemoryTypeInformationHob ( + VOID + ); + +STATIC +VOID +InitMmu ( + IN ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable + ) +{ + + VOID *TranslationTableBase; + UINTN TranslationTableSize; + RETURN_STATUS Status; + + //Note: Because we called PeiServicesInstallPeiMemory() before to call InitMmu() the MMU Page Table resides in + // DRAM (even at the top of DRAM as it is the first permanent memory allocation) + Status = ArmConfigureMmu (MemoryTable, &TranslationTableBase, &TranslationTableSize); + if (EFI_ERROR (Status)) { +DEBUG ((EFI_D_ERROR, "Error: Failed to enable MMU\n")); + } +} + +/*++ + +Routine Description: + + + +Arguments: + + FileHandle - Handle of the file being invoked. + PeiServices - Describes the list of possible PEI Services. + +Returns: + + Status - EFI_SUCCESS if the boot mode could be set + +--*/ +EFI_STATUS +EFIAPI +MemoryPeim ( + IN EFI_PHYSICAL_ADDRESS UefiMemoryBase, + IN UINT64 UefiMemorySize + ) +{ + ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable; + EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttributes; + UINT64 ResourceLength; + EFI_PEI_HOB_POINTERS NextHob; + EFI_PHYSICAL_ADDRESS FdTop; + EFI_PHYSICAL_ADDRESS SystemMemoryTop; + EFI_PHYSICAL_ADDRESS ResourceTop; + BOOLEAN Found; + + // Get Virtual Memory Map from the Platform Library + ArmPlatformGetVirtualMemoryMap (&MemoryTable); + + // Ensure PcdSystemMemorySize has been set + ASSERT (PcdGet64 (PcdSystemMemorySize) != 0); + + // + // Now, the permanent memory has been installed, we can call AllocatePages() + // + ResourceAttributes = ( + EFI_RESOURCE_ATTRIBUTE_PRESENT | + EFI_RESOURCE_ATTRIBUTE_INITIALIZED | + EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE | + EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | + EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE | + EFI_RESOURCE_ATTRIBUTE_TESTED + ); + + // + // Check if the resource for the main system memory has been declared + // + Found = FALSE; + NextHob.Raw = GetHobList (); + while ((NextHob.Raw = GetNextHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, NextHob.Raw)) != NULL) { +if ((NextHob.ResourceDescriptor->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY) && +(PcdGet64 (PcdSystemMemoryBase) >= NextHob.ResourceDescriptor->PhysicalStart) && +(NextHob.ResourceDescriptor->PhysicalStart + NextH
[edk2] [PATCH 4/7] ArmPlatformPkg/PrePi: don't expose PE/COFF and LZMA libraries via HOBs
Avoid the need to preserve all memory exposed by PrePi indefinitely by removing the 'feature' that exposes the PE/COFF and LZMA libraries via special HOBs to other modules that may want to reuse the code. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/PrePi/LzmaDecompress.h | 103 ArmPlatformPkg/PrePi/PeiMPCore.inf| 1 - ArmPlatformPkg/PrePi/PeiUniCore.inf | 1 - ArmPlatformPkg/PrePi/PrePi.c | 11 --- 4 files changed, 116 deletions(-) diff --git a/ArmPlatformPkg/PrePi/LzmaDecompress.h b/ArmPlatformPkg/PrePi/LzmaDecompress.h deleted file mode 100644 index a79ff343d231.. --- a/ArmPlatformPkg/PrePi/LzmaDecompress.h +++ /dev/null @@ -1,103 +0,0 @@ -/** @file - LZMA Decompress Library header file - - Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef __LZMA_DECOMPRESS_H___ -#define __LZMA_DECOMPRESS_H___ - -/** - Examines a GUIDed section and returns the size of the decoded buffer and the - size of an scratch buffer required to actually decode the data in a GUIDed section. - - Examines a GUIDed section specified by InputSection. - If GUID for InputSection does not match the GUID that this handler supports, - then RETURN_UNSUPPORTED is returned. - If the required information can not be retrieved from InputSection, - then RETURN_INVALID_PARAMETER is returned. - If the GUID of InputSection does match the GUID that this handler supports, - then the size required to hold the decoded buffer is returned in OututBufferSize, - the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field - from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute. - - If InputSection is NULL, then ASSERT(). - If OutputBufferSize is NULL, then ASSERT(). - If ScratchBufferSize is NULL, then ASSERT(). - If SectionAttribute is NULL, then ASSERT(). - - - @param[in] InputSection A pointer to a GUIDed section of an FFS formatted file. - @param[out] OutputBufferSize A pointer to the size, in bytes, of an output buffer required - if the buffer specified by InputSection were decoded. - @param[out] ScratchBufferSize A pointer to the size, in bytes, required as scratch space - if the buffer specified by InputSection were decoded. - @param[out] SectionAttribute A pointer to the attributes of the GUIDed section. See the Attributes - field of EFI_GUID_DEFINED_SECTION in the PI Specification. - - @retval RETURN_SUCCESSThe information about InputSection was returned. - @retval RETURN_UNSUPPORTEDThe section specified by InputSection does not match the GUID this handler supports. - @retval RETURN_INVALID_PARAMETER The information can not be retrieved from the section specified by InputSection. - -**/ -RETURN_STATUS -EFIAPI -LzmaGuidedSectionGetInfo ( - IN CONST VOID *InputSection, - OUT UINT32 *OutputBufferSize, - OUT UINT32 *ScratchBufferSize, - OUT UINT16 *SectionAttribute - ); - -/** - Decompress a LZAM compressed GUIDed section into a caller allocated output buffer. - - Decodes the GUIDed section specified by InputSection. - If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. - If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned. - If the GUID of InputSection does match the GUID that this handler supports, then InputSection - is decoded into the buffer specified by OutputBuffer and the authentication status of this - decode operation is returned in AuthenticationStatus. If the decoded buffer is identical to the - data in InputSection, then OutputBuffer is set to point at the data in InputSection. Otherwise, - the decoded data will be placed in caller allocated buffer specified by OutputBuffer. - - If InputSection is NULL, then ASSERT(). - If OutputBuffer is NULL, then ASSERT(). - If ScratchBuffer is NULL and this decode operation requires a scratch buffer, then ASSERT(). - If AuthenticationStatus is NULL, then ASSERT(). - - - @param[in] InputSection A pointer to a GUIDed section of an FFS formatted file. - @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. - @param[out] ScratchBuffer A caller allocated buffer that may be required by this function -
[edk2] [PATCH 0/7] ArmPlatformPkg/PrePi: stop exposing internal code via HOBs
This removes the code from PrePi and MemoryInitPeiLib that keeps the primary FV around forever so that DXE phase code can reuse some of the code inside the PrePi module. Cc: Udit Kumar Cc: Meenakshi Aggarwal Cc: Sakar Arora Ard Biesheuvel (6): EmbeddedPkg BeagleBoardPkg: move special HOB reuse libraries into platform BeagleBoardPkg: create private PrePi implementation BeagleBoardPkg: clone MemoryInitPeiLib ArmPlatformPkg/PrePi: don't expose PE/COFF and LZMA libraries via HOBs ArmPlatformPkg/PrePi; call all constructors by hand ArmPlatformPkg/PrePi: remove bogus IntelFrameworkModulePkg reference Meenakshi Aggarwal (1): ArmPlatformPkg/MemoryInitPeiLib: don't reserve primary FV in memory ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c | 69 --- ArmPlatformPkg/PrePi/PeiMPCore.inf | 2 - ArmPlatformPkg/PrePi/PeiUniCore.inf | 2 - ArmPlatformPkg/PrePi/PrePi.c | 24 +-- BeagleBoardPkg/BeagleBoardPkg.dsc | 14 +- BeagleBoardPkg/BeagleBoardPkg.fdf | 2 +- {EmbeddedPkg => BeagleBoardPkg}/Library/DxeHobPeCoffLib/DxeHobPeCoff.c | 0 {EmbeddedPkg => BeagleBoardPkg}/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf | 0 {EmbeddedPkg => BeagleBoardPkg}/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.c | 0 {EmbeddedPkg => BeagleBoardPkg}/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.inf | 0 BeagleBoardPkg/Library/MemoryInitPeiLib/MemoryInitPeiLib.c | 198 BeagleBoardPkg/Library/MemoryInitPeiLib/MemoryInitPeiLib.inf | 64 +++ BeagleBoardPkg/PrePi/Arm/ArchPrePi.c | 29 +++ BeagleBoardPkg/PrePi/Arm/ModuleEntryPoint.S | 130 + BeagleBoardPkg/PrePi/Arm/ModuleEntryPoint.asm | 148 +++ {ArmPlatformPkg => BeagleBoardPkg}/PrePi/LzmaDecompress.h | 0 BeagleBoardPkg/PrePi/MainUniCore.c | 39 BeagleBoardPkg/PrePi/PeiUniCore.inf | 104 ++ BeagleBoardPkg/PrePi/PrePi.c | 198 BeagleBoardPkg/PrePi/PrePi.h | 90 + EmbeddedPkg/EmbeddedPkg.dsc | 2 - 21 files changed, 1012 insertions(+), 103 deletions(-) rename {EmbeddedPkg => BeagleBoardPkg}/Library/DxeHobPeCoffLib/DxeHobPeCoff.c (100%) rename {EmbeddedPkg => BeagleBoardPkg}/Library/DxeHobPeCoffLib/DxeHobPeCoffLib.inf (100%) rename {EmbeddedPkg => BeagleBoardPkg}/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.c (100%) rename {EmbeddedPkg => BeagleBoardPkg}/Library/LzmaHobCustomDecompressLib/LzmaHobCustomDecompressLib.inf (100%) create mode 100644 BeagleBoardPkg/Library/MemoryInitPeiLib/MemoryInitPeiLib.c create mode 100644 BeagleBoardPkg/Library/MemoryInitPeiLib/MemoryInitPeiLib.inf create mode 100644 BeagleBoardPkg/PrePi/Arm/ArchPrePi.c create mode 100644 BeagleBoardPkg/PrePi/Arm/ModuleEntryPoint.S create mode 100644 BeagleBoardPkg/PrePi/Arm/ModuleEntryPoint.asm rename {ArmPlatformPkg => BeagleBoardPkg}/PrePi/LzmaDecompress.h (100%) create mode 100644 BeagleBoardPkg/PrePi/MainUniCore.c create mode 100644 BeagleBoardPkg/PrePi/PeiUniCore.inf create mode 100644 BeagleBoardPkg/PrePi/PrePi.c create mode 100644 BeagleBoardPkg/PrePi/PrePi.h -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 5/7] ArmPlatformPkg/MemoryInitPeiLib: don't reserve primary FV in memory
From: Meenakshi Aggarwal Now that PrePi no longer exposes its internal code via special HOBs, we can remove the special handling of the primary FV, which needed to be reserved so that DXE core could call into the PE/COFF and LZMA libraries in the PrePi module. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Udit Kumar Signed-off-by: Meenakshi Aggarwal [ardb: updated commit log] Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c | 69 1 file changed, 69 deletions(-) diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c index 2feb11f21d5d..d03214b5df66 100644 --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c +++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c @@ -70,11 +70,7 @@ MemoryPeim ( { ARM_MEMORY_REGION_DESCRIPTOR *MemoryTable; EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttributes; - UINT64 ResourceLength; EFI_PEI_HOB_POINTERS NextHob; - EFI_PHYSICAL_ADDRESS FdTop; - EFI_PHYSICAL_ADDRESS SystemMemoryTop; - EFI_PHYSICAL_ADDRESS ResourceTop; BOOLEAN Found; // Get Virtual Memory Map from the Platform Library @@ -121,71 +117,6 @@ MemoryPeim ( ); } - // - // Reserved the memory space occupied by the firmware volume - // - - SystemMemoryTop = (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdSystemMemoryBase) + (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdSystemMemorySize); - FdTop = (EFI_PHYSICAL_ADDRESS)PcdGet64 (PcdFdBaseAddress) + (EFI_PHYSICAL_ADDRESS)PcdGet32 (PcdFdSize); - - // EDK2 does not have the concept of boot firmware copied into DRAM. To avoid the DXE - // core to overwrite this area we must mark the region with the attribute non-present - if ((PcdGet64 (PcdFdBaseAddress) >= PcdGet64 (PcdSystemMemoryBase)) && (FdTop <= SystemMemoryTop)) { -Found = FALSE; - -// Search for System Memory Hob that contains the firmware -NextHob.Raw = GetHobList (); -while ((NextHob.Raw = GetNextHob (EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, NextHob.Raw)) != NULL) { - if ((NextHob.ResourceDescriptor->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY) && - (PcdGet64 (PcdFdBaseAddress) >= NextHob.ResourceDescriptor->PhysicalStart) && - (FdTop <= NextHob.ResourceDescriptor->PhysicalStart + NextHob.ResourceDescriptor->ResourceLength)) - { -ResourceAttributes = NextHob.ResourceDescriptor->ResourceAttribute; -ResourceLength = NextHob.ResourceDescriptor->ResourceLength; -ResourceTop = NextHob.ResourceDescriptor->PhysicalStart + ResourceLength; - -if (PcdGet64 (PcdFdBaseAddress) == NextHob.ResourceDescriptor->PhysicalStart) { - if (SystemMemoryTop == FdTop) { -NextHob.ResourceDescriptor->ResourceAttribute = ResourceAttributes & ~EFI_RESOURCE_ATTRIBUTE_PRESENT; - } else { -// Create the System Memory HOB for the firmware with the non-present attribute -BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY, -ResourceAttributes & ~EFI_RESOURCE_ATTRIBUTE_PRESENT, -PcdGet64 (PcdFdBaseAddress), -PcdGet32 (PcdFdSize)); - -// Top of the FD is system memory available for UEFI -NextHob.ResourceDescriptor->PhysicalStart += PcdGet32(PcdFdSize); -NextHob.ResourceDescriptor->ResourceLength -= PcdGet32(PcdFdSize); - } -} else { - // Create the System Memory HOB for the firmware with the non-present attribute - BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY, - ResourceAttributes & ~EFI_RESOURCE_ATTRIBUTE_PRESENT, - PcdGet64 (PcdFdBaseAddress), - PcdGet32 (PcdFdSize)); - - // Update the HOB - NextHob.ResourceDescriptor->ResourceLength = PcdGet64 (PcdFdBaseAddress) - NextHob.ResourceDescriptor->PhysicalStart; - - // If there is some memory available on the top of the FD then create a HOB - if (FdTop < NextHob.ResourceDescriptor->PhysicalStart + ResourceLength) { -// Create the System Memory HOB for the remaining region (top of the FD) -BuildResourceDescriptorHob (EFI_RESOURCE_SYSTEM_MEMORY, -ResourceAttributes, -FdTop, -ResourceTop - FdTop); - } -} -Found = TRUE; -break; - } - NextHob.Raw = GET_NEXT_HOB (NextHob); -} - -ASSERT(Found); - } - // Build Memory Allocation Hob InitMmu (MemoryTable); -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk
[edk2] [PATCH 6/7] ArmPlatformPkg/PrePi; call all constructors by hand
Call ProcessLibraryConstructorList () to invoke all library constructors by hand rather than calling only some of them explicitly. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/PrePi/PrePi.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c index a60cafdce45e..76a53bc871d2 100644 --- a/ArmPlatformPkg/PrePi/PrePi.c +++ b/ArmPlatformPkg/PrePi/PrePi.c @@ -33,15 +33,9 @@ UINT64 mSystemMemoryEnd = FixedPcdGet64(PcdSystemMemoryBase) + FixedPcdGet64(PcdSystemMemorySize) - 1; -EFI_STATUS -EFIAPI -ExtractGuidedSectionLibConstructor ( - VOID - ); - -EFI_STATUS +VOID EFIAPI -LzmaDecompressLibConstructor ( +ProcessLibraryConstructorList ( VOID ); @@ -162,8 +156,7 @@ PrePiMain ( PERF_START (NULL, "PEI", NULL, StartTimeStamp); // SEC phase needs to run library constructors by hand. - ExtractGuidedSectionLibConstructor (); - LzmaDecompressLibConstructor (); + ProcessLibraryConstructorList (); // Assume the FV that contains the SEC (our code) also contains a compressed FV. Status = DecompressFirstFv (); -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 7/7] ArmPlatformPkg/PrePi: remove bogus IntelFrameworkModulePkg reference
PrePi does not use anything from IntelFrameworkModulePkg so remove the reference from its [Packages] sections. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/PrePi/PeiMPCore.inf | 1 - ArmPlatformPkg/PrePi/PeiUniCore.inf | 1 - 2 files changed, 2 deletions(-) diff --git a/ArmPlatformPkg/PrePi/PeiMPCore.inf b/ArmPlatformPkg/PrePi/PeiMPCore.inf index ccb5388e5516..242b03175536 100644 --- a/ArmPlatformPkg/PrePi/PeiMPCore.inf +++ b/ArmPlatformPkg/PrePi/PeiMPCore.inf @@ -39,7 +39,6 @@ [Packages] EmbeddedPkg/EmbeddedPkg.dec ArmPkg/ArmPkg.dec ArmPlatformPkg/ArmPlatformPkg.dec - IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec [LibraryClasses] BaseLib diff --git a/ArmPlatformPkg/PrePi/PeiUniCore.inf b/ArmPlatformPkg/PrePi/PeiUniCore.inf index 2d376c30d400..a45cdef4ed91 100644 --- a/ArmPlatformPkg/PrePi/PeiUniCore.inf +++ b/ArmPlatformPkg/PrePi/PeiUniCore.inf @@ -39,7 +39,6 @@ [Packages] EmbeddedPkg/EmbeddedPkg.dec ArmPkg/ArmPkg.dec ArmPlatformPkg/ArmPlatformPkg.dec - IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec [LibraryClasses] BaseLib -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [platforms: PATCH v3 0/4] Armada 7k/8k variable support
On Tue, Nov 28, 2017 at 09:19:09AM +0100, Marcin Wojtas wrote: > Hi, > > I submit v3 of the Armada variable support with the MvFvbDxe > driver improved according to the recent review. The biggest > changes are a proper implementation of Set/GetAttributes > protocol callbacks. Details can be found in the changelog below. > > Patches are available in the github: > https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/var-upstream-r20171128 > > I'm looking forward to the comments or remarks. > > Best regards, > Marcin This looks a lot better, thanks. For the series: Reviewed-by: Leif Lindholm Pushed as 4fe276ea64..93f1d9689a. > Changelog: > v2 -> v3 > * 2/4 - 4/4 > - Add RBs > > * 1/4 > - Fix line-breaking in MvFvbValidateFvHeader > - Check actual WriteDisabled attributes MvFvbEraseBlocks > - Rework MvFvbGetAttributes/MvFvbSetAttributes to properly > support those features > > v1 -> v2: > * Change patches order in order to safely apply related Depex modifications > > * 1/4: > - Fix style (line breaking, openining brackets, alignment, typos) > - Rework MvFvbSetAttributes - because it can return only EFI_SUCCESS / > EFI_INVALID_PARAMETER and should return FVB attributes, > add debug information, that operation is not supported and return > default values via MvFvbGetAttributes. > - Return EFI_SUCCESS, in case NumBytes == 0 in MvFvbRead. > > * 2/4: > - Move Depex configuration from 4/4 > > * 3/4: > - Move Depex configuration from 4/4 > - Reword and break commit message. > > * 4/4: > - Remove Depex configuration > > > Marcin Wojtas (4): > Platform/Marvell: Introduce MvFvbDxe variable support driver > Marvell/Drivers: MvSpiFlash: Enable using driver in RT > Marvell/Drivers: MvSpiDxe: Enable using driver in RT > Marvell/Armada: Enable variables support > > Platform/Marvell/Armada/Armada.dsc.inc | 25 +- > Platform/Marvell/Armada/Armada70x0.fdf |6 +- > Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.c | 58 +- > Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.h |1 + > Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.inf | 11 +- > Platform/Marvell/Drivers/Spi/MvSpiDxe.c | 50 +- > Platform/Marvell/Drivers/Spi/MvSpiDxe.h |2 + > Platform/Marvell/Drivers/Spi/MvSpiDxe.inf |9 +- > Platform/Marvell/Drivers/Spi/Variables/MvFvbDxe.c | 1138 > > Platform/Marvell/Drivers/Spi/Variables/MvFvbDxe.h | 128 +++ > Platform/Marvell/Drivers/Spi/Variables/MvFvbDxe.inf | 91 ++ > Platform/Marvell/Include/Protocol/Spi.h |7 + > Platform/Marvell/Marvell.dec|4 + > 13 files changed, 1516 insertions(+), 14 deletions(-) > create mode 100644 Platform/Marvell/Drivers/Spi/Variables/MvFvbDxe.c > create mode 100644 Platform/Marvell/Drivers/Spi/Variables/MvFvbDxe.h > create mode 100644 Platform/Marvell/Drivers/Spi/Variables/MvFvbDxe.inf > > -- > 2.7.4 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 0/7] ArmPlatformPkg cleanup - phase II
On Thu, Nov 30, 2017 at 02:15:02PM +, Ard Biesheuvel wrote: > Proceed with removing junk from ArmPlatformPkg, and tidying up the bits > we want to keep. > > While we make up our minds how to proceed with the migration of > ArmVExpressPkg, and the dependent BootMonFs and ShellCmdRunAxf modules, > this series removes the outdated documentation and CTA9x4 code, moves > some header files out of Include/Drivers, and removes some unused stuff > from ArmPlatformLib. Good stuff. For the series: Reviewed-by: Leif Lindholm > Ard Biesheuvel (7): > ArmPlatformPkg/Documentation: remove outdated porting manual > ArmPlatformPkg: remove unused ArmVExpressLibCTA9x4 code > ArmPlatformPkg/ArmPlatformLib: remove > ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR > ArmPlatformPkg: remove ArmPlatformInitializeSystemMemory > ArmPlatformPkg: move internal PL061 header into driver directory > ArmPlatformPkg: move internal SP805 header into driver directory > ArmPlatformPkg: move internal PL031 header into driver directory > > ArmPlatformPkg/ArmPlatformPkg.dec > | 1 - > ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h > | 121 > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7.c > | 13 -- > > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLib.inf > | 57 -- > > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLibSec.inf >| 54 -- > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c > | 198 > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.S > | 49 - > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.asm > | 63 --- > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Mem.c > | 119 > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c > | 14 -- > ArmPlatformPkg/Documentation/ARM-EDK2-Overview.png > | Bin 54500 -> 0 bytes > ArmPlatformPkg/Documentation/ArmPlatformLib-2nd-Stage.png > | Bin 56506 -> 0 bytes > ArmPlatformPkg/Documentation/ArmPlatformLib-Full-Boot.png > | Bin 79676 -> 0 bytes > ArmPlatformPkg/Documentation/ArmPlatformPkg.txt > | 74 > ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c > | 3 +- > ArmPlatformPkg/{Include/Drivers => Drivers/PL061GpioDxe}/PL061Gpio.h > | 0 > ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c > | 3 +- > ArmPlatformPkg/{Include/Drivers => Drivers/SP805WatchdogDxe}/SP805Watchdog.h > | 0 > ArmPlatformPkg/Include/Library/ArmPlatformLib.h > | 24 --- > ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.c > | 14 -- > ArmPlatformPkg/{Include/Drivers => > Library/PL031RealTimeClockLib}/PL031RealTimeClock.h | 0 > ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c > | 19 +- > ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c > | 8 - > ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf > | 1 - > BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c > | 14 -- > 25 files changed, 13 insertions(+), 836 deletions(-) > delete mode 100644 > ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h > delete mode 100644 > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLib.inf > delete mode 100644 > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLibSec.inf > delete mode 100644 > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c > delete mode 100644 > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.S > delete mode 100644 > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.asm > delete mode 100644 > ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Mem.c > delete mode 100644 ArmPlatformPkg/Documentation/ARM-EDK2-Overview.png > delete mode 100644 ArmPlatformPkg/Documentation/ArmPlatformLib-2nd-Stage.png > delete mode 100644 ArmPlatformPkg/Documentation/ArmPlatformLib-Full-Boot.png > delete mode 100644 ArmPlatformPkg/Documentation/ArmPlatformPkg.txt > rename ArmPlatformPkg/{Include/Drivers => Drivers/PL061GpioDxe}/PL061Gpio.h > (100%) > rename ArmPlatformPkg/{Include/Drivers => > Drivers/SP805WatchdogDxe}/SP805Watchdog.h (100%) > rename ArmPlatformPkg/{Include/Drivers => > Library/PL031RealTimeClockLib}/PL031Rea
Re: [edk2] [PATCH 0/7] ArmPlatformPkg cleanup - phase II
On 30 November 2017 at 15:55, Leif Lindholm wrote: > On Thu, Nov 30, 2017 at 02:15:02PM +, Ard Biesheuvel wrote: >> Proceed with removing junk from ArmPlatformPkg, and tidying up the bits >> we want to keep. >> >> While we make up our minds how to proceed with the migration of >> ArmVExpressPkg, and the dependent BootMonFs and ShellCmdRunAxf modules, >> this series removes the outdated documentation and CTA9x4 code, moves >> some header files out of Include/Drivers, and removes some unused stuff >> from ArmPlatformLib. > > Good stuff. For the series: > Reviewed-by: Leif Lindholm > Thanks. Pushed as f0d9d2b61726..c6e51751e026 >> Ard Biesheuvel (7): >> ArmPlatformPkg/Documentation: remove outdated porting manual >> ArmPlatformPkg: remove unused ArmVExpressLibCTA9x4 code >> ArmPlatformPkg/ArmPlatformLib: remove >> ARM_SYSTEM_MEMORY_REGION_DESCRIPTOR >> ArmPlatformPkg: remove ArmPlatformInitializeSystemMemory >> ArmPlatformPkg: move internal PL061 header into driver directory >> ArmPlatformPkg: move internal SP805 header into driver directory >> ArmPlatformPkg: move internal PL031 header into driver directory >> >> ArmPlatformPkg/ArmPlatformPkg.dec >>| 1 - >> ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h >>| 121 >> ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA15-A7/CTA15-A7.c >>| 13 -- >> >> ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLib.inf >> | 57 -- >> >> ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLibSec.inf >>| 54 -- >> ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c >>| 198 >> ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.S >>| 49 - >> ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.asm >>| 63 --- >> ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Mem.c >>| 119 >> ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c >>| 14 -- >> ArmPlatformPkg/Documentation/ARM-EDK2-Overview.png >>| Bin 54500 -> 0 bytes >> ArmPlatformPkg/Documentation/ArmPlatformLib-2nd-Stage.png >>| Bin 56506 -> 0 bytes >> ArmPlatformPkg/Documentation/ArmPlatformLib-Full-Boot.png >>| Bin 79676 -> 0 bytes >> ArmPlatformPkg/Documentation/ArmPlatformPkg.txt >>| 74 >> ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c >>| 3 +- >> ArmPlatformPkg/{Include/Drivers => Drivers/PL061GpioDxe}/PL061Gpio.h >>| 0 >> ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c >>| 3 +- >> ArmPlatformPkg/{Include/Drivers => >> Drivers/SP805WatchdogDxe}/SP805Watchdog.h | 0 >> ArmPlatformPkg/Include/Library/ArmPlatformLib.h >>| 24 --- >> ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.c >>| 14 -- >> ArmPlatformPkg/{Include/Drivers => >> Library/PL031RealTimeClockLib}/PL031RealTimeClock.h | 0 >> ArmPlatformPkg/Library/PL031RealTimeClockLib/PL031RealTimeClockLib.c >>| 19 +- >> ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c >>| 8 - >> ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf >>| 1 - >> BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c >>| 14 -- >> 25 files changed, 13 insertions(+), 836 deletions(-) >> delete mode 100644 >> ArmPlatformPkg/ArmVExpressPkg/Include/Platform/CTA9x4/ArmPlatform.h >> delete mode 100644 >> ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLib.inf >> delete mode 100644 >> ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/ArmVExpressLibSec.inf >> delete mode 100644 >> ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4.c >> delete mode 100644 >> ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.S >> delete mode 100644 >> ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Helper.asm >> delete mode 100644 >> ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibCTA9x4/CTA9x4Mem.c >> delete mode 100644 ArmPlatformPkg/Documentation/ARM-EDK2-Overview.png >> delete mode 100644 ArmPlatformPkg/Documentation/ArmPlatformLib-2nd-Stage.png >> delete mode 100644 ArmPlatformPkg/Documentation/ArmPlatformLib-Full-Boot.png >> delete mode 100644 ArmPlatformPkg/Documentation/ArmPlatformPkg.txt >> rename ArmPlatformPkg/{Include/Drivers => Drivers/PL061GpioDxe}/PL061Gpio.h
[edk2] [PATCH edk2-platforms] Platform Silicon: remove ArmPlatformInitializeSystemMemory () functions
The function ArmPlatformInitializeSystemMemory () has been removed from ArmPlatformLib, so remove all the [empty] implementations provided by the various platforms. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJuno.c | 13 - Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c | 13 - Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c | 14 -- Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c | 15 --- Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c | 14 -- Silicon/Socionext/SynQuacer/Library/SynQuacerLib/SynQuacer.c | 13 - 6 files changed, 82 deletions(-) diff --git a/Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJuno.c b/Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJuno.c index 5ec72ff7ed8b..cbc5ed595571 100644 --- a/Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJuno.c +++ b/Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJuno.c @@ -146,19 +146,6 @@ ArmPlatformInitialize ( return Status; } -/** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ) -{ -} - EFI_STATUS PrePeiCoreGetMpCoreInfo ( OUT UINTN *CoreCount, diff --git a/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c b/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c index f4a47b28493a..6bf0d39bd4e2 100644 --- a/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c +++ b/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c @@ -111,19 +111,6 @@ ArmPlatformInitialize ( return RETURN_SUCCESS; } -/** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ) -{ -} - EFI_STATUS PrePeiCoreGetMpCoreInfo ( OUT UINTN *CoreCount, diff --git a/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c b/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c index 968d28f813f6..b2b415571c74 100644 --- a/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c +++ b/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c @@ -89,20 +89,6 @@ ArmPlatformInitialize ( return RETURN_SUCCESS; } -/** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ) -{ - //TODO: Initialize DRAM controller here -} - EFI_STATUS PrePeiCoreGetMpCoreInfo ( OUT UINTN *CoreCount, diff --git a/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c b/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c index facfd61ca230..dc59d4f08f5a 100644 --- a/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c +++ b/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c @@ -84,21 +84,6 @@ ArmPlatformInitialize ( } -/** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ) -{ - // Nothing to do here -} - - // // Return list of cores in the system // diff --git a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c index b59b9f027573..4962543f5531 100644 --- a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c +++ b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c @@ -56,20 +56,6 @@ ArmPlatformInitialize ( return RETURN_SUCCESS; } -/** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ) -{ - // Nothing to do here -} - EFI_STATUS PrePeiCoreGetMpCoreInfo ( OUT UINTN *CoreCount, diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerLib/SynQuacer.c b/Silicon/Socionext/SynQuacer/Library/SynQuacerLib/SynQuacer.c index 4da0200279cd..6d4be4badb80 100644 --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerLib/SynQuacer.c +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerLib/SynQuacer.c @@ -76,19 +76,6 @@ ArmPlatformInitialize ( return RETURN_SUCCESS; } -/** - Initialize the system (or sometimes called permanent) memory - - This memory is generally represented by the DRAM. - -**/ -VOID -ArmPlatformInitializeSystemMemory ( - VOID - ) -{ -} - STATIC EFI_STATUS PrePeiCoreGetMpCoreInfo ( -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [platforms: PATCH v3 0/4] Armada 7k/8k variable support
2017-11-30 16:51 GMT+01:00 Leif Lindholm : > On Tue, Nov 28, 2017 at 09:19:09AM +0100, Marcin Wojtas wrote: >> Hi, >> >> I submit v3 of the Armada variable support with the MvFvbDxe >> driver improved according to the recent review. The biggest >> changes are a proper implementation of Set/GetAttributes >> protocol callbacks. Details can be found in the changelog below. >> >> Patches are available in the github: >> https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/var-upstream-r20171128 >> >> I'm looking forward to the comments or remarks. >> >> Best regards, >> Marcin > > This looks a lot better, thanks. > > For the series: Reviewed-by: Leif Lindholm > Pushed as 4fe276ea64..93f1d9689a. > Thanks a lot! Best regards, Marcin >> Changelog: >> v2 -> v3 >> * 2/4 - 4/4 >> - Add RBs >> >> * 1/4 >> - Fix line-breaking in MvFvbValidateFvHeader >> - Check actual WriteDisabled attributes MvFvbEraseBlocks >> - Rework MvFvbGetAttributes/MvFvbSetAttributes to properly >> support those features >> >> v1 -> v2: >> * Change patches order in order to safely apply related Depex modifications >> >> * 1/4: >> - Fix style (line breaking, openining brackets, alignment, typos) >> - Rework MvFvbSetAttributes - because it can return only EFI_SUCCESS / >> EFI_INVALID_PARAMETER and should return FVB attributes, >> add debug information, that operation is not supported and return >> default values via MvFvbGetAttributes. >> - Return EFI_SUCCESS, in case NumBytes == 0 in MvFvbRead. >> >> * 2/4: >> - Move Depex configuration from 4/4 >> >> * 3/4: >> - Move Depex configuration from 4/4 >> - Reword and break commit message. >> >> * 4/4: >> - Remove Depex configuration >> >> >> Marcin Wojtas (4): >> Platform/Marvell: Introduce MvFvbDxe variable support driver >> Marvell/Drivers: MvSpiFlash: Enable using driver in RT >> Marvell/Drivers: MvSpiDxe: Enable using driver in RT >> Marvell/Armada: Enable variables support >> >> Platform/Marvell/Armada/Armada.dsc.inc | 25 +- >> Platform/Marvell/Armada/Armada70x0.fdf |6 +- >> Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.c | 58 +- >> Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.h |1 + >> Platform/Marvell/Drivers/Spi/Devices/MvSpiFlash.inf | 11 +- >> Platform/Marvell/Drivers/Spi/MvSpiDxe.c | 50 +- >> Platform/Marvell/Drivers/Spi/MvSpiDxe.h |2 + >> Platform/Marvell/Drivers/Spi/MvSpiDxe.inf |9 +- >> Platform/Marvell/Drivers/Spi/Variables/MvFvbDxe.c | 1138 >> >> Platform/Marvell/Drivers/Spi/Variables/MvFvbDxe.h | 128 +++ >> Platform/Marvell/Drivers/Spi/Variables/MvFvbDxe.inf | 91 ++ >> Platform/Marvell/Include/Protocol/Spi.h |7 + >> Platform/Marvell/Marvell.dec|4 + >> 13 files changed, 1516 insertions(+), 14 deletions(-) >> create mode 100644 Platform/Marvell/Drivers/Spi/Variables/MvFvbDxe.c >> create mode 100644 Platform/Marvell/Drivers/Spi/Variables/MvFvbDxe.h >> create mode 100644 Platform/Marvell/Drivers/Spi/Variables/MvFvbDxe.inf >> >> -- >> 2.7.4 >> ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 1/8] OvmfPkg: introduce PcdMemVarstoreEmuEnable feature flag
... and the corresponding MEM_VARSTORE_EMU_ENABLE build define, which defaults to TRUE. Setting the build flag to FALSE will later enable the exclusion of the dynamically allocated, emulated, in-memory varstore. Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/OvmfPkg.dec| 6 ++ OvmfPkg/OvmfPkgIa32.dsc| 4 OvmfPkg/OvmfPkgIa32X64.dsc | 4 OvmfPkg/OvmfPkgX64.dsc | 4 4 files changed, 18 insertions(+) diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index 27bcfc141e5a..f03dd7e27d6b 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -150,3 +150,9 @@ [PcdsFeatureFlag] # runtime OS from tampering with firmware structures (special memory ranges # used by OVMF, the varstore pflash chip, LockBox etc). gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|FALSE|BOOLEAN|0x1e + + ## This feature flag reports whether in-memory (that is, non-flash) variable + # emulation is enabled. Note that with PcdSmmSmramRequire set to TRUE, this + # setting is irrelevant, as SMM/SMRAM support always requires flash + # variables. + gUefiOvmfPkgTokenSpaceGuid.PcdMemVarstoreEmuEnable|TRUE|BOOLEAN|3 diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 9d23f8c162e4..443da553d0a3 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -39,6 +39,7 @@ [Defines] DEFINE HTTP_BOOT_ENABLE= FALSE DEFINE SMM_REQUIRE = FALSE DEFINE TLS_ENABLE = FALSE + DEFINE MEM_VARSTORE_EMU_ENABLE = TRUE # # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to @@ -410,6 +411,9 @@ [PcdsFeatureFlag] gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|TRUE gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE !endif +!if $(MEM_VARSTORE_EMU_ENABLE) == FALSE + gUefiOvmfPkgTokenSpaceGuid.PcdMemVarstoreEmuEnable|FALSE +!endif [PcdsFixedAtBuild] gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1 diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index a9c667fed8b0..0fc81743bac4 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -39,6 +39,7 @@ [Defines] DEFINE HTTP_BOOT_ENABLE= FALSE DEFINE SMM_REQUIRE = FALSE DEFINE TLS_ENABLE = FALSE + DEFINE MEM_VARSTORE_EMU_ENABLE = TRUE # # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to @@ -415,6 +416,9 @@ [PcdsFeatureFlag] gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|TRUE gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE !endif +!if $(MEM_VARSTORE_EMU_ENABLE) == FALSE + gUefiOvmfPkgTokenSpaceGuid.PcdMemVarstoreEmuEnable|FALSE +!endif [PcdsFixedAtBuild] gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1 diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index abf570512a38..db33be4bc0b7 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -39,6 +39,7 @@ [Defines] DEFINE HTTP_BOOT_ENABLE= FALSE DEFINE SMM_REQUIRE = FALSE DEFINE TLS_ENABLE = FALSE + DEFINE MEM_VARSTORE_EMU_ENABLE = TRUE # # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to @@ -415,6 +416,9 @@ [PcdsFeatureFlag] gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire|TRUE gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmEnableBspElection|FALSE !endif +!if $(MEM_VARSTORE_EMU_ENABLE) == FALSE + gUefiOvmfPkgTokenSpaceGuid.PcdMemVarstoreEmuEnable|FALSE +!endif [PcdsFixedAtBuild] gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1 -- 2.14.1.3.gb7cf6e02401b ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 0/8] OvmfPkg: add the Variable PEIM, defragment the UEFI memmap
Repo: https://github.com/lersek/edk2.git Branch: memmap_defrag_v2 This version is identical to the v1 seres I posted in March. Some patches of the v1 series have been committed. I've been rebasing and using the rest since, and am now posting it as v2. References: * https://bugzilla.tianocore.org/show_bug.cgi?id=386 * http://mid.mail-archive.com/20170314233246.17864-1-lersek@redhat.com https://lists.01.org/pipermail/edk2-devel/2017-March/008525.html * http://mid.mail-archive.com/20170327080544.24748-1-jordan.l.justen@intel.com https://lists.01.org/pipermail/edk2-devel/2017-March/009049.html Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Thanks Laszlo Laszlo Ersek (8): OvmfPkg: introduce PcdMemVarstoreEmuEnable feature flag OvmfPkg/QemuFlashFvbServicesRuntimeDxe: check PcdMemVarstoreEmuEnable OvmfPkg: conditionally disable reserved memory varstore emulation at build OvmfPkg: introduce FlashNvStorageAddressLib OvmfPkg: include FaultTolerantWritePei and VariablePei OvmfPkg/QemuFlashFvbServicesRuntimeDxe: don't set flash PCDs if SMM or no-emu OvmfPkg/PlatformPei: remedy UEFI memory map fragmentation OvmfPkg/README: document MEM_VARSTORE_EMU_ENABLE and memmap defrag OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.c | 53 +++ OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.inf | 48 +++ OvmfPkg/OvmfPkg.dec | 6 + OvmfPkg/OvmfPkgIa32.dsc | 15 +- OvmfPkg/OvmfPkgIa32.fdf | 8 +- OvmfPkg/OvmfPkgIa32X64.dsc| 15 +- OvmfPkg/OvmfPkgIa32X64.fdf| 8 +- OvmfPkg/OvmfPkgX64.dsc| 15 +- OvmfPkg/OvmfPkgX64.fdf| 8 +- OvmfPkg/PlatformPei/MemTypeInfo.c | 151 OvmfPkg/PlatformPei/Platform.c| 26 +--- OvmfPkg/PlatformPei/Platform.h| 5 + OvmfPkg/PlatformPei/PlatformPei.inf | 3 + OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf | 1 + OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf | 1 + OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c | 58 +--- OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c| 1 + OvmfPkg/README| 10 ++ 18 files changed, 385 insertions(+), 47 deletions(-) create mode 100644 OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.c create mode 100644 OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.inf create mode 100644 OvmfPkg/PlatformPei/MemTypeInfo.c -- 2.14.1.3.gb7cf6e02401b ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 2/8] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: check PcdMemVarstoreEmuEnable
This patch parallels commit b963ec494c48 ("OvmfPkg: QemuFlashFvbServicesRuntimeDxe: adhere to -D SMM_REQUIRE", 2015-11-30) in that if QemuFlashDetected() fails -- because flash is not found --, not only SMM_REQUIRE=TRUE is a wrong build to execute, but MEM_VARSTORE_EMU_ENABLE=FALSE as well. Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf | 1 + OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf| 1 + OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c | 1 + 3 files changed, 3 insertions(+) diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf index c0dda75bf75f..cf30d5c8f021 100644 --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf @@ -87,6 +87,7 @@ [Pcd] [FeaturePcd] gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire + gUefiOvmfPkgTokenSpaceGuid.PcdMemVarstoreEmuEnable [Depex] TRUE diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf index ba2d3679a46d..d5aa393dbc0b 100644 --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf @@ -86,6 +86,7 @@ [Pcd] [FeaturePcd] gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire + gUefiOvmfPkgTokenSpaceGuid.PcdMemVarstoreEmuEnable [Depex] TRUE diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c index 5677b5ee119c..60bc7a84bd6b 100644 --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c @@ -246,6 +246,7 @@ QemuFlashInitialize ( if (!QemuFlashDetected ()) { ASSERT (!FeaturePcdGet (PcdSmmSmramRequire)); +ASSERT (FeaturePcdGet (PcdMemVarstoreEmuEnable)); return EFI_WRITE_PROTECTED; } -- 2.14.1.3.gb7cf6e02401b ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 3/8] OvmfPkg: conditionally disable reserved memory varstore emulation at build
(All of the below is only relevant for SMM_REQUIRE=FALSE.) For the emulated variable store, PlatformPei allocates reserved memory (as early as possible, so that the address remains the same during reboot), and PcdEmuVariableNvStoreReserved carries the address to EmuVariableFvbRuntimeDxe. In addition, QemuFlashFvbServicesRuntimeDxe is always launched before EmuVariableFvbRuntimeDxe, so that if flash variables are available, QemuFlashFvbServicesRuntimeDxe can set PcdFlashNvStorageVariableBase64 first, and EmuVariableFvbRuntimeDxe can exit early. This ordering is currently enforced by adding QemuFlashFvbServicesRuntimeDxe to the APRIORI DXE file. All of this is unnecessary when MEM_VARSTORE_EMU_ENABLE is set to FALSE. In such a build, - (almost) remove the dynamic default for PcdEmuVariableNvStoreReserved (we can't really do this because the PcdSet64() in ReserveEmuVariableNvStore() wouldn't compile), - prevent the reserved memory allocation and PCD setting in PlatformPei, - exclude EmuVariableFvbRuntimeDxe, - and drop QemuFlashFvbServicesRuntimeDxe from the APRIORI DXE file (since it doesn't have to beat EmuVariableFvbRuntimeDxe in setting PcdFlashNvStorageVariableBase64 any longer). Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/OvmfPkgIa32.dsc | 4 +++- OvmfPkg/OvmfPkgIa32X64.dsc | 4 +++- OvmfPkg/OvmfPkgX64.dsc | 4 +++- OvmfPkg/OvmfPkgIa32.fdf | 4 +++- OvmfPkg/OvmfPkgIa32X64.fdf | 4 +++- OvmfPkg/OvmfPkgX64.fdf | 4 +++- OvmfPkg/PlatformPei/PlatformPei.inf | 1 + OvmfPkg/PlatformPei/Platform.c | 3 ++- 8 files changed, 21 insertions(+), 7 deletions(-) diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 443da553d0a3..dd6be0de0445 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -502,7 +502,7 @@ [PcdsFixedAtBuild] [PcdsDynamicDefault] # only set when - # ($(SMM_REQUIRE) == FALSE) + # (($(SMM_REQUIRE) == FALSE) && ($(MEM_VARSTORE_EMU_ENABLE) == TRUE)) gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 @@ -871,10 +871,12 @@ [Components] # Variable driver stack (non-SMM) # OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf +!if $(MEM_VARSTORE_EMU_ENABLE) == TRUE OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf { PlatformFvbLib|OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.inf } +!endif MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 0fc81743bac4..84c578ac22a4 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -508,7 +508,7 @@ [PcdsFixedAtBuild.X64] [PcdsDynamicDefault] # only set when - # ($(SMM_REQUIRE) == FALSE) + # (($(SMM_REQUIRE) == FALSE) && ($(MEM_VARSTORE_EMU_ENABLE) == TRUE)) gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 @@ -881,10 +881,12 @@ [Components.X64] # Variable driver stack (non-SMM) # OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf +!if $(MEM_VARSTORE_EMU_ENABLE) == TRUE OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf { PlatformFvbLib|OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.inf } +!endif MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index db33be4bc0b7..b5d385101411 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -507,7 +507,7 @@ [PcdsFixedAtBuild] [PcdsDynamicDefault] # only set when - # ($(SMM_REQUIRE) == FALSE) + # (($(SMM_REQUIRE) == FALSE) && ($(MEM_VARSTORE_EMU_ENABLE) == TRUE)) gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0 @@ -879,10 +879,12 @@ [Components] # Variable driver stack (non-SMM) # OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf +!if $(MEM_VARSTORE_EMU_ENABLE) == TRUE OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf { PlatformFvbLib|OvmfPkg/Library/EmuVariableFvbLib/EmuVariableFvbLib.inf } +!endif MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf index ba980834d720..50a2db897bbb 100644 --- a/OvmfPkg/OvmfPkgIa32.fdf +++ b/OvmfPkg/OvmfPkgIa32.fdf @@ -191,7 +191,7 @@ [FV.DXEFV] APRIORI DXE { INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf INF
[edk2] [PATCH v2 5/8] OvmfPkg: include FaultTolerantWritePei and VariablePei
... but only for the -D SMM_REQUIRE and -D MEM_VARSTORE_EMU_ENABLE=FALSE builds, where - FaultTolerantWritePei can immediately consume PcdFlashNvStorageFtwWorkingBase and PcdFlashNvStorageFtwSpareBase, - and VariablePei can immediately consume PcdFlashNvStorageVariableBase64, with the help of FlashNvStorageAddressLib, plus variables can actually be read from some variable store (namely, the pflash chip). FaultTolerantWritePei produces a GUID data HOB with FAULT_TOLERANT_WRITE_LAST_WRITE_DATA as contents. It also installs a Null PPI that carries, as GUID, the same gEdkiiFaultTolerantWriteGuid as the GUID data HOB. VariablePei depends on the Null PPI mentioned above with a DEPEX, consumes the HOB (which is safe due to the DEPEX), and produces EFI_PEI_READ_ONLY_VARIABLE2_PPI. Because of the above serialization via the Null PPI, it suffices to link FlashNvStorageAddressLib into FaultTolerantWritePei only. Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=386 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/OvmfPkgIa32.dsc| 7 +++ OvmfPkg/OvmfPkgIa32X64.dsc | 7 +++ OvmfPkg/OvmfPkgX64.dsc | 7 +++ OvmfPkg/OvmfPkgIa32.fdf| 4 OvmfPkg/OvmfPkgIa32X64.fdf | 4 OvmfPkg/OvmfPkgX64.fdf | 4 6 files changed, 33 insertions(+) diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index dd6be0de0445..e5268f64f381 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -592,6 +592,13 @@ [Components] OvmfPkg/SmmAccess/SmmAccessPei.inf !endif UefiCpuPkg/CpuMpPei/CpuMpPei.inf +!if ($(SMM_REQUIRE) == TRUE) || ($(MEM_VARSTORE_EMU_ENABLE) == FALSE) + MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf { + + NULL|OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.inf + } + MdeModulePkg/Universal/Variable/Pei/VariablePei.inf +!endif # # DXE Phase modules diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 84c578ac22a4..2ba567f45306 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -600,6 +600,13 @@ [Components.IA32] OvmfPkg/SmmAccess/SmmAccessPei.inf !endif UefiCpuPkg/CpuMpPei/CpuMpPei.inf +!if ($(SMM_REQUIRE) == TRUE) || ($(MEM_VARSTORE_EMU_ENABLE) == FALSE) + MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf { + + NULL|OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.inf + } + MdeModulePkg/Universal/Variable/Pei/VariablePei.inf +!endif [Components.X64] # diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index b5d385101411..28db76c630d7 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -599,6 +599,13 @@ [Components] OvmfPkg/SmmAccess/SmmAccessPei.inf !endif UefiCpuPkg/CpuMpPei/CpuMpPei.inf +!if ($(SMM_REQUIRE) == TRUE) || ($(MEM_VARSTORE_EMU_ENABLE) == FALSE) + MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf { + + NULL|OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.inf + } + MdeModulePkg/Universal/Variable/Pei/VariablePei.inf +!endif # # DXE Phase modules diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf index 50a2db897bbb..d697d9151f8e 100644 --- a/OvmfPkg/OvmfPkgIa32.fdf +++ b/OvmfPkg/OvmfPkgIa32.fdf @@ -164,6 +164,10 @@ [FV.PEIFV] INF OvmfPkg/SmmAccess/SmmAccessPei.inf !endif INF UefiCpuPkg/CpuMpPei/CpuMpPei.inf +!if ($(SMM_REQUIRE) == TRUE) || ($(MEM_VARSTORE_EMU_ENABLE) == FALSE) +INF MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf +INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf +!endif diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf index efa01734b576..d70b43198ab8 100644 --- a/OvmfPkg/OvmfPkgIa32X64.fdf +++ b/OvmfPkg/OvmfPkgIa32X64.fdf @@ -164,6 +164,10 @@ [FV.PEIFV] INF OvmfPkg/SmmAccess/SmmAccessPei.inf !endif INF UefiCpuPkg/CpuMpPei/CpuMpPei.inf +!if ($(SMM_REQUIRE) == TRUE) || ($(MEM_VARSTORE_EMU_ENABLE) == FALSE) +INF MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf +INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf +!endif diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf index d7a5ea97bda8..bb46a409d9d8 100644 --- a/OvmfPkg/OvmfPkgX64.fdf +++ b/OvmfPkg/OvmfPkgX64.fdf @@ -164,6 +164,10 @@ [FV.PEIFV] INF OvmfPkg/SmmAccess/SmmAccessPei.inf !endif INF UefiCpuPkg/CpuMpPei/CpuMpPei.inf +!if ($(SMM_REQUIRE) == TRUE) || ($(MEM_VARSTORE_EMU_ENABLE) == FALSE) +INF MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf +INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf +!endif ##
[edk2] [PATCH v2 7/8] OvmfPkg/PlatformPei: remedy UEFI memory map fragmentation
The Memory Type Information HOB is used for sizing the allocation bins for the various memory types. If the PEI phase does not produce the HOB, and it includes the VariablePei driver, then the DXE IPL PEIM will itself build the HOB, from the "MemoryTypeInformation" non-volatile variable. (The HOB is consumed in the DxeLoadCore() function, and it is ignored if the boot mode is BOOT_ON_S3_RESUME. Accordingly, we already don't build the HOB in InitializePlatform() during S3 resume; MemMapInitialization() isn't called.) In the BDS phase, BmSetMemoryTypeInformationVariable() reads the variable (if it exists) under all boot modes different from BOOT_WITH_DEFAULT_SETTINGS, and (re-)sets the variable if it doesn't exist, or the counts of the pages allocated during boot have changed, relative to what the variable predicted. In effect this creates a feedback loop between BDS and the next boot's PEI, making sure the memory allocation bins are sized large enough in advance. Ultimately, for BOOT_WITH_FULL_CONFIGURATION, as a special case of the above, this measures the maximum boot memory requirement per UEFI memory type, and over time decreases fragmentation in the UEFI memory map. We continue creating our (constant) Memory Type Information HOB in OvmfPkg/PlatformPei -- which prevents the above feedback loop -- except in one case: when OVMF is built with SMM_REQUIRE=TRUE or MEM_VARSTORE_EMU_ENABLE=FALSE (that is, when a flash-based varstore is guaranteed), and the "MemoryTypeInformation" variable exists (that is, when the virtual machine has been booted at least once). This lets the OS installer see a somewhat fragmented memory map at first boot, but further boots should witness defragmented maps. In practice the difference seems to be 20-24 entries in the UEFI memory map. In the longer term this should also serve as basis for S4 enablement. For now, we keep the PcdResetOnMemoryTypeInformationChange|FALSE setting in the OVMF DSC files, dating back to commit 7709cf48e432 ("DuetPkg, OvmfPkg, UnixPkg: Remove unnecessary reset during boot", 2010-12-06). Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/PlatformPei/PlatformPei.inf | 2 + OvmfPkg/PlatformPei/Platform.h | 5 + OvmfPkg/PlatformPei/MemTypeInfo.c | 151 OvmfPkg/PlatformPei/Platform.c | 23 +-- 4 files changed, 159 insertions(+), 22 deletions(-) diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/PlatformPei.inf index 4b8626cb2a27..062cc083c698 100644 --- a/OvmfPkg/PlatformPei/PlatformPei.inf +++ b/OvmfPkg/PlatformPei/PlatformPei.inf @@ -34,6 +34,7 @@ [Sources] FeatureControl.c Fv.c MemDetect.c + MemTypeInfo.c Platform.c Xen.c @@ -113,6 +114,7 @@ [FeaturePcd] [Ppis] gEfiPeiMasterBootModePpiGuid gEfiPeiMpServicesPpiGuid + gEfiPeiReadOnlyVariable2PpiGuid [Depex] TRUE diff --git a/OvmfPkg/PlatformPei/Platform.h b/OvmfPkg/PlatformPei/Platform.h index f942e61bb4f9..5847b46a308d 100644 --- a/OvmfPkg/PlatformPei/Platform.h +++ b/OvmfPkg/PlatformPei/Platform.h @@ -78,6 +78,11 @@ PeiFvInitialization ( VOID ); +VOID +MemTypeInfoInitialization ( + VOID + ); + VOID InstallFeatureControlCallback ( VOID diff --git a/OvmfPkg/PlatformPei/MemTypeInfo.c b/OvmfPkg/PlatformPei/MemTypeInfo.c new file mode 100644 index ..46ed9aaf8f31 --- /dev/null +++ b/OvmfPkg/PlatformPei/MemTypeInfo.c @@ -0,0 +1,151 @@ +/**@file + Produce a default memory type information HOB unless we can determine, from + the existence of the "MemoryTypeInformation" variable, that the DXE IPL PEIM + will produce the HOB. + + Copyright (C) 2017, Red Hat, Inc. + + 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 + +#include "Platform.h" + +STATIC EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = { + { EfiACPIMemoryNVS, 0x004 }, + { EfiACPIReclaimMemory, 0x008 }, + { EfiReservedMemoryType, 0x004 }, + { EfiRuntimeServicesData, 0x024 }, + { EfiRuntimeServicesCode, 0x030 }, + { EfiBootServicesCode,0x180 }, + { EfiBootServicesData,0xF00 }, + { EfiMaxMemoryType, 0x000 } +}; + +STATIC +VOID +BuildMemTypeInfoHob ( + VOID + ) +{ + BuildGuidDataHob ( +&gEfiMemoryTypeInformationGuid, +mDefaultMemoryTypeInformation, +sizeof mDefaultMemoryTypeInformation +); + DEBUG (( +DEBUG_INFO, +"%a: default memory type information HOB built\n", +__FUNCTION__ +)); +
[edk2] [PATCH v2 4/8] OvmfPkg: introduce FlashNvStorageAddressLib
An OVMF binary built with -D SMM_REQUIRE or with -D MEM_VARSTORE_EMU_ENABLE=FALSE requires flash to be present at the expected (build-time determined) location; falling back to the emulated varstore is not possible. In such builds, we can replace the settings of the - varstore, - FTW working block, - and FTW spare area address PCDs in QemuFlashFvbServicesRuntimeDxe with identical settings in a new plug-in (NULL class) library, to be linked into variable-related PEIMs. This will enable such builds to access variables during the PEI phase, without dynamic flash detection and without ordering constraints against other PEIMs. Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.inf | 48 ++ OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.c | 53 2 files changed, 101 insertions(+) diff --git a/OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.inf b/OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.inf new file mode 100644 index ..f79194f80de9 --- /dev/null +++ b/OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.inf @@ -0,0 +1,48 @@ +## @file +# +# A hook-in library for variable-related PEIMs, in order to set +# - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64, +# - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase, +# - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase, +# from their gUefiOvmfPkgTokenSpaceGuid counterparts, just before those PEIMs +# consume them. +# +# Copyright (C) 2017, Red Hat, Inc. +# +# 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= 1.25 + BASE_NAME = FlashNvStorageAddressLib + FILE_GUID = 5FF5A9F9-D01E-49EC-9A17-1682FC85122F + MODULE_TYPE= BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = FlashNvStorageAddressLib|PEIM + CONSTRUCTOR= SetFlashNvStorageAddresses + +[Sources] + FlashNvStorageAddressLib.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + OvmfPkg/OvmfPkg.dec + +[LibraryClasses] + PcdLib + +[Pcd] + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase diff --git a/OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.c b/OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.c new file mode 100644 index ..dc1280cc23f1 --- /dev/null +++ b/OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.c @@ -0,0 +1,53 @@ +/** @file + + A hook-in library for variable-related PEIMs, in order to set + - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64, + - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase, + - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase, + from their gUefiOvmfPkgTokenSpaceGuid counterparts, just before those PEIMs + consume them. + + Copyright (C) 2017, Red Hat, Inc. + + 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 + +RETURN_STATUS +EFIAPI +SetFlashNvStorageAddresses ( + VOID + ) +{ + RETURN_STATUS PcdStatus; + + PcdStatus = PcdSet64S ( +PcdFlashNvStorageVariableBase64, +PcdGet32 (PcdOvmfFlashNvStorageVariableBase) +); + if (RETURN_ERROR (PcdStatus)) { +return PcdStatus; + } + + PcdStatus = PcdSet32S ( +PcdFlashNvStorageFtwWorkingBase, +PcdGet32 (PcdOvmfFlashNvStorageFtwWorkingBase) +); + if (RETURN_ERROR (PcdStatus)) { +return PcdStatus; + } + + PcdStatus = PcdSet32S ( +PcdFlashNvStorageFtwSpareBase, +PcdGet32 (P
[edk2] [PATCH v2 6/8] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: don't set flash PCDs if SMM or no-emu
... only check them. When OVMF is built with -D SMM_REQUIRE or with -D MEM_VARSTORE_EMU_ENABLE=FALSE then the PCDs are set during the PEI phase, as part of FaultTolerantWritePei's startup (in FlashNvStorageAddressLib's constructor). Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c | 58 ++-- 1 file changed, 40 insertions(+), 18 deletions(-) diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c index 558b395dff4a..5d5a7580454a 100644 --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c @@ -1093,24 +1093,46 @@ FvbInitialize ( MarkMemoryRangeForRuntimeAccess (BaseAddress, Length); - // - // Set several PCD values to point to flash - // - PcdStatus = PcdSet64S ( -PcdFlashNvStorageVariableBase64, -(UINTN) PcdGet32 (PcdOvmfFlashNvStorageVariableBase) -); - ASSERT_RETURN_ERROR (PcdStatus); - PcdStatus = PcdSet32S ( -PcdFlashNvStorageFtwWorkingBase, -PcdGet32 (PcdOvmfFlashNvStorageFtwWorkingBase) -); - ASSERT_RETURN_ERROR (PcdStatus); - PcdStatus = PcdSet32S ( -PcdFlashNvStorageFtwSpareBase, -PcdGet32 (PcdOvmfFlashNvStorageFtwSpareBase) -); - ASSERT_RETURN_ERROR (PcdStatus); + if (!FeaturePcdGet (PcdSmmSmramRequire) && + FeaturePcdGet (PcdMemVarstoreEmuEnable)) { +// +// This build is suitable for both flash and in-memory emulated variables, +// and we happen to have found flash. Set several PCD values to point to +// flash. +// +PcdStatus = PcdSet64S ( + PcdFlashNvStorageVariableBase64, + PcdGet32 (PcdOvmfFlashNvStorageVariableBase) + ); +ASSERT_RETURN_ERROR (PcdStatus); +PcdStatus = PcdSet32S ( + PcdFlashNvStorageFtwWorkingBase, + PcdGet32 (PcdOvmfFlashNvStorageFtwWorkingBase) + ); +ASSERT_RETURN_ERROR (PcdStatus); +PcdStatus = PcdSet32S ( + PcdFlashNvStorageFtwSpareBase, + PcdGet32 (PcdOvmfFlashNvStorageFtwSpareBase) + ); +ASSERT_RETURN_ERROR (PcdStatus); + } else { +// +// This build is suitable for flash variables only. Double-check several +// PCDs that point to the flash. +// +ASSERT ( + (PcdGet64 (PcdFlashNvStorageVariableBase64) == + PcdGet32 (PcdOvmfFlashNvStorageVariableBase)) + ); +ASSERT ( + (PcdGet32 (PcdFlashNvStorageFtwWorkingBase) == + PcdGet32 (PcdOvmfFlashNvStorageFtwWorkingBase)) + ); +ASSERT ( + (PcdGet32 (PcdFlashNvStorageFtwSpareBase) == + PcdGet32 (PcdOvmfFlashNvStorageFtwSpareBase)) + ); + } FwhInstance = (EFI_FW_VOL_INSTANCE *) ( -- 2.14.1.3.gb7cf6e02401b ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 8/8] OvmfPkg/README: document MEM_VARSTORE_EMU_ENABLE and memmap defrag
Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- OvmfPkg/README | 10 ++ 1 file changed, 10 insertions(+) diff --git a/OvmfPkg/README b/OvmfPkg/README index 00fb71848200..cdd8dbea7f18 100644 --- a/OvmfPkg/README +++ b/OvmfPkg/README @@ -68,13 +68,21 @@ https://github.com/tianocore/tianocore.github.io/wiki/How%20to%20build%20OVMF * Run qemu with: -pflash path/to/OVMF.fd * Note that this option is required for running SecureBoot-enabled builds (-D SECURE_BOOT_ENABLE). +* When a commitment to this option (i.e., -pflash) can be made, it is + recommended to build OVMF with -D MEM_VARSTORE_EMU_ENABLE=FALSE. Said + build setting enables UEFI memory map defragmentation across boots of the + virtual machine. - Option 2: Use QEMU -bios parameter * Note that UEFI variables will be partially emulated, and non-volatile variables may lose their contents after a reboot +* The build option -D MEM_VARSTORE_EMU_ENABLE=FALSE is incompatible with + the QEMU -bios option. * Run qemu with: -bios path/to/OVMF.fd - Option 3: Use QEMU -L parameter * Note that UEFI variables will be partially emulated, and non-volatile variables may lose their contents after a reboot +* The build option -D MEM_VARSTORE_EMU_ENABLE=FALSE is incompatible with + the QEMU -L option. * Either copy, rename or symlink OVMF.fd => bios.bin * Use the QEMU -L parameter to specify the directory where the bios.bin file is located. @@ -139,6 +147,8 @@ during boot (even in RELEASE builds). Both the naming of the flag (SMM_REQUIRE, instead of SMM_ENABLE), and this behavior are consistent with the goal described above: this is supposed to be a security feature, and fallbacks are not allowed. Similarly, a pflash-backed variable store is a requirement. +(Accordingly, SMM_REQUIRE automatically enables all benefits of +MEM_VARSTORE_EMU_ENABLE=FALSE). QEMU should be started with the options listed below (in addition to any other guest-specific flags). The command line should be gradually composed from the -- 2.14.1.3.gb7cf6e02401b ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 6/7] ArmPlatformPkg/PrePi; call all constructors by hand
On Thu, Nov 30, 2017 at 03:24:52PM +, Ard Biesheuvel wrote: > Call ProcessLibraryConstructorList () to invoke all library constructors > by hand rather than calling only some of them explicitly. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel > --- > ArmPlatformPkg/PrePi/PrePi.c | 13 +++-- > 1 file changed, 3 insertions(+), 10 deletions(-) > > diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c > index a60cafdce45e..76a53bc871d2 100644 > --- a/ArmPlatformPkg/PrePi/PrePi.c > +++ b/ArmPlatformPkg/PrePi/PrePi.c > @@ -33,15 +33,9 @@ > UINT64 mSystemMemoryEnd = FixedPcdGet64(PcdSystemMemoryBase) + >FixedPcdGet64(PcdSystemMemorySize) - 1; > > -EFI_STATUS > -EFIAPI > -ExtractGuidedSectionLibConstructor ( > - VOID > - ); > - > -EFI_STATUS > +VOID > EFIAPI > -LzmaDecompressLibConstructor ( > +ProcessLibraryConstructorList ( >VOID >); Hmm ... Do we need this local declaration? Is there some header we could use? If not - could we move it out to PrePi.h? > @@ -162,8 +156,7 @@ PrePiMain ( >PERF_START (NULL, "PEI", NULL, StartTimeStamp); > >// SEC phase needs to run library constructors by hand. > - ExtractGuidedSectionLibConstructor (); > - LzmaDecompressLibConstructor (); > + ProcessLibraryConstructorList (); > >// Assume the FV that contains the SEC (our code) also contains a > compressed FV. >Status = DecompressFirstFv (); > -- > 2.11.0 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms] Platform Silicon: remove ArmPlatformInitializeSystemMemory () functions
On Thu, Nov 30, 2017 at 04:13:06PM +, Ard Biesheuvel wrote: > The function ArmPlatformInitializeSystemMemory () has been removed from > ArmPlatformLib, so remove all the [empty] implementations provided by > the various platforms. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm > --- > Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJuno.c | 13 > - > Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c | 13 > - > Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c | 14 > -- > Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c | 15 > --- > Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c | 14 > -- > Silicon/Socionext/SynQuacer/Library/SynQuacerLib/SynQuacer.c | 13 > - > 6 files changed, 82 deletions(-) > > diff --git a/Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJuno.c > b/Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJuno.c > index 5ec72ff7ed8b..cbc5ed595571 100644 > --- a/Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJuno.c > +++ b/Platform/ARM/JunoPkg/Library/ArmJunoLib/ArmJuno.c > @@ -146,19 +146,6 @@ ArmPlatformInitialize ( >return Status; > } > > -/** > - Initialize the system (or sometimes called permanent) memory > - > - This memory is generally represented by the DRAM. > - > -**/ > -VOID > -ArmPlatformInitializeSystemMemory ( > - VOID > - ) > -{ > -} > - > EFI_STATUS > PrePeiCoreGetMpCoreInfo ( >OUT UINTN *CoreCount, > diff --git a/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c > b/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c > index f4a47b28493a..6bf0d39bd4e2 100644 > --- a/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c > +++ b/Platform/Hisilicon/HiKey/Library/HiKeyLib/HiKey.c > @@ -111,19 +111,6 @@ ArmPlatformInitialize ( >return RETURN_SUCCESS; > } > > -/** > - Initialize the system (or sometimes called permanent) memory > - > - This memory is generally represented by the DRAM. > - > -**/ > -VOID > -ArmPlatformInitializeSystemMemory ( > - VOID > - ) > -{ > -} > - > EFI_STATUS > PrePeiCoreGetMpCoreInfo ( >OUT UINTN *CoreCount, > diff --git a/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c > b/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c > index 968d28f813f6..b2b415571c74 100644 > --- a/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c > +++ b/Platform/Marvell/Armada/Library/Armada70x0Lib/Armada70x0Lib.c > @@ -89,20 +89,6 @@ ArmPlatformInitialize ( >return RETURN_SUCCESS; > } > > -/** > - Initialize the system (or sometimes called permanent) memory > - > - This memory is generally represented by the DRAM. > - > -**/ > -VOID > -ArmPlatformInitializeSystemMemory ( > - VOID > - ) > -{ > - //TODO: Initialize DRAM controller here > -} > - > EFI_STATUS > PrePeiCoreGetMpCoreInfo ( >OUT UINTN *CoreCount, > diff --git a/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c > b/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c > index facfd61ca230..dc59d4f08f5a 100644 > --- a/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c > +++ b/Silicon/AMD/Styx/Library/AmdStyxLib/Styx.c > @@ -84,21 +84,6 @@ ArmPlatformInitialize ( > } > > > -/** > - Initialize the system (or sometimes called permanent) memory > - > - This memory is generally represented by the DRAM. > - > -**/ > -VOID > -ArmPlatformInitializeSystemMemory ( > - VOID > - ) > -{ > - // Nothing to do here > -} > - > - > // > // Return list of cores in the system > // > diff --git > a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c > b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c > index b59b9f027573..4962543f5531 100644 > --- a/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c > +++ b/Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLib.c > @@ -56,20 +56,6 @@ ArmPlatformInitialize ( >return RETURN_SUCCESS; > } > > -/** > - Initialize the system (or sometimes called permanent) memory > - > - This memory is generally represented by the DRAM. > - > -**/ > -VOID > -ArmPlatformInitializeSystemMemory ( > - VOID > - ) > -{ > - // Nothing to do here > -} > - > EFI_STATUS > PrePeiCoreGetMpCoreInfo ( >OUT UINTN *CoreCount, > diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerLib/SynQuacer.c > b/Silicon/Socionext/SynQuacer/Library/SynQuacerLib/SynQuacer.c > index 4da0200279cd..6d4be4badb80 100644 > --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerLib/SynQuacer.c > +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerLib/SynQuacer.c > @@ -76,19 +76,6 @@ ArmPlatformInitialize ( >return RETURN_SUCCESS; > } > > -/** > - Initialize the system (or sometimes called permanent) memory > - > - This memory is generally represented by the DRAM. > - > -**/ > -VOID > -ArmPl
Re: [edk2] [PATCH 6/7] ArmPlatformPkg/PrePi; call all constructors by hand
On 30 November 2017 at 16:31, Leif Lindholm wrote: > On Thu, Nov 30, 2017 at 03:24:52PM +, Ard Biesheuvel wrote: >> Call ProcessLibraryConstructorList () to invoke all library constructors >> by hand rather than calling only some of them explicitly. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel >> --- >> ArmPlatformPkg/PrePi/PrePi.c | 13 +++-- >> 1 file changed, 3 insertions(+), 10 deletions(-) >> >> diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c >> index a60cafdce45e..76a53bc871d2 100644 >> --- a/ArmPlatformPkg/PrePi/PrePi.c >> +++ b/ArmPlatformPkg/PrePi/PrePi.c >> @@ -33,15 +33,9 @@ >> UINT64 mSystemMemoryEnd = FixedPcdGet64(PcdSystemMemoryBase) + >>FixedPcdGet64(PcdSystemMemorySize) - 1; >> >> -EFI_STATUS >> -EFIAPI >> -ExtractGuidedSectionLibConstructor ( >> - VOID >> - ); >> - >> -EFI_STATUS >> +VOID >> EFIAPI >> -LzmaDecompressLibConstructor ( >> +ProcessLibraryConstructorList ( >>VOID >>); > > Hmm ... > Do we need this local declaration? > Is there some header we could use? That doesn't appear to be the case, no > If not - could we move it out to PrePi.h? > Yes, that works for me. >> @@ -162,8 +156,7 @@ PrePiMain ( >>PERF_START (NULL, "PEI", NULL, StartTimeStamp); >> >>// SEC phase needs to run library constructors by hand. >> - ExtractGuidedSectionLibConstructor (); >> - LzmaDecompressLibConstructor (); >> + ProcessLibraryConstructorList (); >> >>// Assume the FV that contains the SEC (our code) also contains a >> compressed FV. >>Status = DecompressFirstFv (); >> -- >> 2.11.0 >> ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 6/7] ArmPlatformPkg/PrePi; call all constructors by hand
On Thu, Nov 30, 2017 at 04:35:41PM +, Ard Biesheuvel wrote: > On 30 November 2017 at 16:31, Leif Lindholm wrote: > > On Thu, Nov 30, 2017 at 03:24:52PM +, Ard Biesheuvel wrote: > >> Call ProcessLibraryConstructorList () to invoke all library constructors > >> by hand rather than calling only some of them explicitly. > >> > >> Contributed-under: TianoCore Contribution Agreement 1.1 > >> Signed-off-by: Ard Biesheuvel > >> --- > >> ArmPlatformPkg/PrePi/PrePi.c | 13 +++-- > >> 1 file changed, 3 insertions(+), 10 deletions(-) > >> > >> diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c > >> index a60cafdce45e..76a53bc871d2 100644 > >> --- a/ArmPlatformPkg/PrePi/PrePi.c > >> +++ b/ArmPlatformPkg/PrePi/PrePi.c > >> @@ -33,15 +33,9 @@ > >> UINT64 mSystemMemoryEnd = FixedPcdGet64(PcdSystemMemoryBase) + > >>FixedPcdGet64(PcdSystemMemorySize) - 1; > >> > >> -EFI_STATUS > >> -EFIAPI > >> -ExtractGuidedSectionLibConstructor ( > >> - VOID > >> - ); > >> - > >> -EFI_STATUS > >> +VOID > >> EFIAPI > >> -LzmaDecompressLibConstructor ( > >> +ProcessLibraryConstructorList ( > >>VOID > >>); > > > > Hmm ... > > Do we need this local declaration? > > Is there some header we could use? > > That doesn't appear to be the case, no Seems like a future opportunity. > > If not - could we move it out to PrePi.h? > > Yes, that works for me. OK, if you fold that in, for the series: Reviewed-by: Leif Lindholm > >> @@ -162,8 +156,7 @@ PrePiMain ( > >>PERF_START (NULL, "PEI", NULL, StartTimeStamp); > >> > >>// SEC phase needs to run library constructors by hand. > >> - ExtractGuidedSectionLibConstructor (); > >> - LzmaDecompressLibConstructor (); > >> + ProcessLibraryConstructorList (); > >> > >>// Assume the FV that contains the SEC (our code) also contains a > >> compressed FV. > >>Status = DecompressFirstFv (); > >> -- > >> 2.11.0 > >> > ___ > 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] edk2 interface deprecation policy
Felix, I don't think we have one Adding new interfaces does not impact the downstream projects, but depreciating interface can break stuff. Seems like it might at least be a good idea to have a depreciation discussion on the mailing list. I'm open to other suggestions Thanks, Andrew Fish > On Nov 30, 2017, at 6:00 AM, Felix Poludov wrote: > > Does edk2 have a policy regarding deprecation of interface definition headers? > I can see that definition of the UgaDraw protocol that was deprecated years > ago (I believe in UEFI 2.0) is still part of the code base; yet, definition > of the SMM Communication ACPI Table that was deprecated this year in UEFI > 2.6B has already been removed. > > Please consider the environment before printing this email. > > The information contained in this message may be confidential and proprietary > to American Megatrends, Inc. This communication is intended to be read only > by the individual or entity to whom it is addressed or by their designee. If > the reader of this message is not the intended recipient, you are on notice > that any distribution of this message, in any form, is strictly prohibited. > Please promptly notify the sender by reply e-mail or by telephone at > 770-246-8600, and then delete or destroy all copies of the transmission. > ___ > 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 edk2-platforms] Platform Silicon: remove ArmPlatformInitializeSystemMemory () functions
On 30 November 2017 at 16:34, Leif Lindholm wrote: > On Thu, Nov 30, 2017 at 04:13:06PM +, Ard Biesheuvel wrote: >> The function ArmPlatformInitializeSystemMemory () has been removed from >> ArmPlatformLib, so remove all the [empty] implementations provided by >> the various platforms. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel > > Reviewed-by: Leif Lindholm > Thanks. Pushed as a58dcf22b42c ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 6/7] ArmPlatformPkg/PrePi; call all constructors by hand
On 30 November 2017 at 16:45, Leif Lindholm wrote: > On Thu, Nov 30, 2017 at 04:35:41PM +, Ard Biesheuvel wrote: >> On 30 November 2017 at 16:31, Leif Lindholm wrote: >> > On Thu, Nov 30, 2017 at 03:24:52PM +, Ard Biesheuvel wrote: >> >> Call ProcessLibraryConstructorList () to invoke all library constructors >> >> by hand rather than calling only some of them explicitly. >> >> >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> >> Signed-off-by: Ard Biesheuvel >> >> --- >> >> ArmPlatformPkg/PrePi/PrePi.c | 13 +++-- >> >> 1 file changed, 3 insertions(+), 10 deletions(-) >> >> >> >> diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c >> >> index a60cafdce45e..76a53bc871d2 100644 >> >> --- a/ArmPlatformPkg/PrePi/PrePi.c >> >> +++ b/ArmPlatformPkg/PrePi/PrePi.c >> >> @@ -33,15 +33,9 @@ >> >> UINT64 mSystemMemoryEnd = FixedPcdGet64(PcdSystemMemoryBase) + >> >>FixedPcdGet64(PcdSystemMemorySize) - 1; >> >> >> >> -EFI_STATUS >> >> -EFIAPI >> >> -ExtractGuidedSectionLibConstructor ( >> >> - VOID >> >> - ); >> >> - >> >> -EFI_STATUS >> >> +VOID >> >> EFIAPI >> >> -LzmaDecompressLibConstructor ( >> >> +ProcessLibraryConstructorList ( >> >>VOID >> >>); >> > >> > Hmm ... >> > Do we need this local declaration? >> > Is there some header we could use? >> >> That doesn't appear to be the case, no > > Seems like a future opportunity. > >> > If not - could we move it out to PrePi.h? >> >> Yes, that works for me. > > OK, if you fold that in, for the series: > Reviewed-by: Leif Lindholm > Thanks. Pushed as c6e51751e026..73fcbb48665e I have taken the liberty of reordering this patch with the one that clones PrePi for Beagle, so this fix is applied to the clone as well. >> >> @@ -162,8 +156,7 @@ PrePiMain ( >> >>PERF_START (NULL, "PEI", NULL, StartTimeStamp); >> >> >> >>// SEC phase needs to run library constructors by hand. >> >> - ExtractGuidedSectionLibConstructor (); >> >> - LzmaDecompressLibConstructor (); >> >> + ProcessLibraryConstructorList (); >> >> >> >>// Assume the FV that contains the SEC (our code) also contains a >> >> compressed FV. >> >>Status = DecompressFirstFv (); >> >> -- >> >> 2.11.0 >> >> >> ___ >> 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 edk2-platforms] Silicon/SynQuacerPciHostBridgeLib: fix weird indentation
On 29 November 2017 at 19:24, Laszlo Ersek wrote: > Hi Ard, > > On 11/29/17 19:35, Ard Biesheuvel wrote: >> Fix the weird indentation in the various #defines in the file containing >> the RC init code. This is a whitespace only change. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel >> --- >> >> Silicon/Socionext/SynQuacer/Library/SynQuacerPciHostBridgeLib/SynQuacerPciHostBridgeLibConstructor.c >> | 138 ++-- >> 1 file changed, 69 insertions(+), 69 deletions(-) > > I'm not really supposed to comment on this, but the pre-patch > indentation is "native" to edk2. See for example > > MdePkg/Include/IndustryStandard/Pci22.h > > I also follwed it in > > OvmfPkg/Include/IndustryStandard/Q35MchIch9.h > OvmfPkg/Include/IndustryStandard/I440FxPiix4.h > Yeah. I cleaned it up anyway :-) Pushed as 7a74db8e88ca6926599a7bf60cd8ef92f260388e ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms] Silicon/SynQuacerPciHostBridgeLib: enable Gen2 speed
On 29 November 2017 at 19:12, Leif Lindholm wrote: > On Wed, Nov 29, 2017 at 06:44:59PM +, Ard Biesheuvel wrote: >> As it turns out, getting the PCIe controllers to switch to Gen2 speed >> is surprisingly easy. It only involves setting the 'speed change' bit >> in the controller at initialization time, after which the hardware >> will automatically attempt to switch to Gen2 speed after training at >> Gen1 speed has completed. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel > > Hmm? > Well, that sounds like an improvement. > Reviewed-by: Leif Lindholm > Thanks. Pushed as b490ebc08f2a8c3b95b5fd22f142badc72925358 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH edk2-platforms v2] Silicon/SynQuacer: enable coherent DMA for NETSEC and eMMC
As it turns out, it is surprisingly easy to configure both the NETSEC and eMMC devices as cache coherent for DMA, given that they are both behind the same SMMU which is already configured in passthrough mode by the firmware running on the SCP. So update the static SMMU configuration to make memory accesses performed by these devices inner shareable inner/outer writeback cacheable, which makes them cache coherent with the CPUs. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- v2: update DeveloperBox as well update commit log to clarify that the SMMU is configured in pass through mode by the firmware running on the Cortex-M3 SCP Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 2 +- Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc | 2 +- Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi | 2 ++ Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.c | 2 +- Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c | 23 Silicon/Socionext/SynQuacer/Include/Platform/MemoryMap.h | 4 Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c | 3 +++ 7 files changed, 35 insertions(+), 3 deletions(-) diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc index 7ca9fb104311..e1183b529b73 100644 --- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc @@ -600,7 +600,7 @@ [Components.common] NetworkPkg/HttpBootDxe/HttpBootDxe.inf Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.inf { - DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf + DmaLib|EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.inf } # diff --git a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc index 10da45ad2837..637f6d414d24 100644 --- a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc +++ b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc @@ -592,7 +592,7 @@ [Components.common] NetworkPkg/HttpBootDxe/HttpBootDxe.inf Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.inf { - DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf + DmaLib|EmbeddedPkg/Library/CoherentDmaLib/CoherentDmaLib.inf } # diff --git a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi index 5e663c59efbd..ec784c70afe7 100644 --- a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi +++ b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi @@ -456,6 +456,7 @@ max-speed = <1000>; max-frame-size = <9000>; phy-handle = <ðphy0>; +dma-coherent; #address-cells = <1>; #size-cells = <0>; @@ -557,6 +558,7 @@ fujitsu,cmd-dat-delay-select; clocks = <&clk_alw_c_0 &clk_alw_b_0>; clock-names = "core", "iface"; +dma-coherent; status = "disabled"; }; }; diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.c b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.c index e577076ada4f..5a99283977fb 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.c +++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/Emmc.c @@ -191,7 +191,7 @@ RegisterEmmc ( Status = RegisterNonDiscoverableMmioDevice ( NonDiscoverableDeviceTypeSdhci, - NonDiscoverableDeviceDmaTypeNonCoherent, + NonDiscoverableDeviceDmaTypeCoherent, NULL, &mSdMmcControllerHandle, 1, diff --git a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c index c64ccf3b3c30..7e7c790a6113 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c +++ b/Silicon/Socionext/SynQuacer/Drivers/PlatformDxe/PlatformDxe.c @@ -123,6 +123,27 @@ FreeDevice: return Status; } +#define SMMU_SCR0 0x0 +#define SMMU_SCR0_SHCFG_INNER (0x2 << 22) +#define SMMU_SCR0_MTCFG (0x1 << 20) +#define SMMU_SCR0_MEMATTR_INNER_OUTER_WB (0xf << 16) + +STATIC +VOID +SmmuEnableCoherentDma ( + VOID + ) +{ + // + // The SCB SMMU (MMU-500) is shared between the NETSEC and eMMC devices, and + // is configured in passthrough mode by default. Let's set the global memory + // type override as well, so that all memory accesses by these devices are + // inner shareable inner/outer writeback cacheable. + // + MmioOr32 (SYNQUACER_SCB_SMMU_BASE + SMMU_SCR0, +SMMU_SCR0_SHCFG_INN
[edk2] [PATCH edk2-platforms] Silicon/Fip006Dxe: map NOR_FLASH_INFO FSR flag with instance flag
From: Pipat Methavanitpong Now that we incorporated NorFlashInfoLib into the Fip006Dxe driver, replace the code that explicitly enables flag status register polling for Micron NOR flash with a test of the flags field provided by NorFlashInfoLib, which carries the same information. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pipat Methavanitpong Signed-off-by: Ard Biesheuvel --- Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c | 22 +++- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c index a521b1f3d167..8d6bca8739d0 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c +++ b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c @@ -1129,6 +1129,7 @@ NorFlashCreateInstance ( { EFI_STATUS Status; NOR_FLASH_INSTANCE* Instance; + NOR_FLASH_INFO *FlashInfo; UINT8 JedecId[3]; ASSERT(NorFlashInstance != NULL); @@ -1157,23 +1158,15 @@ NorFlashCreateInstance ( NorFlashReset (Instance); NorFlashReadID (Instance, JedecId); + Status = NorFlashGetInfo (JedecId, &FlashInfo, FALSE); + if (EFI_ERROR (Status)) { +goto FreeInstance; + } - DEBUG_CODE_BEGIN (); -{ - NOR_FLASH_INFO*FlashInfo; - - Status = NorFlashGetInfo (JedecId, &FlashInfo, FALSE); - if (EFI_ERROR (Status)) { -goto FreeInstance; - } - - NorFlashPrintInfo (FlashInfo); - FreePool (FlashInfo); -} - DEBUG_CODE_END (); + NorFlashPrintInfo (FlashInfo); Instance->Flags = 0; - if (JedecId[0] == NOR_FLASH_ID_STMICRO) { + if (FlashInfo->Flags & NOR_FLASH_WRITE_FSR) { Instance->Flags = NOR_FLASH_POLL_FSR; } @@ -1198,6 +1191,7 @@ NorFlashCreateInstance ( } *NorFlashInstance = Instance; + FreePool (FlashInfo); return EFI_SUCCESS; FreeInstance: -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v2 0/8] OvmfPkg: add the Variable PEIM, defragment the UEFI memmap
As I recall, this enables a modest (non-essential) improvement in fragmentation, at the cost of more ways to configure OVMF to hang during boot. (With info available via debugcon.) I would prefer if were able to always fallback and continue boot. Later, after GOP has started we could visibly warn the user that they haven't properly enabled SMM and/or flash. If we had a way to do this, I would be in favor of displaying an error message and delaying for 30 seconds before booting if flash has not been enabled. (Or, if SMM was enabled in the build, but not set on the command line.) At that point, I think we could start to transition to making flash an boot requirement for OVMF. But first we need to be able to visibly warn the user why they are not able to boot. -Jordan On 2017-11-30 08:30:21, Laszlo Ersek wrote: > Repo: https://github.com/lersek/edk2.git > Branch: memmap_defrag_v2 > > This version is identical to the v1 seres I posted in March. Some > patches of the v1 series have been committed. I've been rebasing and > using the rest since, and am now posting it as v2. References: > > * https://bugzilla.tianocore.org/show_bug.cgi?id=386 > > * http://mid.mail-archive.com/20170314233246.17864-1-lersek@redhat.com > https://lists.01.org/pipermail/edk2-devel/2017-March/008525.html > > * http://mid.mail-archive.com/20170327080544.24748-1-jordan.l.justen@intel.com > https://lists.01.org/pipermail/edk2-devel/2017-March/009049.html > > Cc: Anthony Perard > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Julien Grall > > Thanks > Laszlo > > Laszlo Ersek (8): > OvmfPkg: introduce PcdMemVarstoreEmuEnable feature flag > OvmfPkg/QemuFlashFvbServicesRuntimeDxe: check PcdMemVarstoreEmuEnable > OvmfPkg: conditionally disable reserved memory varstore emulation at > build > OvmfPkg: introduce FlashNvStorageAddressLib > OvmfPkg: include FaultTolerantWritePei and VariablePei > OvmfPkg/QemuFlashFvbServicesRuntimeDxe: don't set flash PCDs if SMM or > no-emu > OvmfPkg/PlatformPei: remedy UEFI memory map fragmentation > OvmfPkg/README: document MEM_VARSTORE_EMU_ENABLE and memmap defrag > > OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.c | 53 > +++ > OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.inf | 48 > +++ > OvmfPkg/OvmfPkg.dec | 6 + > OvmfPkg/OvmfPkgIa32.dsc | 15 > +- > OvmfPkg/OvmfPkgIa32.fdf | 8 > +- > OvmfPkg/OvmfPkgIa32X64.dsc| 15 > +- > OvmfPkg/OvmfPkgIa32X64.fdf| 8 > +- > OvmfPkg/OvmfPkgX64.dsc| 15 > +- > OvmfPkg/OvmfPkgX64.fdf| 8 > +- > OvmfPkg/PlatformPei/MemTypeInfo.c | 151 > > OvmfPkg/PlatformPei/Platform.c| 26 > +--- > OvmfPkg/PlatformPei/Platform.h| 5 + > OvmfPkg/PlatformPei/PlatformPei.inf | 3 + > OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf | 1 + > OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf | 1 + > OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c | 58 > +--- > OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c| 1 + > OvmfPkg/README| 10 > ++ > 18 files changed, 385 insertions(+), 47 deletions(-) > create mode 100644 > OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.c > create mode 100644 > OvmfPkg/Library/FlashNvStorageAddressLib/FlashNvStorageAddressLib.inf > create mode 100644 OvmfPkg/PlatformPei/MemTypeInfo.c > > -- > 2.14.1.3.gb7cf6e02401b > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH RFT] ArmVirtPkg/ArmVirtXen: move from Intel to generic BDS
ArmVirtXen is the only remaining consumer of ArmPlatformPkg's PlatformIntelBdsLib implementation, which is tightly coupled to the deprecated Intel BDS. So move ArmVirtXen to the generic BDS as well, allowing us to get rid of PlatformIntelBdsLib entirely. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirtXen.dsc | 14 +++--- ArmVirtPkg/ArmVirtXen.fdf | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc index 11e073287a84..ae43d5990110 100644 --- a/ArmVirtPkg/ArmVirtXen.dsc +++ b/ArmVirtPkg/ArmVirtXen.dsc @@ -48,8 +48,9 @@ [LibraryClasses] TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf - GenericBdsLib|IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf - PlatformBdsLib|ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf + UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf + BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf + PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf [LibraryClasses.common.UEFI_DRIVER] @@ -86,6 +87,7 @@ [PcdsFixedAtBuild.common] gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0 gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE + gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 } gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83, 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 } [PcdsPatchableInModule.common] @@ -199,7 +201,13 @@ [Components.common] MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf - IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf + MdeModulePkg/Universal/BdsDxe/BdsDxe.inf + MdeModulePkg/Application/UiApp/UiApp.inf { + + NULL|MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf + NULL|MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf + NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf + } OvmfPkg/XenBusDxe/XenBusDxe.inf OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf diff --git a/ArmVirtPkg/ArmVirtXen.fdf b/ArmVirtPkg/ArmVirtXen.fdf index 6586ce6be505..50e670254d52 100644 --- a/ArmVirtPkg/ArmVirtXen.fdf +++ b/ArmVirtPkg/ArmVirtXen.fdf @@ -177,7 +177,8 @@ [FV.FvMain] INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf - INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf + INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf + INF MdeModulePkg/Application/UiApp/UiApp.inf INF OvmfPkg/XenBusDxe/XenBusDxe.inf INF OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf -- 2.11.0 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] edk2 interface deprecation policy
I agree. It would be beneficial to have a mailing list discussion on how to deal with the deprecated item. In some cases it would make sense to tag an interface as deprecated, but keep in the code base for a while (6 month?) before actually deleting it. -Original Message- From: af...@apple.com [mailto:af...@apple.com] Sent: Thursday, November 30, 2017 11:57 AM To: Felix Poludov Cc: edk2-devel@lists.01.org Subject: Re: [edk2] edk2 interface deprecation policy Felix, I don't think we have one Adding new interfaces does not impact the downstream projects, but depreciating interface can break stuff. Seems like it might at least be a good idea to have a depreciation discussion on the mailing list. I'm open to other suggestions Thanks, Andrew Fish > On Nov 30, 2017, at 6:00 AM, Felix Poludov wrote: > > Does edk2 have a policy regarding deprecation of interface definition headers? > I can see that definition of the UgaDraw protocol that was deprecated years > ago (I believe in UEFI 2.0) is still part of the code base; yet, definition > of the SMM Communication ACPI Table that was deprecated this year in UEFI > 2.6B has already been removed. > > Please consider the environment before printing this email. > > The information contained in this message may be confidential and proprietary > to American Megatrends, Inc. This communication is intended to be read only > by the individual or entity to whom it is addressed or by their designee. If > the reader of this message is not the intended recipient, you are on notice > that any distribution of this message, in any form, is strictly prohibited. > Please promptly notify the sender by reply e-mail or by telephone at > 770-246-8600, and then delete or destroy all copies of the transmission. > ___ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends, Inc. This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [RFC v1 00/15] *** Proposal for StandaloneMmPkg ***
On Tue, 2017-11-28 at 07:00 +, Yao, Jiewen wrote: > HI > I am sorry that I missed this mail before. > > I found only 0/15 and 13/15 are in my mail box. :-( > I do not know why others are filtered. This was deliberate as PATCH 13/15 implements MM core code. Rest of them are/were AARCH64 Specific excluding the MM libraries. > > Is that possible to post the whole patch to your private git? > As such, we can review it in more efficient way. I have created a github repo below to review it in more efficient way. EDK2 https://github.com/supven01/edk2.git (Branch: AArch64StandaloneMm) EDK2-PLATFORMS https://github.com/supven01/edk2-platforms.git (Branch: master) Also, we are in the process of updating these changes into edk2 Staging repository here: https://github.com/tianocore/edk2-staging/tree/AArch64StandaloneMm I will send out PATCH set once you/team completes the review and give feedback/comments. > > Basically, I think it is a good idea to have StandaloneMmPkg to hold > all these features. Thank you for acknowledging this. > > Thank you > Yao Jiewen > > > > > -Original Message- > > From: Supreeth Venkatesh [mailto:supreeth.venkat...@arm.com] > > Sent: Saturday, November 18, 2017 7:08 AM > > To: edk2-devel@lists.01.org > > Cc: leif.lindh...@linaro.org; Yao, Jiewen ; > > Supreeth > > Venkatesh > > Subject: [RFC v1 00/15] *** Proposal for StandaloneMmPkg *** > > > > *** > > PI Specification v1.5 "Volume 4: Management Mode Core Interface" > > introduces the concept of MM Standalone Mode. Initialization of > > this mode > > can be done during the SEC phase (Section 1.5.2). > > On ARMv8-A systems, ARM Trusted Firmware is responsible for > > launching > > the normal world firmware e.g. UEFI. > > > > The Standalone MM environment is instantiated in Secure EL0 as a > > separate > > firmware volume. It executes as BL32 Image under control of ARM TF > > which is instantiated in EL3. Both components execute in the > > AArch64 execution > > state. > > This patchset will build upon the StandaloneSmmPkg module > > originally > > contributed by Intel. > > > > This package can be used in conjunction with ARM Trusted Firmware > > to recreate a simple MM secure environment that demonstrates > > communication > > between two UEFI images where one is executing in the normal world > > and the > > other is > > executing in the secure world. > > > > The normal world image includes: > > MM Communication DXE runtime driver that implements the protocol > > for > > communication > > with the MM environment in the secure world. > > > > The secure world image includes: > > The MM Standalone framework. > > > > This RFC patchset includes the proposed organization/structure and > > has architecture agnostic core changes only as a first pass. > > Once the organization/structure have been agreed upon, patchset for > > supporting libraries and AARCH64 implementation will be sent. > > > > Steps to build MM Standalone images > > In user preferred "work" directory, execute the following shell > > commands > > > > git clone https://github.com/tianocore/edk2.git > > git checkout master > > > > git clone https://github.com/tianocore/edk2-platforms.git > > git checkout master > > > > mkdir arm-tf > > cd arm-tf > > git clone https://github.com/ARM-software/arm-trusted-firmware.git > > . > > git checkout master > > cd .. > > > > git clone https://git.linaro.org/uefi/uefi-tools.git . > > git checkout master > > > > The following will build the MM Standalone image which runs in > > secure world. > > ./uefi-tools/edk2-build.sh -b DEBUG fvp_mm_standalone > > > > The follwing will build the normal world UEFI image, ARM Trusted > > Firmware and > > a Firmware Image Package (FIP) that includes both the UEFI images. > > ./uefi-tools/edk2-build.sh -a ./arm-tf -b DEBUG fvp_mm_normal > > > > Boot Loader Stage 1 (BL1) binary and combined arm-tf/uefi firmware > > image > > package (fip) binary will be generated at: > > > > Build Output > > Build/ArmVExpress-FVP-AArch64-MM-Normal/DEBUG_GCC5/FV/bl1.bin > > Build/ArmVExpress-FVP-AArch64-MM-Normal/DEBUG_GCC5/FV/fip.bin > > > > Steps to run MM Standalone image > > 1. Download the ARMv8 Architecture FVP from > > > > https://silver.arm.com/download/download.tm?pv=3744408&p=1424570 > > For more information, please refer > > > > https://developer.arm.com/products/system-design/fixed-virtual-plat > > forms > > 2. Install FVP into preferred "work" directory. > > 3. Create a shell script "run_mm.sh" in the same folder where > > "FVP_Base_AEMv8A-AEMv8A" is present. > > Sample Shell script below: > > ./FVP_Base_AEMv8A-AEMv8A > > -C cache_state_modelled=0 > > -C bp.secure_memory=1 > > -C bp.tzc_400.diagnostics=1 > > -C bp.pl011_uart0.untimed_fifos=0 > > -C cluster1.NUM_CORES=4 > > -C cluster0.NUM_CORES=4 > > -C bp.pl011_uart0.out_file=uart0.output > > -C bp.pl011_uart1.out_file=uart1.output > > -C bp.pl011_uart2.out_file=uart2.output
Re: [edk2] Enabling boot menu via serial & PXE boot in CorebootPayloadPkg
Hi, Cameron, > Interestingly, my debug build was complaining that it ran out of room when > attempting to fit everything in the UEFIPAYLOAD. > When I strip out the network additions and keep DEBUG on, Tianocore builds but > errors at runtime: > ``` > Failed to add memory space :0xFEE0 0x10 > ``` > I'm guessing I can increase the size of a region somewhere to avoid this > issue? There has been a recent fix for this issue by commit e2ef8b9a68. Could you please have a try? > I get serial output from coreboot and edk2, just not the boot menu. I will double check whether there is an issue with enabling serial with release build. Thanks, - ben ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] IntelSiliconPkg: Update MicrocodeUpdate build path in dsc
That was missed in 43e12eeac8b125165b8a93c3501925a8893544ef. Cc: Dandan Bi Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng --- IntelSiliconPkg/IntelSiliconPkg.dsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IntelSiliconPkg/IntelSiliconPkg.dsc b/IntelSiliconPkg/IntelSiliconPkg.dsc index e3043f82228e..790870e2f1de 100644 --- a/IntelSiliconPkg/IntelSiliconPkg.dsc +++ b/IntelSiliconPkg/IntelSiliconPkg.dsc @@ -39,7 +39,7 @@ [LibraryClasses] PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf - MicrocodeFlashAccessLib|UefiCpuPkg/Feature/Capsule/Library/MicrocodeFlashAccessLibNull/MicrocodeFlashAccessLibNull.inf + MicrocodeFlashAccessLib|IntelSiliconPkg/Feature/Capsule/Library/MicrocodeFlashAccessLibNull/MicrocodeFlashAccessLibNull.inf [LibraryClasses.common.PEIM] PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf @@ -84,7 +84,7 @@ [Components] IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.inf IntelSiliconPkg/Feature/VTd/PlatformVTdSampleDxe/PlatformVTdSampleDxe.inf IntelSiliconPkg/Feature/VTd/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePei.inf - UefiCpuPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf + IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf [BuildOptions] *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES -- 2.7.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] IntelSiliconPkg: Update MicrocodeUpdate build path in dsc
Reviewed-by: jiewen@intel.com > -Original Message- > From: Zeng, Star > Sent: Friday, December 1, 2017 9:20 AM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Bi, Dandan ; Yao, > Jiewen > Subject: [PATCH] IntelSiliconPkg: Update MicrocodeUpdate build path in dsc > > That was missed in 43e12eeac8b125165b8a93c3501925a8893544ef. > > Cc: Dandan Bi > Cc: Jiewen Yao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > --- > IntelSiliconPkg/IntelSiliconPkg.dsc | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/IntelSiliconPkg/IntelSiliconPkg.dsc > b/IntelSiliconPkg/IntelSiliconPkg.dsc > index e3043f82228e..790870e2f1de 100644 > --- a/IntelSiliconPkg/IntelSiliconPkg.dsc > +++ b/IntelSiliconPkg/IntelSiliconPkg.dsc > @@ -39,7 +39,7 @@ [LibraryClasses] > > PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLib > Null.inf > > SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf > > CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheM > aintenanceLib.inf > - > MicrocodeFlashAccessLib|UefiCpuPkg/Feature/Capsule/Library/MicrocodeFlash > AccessLibNull/MicrocodeFlashAccessLibNull.inf > + > MicrocodeFlashAccessLib|IntelSiliconPkg/Feature/Capsule/Library/MicrocodeFl > ashAccessLibNull/MicrocodeFlashAccessLibNull.inf > > [LibraryClasses.common.PEIM] >PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf > @@ -84,7 +84,7 @@ [Components] >IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.inf > > IntelSiliconPkg/Feature/VTd/PlatformVTdSampleDxe/PlatformVTdSampleDxe.inf > > IntelSiliconPkg/Feature/VTd/PlatformVTdInfoSamplePei/PlatformVTdInfoSample > Pei.inf > - UefiCpuPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf > + > IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf > > [BuildOptions] >*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES > -- > 2.7.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] IntelSiliconPkg: Update MicrocodeUpdate build path in dsc
Reviewed-by: Dandan Bi Thanks, Dandan -Original Message- From: Zeng, Star Sent: Friday, December 1, 2017 9:20 AM To: edk2-devel@lists.01.org Cc: Zeng, Star ; Bi, Dandan ; Yao, Jiewen Subject: [PATCH] IntelSiliconPkg: Update MicrocodeUpdate build path in dsc That was missed in 43e12eeac8b125165b8a93c3501925a8893544ef. Cc: Dandan Bi Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng --- IntelSiliconPkg/IntelSiliconPkg.dsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IntelSiliconPkg/IntelSiliconPkg.dsc b/IntelSiliconPkg/IntelSiliconPkg.dsc index e3043f82228e..790870e2f1de 100644 --- a/IntelSiliconPkg/IntelSiliconPkg.dsc +++ b/IntelSiliconPkg/IntelSiliconPkg.dsc @@ -39,7 +39,7 @@ [LibraryClasses] PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf - MicrocodeFlashAccessLib|UefiCpuPkg/Feature/Capsule/Library/MicrocodeFlashAccessLibNull/MicrocodeFlashAccessLibNull.inf + MicrocodeFlashAccessLib|IntelSiliconPkg/Feature/Capsule/Library/MicrocodeFlashAccessLibNull/MicrocodeFlashAccessLibNull.inf [LibraryClasses.common.PEIM] PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf @@ -84,7 +84,7 @@ [Components] IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.inf IntelSiliconPkg/Feature/VTd/PlatformVTdSampleDxe/PlatformVTdSampleDxe.inf IntelSiliconPkg/Feature/VTd/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePei.inf - UefiCpuPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf + IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf [BuildOptions] *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES -- 2.7.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v4 2/3] ArmVirtPkg: Fix build failure due to Tftp library removal
Laszlo, Thank you very much for that! I will try to become a talkaholic when writing commit messages next time. > -Original Message- > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] > Sent: Thursday, November 30, 2017 9:16 PM > To: Laszlo Ersek > Cc: Ni, Ruiyu ; edk2-devel@lists.01.org > Subject: Re: [edk2] [PATCH v4 2/3] ArmVirtPkg: Fix build failure due to Tftp > library removal > > On 30 November 2017 at 12:22, Laszlo Ersek wrote: > > On 11/29/17 14:53, Laszlo Ersek wrote: > >> Ray, > >> > >> On 11/29/17 11:14, Ruiyu Ni wrote: > >>> The TFTP command was converted from a NULL class library instance to > >>> a dynamic shell command in commit 0961002352e9. > >>> > >>> Contributed-under: TianoCore Contribution Agreement 1.1 > >>> Signed-off-by: Ruiyu Ni > >>> Reviewed-by: Laszlo Ersek > >>> Cc: Ard Biesheuvel > >>> Cc: Julien Grall > >>> --- > >>> ArmVirtPkg/ArmVirt.dsc.inc | 11 +++ > >>> ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 3 ++- > >>> ArmVirtPkg/ArmVirtXen.fdf| 3 ++- > >>> 3 files changed, 11 insertions(+), 6 deletions(-) > >> > >> Can you please incorporate points (2) and (3) as well, from my v3 review? > >> > >> https://lists.01.org/pipermail/edk2-devel/2017-November/018191.html > > > > I fixed up the commit message as described above. > > > > I also test-built the ArmVirtQemu, ArmVirtQemuKernel and ArmVirtXen > > platforms, with the patch applied, for ARM and AARCH64. > > > > [ler...@redhat.com: extend commit message] > > Reviewed-by: Laszlo Ersek > > Build-tested-by: Laszlo Ersek > > > > Commit 59fcf0706bf4. > > > > Thanks for taking care of this. The build had been broken long enough ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] edk2 interface deprecation policy
Felix: I agree to define the tag to specify the deprecated definition, library and drivers. If so, user can easily know which one is not used any more. But, I think we can still keep them in edk2 project, because they have no negative impact. Thanks Liming >-Original Message- >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >Felix Poludov >Sent: Friday, December 01, 2017 6:12 AM >To: af...@apple.com >Cc: edk2-devel@lists.01.org >Subject: Re: [edk2] edk2 interface deprecation policy > >I agree. It would be beneficial to have a mailing list discussion on how to >deal >with the deprecated item. >In some cases it would make sense to tag an interface as deprecated, but >keep in the code base for a while (6 month?) before actually deleting it. > >-Original Message- >From: af...@apple.com [mailto:af...@apple.com] >Sent: Thursday, November 30, 2017 11:57 AM >To: Felix Poludov >Cc: edk2-devel@lists.01.org >Subject: Re: [edk2] edk2 interface deprecation policy > >Felix, > >I don't think we have one > >Adding new interfaces does not impact the downstream projects, but >depreciating interface can break stuff. Seems like it might at least be a good >idea to have a depreciation discussion on the mailing list. I'm open to other >suggestions > >Thanks, > >Andrew Fish > >> On Nov 30, 2017, at 6:00 AM, Felix Poludov wrote: >> >> Does edk2 have a policy regarding deprecation of interface definition >headers? >> I can see that definition of the UgaDraw protocol that was deprecated years >ago (I believe in UEFI 2.0) is still part of the code base; yet, definition of >the >SMM Communication ACPI Table that was deprecated this year in UEFI 2.6B >has already been removed. >> >> Please consider the environment before printing this email. >> >> The information contained in this message may be confidential and >proprietary to American Megatrends, Inc. This communication is intended to >be read only by the individual or entity to whom it is addressed or by their >designee. If the reader of this message is not the intended recipient, you are >on notice that any distribution of this message, in any form, is strictly >prohibited. Please promptly notify the sender by reply e-mail or by telephone >at 770-246-8600, and then delete or destroy all copies of the transmission. >> ___ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel > > >Please consider the environment before printing this email. > >The information contained in this message may be confidential and >proprietary to American Megatrends, Inc. This communication is intended to >be read only by the individual or entity to whom it is addressed or by their >designee. If the reader of this message is not the intended recipient, you are >on notice that any distribution of this message, in any form, is strictly >prohibited. Please promptly notify the sender by reply e-mail or by telephone >at 770-246-8600, and then delete or destroy all copies of the transmission. >___ >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] edk2 interface deprecation policy
I prefer to remove all deprecated items because I like clean:) But then lots of customer complains may come. So just provide my thoughts: Deprecated items can be separated into: 1. Definitions: E.g.: UgaDraw protocol, DriverConfiguration2 protocol Keep: But harm the newbie developers because they don't know which interfaces should depend on. Remove: A pure world. But easy to cause build break. Yet easy to fix by downloading the definitions from old revision. Proposal: Move all deprecated definitions to a DeprecatePkg/OldPkg. 2. Modules. E.g.: IntelFrameworkModulePkg/Universal/BdsDxe, IntelFrameworkModulePkg/Bus/Isa/* Keep: Increase feature owner's maintain effort. Cause confusing because new features won't be enabled in deprecated modules. Remove: A pure world. But easy to cause build break. Yet easy to fix by downloading the definitions from old revision. Proposal: Keep it if in IntelFramework[Module]Pkg because in future the two pkgs will be deprecated. Move it to DeprecatePkg/OldPkg if in Mde[Module]Pkg 3. Libraries: E.g.: IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode Same as #2. So how about we create another GIT repo and store the DeprecatePkg/OldPkg. Old consumers can download old stuffs from the other GIT repo. Eventually the IntelFramework[Module]Pkg can be moved to that repo as well. > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Gao, > Liming > Sent: Friday, December 1, 2017 9:51 AM > To: Felix Poludov ; af...@apple.com > Cc: edk2-devel@lists.01.org > Subject: Re: [edk2] edk2 interface deprecation policy > > Felix: > I agree to define the tag to specify the deprecated definition, library and > drivers. > If so, user can easily know which one is not used any more. But, I think we > can > still keep them in edk2 project, because they have no negative impact. > > Thanks > Liming > >-Original Message- > >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > >Felix Poludov > >Sent: Friday, December 01, 2017 6:12 AM > >To: af...@apple.com > >Cc: edk2-devel@lists.01.org > >Subject: Re: [edk2] edk2 interface deprecation policy > > > >I agree. It would be beneficial to have a mailing list discussion on > >how to deal with the deprecated item. > >In some cases it would make sense to tag an interface as deprecated, > >but keep in the code base for a while (6 month?) before actually deleting it. > > > >-Original Message- > >From: af...@apple.com [mailto:af...@apple.com] > >Sent: Thursday, November 30, 2017 11:57 AM > >To: Felix Poludov > >Cc: edk2-devel@lists.01.org > >Subject: Re: [edk2] edk2 interface deprecation policy > > > >Felix, > > > >I don't think we have one > > > >Adding new interfaces does not impact the downstream projects, but > >depreciating interface can break stuff. Seems like it might at least be > >a good idea to have a depreciation discussion on the mailing list. I'm > >open to other suggestions > > > >Thanks, > > > >Andrew Fish > > > >> On Nov 30, 2017, at 6:00 AM, Felix Poludov wrote: > >> > >> Does edk2 have a policy regarding deprecation of interface definition > >headers? > >> I can see that definition of the UgaDraw protocol that was deprecated > >> years > >ago (I believe in UEFI 2.0) is still part of the code base; yet, > >definition of the SMM Communication ACPI Table that was deprecated this > >year in UEFI 2.6B has already been removed. > >> > >> Please consider the environment before printing this email. > >> > >> The information contained in this message may be confidential and > >proprietary to American Megatrends, Inc. This communication is > >intended to be read only by the individual or entity to whom it is > >addressed or by their designee. If the reader of this message is not > >the intended recipient, you are on notice that any distribution of this > >message, in any form, is strictly prohibited. Please promptly notify > >the sender by reply e-mail or by telephone at 770-246-8600, and then delete > >or > destroy all copies of the transmission. > >> ___ > >> edk2-devel mailing list > >> edk2-devel@lists.01.org > >> https://lists.01.org/mailman/listinfo/edk2-devel > > > > > >Please consider the environment before printing this email. > > > >The information contained in this message may be confidential and > >proprietary to American Megatrends, Inc. This communication is > >intended to be read only by the individual or entity to whom it is > >addressed or by their designee. If the reader of this message is not > >the intended recipient, you are on notice that any distribution of this > >message, in any form, is strictly prohibited. Please promptly notify > >the sender by reply e-mail or by telephone at 770-246-8600, and then delete > >or > destroy all copies of the tran
Re: [edk2] edk2 interface deprecation policy
The negative impact is there will be more and more deprecated codes in the project. We'd better have an exit mechanism for them although some of them may need to be kept for compatibility case by case. Thanks, Star -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Gao, Liming Sent: Friday, December 1, 2017 9:51 AM To: Felix Poludov ; af...@apple.com Cc: edk2-devel@lists.01.org Subject: Re: [edk2] edk2 interface deprecation policy Felix: I agree to define the tag to specify the deprecated definition, library and drivers. If so, user can easily know which one is not used any more. But, I think we can still keep them in edk2 project, because they have no negative impact. Thanks Liming >-Original Message- >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >Felix Poludov >Sent: Friday, December 01, 2017 6:12 AM >To: af...@apple.com >Cc: edk2-devel@lists.01.org >Subject: Re: [edk2] edk2 interface deprecation policy > >I agree. It would be beneficial to have a mailing list discussion on >how to deal with the deprecated item. >In some cases it would make sense to tag an interface as deprecated, >but keep in the code base for a while (6 month?) before actually deleting it. > >-Original Message- >From: af...@apple.com [mailto:af...@apple.com] >Sent: Thursday, November 30, 2017 11:57 AM >To: Felix Poludov >Cc: edk2-devel@lists.01.org >Subject: Re: [edk2] edk2 interface deprecation policy > >Felix, > >I don't think we have one > >Adding new interfaces does not impact the downstream projects, but >depreciating interface can break stuff. Seems like it might at least be >a good idea to have a depreciation discussion on the mailing list. I'm >open to other suggestions > >Thanks, > >Andrew Fish > >> On Nov 30, 2017, at 6:00 AM, Felix Poludov wrote: >> >> Does edk2 have a policy regarding deprecation of interface definition >headers? >> I can see that definition of the UgaDraw protocol that was deprecated >> years >ago (I believe in UEFI 2.0) is still part of the code base; yet, >definition of the SMM Communication ACPI Table that was deprecated this >year in UEFI 2.6B has already been removed. >> >> Please consider the environment before printing this email. >> >> The information contained in this message may be confidential and >proprietary to American Megatrends, Inc. This communication is >intended to be read only by the individual or entity to whom it is >addressed or by their designee. If the reader of this message is not >the intended recipient, you are on notice that any distribution of this >message, in any form, is strictly prohibited. Please promptly notify >the sender by reply e-mail or by telephone at 770-246-8600, and then delete or >destroy all copies of the transmission. >> ___ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel > > >Please consider the environment before printing this email. > >The information contained in this message may be confidential and >proprietary to American Megatrends, Inc. This communication is >intended to be read only by the individual or entity to whom it is >addressed or by their designee. If the reader of this message is not >the intended recipient, you are on notice that any distribution of this >message, in any form, is strictly prohibited. Please promptly notify >the sender by reply e-mail or by telephone at 770-246-8600, and then delete or >destroy all copies of the transmission. >___ >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
[edk2] [platforms: PATCH 0/4] Armada 7k/8k - misc improvements pt.3
Hi, This patchset contains small fixes and improvements in the Armada platform support (re-enable tftp command, fix watchdog base, clean-up MvPhyDxe header and firmware update command's usage information). Right after these patches get merged, the file structure of the support will be reworked. The patches are available in the github: https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/misc-upstream-r20171201 I'm looking forward to your comments or remarks. Best regards, Marcin Marcin Wojtas (4): Marvell/Armada: Switch to dynamic tftp command Marvell/Armada: Fix watchdog control base Marvell/Applications: FirmwareUpdate: Fix usage information Marvell/Drivers: MvPhyDxe: Cleanup the header Platform/Marvell/Applications/FirmwareUpdate/FUpdate.uni | Bin 5146 -> 2300 bytes Platform/Marvell/Armada/Armada.dsc.inc | 3 +- Platform/Marvell/Armada/Armada70x0.fdf | 1 + Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.c | 2 +- Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.h | 152 5 files changed, 34 insertions(+), 124 deletions(-) -- 2.7.4 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [platforms: PATCH 1/4] Marvell/Armada: Switch to dynamic tftp command
After removal of the tftp library in EDK2, the tftp was disabled on Armada platform. Re-enable this functionality as a dynamic command. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- Platform/Marvell/Armada/Armada.dsc.inc | 1 + Platform/Marvell/Armada/Armada70x0.fdf | 1 + 2 files changed, 2 insertions(+) diff --git a/Platform/Marvell/Armada/Armada.dsc.inc b/Platform/Marvell/Armada/Armada.dsc.inc index 2a8a226..1b68ef3 100644 --- a/Platform/Marvell/Armada/Armada.dsc.inc +++ b/Platform/Marvell/Armada/Armada.dsc.inc @@ -524,6 +524,7 @@ gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000 } + ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf [BuildOptions.common.EDKII.DXE_CORE,BuildOptions.common.EDKII.DXE_DRIVER,BuildOptions.common.EDKII.UEFI_DRIVER,BuildOptions.common.EDKII.UEFI_APPLICATION] GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000 diff --git a/Platform/Marvell/Armada/Armada70x0.fdf b/Platform/Marvell/Armada/Armada70x0.fdf index ca92c60..65c6474 100644 --- a/Platform/Marvell/Armada/Armada70x0.fdf +++ b/Platform/Marvell/Armada/Armada70x0.fdf @@ -176,6 +176,7 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c # UEFI application (Shell Embedded Boot Loader) INF ShellPkg/Application/Shell/Shell.inf + INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf # Bds INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf -- 2.7.4 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [platforms: PATCH 2/4] Marvell/Armada: Fix watchdog control base
Proper watchdog control base is 0xf061, so fix the incorrect value. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- Platform/Marvell/Armada/Armada.dsc.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/Marvell/Armada/Armada.dsc.inc b/Platform/Marvell/Armada/Armada.dsc.inc index 1b68ef3..cf81615 100644 --- a/Platform/Marvell/Armada/Armada.dsc.inc +++ b/Platform/Marvell/Armada/Armada.dsc.inc @@ -269,7 +269,7 @@ gEmbeddedTokenSpaceGuid.PcdMetronomeTickPeriod|1000 # ARM SBSA Watchdog - gArmTokenSpaceGuid.PcdGenericWatchdogControlBase|0xF062 + gArmTokenSpaceGuid.PcdGenericWatchdogControlBase|0xF061 gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase|0xF060 gArmTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum|34 -- 2.7.4 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [platforms: PATCH 4/4] Marvell/Drivers: MvPhyDxe: Cleanup the header
This patch removes unused macros defined in MvPhyDxe.h, as well as improves the style and comments. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.c | 2 +- Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.h | 152 2 files changed, 31 insertions(+), 123 deletions(-) diff --git a/Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.c b/Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.c index e776a91..203dce2 100644 --- a/Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.c +++ b/Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.c @@ -201,7 +201,7 @@ MvPhyParseStatus ( DEBUG((DEBUG_ERROR,"MvPhyDxe: Waiting for PHY realtime link")); while (!(Data & MIIM_88E1xxx_PHYSTAT_SPDDONE)) { - if (i > PHY_AUTONEGOTIATE_TIMEOUT) { + if (i > PHY_ANEG_TIMEOUT) { DEBUG((DEBUG_ERROR," TIMEOUT !\n")); PhyDev->LinkUp = FALSE; break; diff --git a/Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.h b/Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.h index 0c3d935..3cfcb80 100644 --- a/Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.h +++ b/Platform/Marvell/Drivers/Net/Phy/MvPhyDxe/MvPhyDxe.h @@ -34,137 +34,45 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef __MV_PHY_DXE_H__ #define __MV_PHY_DXE_H__ -#define MII_BMCR 0x00 /* Basic mode control Register */ -#define MII_BMSR 0x01 /* Basic mode status Register */ -#define MII_PHYSID1 0x02 /* PHYS ID 1 */ -#define MII_PHYSID2 0x03 /* PHYS ID 2 */ -#define MII_ADVERTISE 0x04 /* Advertisement control Reg */ -#define MII_LPA0x05 /* Link partner ability Reg*/ -#define MII_EXPANSION 0x06 /* Expansion Register */ -#define MII_CTRL1000 0x09 /* 1000BASE-T control */ -#define MII_STAT1000 0x0a /* 1000BASE-T status */ -#define MII_ESTATUS 0x0f /* Extended Status */ -#define MII_DCOUNTER 0x12 /* Disconnect counter */ -#define MII_FCSCOUNTER 0x13 /* False carrier counter */ -#define MII_NWAYTEST 0x14 /* N-way auto-neg test Reg */ -#define MII_RERRCOUNTER 0x15 /* Receive error counter */ -#define MII_SREVISION 0x16 /* Silicon revision */ -#define MII_RESV1 0x17 /* Reserved... */ -#define MII_LBRERROR 0x18 /* Lpback, rx, bypass error*/ -#define MII_PHYADDR 0x19 /* PHY address */ -#define MII_RESV2 0x1a /* Reserved... */ -#define MII_TPISTATUS 0x1b /* TPI status for 10mbps */ -#define MII_NCONFIG 0x1c /* Network interface config*/ - -/* Basic mode control Register. */ -#define BMCR_RESV0x003f /* Unused... */ -#define BMCR_SPEED10000x0040 /* MSB of Speed (1000) */ -#define BMCR_CTST0x0080 /* Collision test */ -#define BMCR_FULLDPLX0x0100 /* Full duplex */ -#define BMCR_ANRESTART0x0200 /* Auto negotiation restart*/ -#define BMCR_ISOLATE0x0400 /* Disconnect DP83840 from MII */ -#define BMCR_PDOWN0x0800 /* Powerdown the DP83840 */ -#define BMCR_ANENABLE0x1000 /* Enable auto negotiation */ -#define BMCR_SPEED1000x2000 /* Select 100Mbps */ -#define BMCR_LOOPBACK0x4000 /* TXD loopback bits */ -#define BMCR_RESET0x8000 /* Reset the DP83840 */ - -/* Basic mode status Register. */ -#define BMSR_ERCAP0x0001 /* Ext-Reg capability */ -#define BMSR_JCD0x0002 /* Jabber detected */ -#define BMSR_LSTATUS0x0004 /* Link status */ -#define BMSR_ANEGCAPABLE 0x0008 /* Able to do auto-negotiation */ -#define BMSR_RFAULT0x0010 /* Remote fault detected */ -#define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ -#define BMSR_RESV0x00c0 /* Unused... */ -#define BMSR_ESTATEN0x0100 /* Extended Status in R15 */ -#define BMSR_100HALF20x0200 /* Can do 100BASE-T2 HDX */ -#define BMSR_100FULL20x0400 /* Can do 100BASE-T2 FDX */ -#define BMSR_10HALF0x0800 /* Can do 10mbps, half-duplex */ -#define BMSR_10FULL0x1000 /* Can do 10mbps, full-duplex */ -#define BMSR_100HALF0x2000 /* Can do 100mbps, half-duplex */ -#define BMSR_100FULL0x4000 /* Can do 100mbps, full-duplex */ -#define BMSR_100BASE40x8000 /* Can do 100mbps, 4k packets */ - -#define PHY_ANEG_TIMEOUT 4000 - -#define PHY_INTERFACE_MODE_RGMII 0 -#define PHY_INTERFACE_MODE_RGMII_ID 1 -#define PHY_INTERFACE_MODE_RGMII_RXID 2 -#define PHY_INTERFACE_MODE_RGMII_TXID 3 -#define PHY_INTERFACE_MODE_SGMII 4 -#define PHY_INTERFACE_MODE_RTBI 5 - -#define PHY_AUTONEGOTIATE_TIMEOUT 5000 +#define MII_BMCR 0x00 /* Basic mode control Register */ +#define MII_BMSR 0x01 /* Basic mode status Register */ + +/* BMCR */ +#define BMCR_ANRESTART
[edk2] [platforms: PATCH 3/4] Marvell/Applications: FirmwareUpdate: Fix usage information
fupdate command's usage information referred to a deprecated flag in 'examples' section. Fix this and replace damaged FUpdate.uni file with its proper text version. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- Platform/Marvell/Applications/FirmwareUpdate/FUpdate.uni | Bin 5146 -> 2300 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Platform/Marvell/Applications/FirmwareUpdate/FUpdate.uni b/Platform/Marvell/Applications/FirmwareUpdate/FUpdate.uni index 9d52e590c6d239621d226a240a3f9755210f52fe..293ae6650b92d04bcc977193ea4390e3d938a15f 100644 GIT binary patch literal 2300 zcmb_dU2mf}6n*DcTxDLS6>VqdVIMlXD-m!KO9WU9O(Ts|Q9fErfFmHS^6&T9fixNI zXrw5o7LnG z#jRycYjfd|FY~hPOA2>7#Ikrr2eqfJ%uD%J7Bsxdo))q$sp?cS!P+LM$quA;0}YDy zeQ9G;A^V||&-^=~O+%e0N6nYaAZ}h~vMD?C@aK$>`AnIK5lSxh5bj?{ov?^TdjE@*?heq;&53eB zE$7jWs_T*RK+os&;3!C}sB8QW&3liZX**GyHjH5Vw;2!g6zNKWv$PJ@y%$KW#R-x~) zSdbHVm<^Jc&(kEt#LN-cInxW46Ksh+MllnD!kG9v@;ShO9y>w8nXrimuAh25SlR>t z3c`eZzUB$SlF&9u$8FZfHVPNCX0f{hiZkavPqv20f+vB_wLmh5A}3C`oBB>nQ5r{~ zV1%+Pj|}rvt+{h{2z*-C2ktCwWbUiL^>Ak3FOjh2>a}%oB(Fl>^50Zwci!Epy&(D7P4#1aUZ90)iijHX5YK-t&SEe3Y;|? zKTpx=5x_l0p9PC;5JrNFaf-(ODdQi$%ClO(w^25{{xz;%OwtYQu%>UWS_e}#QIw4? zrNZVP&^1es2{-1(d*dp5bZ}JI{rEXj{y;mvU?SpF)mi^~d|@>@RsGj{Gk0TB-r~I( KL8dx>8u1U73A2&_ literal 5146 zcmd6r+fN%;5XR@ZQvZh)c}b%HX&?GPFOo4PK{A+nZD^!ODA<@-!Zx){5&wMK?{|h_ zFE$rNsuWrFo;^Ef=9_OW=dAzzXWQO<)1U9{J8Rm^uIeP;W*UL`#v$<1t{xvJ&2nh8x4p}x~S zzT@#yqf9nHf*h8HN%K&y#l(jgTBAee3Ytq!n=Gc+oP_Dwv$v zt=3M(e5SjCkC=0gC&J}?cGu!^_5)k^ktNNU*23OAF;~c(r>8^}9>6mfXN%-LnD7LC zKppq!fvv)45Et=(n;1bSK3?k=o#?_3;&rW=nW8t=ozGwg4Nr43&?ESeI3v#RFv*m|<#Os?D$**OxHmp0CfJI#V9+q1eOo0_oFy zQT>6ae66zR+PwPzU%sM}h|fjJvNEa|4;ABqJcVPrV^J4Tb>20|HP=LK(TTju#~NKJ z>g%c`DzIR1wL5uT6n!^v#g*6|37gk;wI9*N!5wu_?VOqX@lN2lxp(=Za?r}1XKJ}? zvXUp!bI+gP&^xf_G#wcx;S~*z4$eHQ=tAC;%UR|qs9O3q6^XWDPbg}PS|3Tnt$gv0 z6)bz7dn^kVsk05FeWdT;9uMq$uf(o*JUT?t1sC$69;2Rp&|aELF4z9IZ#_G;hI&;? zGd_Q;yN;dcZcnp&n%}jL`eh|jO+7ucHukX5eO+|bomzyKrcwd_yX0a>0TS&96iX4|?tHb>u0t9ofRPdmziv@|8x7Y@en z)2w44D?14{dJgsN-D?9MyK(qhwFbI%_BcuGYt^B&bY=C!J(`AmK1f)5$)jLpKUq9_ z@N7S^0tcCVBN}+p6!vzyW45o^W69-Og(SRy2k-LaX+t9r?5W$r(~*Ah6DCjeB@RR# zbZvbKFV{u1BTqpH=g$1&vD}p$r?3NQ-qn>m_o*CDkb=4?9B>T6b#qNUA@jfsQe<=a z&Ppu!4B64T&jr}{nB>YxVd@X@=9+wECe014YA7GbEAYKeNWMN-yk3YF-Vp(3+H)e; zJm*g$+S8a!%VfQy&z|OkUC?$@)ipKB?U#hDEvd+UGOVw=R`L`-;0JcxYscZa#rl{h z=kw%aR1(aCqpMF}%z}+Nw#Xf&yVmN*9yai=p71z$}ka5SfS4!`g~ zPI2eGBkC!76J5YPC8FVRbPeaLJc}mys`p$NiR#1#F>WX?=)NF4i6eO0w%_d4!`-WNmgJp)BI|H6lanxU!X*Is?C|3OTiM@`MNM9VdRi*zYT=!!8!1 zOTEM@v3uN3M0QhBVViR<=Re+%9UalD^R|wy=Q#*3*t3Wi=NEeM^DFBsc2?Fr7wO_0 z8qvkCh5l*T(Uo^J>SeQ(2U~ixq*_+dt>*KlbbPJ8V1-?iow2LTIuSpd*https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v3 06/11] MdeModulePkg/CpuExceptionHandlerLibNull: Add new API implementation
> v3: >Newly added This patch add implementation of new API InitializeCpuExceptionHandlersEx introduced into CpuExceptionHandlerLib on behalf of Stack Guard feature. Cc: Star Zeng Cc: Eric Dong Cc: Jiewen Yao Suggested-by: Ayellet Wolman Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- .../CpuExceptionHandlerLibNull.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c b/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c index cbe4768633..6ea71972aa 100644 --- a/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c +++ b/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c @@ -111,3 +111,37 @@ DumpCpuContext ( ) { } + +/** + Initializes all CPU exceptions entries with optional extra initializations. + + By default, this method should include all functionalities implemented by + InitializeCpuExceptionHandlers(), plus extra initialization works, if any. + This is could be done by calling InitializeCpuExceptionHandlers() directly + in this method besides the extra works. + + InitDataEx is optional and its use and content are processor arch dependent. + The typical usage of it is to convey resources which have to be reserved + elsewhere and are necessary for the extra initializations of exception. + + @param[in] VectorInfoPointer to reserved vector list. + @param[in] InitDataExPointer to data optional for extra initializations +of exception. + + @retval EFI_SUCCESS The exceptions have been successfully + initialized. + @retval EFI_INVALID_PARAMETER VectorInfo or InitDataEx contains invalid + content. + @retval EFI_UNSUPPORTED This function is not supported. + +**/ +EFI_STATUS +EFIAPI +InitializeCpuExceptionHandlersEx ( + IN EFI_VECTOR_HANDOFF_INFO*VectorInfo OPTIONAL, + IN CPU_EXCEPTION_INIT_DATA_EX *InitDataEx OPTIONAL + ) +{ + return InitializeCpuExceptionHandlers (VectorInfo); +} + -- 2.14.1.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v3 02/11] UefiCpuPkg/UefiCpuPkg.dec: Add two new PCDs for stack switch
> v3: >No change > v2: >Add two new PCDs to configure exception stack switch. Stack switch is required by Stack Guard feature. Following two PCDs are introduced to simplify the resource allocation for initializing stack switch. gUefiCpuPkgTokenSpaceGuid.PcdCpuStackSwitchExceptionList gUefiCpuPkgTokenSpaceGuid.PcdCpuKnownGoodStackSize PcdCpuStackSwitchExceptionList is used to specify which exception will have separate stack for its handler. For Stack Guard feature, #PF must be specified at least. PcdCpuKnownGoodStackSize is used to specify the size of knwon good stack for an exception handler. Cpu driver or other drivers should use this PCD to reserve new stack memory for exceptions specified by above PCD. Cc: Eric Dong Cc: Laszlo Ersek Cc: Jiewen Yao Suggested-by: Ayellet Wolman Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- UefiCpuPkg/UefiCpuPkg.dec | 12 1 file changed, 12 insertions(+) diff --git a/UefiCpuPkg/UefiCpuPkg.dec b/UefiCpuPkg/UefiCpuPkg.dec index d2965ba14c..83eb6eed40 100644 --- a/UefiCpuPkg/UefiCpuPkg.dec +++ b/UefiCpuPkg/UefiCpuPkg.dec @@ -137,6 +137,18 @@ # @Prompt Lock SMM Feature Control MSR. gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmFeatureControlMsrLock|TRUE|BOOLEAN|0x3213210B +[PcdsFixedAtBuild] + ## List of exception vectors which need switching stack. + # This PCD will only take into effect if PcdCpuStackGuard is enabled. + # By default exception #DD(8), #PF(14) are supported. + # @Prompt Specify exception vectors which need switching stack. + gUefiCpuPkgTokenSpaceGuid.PcdCpuStackSwitchExceptionList|{0x08, 0x0E}|VOID*|0x30002000 + + ## Size of good stack for an exception. + # This PCD will only take into effect if PcdCpuStackGuard is enabled. + # @Prompt Specify size of good stack of exception which need switching stack. + gUefiCpuPkgTokenSpaceGuid.PcdCpuKnownGoodStackSize|2048|UINT32|0x30002001 + [PcdsFixedAtBuild, PcdsPatchableInModule] ## This value is the CPU Local APIC base address, which aligns the address on a 4-KByte boundary. # @Prompt Configure base address of CPU Local APIC -- 2.14.1.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v3 00/11] Implement stack guard feature
> v3: > a. Change new API InitializeCpuExceptionStackSwitchHandlers() to > InitializeCpuExceptionHandlersEx(). Related code are updated accordingly. > b. Move EXCEPTION_STACK_SWITCH_DATA to CpuExceptionHandlerLib.h > and change the name to CPU_EXCEPTION_INIT_DATA_EX for the sake > of the API name change. > c. Add more general macros in BaseLib.h. > d. Add dummy implementation of InitializeCpuExceptionHandlersEx for > SEC, PEI and SMM but implement a full version for DXE. > e. Add dummy InitializeCpuExceptionHandlersEx for ARM's > CpuExceptionHandlerLib > and NULL version of CpuExceptionHandlerLib > f. Call InitializeCpuExceptionHandlersEx() in DxeMain instead of > InitializeCpuExceptionHandlers(). > v2: > a. Introduce and implement new API > InitializeCpuExceptionStackSwitchHandlers(). > b. Add stack switch related general definitions of IA32 in BaseLib.h. > c. Add two new PCDs to configure exception vector list and stack size. > d. Add code to save/restore GDTR, IDTR and TR for AP. > e. Refactor exception handler code for stack switch. > f. Add code to setup stack switch for AP besides BSP. Stack guard feature makes use of paging mechanism to monitor if there's a stack overflow occurred during boot. A new PCD PcdCpuStackGuard is added to enable/disable this feature. PCD PcdCpuStackSwitchExceptionList and PcdCpuKnownGoodStackSize are introduced to configure the required exceptions and stack size. If this feature is enabled, DxeIpl will setup page tables and set page where the stack bottom is at to be NON-PRESENT. If stack overflow occurs, Page Fault exception will be triggered. In order to make sure exception handler works normally even when the stack is corrupted, stack switching is implemented in exception library. Due to the mechanism behind Stack Guard, this feature is only avaiable for UEFI drivers (memory avaiable). That also means it doesn't support NT32 emulated platform (paging not supported). Jian J Wang (11): MdeModulePkg/metafile: Add PCD PcdCpuStackGuard UefiCpuPkg/UefiCpuPkg.dec: Add two new PCDs for stack switch MdeModulePkg/CpuExceptionHandlerLib.h: Add a new API InitializeCpuExceptionHandlersEx MdePkg/BaseLib: Add stack switch related definitions for IA32 UefiCpuPkg/CpuExceptionHandlerLib: Add stack switch support MdeModulePkg/CpuExceptionHandlerLibNull: Add new API implementation ArmPkg/ArmExceptionLib: Add implementation of new API UefiCpuPkg/MpLib: Add GDTR, IDTR and TR in saved AP data UefiCpuPkg/CpuDxe: Initialize stack switch for MP MdeModulePkg/Core/Dxe: Call new API InitializeCpuExceptionHandlersEx instead MdeModulePkg/DxeIpl: Enable paging for Stack Guard ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c | 33 ++ MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c| 2 +- MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf| 5 +- MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c| 4 + MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c | 1 + MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c | 51 ++- .../Include/Library/CpuExceptionHandlerLib.h | 78 .../CpuExceptionHandlerLibNull.c | 34 ++ MdeModulePkg/MdeModulePkg.dec | 7 + MdeModulePkg/MdeModulePkg.uni | 7 + MdePkg/Include/Library/BaseLib.h | 117 ++ MdePkg/Library/BaseLib/BaseLib.inf | 3 + MdePkg/Library/BaseLib/Ia32/WriteTr.nasm | 36 ++ MdePkg/Library/BaseLib/X64/WriteTr.nasm| 37 ++ UefiCpuPkg/CpuDxe/CpuDxe.inf | 3 + UefiCpuPkg/CpuDxe/CpuMp.c | 177 + .../CpuExceptionHandlerLib/CpuExceptionCommon.h| 39 ++ .../DxeCpuExceptionHandlerLib.inf | 6 + .../Library/CpuExceptionHandlerLib/DxeException.c | 79 .../Ia32/ArchExceptionHandler.c| 167 + .../Ia32/ArchInterruptDefs.h | 8 + .../Ia32/ExceptionTssEntryAsm.nasm | 398 + .../CpuExceptionHandlerLib/PeiCpuException.c | 34 +- .../PeiCpuExceptionHandlerLib.inf | 1 + .../CpuExceptionHandlerLib/SecPeiCpuException.c| 34 +- .../SecPeiCpuExceptionHandlerLib.inf | 1 + .../SmmCpuExceptionHandlerLib.inf | 1 + .../Library/CpuExceptionHandlerLib/SmmException.c | 34 +- .../X64/ArchExceptionHandler.c | 134 +++ .../CpuExceptionHandlerLib/X64/ArchInterruptDefs.h | 3 + UefiCpuPkg/Library/MpInitLib/MpLib.c | 17 + UefiCpuPkg/Library/MpInitLib/MpLib.h | 3 + UefiCpuPkg/UefiCpuPkg.dec | 12 + 33 files changed, 1547 insertions(+), 19 deletions(-) create mode 100644 MdePkg/Library/BaseLib/Ia32/WriteTr.nasm create mode 100644 MdePkg/Library/BaseLib/X64/WriteTr.nasm create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/Exce