Re: [edk2] [Patch V2 0/9] Add DisplayUpdateProgressLib for capsules
Reviewed-by: Sean Brogan-Original Message- From: Kinney, Michael D Sent: Wednesday, April 11, 2018 5:48 PM To: edk2-devel@lists.01.org Cc: Sean Brogan ; Zeng, Star ; Dong, Eric ; Yao, Jiewen ; Wei, David ; Guo, Mang ; Steele, Kelly ; Kinney, Michael D Subject: [Patch V2 0/9] Add DisplayUpdateProgressLib for capsules https://bugzilla.tianocore.org/show_bug.cgi?id=801 Based on content from: https://github.com/Microsoft/MS_UEFI/blob/share/MsCapsuleSupport/MsCapsuleUpdatePkg/Include/Library/DisplayUpdateProgressLib.h https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport/MsCapsuleUpdatePkg/Library/DisplayUpdateProgressGraphicsLib https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport/MsCapsuleUpdatePkg/Library/DisplayUpdateProgressTextLib Updates for V2 == * Change DisplayUpdateProgressGraphicsLib to DisplayUpdateProgressLibGraphics * Change DisplayUpdateProgressTextLib to DisplayUpdateProgressLibText * Clarify that color in Firmware Management Progress Protocol is the foreground color * Add missing parameters to PerformFlashWriteWithProgress() function header. * Update PerformFlashWriteWithProgress() function header describing the use of the start and end percentage values. * Update QuarkPlatformPkg PerformFlashWriteWithProgress() to call Progress() for the end precentage. * Update Vlv2Tbl2DevicePkg PerformFlashWriteWithProgress() to call Progress() for the end precentage. Add DisplayUpdateProgressLib class along implementations for both graphical (Graphics Output Protocol based) and text (Simple Text Output Protocol based) consoles. Also add the EDK II Firmware Management Progress Protocol that is an optional protocol that provides the progress bar color and a watchdog timeout value thaty can be used when a firmware image is updated in a firmware device. * Add progress support to DxeCapsuleLibFmp * Add progress support to SystemFirmwareUpdateDxe * Add progress support to PlatformFlashAccessLib class and instances. * Reduce Print() calls during a firmware update. Cc: Sean Brogan Cc: Star Zeng Cc: Eric Dong Cc: Jiewen Yao Cc: David Wei Cc: Mang Guo Cc: Kelly Steele Signed-off-by: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Kinney, Michael D (3): QuarkPlatformPkg: Add DisplayUpdateProgressLib mapping MdeModulePkg/DxeCapsuleLibFmp: Add progress bar support SignedCapsulePkg/SystemFirmwareUpdateDxe: Use progress API Michael D Kinney (6): MdeModulePkg: Add DisplayUpdateProgressLib class MdeModulePkg: Add DisplayUpdateProgressLib instances Vlv2Tbl2DevicePkg: Add DisplayUpdateProgressLib mapping SignedCapsulePkg/PlatformFlashAccessLib: Add progress API Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add progress API QuarkPlatformPkg/PlatformFlashAccessLib: Add progress API .../Include/Library/DisplayUpdateProgressLib.h | 65 +++ .../Include/Protocol/FirmwareManagementProgress.h | 51 +++ .../DisplayUpdateProgressLibGraphics.c | 475 + .../DisplayUpdateProgressLibGraphics.inf | 60 +++ .../DisplayUpdateProgressLibGraphics.uni | 18 + .../DisplayUpdateProgressLibText.c | 174 .../DisplayUpdateProgressLibText.inf | 53 +++ .../DisplayUpdateProgressLibText.uni | 18 + .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 47 +- .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf | 8 +- .../DxeCapsuleLibFmp/DxeCapsuleProcessLib.c| 84 +++- .../DxeCapsuleLibFmp/DxeCapsuleProcessLibNull.c| 21 +- .../DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf | 7 +- MdeModulePkg/MdeModulePkg.dec | 11 + MdeModulePkg/MdeModulePkg.dsc | 3 + .../PlatformFlashAccessLibDxe.c| 78 +++- QuarkPlatformPkg/Quark.dsc | 1 + .../Include/Library/PlatformFlashAccessLib.h | 49 ++- .../PlatformFlashAccessLibNull.c | 70 ++- .../SystemFirmwareUpdate/SystemFirmwareUpdateDxe.c | 90 +++- .../PlatformFlashAccessLib.c | 102 +++-- .../PlatformFlashAccessLib.inf | 3 +- Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc| 1 + Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 1 + Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 1 + 25 files changed, 1387 insertions(+), 104 deletions(-) create mode 100644 MdeModulePkg/Include/Library/DisplayUpdateProgressLib.h create mode 100644
Re: [edk2] [RFC v2 0/4] Add FmpDevicePkg
I had a minor comment at https://lists.01.org/pipermail/edk2-devel/2018-April/023570.html to PcdFmpDeviceBuildTimeLowestSupportedVersion before. Thanks, Star -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yao, Jiewen Sent: Friday, April 20, 2018 12:18 PM To: Kinney, Michael D; edk2-devel@lists.01.org Subject: Re: [edk2] [RFC v2 0/4] Add FmpDevicePkg Thanks Mike. I am a little confused about naming: CheckLowestSupportedVersion() and LockFmpDeviceAtLockEventGuid(). At the first glace, I think those 2 API will *do the check* for LSV, or *do the lock* FMP. But actually, it returns a state to indicate *if* the caller need check LSV and *if* the caller need lock FMP. Can we rename them to be NeedCheckLowestSupportedVersion() and NeedLockFmpDeviceAtLockEventGuid() ? Other update seems good. Reviewed-by: jiewen@intel.com Thank you Yao Jiewen > -Original Message- > From: Kinney, Michael D > Sent: Wednesday, April 18, 2018 5:05 AM > To: edk2-devel@lists.01.org > Cc: Sean Brogan ; Yao, Jiewen > ; Kinney, Michael D > Subject: [RFC v2 0/4] Add FmpDevicePkg > > https://bugzilla.tianocore.org/show_bug.cgi?id=922 > > Changes in V2 > = > * FmpDevicePkg DEC file > + Change PcdFmpDeviceSystemResetRequired from FeatureFlag > to FixedAtBuild > + Add PcdFmpDeviceTestKeySha256Digest for test key detection. > Set to {0} to disable test key detection. > * FmpDevicePkg DSC file > + Fix ARM and AARCH64 build issues > + Update DisplayUpdateProgressLib mappings to match patches in > Bug_801_DisplayUpdateProgressLib_V2 > * FmpDeviceLib Class and Instance > + Update FmpDeviceGetSize() to return EFI_STATUS > + Update FmpDeviceGetAttributes() to return EFI_STATUS > + Update FmpDeviceGetVersionString() to return EFI_STATUS > * FmpDxe > + Set depex to Variable Arch Write Protocol and Variable Lock Protocol > + Break out test key detection in FmpDxe into DetectTestKey.c > + Change LockAllVars() to LockAllFmpVariables() > + Update LockAllFmpVariables() to lock each of the UEFI variables used. > + Always lock UEFI variables when PcdFmpDeviceLockEventGuid is signaled > + Remove ComputeVersionName(). FmpDeviceLib must provide version > string > > Based on content from the following branch: > > https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport/MsCap > su > leUpdatePkg > > Branch for review: > > https://github.com/mdkinney/edk2/tree/Bug_922_FmpDevicePkg_V2 > > This package provides an implementation of a Firmware Management > Protocol instance that supports the update of firmware storage devices > using UEFI Capsules. The behavior of the Firmware Management Protocol > instance is customized using libraries and PCDs. > > Cc: Sean Brogan > Cc: Jiewen Yao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Michael D Kinney > > Kinney, Michael D (4): > FmpDevicePkg: Add package, library classes, and PCDs > FmpDevicePkg: Add library instances > FmpDevicePkg: Add FmpDxe module > FmpDevicePkg: Add DSC file to build all package components > > FmpDevicePkg/FmpDevicePkg.dec | 132 ++ > FmpDevicePkg/FmpDevicePkg.dsc | 134 ++ > FmpDevicePkg/FmpDevicePkg.uni | 80 ++ > FmpDevicePkg/FmpDevicePkgExtra.uni | 18 + > FmpDevicePkg/FmpDxe/DetectTestKey.c| 166 +++ > FmpDevicePkg/FmpDxe/FmpDxe.c | 1451 > > FmpDevicePkg/FmpDxe/FmpDxe.inf | 93 ++ > FmpDevicePkg/FmpDxe/FmpDxe.uni | 20 + > FmpDevicePkg/FmpDxe/FmpDxeExtra.uni| 18 + > FmpDevicePkg/FmpDxe/FmpDxeLib.inf | 90 ++ > FmpDevicePkg/FmpDxe/VariableSupport.c | 461 +++ > FmpDevicePkg/FmpDxe/VariableSupport.h | 180 +++ > .../Include/Library/CapsuleUpdatePolicyLib.h | 120 ++ > FmpDevicePkg/Include/Library/FmpDeviceLib.h| 405 ++ > FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h | 100 ++ > .../CapsuleUpdatePolicyLibNull.c | 136 ++ > .../CapsuleUpdatePolicyLibNull.inf | 45 + > .../CapsuleUpdatePolicyLibNull.uni | 17 + > .../Library/FmpDeviceLibNull/FmpDeviceLib.c| 427 ++ > .../Library/FmpDeviceLibNull/FmpDeviceLibNull.inf | 48 + > .../Library/FmpDeviceLibNull/FmpDeviceLibNull.uni | 18 + > .../FmpPayloadHeaderLibV1/FmpPayloadHeaderLib.c| 188 +++ > .../FmpPayloadHeaderLibV1.inf | 48 + > .../FmpPayloadHeaderLibV1.uni | 21 + > 24 files changed, 4416 insertions(+) > create mode 100644 FmpDevicePkg/FmpDevicePkg.dec create mode
Re: [edk2] [Patch V2 0/9] Add DisplayUpdateProgressLib for capsules
I also had another comment to the protocol at https://lists.01.org/pipermail/edk2-devel/2018-April/023720.html before. Thanks, Star -Original Message- From: Yao, Jiewen Sent: Friday, April 20, 2018 12:23 PM To: Kinney, Michael D; edk2-devel@lists.01.org Cc: Sean Brogan ; Zeng, Star ; Dong, Eric ; Wei, David ; Guo, Mang ; Steele, Kelly Subject: RE: [Patch V2 0/9] Add DisplayUpdateProgressLib for capsules Thanks Mike. I still think we should add a Version flag for EDKII_FIRMWARE_MANAGEMENT_PROGRESS_PROTOCOL for future extension, as we discussed in V1. Other update seems good to me. Reviewed-by: jiewen@intel.com Thank you Yao Jiewen > -Original Message- > From: Kinney, Michael D > Sent: Thursday, April 12, 2018 8:48 AM > To: edk2-devel@lists.01.org > Cc: Sean Brogan ; Zeng, Star > ; Dong, Eric ; Yao, Jiewen > ; Wei, David ; Guo, Mang > ; Steele, Kelly ; Kinney, > Michael D > Subject: [Patch V2 0/9] Add DisplayUpdateProgressLib for capsules > > https://bugzilla.tianocore.org/show_bug.cgi?id=801 > > Based on content from: > > https://github.com/Microsoft/MS_UEFI/blob/share/MsCapsuleSupport/MsCap > s uleUpdatePkg/Include/Library/DisplayUpdateProgressLib.h > https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport/MsCap > su leUpdatePkg/Library/DisplayUpdateProgressGraphicsLib > https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport/MsCap > su leUpdatePkg/Library/DisplayUpdateProgressTextLib > > Updates for V2 > == > * Change DisplayUpdateProgressGraphicsLib to > DisplayUpdateProgressLibGraphics > * Change DisplayUpdateProgressTextLib to DisplayUpdateProgressLibText > * Clarify that color in Firmware Management Progress Protocol is the > foreground color > * Add missing parameters to PerformFlashWriteWithProgress() function header. > * Update PerformFlashWriteWithProgress() function header describing > the use of > the start and end percentage values. > * Update QuarkPlatformPkg PerformFlashWriteWithProgress() to call > Progress() for > the end precentage. > * Update Vlv2Tbl2DevicePkg PerformFlashWriteWithProgress() to call Progress() > for the end precentage. > > Add DisplayUpdateProgressLib class along implementations for both > graphical (Graphics Output Protocol based) and text (Simple Text > Output Protocol based) consoles. Also add the EDK II Firmware > Management Progress Protocol that is an optional protocol that > provides the progress bar color and a watchdog timeout value thaty can > be used when a firmware image is updated in a firmware device. > > * Add progress support to DxeCapsuleLibFmp > * Add progress support to SystemFirmwareUpdateDxe > * Add progress support to PlatformFlashAccessLib class and instances. > * Reduce Print() calls during a firmware update. > > Cc: Sean Brogan > Cc: Star Zeng > Cc: Eric Dong > Cc: Jiewen Yao > Cc: David Wei > Cc: Mang Guo > Cc: Kelly Steele > > Signed-off-by: Michael D Kinney > Contributed-under: TianoCore Contribution Agreement 1.1 > > Kinney, Michael D (3): > QuarkPlatformPkg: Add DisplayUpdateProgressLib mapping > MdeModulePkg/DxeCapsuleLibFmp: Add progress bar support > SignedCapsulePkg/SystemFirmwareUpdateDxe: Use progress API > > Michael D Kinney (6): > MdeModulePkg: Add DisplayUpdateProgressLib class > MdeModulePkg: Add DisplayUpdateProgressLib instances > Vlv2Tbl2DevicePkg: Add DisplayUpdateProgressLib mapping > SignedCapsulePkg/PlatformFlashAccessLib: Add progress API > Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add progress API > QuarkPlatformPkg/PlatformFlashAccessLib: Add progress API > > .../Include/Library/DisplayUpdateProgressLib.h | 65 +++ > .../Include/Protocol/FirmwareManagementProgress.h | 51 +++ > .../DisplayUpdateProgressLibGraphics.c | 475 > + > .../DisplayUpdateProgressLibGraphics.inf | 60 +++ > .../DisplayUpdateProgressLibGraphics.uni | 18 + > .../DisplayUpdateProgressLibText.c | 174 > .../DisplayUpdateProgressLibText.inf | 53 +++ > .../DisplayUpdateProgressLibText.uni | 18 + > .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 47 +- > .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf | 8 +- > .../DxeCapsuleLibFmp/DxeCapsuleProcessLib.c| 84 +++- > .../DxeCapsuleLibFmp/DxeCapsuleProcessLibNull.c| 21 +- > .../DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf
Re: [edk2] [Patch V2 0/9] Add DisplayUpdateProgressLib for capsules
Thanks Mike. I still think we should add a Version flag for EDKII_FIRMWARE_MANAGEMENT_PROGRESS_PROTOCOL for future extension, as we discussed in V1. Other update seems good to me. Reviewed-by: jiewen@intel.com Thank you Yao Jiewen > -Original Message- > From: Kinney, Michael D > Sent: Thursday, April 12, 2018 8:48 AM > To: edk2-devel@lists.01.org > Cc: Sean Brogan; Zeng, Star > ; Dong, Eric ; Yao, Jiewen > ; Wei, David ; Guo, Mang > ; Steele, Kelly ; Kinney, Michael > D > Subject: [Patch V2 0/9] Add DisplayUpdateProgressLib for capsules > > https://bugzilla.tianocore.org/show_bug.cgi?id=801 > > Based on content from: > > https://github.com/Microsoft/MS_UEFI/blob/share/MsCapsuleSupport/MsCaps > uleUpdatePkg/Include/Library/DisplayUpdateProgressLib.h > https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport/MsCapsu > leUpdatePkg/Library/DisplayUpdateProgressGraphicsLib > https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport/MsCapsu > leUpdatePkg/Library/DisplayUpdateProgressTextLib > > Updates for V2 > == > * Change DisplayUpdateProgressGraphicsLib to > DisplayUpdateProgressLibGraphics > * Change DisplayUpdateProgressTextLib to DisplayUpdateProgressLibText > * Clarify that color in Firmware Management Progress Protocol is the > foreground color > * Add missing parameters to PerformFlashWriteWithProgress() function header. > * Update PerformFlashWriteWithProgress() function header describing the use > of > the start and end percentage values. > * Update QuarkPlatformPkg PerformFlashWriteWithProgress() to call Progress() > for > the end precentage. > * Update Vlv2Tbl2DevicePkg PerformFlashWriteWithProgress() to call Progress() > for the end precentage. > > Add DisplayUpdateProgressLib class along implementations for both graphical > (Graphics Output Protocol based) and text (Simple Text Output Protocol based) > consoles. Also add the EDK II Firmware Management Progress Protocol that is > an > optional protocol that provides the progress bar color and a watchdog timeout > value thaty can be used when a firmware image is updated in a firmware device. > > * Add progress support to DxeCapsuleLibFmp > * Add progress support to SystemFirmwareUpdateDxe > * Add progress support to PlatformFlashAccessLib class and instances. > * Reduce Print() calls during a firmware update. > > Cc: Sean Brogan > Cc: Star Zeng > Cc: Eric Dong > Cc: Jiewen Yao > Cc: David Wei > Cc: Mang Guo > Cc: Kelly Steele > > Signed-off-by: Michael D Kinney > Contributed-under: TianoCore Contribution Agreement 1.1 > > Kinney, Michael D (3): > QuarkPlatformPkg: Add DisplayUpdateProgressLib mapping > MdeModulePkg/DxeCapsuleLibFmp: Add progress bar support > SignedCapsulePkg/SystemFirmwareUpdateDxe: Use progress API > > Michael D Kinney (6): > MdeModulePkg: Add DisplayUpdateProgressLib class > MdeModulePkg: Add DisplayUpdateProgressLib instances > Vlv2Tbl2DevicePkg: Add DisplayUpdateProgressLib mapping > SignedCapsulePkg/PlatformFlashAccessLib: Add progress API > Vlv2TbltDevicePkg/PlatformFlashAccessLib: Add progress API > QuarkPlatformPkg/PlatformFlashAccessLib: Add progress API > > .../Include/Library/DisplayUpdateProgressLib.h | 65 +++ > .../Include/Protocol/FirmwareManagementProgress.h | 51 +++ > .../DisplayUpdateProgressLibGraphics.c | 475 > + > .../DisplayUpdateProgressLibGraphics.inf | 60 +++ > .../DisplayUpdateProgressLibGraphics.uni | 18 + > .../DisplayUpdateProgressLibText.c | 174 > .../DisplayUpdateProgressLibText.inf | 53 +++ > .../DisplayUpdateProgressLibText.uni | 18 + > .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 47 +- > .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf | 8 +- > .../DxeCapsuleLibFmp/DxeCapsuleProcessLib.c| 84 +++- > .../DxeCapsuleLibFmp/DxeCapsuleProcessLibNull.c| 21 +- > .../DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf | 7 +- > MdeModulePkg/MdeModulePkg.dec | 11 + > MdeModulePkg/MdeModulePkg.dsc | 3 + > .../PlatformFlashAccessLibDxe.c| 78 +++- > QuarkPlatformPkg/Quark.dsc | 1 + > .../Include/Library/PlatformFlashAccessLib.h | 49 ++- > .../PlatformFlashAccessLibNull.c | 70 ++- > .../SystemFirmwareUpdate/SystemFirmwareUpdateDxe.c | 90 +++- > .../PlatformFlashAccessLib.c | 102 +++-- > .../PlatformFlashAccessLib.inf | 3 +- >
Re: [edk2] [RFC v2 0/4] Add FmpDevicePkg
Thanks Mike. I am a little confused about naming: CheckLowestSupportedVersion() and LockFmpDeviceAtLockEventGuid(). At the first glace, I think those 2 API will *do the check* for LSV, or *do the lock* FMP. But actually, it returns a state to indicate *if* the caller need check LSV and *if* the caller need lock FMP. Can we rename them to be NeedCheckLowestSupportedVersion() and NeedLockFmpDeviceAtLockEventGuid() ? Other update seems good. Reviewed-by: jiewen@intel.com Thank you Yao Jiewen > -Original Message- > From: Kinney, Michael D > Sent: Wednesday, April 18, 2018 5:05 AM > To: edk2-devel@lists.01.org > Cc: Sean Brogan; Yao, Jiewen > ; Kinney, Michael D > Subject: [RFC v2 0/4] Add FmpDevicePkg > > https://bugzilla.tianocore.org/show_bug.cgi?id=922 > > Changes in V2 > = > * FmpDevicePkg DEC file > + Change PcdFmpDeviceSystemResetRequired from FeatureFlag > to FixedAtBuild > + Add PcdFmpDeviceTestKeySha256Digest for test key detection. > Set to {0} to disable test key detection. > * FmpDevicePkg DSC file > + Fix ARM and AARCH64 build issues > + Update DisplayUpdateProgressLib mappings to match patches in > Bug_801_DisplayUpdateProgressLib_V2 > * FmpDeviceLib Class and Instance > + Update FmpDeviceGetSize() to return EFI_STATUS > + Update FmpDeviceGetAttributes() to return EFI_STATUS > + Update FmpDeviceGetVersionString() to return EFI_STATUS > * FmpDxe > + Set depex to Variable Arch Write Protocol and Variable Lock Protocol > + Break out test key detection in FmpDxe into DetectTestKey.c > + Change LockAllVars() to LockAllFmpVariables() > + Update LockAllFmpVariables() to lock each of the UEFI variables used. > + Always lock UEFI variables when PcdFmpDeviceLockEventGuid is signaled > + Remove ComputeVersionName(). FmpDeviceLib must provide version > string > > Based on content from the following branch: > > https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport/MsCapsu > leUpdatePkg > > Branch for review: > > https://github.com/mdkinney/edk2/tree/Bug_922_FmpDevicePkg_V2 > > This package provides an implementation of a Firmware Management Protocol > instance that supports the update of firmware storage devices using UEFI > Capsules. The behavior of the Firmware Management Protocol instance is > customized using libraries and PCDs. > > Cc: Sean Brogan > Cc: Jiewen Yao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Michael D Kinney > > Kinney, Michael D (4): > FmpDevicePkg: Add package, library classes, and PCDs > FmpDevicePkg: Add library instances > FmpDevicePkg: Add FmpDxe module > FmpDevicePkg: Add DSC file to build all package components > > FmpDevicePkg/FmpDevicePkg.dec | 132 ++ > FmpDevicePkg/FmpDevicePkg.dsc | 134 ++ > FmpDevicePkg/FmpDevicePkg.uni | 80 ++ > FmpDevicePkg/FmpDevicePkgExtra.uni | 18 + > FmpDevicePkg/FmpDxe/DetectTestKey.c| 166 +++ > FmpDevicePkg/FmpDxe/FmpDxe.c | 1451 > > FmpDevicePkg/FmpDxe/FmpDxe.inf | 93 ++ > FmpDevicePkg/FmpDxe/FmpDxe.uni | 20 + > FmpDevicePkg/FmpDxe/FmpDxeExtra.uni| 18 + > FmpDevicePkg/FmpDxe/FmpDxeLib.inf | 90 ++ > FmpDevicePkg/FmpDxe/VariableSupport.c | 461 +++ > FmpDevicePkg/FmpDxe/VariableSupport.h | 180 +++ > .../Include/Library/CapsuleUpdatePolicyLib.h | 120 ++ > FmpDevicePkg/Include/Library/FmpDeviceLib.h| 405 ++ > FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h | 100 ++ > .../CapsuleUpdatePolicyLibNull.c | 136 ++ > .../CapsuleUpdatePolicyLibNull.inf | 45 + > .../CapsuleUpdatePolicyLibNull.uni | 17 + > .../Library/FmpDeviceLibNull/FmpDeviceLib.c| 427 ++ > .../Library/FmpDeviceLibNull/FmpDeviceLibNull.inf | 48 + > .../Library/FmpDeviceLibNull/FmpDeviceLibNull.uni | 18 + > .../FmpPayloadHeaderLibV1/FmpPayloadHeaderLib.c| 188 +++ > .../FmpPayloadHeaderLibV1.inf | 48 + > .../FmpPayloadHeaderLibV1.uni | 21 + > 24 files changed, 4416 insertions(+) > create mode 100644 FmpDevicePkg/FmpDevicePkg.dec > create mode 100644 FmpDevicePkg/FmpDevicePkg.dsc > create mode 100644 FmpDevicePkg/FmpDevicePkg.uni > create mode 100644 FmpDevicePkg/FmpDevicePkgExtra.uni > create mode 100644 FmpDevicePkg/FmpDxe/DetectTestKey.c > create mode 100644 FmpDevicePkg/FmpDxe/FmpDxe.c > create mode 100644 FmpDevicePkg/FmpDxe/FmpDxe.inf > create mode 100644 FmpDevicePkg/FmpDxe/FmpDxe.uni > create mode 100644 FmpDevicePkg/FmpDxe/FmpDxeExtra.uni > create mode 100644
Re: [edk2] [PATCH edk2-platforms 19/39] Silicon/NXP:Add support for PCF2129 Real Time Clock Library
> -Original Message- > From: Leif Lindholm [mailto:leif.lindh...@linaro.org] > Sent: Thursday, April 19, 2018 7:17 PM > To: Meenakshi Aggarwal> Cc: ard.biesheu...@linaro.org; edk2-devel@lists.01.org; Udit Kumar > ; Varun Sethi ; Vabhav Sharma > > Subject: Re: [PATCH edk2-platforms 19/39] Silicon/NXP:Add support for > PCF2129 Real Time Clock Library > > On Thu, Apr 19, 2018 at 12:33:50PM +, Meenakshi Aggarwal wrote: > > > > +EFI_STATUS > > > > +EFIAPI > > > > +LibSetTime ( > > > > + IN EFI_TIME*Time > > > > + ) > > > > +{ > > > > + UINT8 Buffer[8]; > > > > + UINT8 Index; > > > > + EFI_STATUS Status; > > > > + RTC_I2C_REQUEST Req; > > > > + UINT8 RtcRegAddr; > > > > + > > > > + Index = 0; > > > > + Status = EFI_SUCCESS; > > > > + RtcRegAddr = PCF2129_CTRL1_REG_ADDR; > > > > + > > > > + if (mI2cMaster == NULL) { > > > > +return EFI_DEVICE_ERROR; > > > > + } > > > > + > > > > + // start register address > > > > + Buffer[Index++] = PCF2129_SEC_REG_ADDR; > > > > + > > > > + // hours, minutes and seconds > > > > + Buffer[Index++] = DecimalToBcd8 (Time->Second); > > > > + Buffer[Index++] = DecimalToBcd8 (Time->Minute); > > > > + Buffer[Index++] = DecimalToBcd8 (Time->Hour); > > > > + Buffer[Index++] = DecimalToBcd8 (Time->Day); > > > > + Buffer[Index++] = EfiTimeToWday (Time) & 0x07; > > > > > > Why mask at the call site? > > > > > In GetTime function, data is been read from RTC device so we need to > > mask the unnecessary bits > > [as described in RTC registers] while > > In SetTime, we are receiving the appropriate buffer so no need to > > mask the data. > > But EfiTimeToWday returns an integer in the range 0-6: > return (EpochDays + 4) % 7; > > Anding the result of that with 0x7 has no effect. > I will check this. > / > Leif ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] Nt32Pkg/NtGopInput: ReadKeyStrokeEx always return key state
Reviewed-by: Star ZengThanks, Star -Original Message- From: Ni, Ruiyu Sent: Thursday, April 19, 2018 6:42 PM To: edk2-devel@lists.01.org Cc: Zeng, Star Subject: [PATCH] Nt32Pkg/NtGopInput: ReadKeyStrokeEx always return key state Today's implementation only return key state when there is key. But when user doesn't press any key, the key state cannot be returned. The patch changes the ReadKeyStrokeEx() to always return the key state even there is no key pressed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Star Zeng --- Nt32Pkg/WinNtGopDxe/WinNtGopInput.c | 79 ++--- 1 file changed, 48 insertions(+), 31 deletions(-) diff --git a/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c b/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c index 6a0f4b7892..b19dfdc2ec 100644 --- a/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c +++ b/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -270,73 +270,87 @@ WinNtGopSimpleTextInTimerHandler ( } /** - TODO: Add function description - - @param Private TODO: add argument description - @param Key TODO: add argument description - - @retval EFI_NOT_READY TODO: Add description for return value - @retval EFI_SUCCESS TODO: Add description for return value + Initialize the key state. + @param Private The GOP_PRIVATE_DATA instance. + @param KeyState A pointer to receive the key state information. **/ -EFI_STATUS -GopPrivateAddKey ( +VOID +InitializeKeyState ( IN GOP_PRIVATE_DATA*Private, - IN EFI_INPUT_KEY Key + IN EFI_KEY_STATE *KeyState ) { - EFI_KEY_DATAKeyData; - - KeyData.Key = Key; - - KeyData.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID; - KeyData.KeyState.KeyToggleState = EFI_TOGGLE_STATE_VALID; + KeyState->KeyShiftState = EFI_SHIFT_STATE_VALID; + KeyState->KeyToggleState = EFI_TOGGLE_STATE_VALID; // // Record Key shift state and toggle state // if (Private->LeftCtrl) { -KeyData.KeyState.KeyShiftState |= EFI_LEFT_CONTROL_PRESSED; +KeyState->KeyShiftState |= EFI_LEFT_CONTROL_PRESSED; } if (Private->RightCtrl) { -KeyData.KeyState.KeyShiftState |= EFI_RIGHT_CONTROL_PRESSED; +KeyState->KeyShiftState |= EFI_RIGHT_CONTROL_PRESSED; } if (Private->LeftAlt) { -KeyData.KeyState.KeyShiftState |= EFI_LEFT_ALT_PRESSED; +KeyState->KeyShiftState |= EFI_LEFT_ALT_PRESSED; } if (Private->RightAlt) { -KeyData.KeyState.KeyShiftState |= EFI_RIGHT_ALT_PRESSED; +KeyState->KeyShiftState |= EFI_RIGHT_ALT_PRESSED; } if (Private->LeftShift) { -KeyData.KeyState.KeyShiftState |= EFI_LEFT_SHIFT_PRESSED; +KeyState->KeyShiftState |= EFI_LEFT_SHIFT_PRESSED; } if (Private->RightShift) { -KeyData.KeyState.KeyShiftState |= EFI_RIGHT_SHIFT_PRESSED; +KeyState->KeyShiftState |= EFI_RIGHT_SHIFT_PRESSED; } if (Private->LeftLogo) { -KeyData.KeyState.KeyShiftState |= EFI_LEFT_LOGO_PRESSED; +KeyState->KeyShiftState |= EFI_LEFT_LOGO_PRESSED; } if (Private->RightLogo) { -KeyData.KeyState.KeyShiftState |= EFI_RIGHT_LOGO_PRESSED; +KeyState->KeyShiftState |= EFI_RIGHT_LOGO_PRESSED; } if (Private->Menu) { -KeyData.KeyState.KeyShiftState |= EFI_MENU_KEY_PRESSED; +KeyState->KeyShiftState |= EFI_MENU_KEY_PRESSED; } if (Private->SysReq) { -KeyData.KeyState.KeyShiftState |= EFI_SYS_REQ_PRESSED; +KeyState->KeyShiftState |= EFI_SYS_REQ_PRESSED; } if (Private->CapsLock) { -KeyData.KeyState.KeyToggleState |= EFI_CAPS_LOCK_ACTIVE; +KeyState->KeyToggleState |= EFI_CAPS_LOCK_ACTIVE; } if (Private->NumLock) { -KeyData.KeyState.KeyToggleState |= EFI_NUM_LOCK_ACTIVE; +KeyState->KeyToggleState |= EFI_NUM_LOCK_ACTIVE; } if (Private->ScrollLock) { -KeyData.KeyState.KeyToggleState |= EFI_SCROLL_LOCK_ACTIVE; +KeyState->KeyToggleState |= EFI_SCROLL_LOCK_ACTIVE; } if (Private->IsPartialKeySupport) { -KeyData.KeyState.KeyToggleState |= EFI_KEY_STATE_EXPOSED; +KeyState->KeyToggleState |= EFI_KEY_STATE_EXPOSED; } +} + +/** + TODO: Add function description + + @param Private TODO: add argument description + @param Key TODO: add argument description + + @retval EFI_NOT_READY TODO: Add description for return value + @retval EFI_SUCCESS TODO: Add description for return value + +**/ +EFI_STATUS +GopPrivateAddKey ( + IN GOP_PRIVATE_DATA
Re: [edk2] [PATCH edk2-platforms 32/39] Silicon/NXP: Implement PciSegmentLib to support multiple RCs
On Fri, Feb 16, 2018 at 02:20:28PM +0530, Meenakshi wrote: > From: Vabhav> > Multiple root complex support is not provided by standard library > PciLib/PciExpressLib/PciSegmentLib, Reimplementing it and provide > function for reading/writing into PCIe configuration Space. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Vabhav > Signed-off-by: Meenakshi Aggarwal > --- > Silicon/NXP/Include/Pcie.h | 143 + > Silicon/NXP/Library/PciSegmentLib/PciSegmentLib.c | 604 > + > .../NXP/Library/PciSegmentLib/PciSegmentLib.inf| 41 ++ > 3 files changed, 788 insertions(+) > create mode 100644 Silicon/NXP/Include/Pcie.h > create mode 100644 Silicon/NXP/Library/PciSegmentLib/PciSegmentLib.c > create mode 100644 Silicon/NXP/Library/PciSegmentLib/PciSegmentLib.inf > > diff --git a/Silicon/NXP/Include/Pcie.h b/Silicon/NXP/Include/Pcie.h > new file mode 100644 > index 000..a7e6f9b > --- /dev/null > +++ b/Silicon/NXP/Include/Pcie.h > @@ -0,0 +1,143 @@ > +/** @file > + PCI memory configuration for NXP > + > + Copyright 2018 NXP > + > + 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 __PCI_H__ > +#define __PCI_H__ I'm not super happy about reusing such a generic name for the include guard - or really even the filename. (MdePkg/Include/Pci.h has _PCI_H_.) Could you rename this header NxpPcie.h and change the include guard to _NXP_PCIE_H_? > + > +// Segment 0 > +#define PCI_SEG0_NUM 0 > + > +#define PCI_SEG0_BUSNUM_MIN 0x0 > +#define PCI_SEG0_BUSNUM_MAX 0xff > + > +#define PCI_SEG0_PORTIO_MIN 0x0 > +#define PCI_SEG0_PORTIO_MAX 0x > + > +#define PCI_SEG0_MMIO32_MIN 0x4000 > +#define PCI_SEG0_MMIO32_MAX 0x4fff > +#define PCI_SEG0_MMIO64_MIN PCI_SEG0_MMIO_MEMBASE + SEG_MEM_SIZE > +#define PCI_SEG0_MMIO64_MAX PCI_SEG0_MMIO_MEMBASE + SEG_MEM_LIMIT > +#define PCI_SEG0_MMIO_MEMBASE FixedPcdGet64 (PcdPciExp1BaseAddr) > + > +#define PCI_SEG0_DBI_BASE 0x0340 > + > +// Segment 1 > +#define PCI_SEG1_NUM 1 > + > +#define PCI_SEG1_BUSNUM_MIN 0x0 > +#define PCI_SEG1_BUSNUM_MAX 0xff > + > +#define PCI_SEG1_PORTIO_MIN 0x1 > +#define PCI_SEG1_PORTIO_MAX 0x1 > + > +#define PCI_SEG1_MMIO32_MIN 0x5000 > +#define PCI_SEG1_MMIO32_MAX 0x5fff > +#define PCI_SEG1_MMIO64_MIN PCI_SEG1_MMIO_MEMBASE + SEG_MEM_SIZE > +#define PCI_SEG1_MMIO64_MAX PCI_SEG1_MMIO_MEMBASE + SEG_MEM_LIMIT > +#define PCI_SEG1_MMIO_MEMBASE FixedPcdGet64 (PcdPciExp2BaseAddr) > + > +#define PCI_SEG1_DBI_BASE 0x0350 > + > +// Segment 2 > +#define PCI_SEG2_NUM 2 > + > +#define PCI_SEG2_BUSNUM_MIN 0x0 > +#define PCI_SEG2_BUSNUM_MAX 0xff > + > +#define PCI_SEG2_PORTIO_MIN 0x2 > +#define PCI_SEG2_PORTIO_MAX 0x2 > + > +#define PCI_SEG2_MMIO32_MIN 0x6000 > +#define PCI_SEG2_MMIO32_MAX 0x6fff > +#define PCI_SEG2_MMIO64_MIN PCI_SEG2_MMIO_MEMBASE + SEG_MEM_SIZE > +#define PCI_SEG2_MMIO64_MAX PCI_SEG2_MMIO_MEMBASE + SEG_MEM_LIMIT > +#define PCI_SEG2_MMIO_MEMBASE FixedPcdGet64 (PcdPciExp3BaseAddr) > + > +#define PCI_SEG2_DBI_BASE 0x0360 > + > +// Segment 3 > +#define PCI_SEG3_NUM 3 > + > +#define PCI_SEG3_BUSNUM_MIN 0x0 > +#define PCI_SEG3_BUSNUM_MAX 0xff > + > +#define PCI_SEG3_PORTIO_MIN 0x3 > +#define PCI_SEG3_PORTIO_MAX 0x3 > + > +#define PCI_SEG3_MMIO32_MIN 0x7000 > +#define PCI_SEG3_MMIO32_MAX 0x7fff > +#define PCI_SEG3_MMIO64_MIN PCI_SEG3_MMIO_MEMBASE + SEG_MEM_SIZE > +#define PCI_SEG3_MMIO64_MAX PCI_SEG3_MMIO_MEMBASE + SEG_MEM_LIMIT > +#define PCI_SEG3_MMIO_MEMBASE FixedPcdGet64 (PcdPciExp4BaseAddr) > + > +#define PCI_SEG3_DBI_BASE 0x0370 > + > +// Segment configuration > +#define SEG_CFG_SIZE 0x1000 > +#define SEG_CFG_BUS 0x > +#define SEG_MEM_SIZE 0x4000 > +#define SEG_MEM_LIMIT 0x7fff > +#define SEG_MEM_BUS 0x4000 > +#define SEG_IO_SIZE 0x0001 > +#define SEG_IO_BUS0x > +#define PCI_BASE_DIFF 0x8 > +#define PCI_DBI_SIZE_DIFF 0x10 > +#define PCI_SEG0_PHY_CFG0_BASEPCI_SEG0_MMIO_MEMBASE > +#define PCI_SEG0_PHY_CFG1_BASEPCI_SEG0_PHY_CFG0_BASE + SEG_CFG_SIZE > +#define
Re: [edk2] [PATCH edk2-platforms 31/39] LS2088ARDB: Enable NOR driver and Runtime Services
On Fri, Feb 16, 2018 at 02:20:27PM +0530, Meenakshi wrote: > From: Wasim Khan> > Enable NOR driver and Runtime Services for LS2088ARDB Platform > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Wasim Khan Ah, I guess the varstore changes may actually happen to this patch. No other comments on this. / Leif > --- > Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc | 15 - > Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.fdf | 6 +- > Platform/NXP/LS2088aRdbPkg/VarStore.fdf.inc | 99 > > 3 files changed, 118 insertions(+), 2 deletions(-) > create mode 100644 Platform/NXP/LS2088aRdbPkg/VarStore.fdf.inc > > diff --git a/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc > b/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc > index 7894925..60449b5 100755 > --- a/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc > +++ b/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc > @@ -42,6 +42,7 @@ >IfcLib|Silicon/NXP/Library/IfcLib/IfcLib.inf >BoardLib|Platform/NXP/LS2088aRdbPkg/Library/BoardLib/BoardLib.inf >FpgaLib|Platform/NXP/LS2088aRdbPkg/Library/FpgaLib/FpgaLib.inf > + NorFlashLib|Silicon/NXP/Library/NorFlashLib/NorFlashLib.inf > > [PcdsFixedAtBuild.common] > > @@ -89,6 +90,13 @@ >gDs3232RtcLibTokenSpaceGuid.PcdMuxRtcChannelValue|0x09 >gDs3232RtcLibTokenSpaceGuid.PcdMuxDefaultChannelValue|0x08 > > + # > + # NV Storage PCDs. > + # > + gArmTokenSpaceGuid.PcdVFPEnabled|1 > + gNxpQoriqLsTokenSpaceGuid.PcdFlashDeviceBase64|0x58000 > + gNxpQoriqLsTokenSpaceGuid.PcdFlashReservedRegionBase64|0x58030 > + > > > # > # Components Section - list of all EDK II Modules needed by this Platform > @@ -98,6 +106,11 @@ ># ># Architectural Protocols ># > - MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf > + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf{ > + > + NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf > + } > + MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf >ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf >Silicon/NXP/Drivers/I2cDxe/I2cDxe.inf > + Silicon/NXP/Drivers/NorFlashDxe/NorFlashDxe.inf > diff --git a/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.fdf > b/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.fdf > index 14072a6..785f88b 100644 > --- a/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.fdf > +++ b/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.fdf > @@ -55,6 +55,7 @@ > gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize > FV = FVMAIN_COMPACT > > !include ../FVRules.fdf.inc > +!include VarStore.fdf.inc > > > # > # FV Section > @@ -103,7 +104,8 @@ READ_LOCK_STATUS = TRUE >INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf >INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf >INF EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf > - INF MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf > + INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf > + INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf >INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf > >INF Silicon/NXP/Drivers/I2cDxe/I2cDxe.inf > @@ -122,6 +124,8 @@ READ_LOCK_STATUS = TRUE >INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf >INF EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOutSerial.inf > > + INF Silicon/NXP/Drivers/NorFlashDxe/NorFlashDxe.inf > + ># ># Network modules ># > diff --git a/Platform/NXP/LS2088aRdbPkg/VarStore.fdf.inc > b/Platform/NXP/LS2088aRdbPkg/VarStore.fdf.inc > new file mode 100644 > index 000..7d35042 > --- /dev/null > +++ b/Platform/NXP/LS2088aRdbPkg/VarStore.fdf.inc > @@ -0,0 +1,99 @@ > +## @file > +# FDF include file with FD definition that defines an empty variable store. > +# > +# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved. > +# Copyright (C) 2014, Red Hat, Inc. > +# Copyright (c) 2016, Linaro, Ltd. All rights reserved. > +# Copyright (c) 2016, Freescale Semiconductor. All rights reserved. > +# Copyright 2017-2018 NXP. > +# > +# 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. > +# > +## > + > +[FD.LS2088aRdbNv_EFI] > + > +BaseAddress = 0x58030|gNxpQoriqLsTokenSpaceGuid.PcdNvFdBase #The base > address of the FLASH
Re: [edk2] [PATCH edk2-platforms 30/39] LS2088 : Enable support of FpgaLib
On Fri, Feb 16, 2018 at 02:20:26PM +0530, Meenakshi wrote: > From: Wasim Khan> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Wasim Khan Reviewed-by: Leif Lindholm > --- > Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc | 3 +++ > Silicon/NXP/Chassis/Chassis3/Soc.c | 18 +- > Silicon/NXP/Chassis/Chassis3/Soc.h | 1 - > Silicon/NXP/Chassis/LS2088aSocLib.inf| 2 ++ > Silicon/NXP/LS2088A/LS2088A.dsc | 1 + > 5 files changed, 23 insertions(+), 2 deletions(-) > > diff --git a/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc > b/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc > index c0a802d..7894925 100755 > --- a/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc > +++ b/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc > @@ -39,6 +39,9 @@ >BeIoLib|Silicon/NXP/Library/BeIoLib/BeIoLib.inf >SocLib|Silicon/NXP/Chassis/LS2088aSocLib.inf >RealTimeClockLib|Silicon/Maxim/Library/Ds3232RtcLib/Ds3232RtcLib.inf > + IfcLib|Silicon/NXP/Library/IfcLib/IfcLib.inf > + BoardLib|Platform/NXP/LS2088aRdbPkg/Library/BoardLib/BoardLib.inf > + FpgaLib|Platform/NXP/LS2088aRdbPkg/Library/FpgaLib/FpgaLib.inf > > [PcdsFixedAtBuild.common] > > diff --git a/Silicon/NXP/Chassis/Chassis3/Soc.c > b/Silicon/NXP/Chassis/Chassis3/Soc.c > index ed6c3cc..dbb1884 100644 > --- a/Silicon/NXP/Chassis/Chassis3/Soc.c > +++ b/Silicon/NXP/Chassis/Chassis3/Soc.c > @@ -18,6 +18,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -25,6 +26,9 @@ > > #include "Soc.h" > > +extern VOID PrintBoardPersonality (VOID); > +extern UINTN GetBoardSysClk (VOID); > + > VOID > GetSysInfo ( >OUT SYS_INFO *PtrSysInfo > @@ -83,7 +87,7 @@ GetSysInfo ( > >GurBase = (VOID *)PcdGet64 (PcdGutsBaseAddr); >ClkBase = (VOID *)PcdGet64 (PcdClkBaseAddr); > - SysClk = CLK_FREQ; > + SysClk = GetBoardSysClk (); > >PtrSysInfo->FreqSystemBus = SysClk; >PtrSysInfo->FreqDdrBus = PcdGet64 (PcdDdrClk); > @@ -152,6 +156,13 @@ SocInit ( >SmmuInit (); > >// > + // Perform IFC Initialization. > + // Early IFC initialization is required to set timings required for fpga > initilzation to > + // get system clock frequency, board info etc. > + // > + IfcInit (); > + > + // >// Initialize the Serial Port. >// Early serial port initialization is required to print RCW, Soc and CPU > infomation at >// the begining of UEFI boot. > @@ -176,5 +187,10 @@ SocInit ( >// Print Soc Personality information >// >PrintSoc (); > + > + // > + // Print Board Personality information > + // > + PrintBoardPersonality (); > } > > diff --git a/Silicon/NXP/Chassis/Chassis3/Soc.h > b/Silicon/NXP/Chassis/Chassis3/Soc.h > index 0e892fb..c3ac1d5 100644 > --- a/Silicon/NXP/Chassis/Chassis3/Soc.h > +++ b/Silicon/NXP/Chassis/Chassis3/Soc.h > @@ -20,7 +20,6 @@ > #define FSL_CLK_GRPA_ADDR 0x0130 > #define FSL_CLK_GRPB_ADDR 0x0131 > #define NUM_CC_PLLS 6 > -#define CLK_FREQ1 > > #define FSL_CLUSTER_CLOCKS { 1, 1, 4, 4 } /* LS208x */ > #define TP_CLUSTER_EOC_MASK 0x8000 /* Mask for End of > clusters */ > diff --git a/Silicon/NXP/Chassis/LS2088aSocLib.inf > b/Silicon/NXP/Chassis/LS2088aSocLib.inf > index 8a4da50..3111d49 100644 > --- a/Silicon/NXP/Chassis/LS2088aSocLib.inf > +++ b/Silicon/NXP/Chassis/LS2088aSocLib.inf > @@ -31,6 +31,8 @@ >BaseLib >BeIoLib >DebugLib > + FpgaLib > + IfcLib >SerialPortLib > > [Sources.common] > diff --git a/Silicon/NXP/LS2088A/LS2088A.dsc b/Silicon/NXP/LS2088A/LS2088A.dsc > index 8f7dbb5..2cff40f 100644 > --- a/Silicon/NXP/LS2088A/LS2088A.dsc > +++ b/Silicon/NXP/LS2088A/LS2088A.dsc > @@ -67,5 +67,6 @@ >gNxpQoriqLsTokenSpaceGuid.PcdI2c0BaseAddr|0x0200 >gNxpQoriqLsTokenSpaceGuid.PcdI2cSize|0x1 >gNxpQoriqLsTokenSpaceGuid.PcdNumI2cController|4 > + gNxpQoriqLsTokenSpaceGuid.PcdIfcBaseAddr|0x0224 > > ## > -- > 1.9.1 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms 29/39] Platform/NXP: LS2088 RDB Board FPGA library
On Fri, Feb 16, 2018 at 02:20:25PM +0530, Meenakshi wrote: > From: Wasim Khan> > Library to provide functions for accessing FPGA > on LS2088ARDB board. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Wasim Khan > --- > .../NXP/LS2088aRdbPkg/Include/Library/FpgaLib.h| 166 > + > .../NXP/LS2088aRdbPkg/Library/FpgaLib/FpgaLib.c| 115 ++ > .../NXP/LS2088aRdbPkg/Library/FpgaLib/FpgaLib.inf | 31 > 3 files changed, 312 insertions(+) > create mode 100644 Platform/NXP/LS2088aRdbPkg/Include/Library/FpgaLib.h > create mode 100644 Platform/NXP/LS2088aRdbPkg/Library/FpgaLib/FpgaLib.c > create mode 100644 Platform/NXP/LS2088aRdbPkg/Library/FpgaLib/FpgaLib.inf > > diff --git a/Platform/NXP/LS2088aRdbPkg/Include/Library/FpgaLib.h > b/Platform/NXP/LS2088aRdbPkg/Include/Library/FpgaLib.h > new file mode 100644 > index 000..84d1f02 > --- /dev/null > +++ b/Platform/NXP/LS2088aRdbPkg/Include/Library/FpgaLib.h > @@ -0,0 +1,166 @@ > +/** FpgaLib.h > +* Header defining the LS2088a Fpga specific constants (Base addresses, > sizes, flags) > +* > +* Copyright 2017-2018 NXP > +* > +* 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 __LS2088A_FPGA_H__ > +#define __LS2088A_FPGA_H__ > + > +typedef enum { > + CLK_66, > + CLK_83, > + CLK_100, > + CLK_125, > + CLK_133 > +} SYSTEM_CLOCK; > + > +/* > + * FPGA register set of LS2088ARDB board-specific. > + */ > +typedef struct { > + UINT8 Id; // ID value uniquely identifying each QorIQ board type > + UINT8 Arch; // Board Version > + UINT8 Ver; // FPGA Version > + UINT8 Model;// Programming Model > + UINT8 Minor;// Minor Revision Number > + UINT8 CtlSys; > + UINT8 Aux; > + UINT8 ClkSpd; > + UINT8 StatDut; > + UINT8 StatSys; > + UINT8 StatAlrm; > + UINT8 Present; > + UINT8 Present2; > + UINT8 RcwCtl; > + UINT8 CtlLed; > + UINT8 I2cBlk; > + UINT8 RcfgCtl; > + UINT8 RcfgSt; > + UINT8 DcmAd; > + UINT8 DcmDa; > + UINT8 Dcmd; > + UINT8 Dmsg; > + UINT8 Gdc; > + UINT8 Gdd; > + UINT8 Dmack; > + UINT8 Res1[6]; > + UINT8 Watch; > + UINT8 PwrCtl[2]; > + UINT8 Res2[2]; > + UINT8 PwrStat[4]; > + UINT8 Res3[8]; > + UINT8 ClkSpd2[2]; > + UINT8 Res4[2]; > + UINT8 Sclk[3]; > + UINT8 Res5; > + UINT8 Dclk[3]; > + UINT8 Res6; > + UINT8 ClkDspd[3]; > + UINT8 Res7; > + UINT8 RstCtl; > + UINT8 RstStat; > + UINT8 RstRsn; > + UINT8 RstFrc[2]; > + UINT8 Res8[11]; > + UINT8 BrdCfg[16]; > + UINT8 DutCfg[16]; > + UINT8 RcwAd[2]; > + UINT8 RcwData; > + UINT8 Res9[5]; > + UINT8 PostCtl; > + UINT8 PostStat; > + UINT8 PostDat[2]; > + UINT8 Pid[4]; > + UINT8 GpioIo[4]; > + UINT8 GpioDir[4]; > + UINT8 Res10[20]; > + UINT8 RjtagCtl; > + UINT8 RjtagDat; > + UINT8 Res11[2]; > + UINT8 TrigSrc[4]; > + UINT8 TrigDst[4]; > + UINT8 TrigStat; > + UINT8 Res12[3]; > + UINT8 TrigCtr[4]; > + UINT8 Res13[16]; > + UINT8 ClkFreq[6]; > + UINT8 ResC6[8]; > + UINT8 ClkBase[2]; > + UINT8 ResD0[8]; > + UINT8 Cms[2]; > + UINT8 ResC0[6]; > + UINT8 Aux2[4]; > + UINT8 Res14[10]; > + UINT8 AuxAd; > + UINT8 AuxDa; > + UINT8 Res15[16]; > +} FPGA_REG_SET; > + > +/** > + Function to read FPGA register. > +**/ > +UINT8 > +FpgaRead ( > + UINTN Reg > + ); > + > +/** > + Function to write FPGA register. > +**/ > +VOID > +FpgaWrite ( > + UINTN Reg, > + UINT8 Value > + ); > + > +/** > + Function to initialize FPGA timings. > +**/ > +VOID > +FpgaInit ( > + VOID > + ); > + > +/** > + Function to get system clock frequency. > +**/ > +UINTN > +GetBoardSysClk ( > + VOID > + ); > + > +/** > + Function to print board personality. > +**/ > +VOID > +PrintBoardPersonality ( > + VOID > + ); > + > +#define FPGA_BASE_PHYS 0x52000 > + > +//SYSCLK > +#define FPGA_CLK_MASK0x0F // FPGA Clock Mask > +#define SYSCLK_66_MHZ6600 > +#define SYSCLK_83_MHZ8300 > +#define SYSCLK_100_MHZ 1 > +#define SYSCLK_125_MHZ 12500 > +#define SYSCLK_133_MHZ 13300 > + > +#define FPGA_VBANK_MASK 0x07 > +#define FPGA_CS_MASK 0x08 > + > +#define FPGA_READ(Reg) FpgaRead (OFFSET_OF (FPGA_REG_SET, Reg)) > +#define FPGA_WRITE(Reg, Value) FpgaWrite (OFFSET_OF (FPGA_REG_SET, Reg), > Value) > + > +#endif // __LS2088A_FPGA_H__ > diff --git a/Platform/NXP/LS2088aRdbPkg/Library/FpgaLib/FpgaLib.c > b/Platform/NXP/LS2088aRdbPkg/Library/FpgaLib/FpgaLib.c > new file mode 100644 >
Re: [edk2] [PATCH edk2-platforms 28/39] Platform/NXP: LS2088A RDB Board Library
On Fri, Feb 16, 2018 at 02:20:24PM +0530, Meenakshi wrote: > From: Wasim Khan> > Library to provide board specific timings for LS2088ARDB > board with interfacing to IFC controller for accessing > NOR, NAND and FPGA. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Wasim Khan Reviewed-by: Leif Lindholm > --- > .../NXP/LS2088aRdbPkg/Include/IfcBoardSpecific.h | 114 > + > .../NXP/LS2088aRdbPkg/Library/BoardLib/BoardLib.c | 69 + > .../LS2088aRdbPkg/Library/BoardLib/BoardLib.inf| 28 + > 3 files changed, 211 insertions(+) > create mode 100644 Platform/NXP/LS2088aRdbPkg/Include/IfcBoardSpecific.h > create mode 100644 Platform/NXP/LS2088aRdbPkg/Library/BoardLib/BoardLib.c > create mode 100644 Platform/NXP/LS2088aRdbPkg/Library/BoardLib/BoardLib.inf > > diff --git a/Platform/NXP/LS2088aRdbPkg/Include/IfcBoardSpecific.h > b/Platform/NXP/LS2088aRdbPkg/Include/IfcBoardSpecific.h > new file mode 100644 > index 000..174a242 > --- /dev/null > +++ b/Platform/NXP/LS2088aRdbPkg/Include/IfcBoardSpecific.h > @@ -0,0 +1,114 @@ > +/** IfcBoardSpecificLib.h > + > + IFC Flash Board Specific Macros and structure > + > + Copyright 2017-2018 NXP > + > + 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 __IFC__BOARD_SPECIFIC_H__ > +#define __IFC__BOARD_SPECIFIC_H__ > + > +#include > + > +// On board flash support > +#define IFC_NAND_BUF_BASE0x53000ULL > + > +// On board Inegrated flash Controller chip select configuration > +#define IFC_NOR_CSIFC_CS0 > +#define IFC_NAND_CS IFC_CS2 > +#define IFC_FPGA_CS IFC_CS3 > + > + > +/* board-specific NAND timing */ > +#define NAND_FTIM0 (IFC_FTIM0_NAND_TCCST(0x0e) | \ > + IFC_FTIM0_NAND_TWP(0x30) | \ > + IFC_FTIM0_NAND_TWCHT(0x0e) | \ > + IFC_FTIM0_NAND_TWH(0x14)) > + > +#define NAND_FTIM1 (IFC_FTIM1_NAND_TADLE(0x64) | \ > + IFC_FTIM1_NAND_TWBE(0xab) | \ > + IFC_FTIM1_NAND_TRR(0x1c) | \ > + IFC_FTIM1_NAND_TRP(0x30)) > + > +#define NAND_FTIM2 (IFC_FTIM2_NAND_TRAD(0x1e) | \ > + IFC_FTIM2_NAND_TREH(0x14) | \ > + IFC_FTIM2_NAND_TWHRE(0x3c)) > + > +#define NAND_FTIM3 0x0 > + > +#define IFC_NAND_BASE_PHYS0x3000 > +#define NAND_CSPR (IFC_CSPR_PHYS_ADDR(IFC_NAND_BASE_PHYS) \ > + | IFC_CSPR_PORT_SIZE_8 \ > + | IFC_CSPR_MSEL_NAND \ > + | IFC_CSPR_V) > + > +#define NAND_CSPR_EXT 0x0 > +#define NAND_AMASK 0x > + > +#define NAND_CSOR (IFC_CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \ > + | IFC_CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \ > + | IFC_CSOR_NAND_ECC_MODE_4 /* 4-bit ECC */ \ > + | IFC_CSOR_NAND_RAL_3 /* RAL = 3 Bytes */ \ > + | IFC_CSOR_NAND_PGS_4K /* Page Size = 4K */ \ > + | IFC_CSOR_NAND_SPRZ_224 /* Spare size = 224 */ \ > + | IFC_CSOR_NAND_PB(7)) /* 2^7 Pages Per Block */ > + > +// board-specific NOR timing > +#define NOR_FTIM0 (IFC_FTIM0_NOR_TACSE(0x4) | \ > + IFC_FTIM0_NOR_TEADC(0x5) | \ > + IFC_FTIM0_NOR_TEAHC(0x5)) > + > +#define NOR_FTIM1 (IFC_FTIM1_NOR_TACO(0x35) | \ > + IFC_FTIM1_NOR_TRAD_NOR(0x1a) | \ > + IFC_FTIM1_NOR_TSEQRAD_NOR(0x13)) > + > +#define NOR_FTIM2 (IFC_FTIM2_NOR_TCS(0x4) | \ > + IFC_FTIM2_NOR_TCH(0x4) | \ > + IFC_FTIM2_NOR_TWPH(0xe) | \ > + IFC_FTIM2_NOR_TWP(0x1c)) > + > +#define NOR_FTIM3 0x0400 > + > +#define IFC_FLASH_BASE_PHYS 0x8000 > +#define NOR_CSPR (IFC_CSPR_PHYS_ADDR(IFC_FLASH_BASE_PHYS) \ > + | IFC_CSPR_PORT_SIZE_16 \ > + | IFC_CSPR_MSEL_NOR\ > + | IFC_CSPR_V) > + > +#define NOR_CSPR_EXT 0x0 > +#define NOR_AMASK IFC_AMASK(128*1024*1024) > +#define NOR_CSOR IFC_CSOR_NOR_ADM_SHIFT(12) > + > +// board-specific fpga timing > +#define FPGA_BASE_PHYS 0x2000 > +#define FPGA_CSPR_EXT 0x0 > +#define FPGA_CSPR (IFC_CSPR_PHYS_ADDR(FPGA_BASE_PHYS) | \ > + IFC_CSPR_PORT_SIZE_8 | \ > + IFC_CSPR_MSEL_GPCM | \ > +
Re: [edk2] [PATCH edk2-platforms 27/39] Compilation : Add the fdf, dsc and dec files
On Fri, Feb 16, 2018 at 02:20:23PM +0530, Meenakshi wrote: > From: Wasim Khan> > The firmware device, description and declaration files for LS2088 board > Apart from the varstore and include handling change, can you bump the DEC_SPECIFICATION entry to 0x0001001a? Nothing else on this patch. / Leif > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Wasim Khan > --- > Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dec | 29 > Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc | 100 ++ > Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.fdf | 198 > +++ > Silicon/NXP/LS2088A/LS2088A.dec | 22 +++ > Silicon/NXP/LS2088A/LS2088A.dsc | 71 ++ > Silicon/NXP/NxpQoriqLs.dec | 13 ++ > 6 files changed, 433 insertions(+) > create mode 100644 Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dec > create mode 100755 Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc > create mode 100644 Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.fdf > create mode 100644 Silicon/NXP/LS2088A/LS2088A.dec > create mode 100644 Silicon/NXP/LS2088A/LS2088A.dsc > > diff --git a/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dec > b/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dec > new file mode 100644 > index 000..93d2e5a > --- /dev/null > +++ b/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dec > @@ -0,0 +1,29 @@ > +# LS2088aRdbPkg.dec > +# LS2088a board package. > +# > +# Copyright 2017 NXP > +# > +# 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] > + PACKAGE_NAME = LS2088aRdbPkg > + PACKAGE_GUID = 474e0c59-5f77-4060-82dd-9025ee4f4939 > + > + > +# > +# Include Section - list of Include Paths that are provided by this package. > +# Comments are used for Keywords and Module Types. > +# > +# Supported Module Types: > +# BASE SEC PEI_CORE PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER > DXE_SMM_DRIVER DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION > +# > + > +[Includes.common] > + Include# Root include for the package > diff --git a/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc > b/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc > new file mode 100755 > index 000..c0a802d > --- /dev/null > +++ b/Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.dsc > @@ -0,0 +1,100 @@ > +# LS2088aRdbPkg.dsc > +# > +# LS2088ARDB Board package. > +# > +# Copyright 2017 NXP > +# > +# 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 Section - statements that will be processed to create a Makefile. > +# > + > +[Defines] > + # > + # Defines for default states. These can be changed on the command line. > + # -D FLAG=VALUE > + # > + PLATFORM_NAME = LS2088aRdbPkg > + PLATFORM_GUID = be06d8bc-05eb-44d6-b39f-191e93617ebd > + OUTPUT_DIRECTORY = Build/LS2088aRdbPkg > + FLASH_DEFINITION = > Platform/NXP/LS2088aRdbPkg/LS2088aRdbPkg.fdf > + DEFINE MC_HIGH_MEM = TRUE > + > +!include ../NxpQoriqLs.dsc > +!include ../../../Silicon/NXP/LS2088A/LS2088A.dsc > + > +[LibraryClasses.common] > + > ArmPlatformLib|Platform/NXP/LS2088aRdbPkg/Library/PlatformLib/ArmPlatformLib.inf > + > ResetSystemLib|ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.inf > + SerialPortLib|Silicon/NXP/Library/DUartPortLib/DUartPortLib.inf > + BeIoLib|Silicon/NXP/Library/BeIoLib/BeIoLib.inf > + SocLib|Silicon/NXP/Chassis/LS2088aSocLib.inf > + RealTimeClockLib|Silicon/Maxim/Library/Ds3232RtcLib/Ds3232RtcLib.inf > + > +[PcdsFixedAtBuild.common] > + > +!if $(MC_HIGH_MEM) == TRUE# > Management Complex loaded at the end of DDR2 > + gNxpQoriqLsTokenSpaceGuid.PcdDram1BaseAddr|0x008000 # Actual > base
Re: [edk2] [PATCH edk2-platforms 25/39] Platform/NXP/LS2088aRdbPkg: ArmPlatformLib Support for LS2088ARDB
On Fri, Feb 16, 2018 at 02:20:21PM +0530, Meenakshi wrote: > From: Wasim Khan> > Add support of ArmPlatformLib for NXP LS2088ARDB board > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Wasim Khan > Signed-off-by: Meenakshi Aggarwal Reviewed-by: Leif Lindholm > --- > .../Library/PlatformLib/ArmPlatformLib.c | 106 > .../Library/PlatformLib/ArmPlatformLib.inf | 77 + > .../Library/PlatformLib/NxpQoriqLsHelper.S | 35 > .../Library/PlatformLib/NxpQoriqLsMem.c| 189 > + > 4 files changed, 407 insertions(+) > create mode 100644 > Platform/NXP/LS2088aRdbPkg/Library/PlatformLib/ArmPlatformLib.c > create mode 100644 > Platform/NXP/LS2088aRdbPkg/Library/PlatformLib/ArmPlatformLib.inf > create mode 100644 > Platform/NXP/LS2088aRdbPkg/Library/PlatformLib/NxpQoriqLsHelper.S > create mode 100644 > Platform/NXP/LS2088aRdbPkg/Library/PlatformLib/NxpQoriqLsMem.c > > diff --git a/Platform/NXP/LS2088aRdbPkg/Library/PlatformLib/ArmPlatformLib.c > b/Platform/NXP/LS2088aRdbPkg/Library/PlatformLib/ArmPlatformLib.c > new file mode 100644 > index 000..90f14ba > --- /dev/null > +++ b/Platform/NXP/LS2088aRdbPkg/Library/PlatformLib/ArmPlatformLib.c > @@ -0,0 +1,106 @@ > +/** ArmPlatformLib.c > +* > +* Contains board initialization functions. > +* > +* Based on BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c > +* > +* Copyright (c) 2011-2012, ARM Limited. All rights reserved. > +* Copyright (c) 2016, Freescale Semiconductor, Inc. All rights reserved. > +* Copyright 2017 NXP > +* > +* 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 > + > +extern VOID SocInit (VOID); > + > +/** > + Return the current Boot Mode > + > + This function returns the boot reason on the platform > + > +**/ > +EFI_BOOT_MODE > +ArmPlatformGetBootMode ( > + VOID > + ) > +{ > + return BOOT_WITH_FULL_CONFIGURATION; > +} > + > +/** > + Placeholder for Platform Initialization > + > +**/ > +EFI_STATUS > +ArmPlatformInitialize ( > + IN UINTN MpId > + ) > +{ > + SocInit (); > + > + return EFI_SUCCESS; > +} > + > +ARM_CORE_INFO LS2088aMpCoreInfoCTA72x4[] = { > + { > +// Cluster 0, Core 0 > +0x0, 0x0, > + > +// MP Core MailBox Set/Get/Clear Addresses and Clear Value > +(EFI_PHYSICAL_ADDRESS)0, > +(EFI_PHYSICAL_ADDRESS)0, > +(EFI_PHYSICAL_ADDRESS)0, > +(UINT64)0x > + }, > +}; > + > +EFI_STATUS > +PrePeiCoreGetMpCoreInfo ( > + OUT UINTN *CoreCount, > + OUT ARM_CORE_INFO **ArmCoreTable > + ) > +{ > + *CoreCount= sizeof (LS2088aMpCoreInfoCTA72x4) / sizeof (ARM_CORE_INFO); > + *ArmCoreTable = LS2088aMpCoreInfoCTA72x4; > + > + return EFI_SUCCESS; > +} > + > +ARM_MP_CORE_INFO_PPI mMpCoreInfoPpi = { PrePeiCoreGetMpCoreInfo }; > + > +EFI_PEI_PPI_DESCRIPTOR gPlatformPpiTable[] = { > + { > +EFI_PEI_PPI_DESCRIPTOR_PPI, > +, > + > + } > +}; > + > +VOID > +ArmPlatformGetPlatformPpiList ( > + OUT UINTN *PpiListSize, > + OUT EFI_PEI_PPI_DESCRIPTOR **PpiList > + ) > +{ > + *PpiListSize = sizeof (gPlatformPpiTable); > + *PpiList = gPlatformPpiTable; > +} > + > + > +UINTN > +ArmPlatformGetCorePosition ( > + IN UINTN MpId > + ) > +{ > + return 1; > +} > diff --git > a/Platform/NXP/LS2088aRdbPkg/Library/PlatformLib/ArmPlatformLib.inf > b/Platform/NXP/LS2088aRdbPkg/Library/PlatformLib/ArmPlatformLib.inf > new file mode 100644 > index 000..f5e5abd > --- /dev/null > +++ b/Platform/NXP/LS2088aRdbPkg/Library/PlatformLib/ArmPlatformLib.inf > @@ -0,0 +1,77 @@ > +#/** @file > +# > +# Copyright (c) 2016, Freescale Semiconductor, Inc. All rights reserved. > +# Copyright 2017 NXP > +# > +# This program and the accompanying materials > +# are licensed and made available under the terms and conditions of the BSD > License > +# which accompanies this distribution. The full text of the license may be > found at > +# http://opensource.org/licenses/bsd-license.php > +# > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR > IMPLIED. > +#**/ > + > +[Defines] > + INF_VERSION= 0x0001001A > + BASE_NAME = PlatformLib > + FILE_GUID = d1361285-8a47-421c-9efd-6b262c9093fc > + MODULE_TYPE= BASE > + VERSION_STRING
Re: [edk2] [PATCH edk2-platforms] Silicon/Socionext/SynQuacer: update PHY reference clock rate
On Mon, Apr 16, 2018 at 01:00:58PM +0200, Ard Biesheuvel wrote: > As reported by Kojima-san, the PHY reference clock value we use in our > ACPI and DT descriptions is out of sync with the hardware. Replace > 125 MHz with 250 MHz throughout. > > Cc: Masahisa Kojima> Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm > --- > Kojima-san, > > Please confirm that the modification to ogma_config.h is correct. > > Thanks, > Ard. > > Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl >| 2 +- > Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi >| 4 ++-- > > Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/ogma_config.h > | 4 ++-- > 3 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl > b/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl > index b6f6c4360029..3f73c191d4d6 100644 > --- a/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl > +++ b/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl > @@ -162,7 +162,7 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "SNI", > "SYNQUACR", >Package (2) { "phy-channel", FixedPcdGet32 (PcdNetsecPhyAddress) }, >Package (2) { "max-speed", 1000 }, >Package (2) { "max-frame-size", 9000 }, > - Package (2) { "socionext,phy-clock-frequency", 12500 }, > + Package (2) { "socionext,phy-clock-frequency", 25000 }, > } >}) > } > diff --git a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi > b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi > index 6e93c6ae16a8..f6887329f6c7 100644 > --- a/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi > +++ b/Silicon/Socionext/SynQuacer/DeviceTree/SynQuacer.dtsi > @@ -420,9 +420,9 @@ > reg-shift = <2>; > }; > > -clk_netsec: refclk125mhz { > +clk_netsec: refclk250mhz { > compatible = "fixed-clock"; > -clock-frequency = <12500>; > +clock-frequency = <25000>; > #clock-cells = <0>; > }; > > diff --git > a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/ogma_config.h > > b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/ogma_config.h > index 1caf64e30623..f6ec9b30ec8e 100644 > --- > a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/ogma_config.h > +++ > b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/ogma_config.h > @@ -16,8 +16,8 @@ > #ifndef OGMA_CONFIG_H > #define OGMA_CONFIG_H > > -#define OGMA_CONFIG_CLK_HZ 12500UL > -#define OGMA_CONFIG_GMAC_CLK_HZ 12500UL > +#define OGMA_CONFIG_CLK_HZ 25000UL > +#define OGMA_CONFIG_GMAC_CLK_HZ 25000UL > #define OGMA_CONFIG_CHECK_CLK_SUPPLY > > #define OGMA_CONFIG_USE_READ_GMAC_STAT > -- > 2.17.0 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms 24/39] Silicon/NXP:SocLib support for initialization of peripherals
A few style comments in addition to the requested layout changes. On Fri, Feb 16, 2018 at 02:20:20PM +0530, Meenakshi wrote: > From: Wasim Khan> > Added SocInit function that initializes peripherals > and print board and soc information for LS2088ARDB Board. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Wasim Khan > --- > Silicon/NXP/Chassis/Chassis.c | 35 ++ > Silicon/NXP/Chassis/Chassis.h | 17 +++ > Silicon/NXP/Chassis/Chassis3/Chassis3.dec | 19 > Silicon/NXP/Chassis/Chassis3/SerDes.h | 91 +++ > Silicon/NXP/Chassis/Chassis3/Soc.c| 180 > ++ > Silicon/NXP/Chassis/Chassis3/Soc.h| 150 + > Silicon/NXP/Chassis/LS2088aSocLib.inf | 48 > Silicon/NXP/LS2088A/Include/SocSerDes.h | 67 +++ > 8 files changed, 607 insertions(+) > create mode 100644 Silicon/NXP/Chassis/Chassis3/Chassis3.dec > create mode 100644 Silicon/NXP/Chassis/Chassis3/SerDes.h > create mode 100644 Silicon/NXP/Chassis/Chassis3/Soc.c > create mode 100644 Silicon/NXP/Chassis/Chassis3/Soc.h > create mode 100644 Silicon/NXP/Chassis/LS2088aSocLib.inf > create mode 100644 Silicon/NXP/LS2088A/Include/SocSerDes.h > > diff --git a/Silicon/NXP/Chassis/Chassis.c b/Silicon/NXP/Chassis/Chassis.c > index ce07fdc..b63efdc 100644 > --- a/Silicon/NXP/Chassis/Chassis.c > +++ b/Silicon/NXP/Chassis/Chassis.c > @@ -45,6 +45,7 @@ GurRead ( > STATIC CPU_TYPE CpuTypeList[] = { >CPU_TYPE_ENTRY (LS1043A, LS1043A, 4), >CPU_TYPE_ENTRY (LS1046A, LS1046A, 4), > + CPU_TYPE_ENTRY (LS2088A, LS2088A, 8), > }; > > /* > @@ -142,6 +143,40 @@ CpuNumCores ( > } > > /* > + * Return core's cluster > + */ > +UINT32 > +QoriqCoreToCluster ( > + IN UINTN Core > + ) > +{ > + CCSR_GUR *GurBase; > + UINTN ClusterIndex; > + UINTN Count; > + UINT32Cluster; > + UINT32Type; > + UINTN InitiatorIndex; > + > + GurBase = (VOID *)PcdGet64 (PcdGutsBaseAddr); > + ClusterIndex = 0; > + Count = 0; > + do { > +Cluster = GurRead ((UINTN)>TpCluster[ClusterIndex].Lower); > +for (InitiatorIndex = 0; InitiatorIndex < TP_INIT_PER_CLUSTER; > InitiatorIndex++) { > + Type = InitiatorType (Cluster, InitiatorIndex); > + if (Type) { > +if (Count == Core) Always {} with if. > + return ClusterIndex; > +Count++; > + } > +} > +ClusterIndex++; > + } while (CHECK_CLUSTER (Cluster)); > + > + return -1; // cannot identify the cluster > +} > + > +/* > * Return the type of core i.e. A53, A57 etc of inputted > * core number. > */ > diff --git a/Silicon/NXP/Chassis/Chassis.h b/Silicon/NXP/Chassis/Chassis.h > index 0beb44c..974fefb 100644 > --- a/Silicon/NXP/Chassis/Chassis.h > +++ b/Silicon/NXP/Chassis/Chassis.h > @@ -57,6 +57,7 @@ CpuMaskNext ( > #define SVR_WO_E0xFE > #define SVR_LS1043A 0x879200 > #define SVR_LS1046A 0x870700 > +#define SVR_LS2088A 0x870901 > > #define SVR_MAJOR(svr) (((svr) >> 4) & 0xf) > #define SVR_MINOR(svr) (((svr) >> 0) & 0xf) > @@ -142,4 +143,20 @@ CpuNumCores ( >VOID >); > > +/* > + * Return the type of initiator for core/hardware accelerator for given core > index. > + */ > +UINT32 > +QoriqCoreToType ( > + IN UINTN Core > + ); > + > +/* > + * Return the cluster of initiator for core/hardware accelerator for given > core index. > + */ > +UINT32 > +QoriqCoreToCluster ( > + IN UINTN Core > + ); > + > #endif /* __CHASSIS_H__ */ > diff --git a/Silicon/NXP/Chassis/Chassis3/Chassis3.dec > b/Silicon/NXP/Chassis/Chassis3/Chassis3.dec > new file mode 100644 > index 000..cf41b3c > --- /dev/null > +++ b/Silicon/NXP/Chassis/Chassis3/Chassis3.dec > @@ -0,0 +1,19 @@ > +# @file > +# > +# Copyright 2017 NXP > +# > +# 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] > + DEC_SPECIFICATION = 0x00010005 0x0001001a > + > +[Includes] > + . > diff --git a/Silicon/NXP/Chassis/Chassis3/SerDes.h > b/Silicon/NXP/Chassis/Chassis3/SerDes.h > new file mode 100644 > index 000..a77ddd5 > --- /dev/null > +++ b/Silicon/NXP/Chassis/Chassis3/SerDes.h > @@ -0,0 +1,91 @@ > +/** SerDes.h > + The Header file of SerDes Module for Chassis 3 > + > + Copyright 2017 NXP > + > + This program and the accompanying materials > + are licensed and made available under the terms and conditions of the BSD > License > + which accompanies
Re: [edk2] [PATCH v2] ArmPkg/TimerDxe: remove workaround for KVM timer handling
Hi Ard, Sorry for the late reply. On 19/04/18 09:16, Ard Biesheuvel wrote: On 17 April 2018 at 08:03, Ard Biesheuvelwrote: When we first ported EDK2 to KVM/arm, we implemented a workaround for the quirky timer handling on the KVM side. This has been fixed in Linux commit f120cd6533d2 ("KVM: arm/arm64: timer: Allow the timer to control the active state") dated 23 June 2014, which was incorporated into Linux release 4.3. So almost 4 years later, it should be safe to drop this workaround on the EDK2 side. This reverts commit b1a633434ddc. Cc: cross-dis...@lists.linaro.org Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Acked-by: Marc Zyngier Reviewed-by: Leif Lindholm Acked-by: Laszlo Ersek Pushed as 411a373ed6426fb1bff253905b6a59ada44e18ad While this was added for KVM, I believe that code is also needed by Xen. Indeed before injecting the interrupt the hypervisor will mask the interrupt. So would it be possible to revert that patch? Cheers, Thanks all --- v2: add acks Note to cross-distro readers: this means guest firmware built with this patch will not work on KVM/ARM hosts using kernel v4.2 or earlier. ArmPkg/Drivers/TimerDxe/TimerDxe.c | 1 - ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c | 10 -- 2 files changed, 11 deletions(-) diff --git a/ArmPkg/Drivers/TimerDxe/TimerDxe.c b/ArmPkg/Drivers/TimerDxe/TimerDxe.c index a3202fa056f3..bd616d2efc73 100644 --- a/ArmPkg/Drivers/TimerDxe/TimerDxe.c +++ b/ArmPkg/Drivers/TimerDxe/TimerDxe.c @@ -337,7 +337,6 @@ TimerInterruptHandler ( // Set next compare value ArmGenericTimerSetCompareVal (CompareValue); -ArmGenericTimerEnableTimer (); ArmInstructionSynchronizationBarrier (); } diff --git a/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c b/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c index 69a4ceb62db6..c941895a3574 100644 --- a/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c +++ b/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c @@ -26,16 +26,6 @@ ArmGenericTimerEnableTimer ( TimerCtrlReg = ArmReadCntvCtl (); TimerCtrlReg |= ARM_ARCH_TIMER_ENABLE; - - // - // When running under KVM, we need to unmask the interrupt on the timer side - // as KVM will mask it when servicing the interrupt at the hypervisor level - // and delivering the virtual timer interrupt to the guest. Otherwise, the - // interrupt will fire again, trapping into the hypervisor again, etc. etc. - // This is scheduled to be fixed on the KVM side, but there is no harm in - // leaving this in once KVM gets fixed. - // - TimerCtrlReg &= ~ARM_ARCH_TIMER_IMASK; ArmWriteCntvCtl (TimerCtrlReg); } -- 2.17.0 ___ cross-distro mailing list cross-dis...@lists.linaro.org https://lists.linaro.org/mailman/listinfo/cross-distro -- Julien Grall ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 1/1] BaseTools: remove EdkIIWorkspace as its not used.
v2 - update makefile too. Cc: Liming GaoCc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/EdkIIWorkspace.py | 317 BaseTools/Source/Python/Makefile | 1 - 2 files changed, 318 deletions(-) diff --git a/BaseTools/Source/Python/Common/EdkIIWorkspace.py b/BaseTools/Source/Python/Common/EdkIIWorkspace.py deleted file mode 100644 index d75b9f8025b3.. --- a/BaseTools/Source/Python/Common/EdkIIWorkspace.py +++ /dev/null @@ -1,317 +0,0 @@ -## @file -# This is the base class for applications that operate on an EDK II Workspace -# -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved. -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# 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. -# - -## -# Import Modules -# -import Common.LongFilePathOs as os, sys, time -from DataType import * -from Common.LongFilePathSupport import OpenLongFilePath as open -from Common.MultipleWorkspace import MultipleWorkspace as mws - -## EdkIIWorkspace -# -# Collect WorkspaceDir from the environment, the Verbose command line flag, and detect an icon bitmap file. -# -# @var StartTime: Time of build system starting -# @var PrintRunTime:Printable time of build system running -# @var PrintRunStatus: Printable status of build system running -# @var RunStatus: Status of build system running -# -class EdkIIWorkspace: -def __init__(self): -self.StartTime = time.time() -self.PrintRunTime = False -self.PrintRunStatus = False -self.RunStatus = '' - -# -# Check environment valiable 'WORKSPACE' -# -if os.environ.get('WORKSPACE') is None: -print 'ERROR: WORKSPACE not defined.Please run EdkSetup from the EDK II install directory.' -return False - -self.CurrentWorkingDir = os.getcwd() - -self.WorkspaceDir = os.path.realpath(os.environ.get('WORKSPACE')) -(Drive, Path) = os.path.splitdrive(self.WorkspaceDir) -if Drive == '': -(Drive, CwdPath) = os.path.splitdrive(self.CurrentWorkingDir) -if Drive != '': -self.WorkspaceDir = Drive + Path -else: -self.WorkspaceDir = Drive.upper() + Path - -self.WorkspaceRelativeWorkingDir = self.WorkspaceRelativePath (self.CurrentWorkingDir) - -try: -# -# Load TianoCoreOrgLogo, used for GUI tool -# -self.Icon = wx.Icon(self.WorkspaceFile('tools/Python/TianoCoreOrgLogo.gif'), wx.BITMAP_TYPE_GIF) -except: -self.Icon = None - -self.Verbose = False -for Arg in sys.argv: -if Arg.lower() == '-v': -self.Verbose = True - -## Close build system -# -# Close build system and print running time and status -# -def Close(self): -if self.PrintRunTime: -Seconds = int(time.time() - self.StartTime) -if Seconds < 60: -print 'Run Time: %d seconds' % (Seconds) -else: -Minutes = Seconds / 60 -Seconds = Seconds % 60 -if Minutes < 60: -print 'Run Time: %d minutes %d seconds' % (Minutes, Seconds) -else: -Hours = Minutes / 60 -Minutes = Minutes % 60 -print 'Run Time: %d hours %d minutes %d seconds' % (Hours, Minutes, Seconds) -if self.RunStatus != '': -print self.RunStatus - -## Convert to a workspace relative filename -# -# Convert a full path filename to a workspace relative filename. -# -# @param FileName: The filename to be Converted -# -# @retval NoneWorkspace dir is not found in the full path -# @retval string The relative filename -# -def WorkspaceRelativePath(self, FileName): -FileName = os.path.realpath(FileName) -if FileName.find(self.WorkspaceDir) != 0: -return None -return FileName.replace (self.WorkspaceDir, '').strip('\\').strip('/') - -## Convert to a full path filename -# -# Convert a workspace relative filename to a full path filename. -# -# @param FileName: The filename to be Converted -# -# @retval string The full path filename -# -def WorkspaceFile(self, FileName): -return os.path.realpath(mws.join(self.WorkspaceDir,FileName)) - -##
[edk2] [PATCH v2 1/1] BaseTools: remove PlatformClass as it's not used
v2 - update makefile too. Cc: Liming GaoCc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/CommonDataClass/PlatformClass.py | 456 BaseTools/Source/Python/Makefile | 1 - 2 files changed, 457 deletions(-) diff --git a/BaseTools/Source/Python/CommonDataClass/PlatformClass.py b/BaseTools/Source/Python/CommonDataClass/PlatformClass.py deleted file mode 100644 index a93d1ce2a1db.. --- a/BaseTools/Source/Python/CommonDataClass/PlatformClass.py +++ /dev/null @@ -1,456 +0,0 @@ -## @file -# This file is used to define a class object to describe a platform -# -# Copyright (c) 2007 - 2016, 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. - -## -# Import Modules -# -from CommonClass import * - -## SkuInfoListClass -# -# This class defined sku info list item used in platform file -# -# @param IncludeStatementClass: Inherited from IncludeStatementClass class -# -# @var SkuInfoList: To store value for SkuInfoList, it is a set structure as -#{ SkuName : SkuId } -# -class SkuInfoListClass(IncludeStatementClass): -def __init__(self): -IncludeStatementClass.__init__(self) -self.SkuInfoList = {} - -## PlatformHeaderClass -# -# This class defined header items used in Platform file -# -# @param IdentificationClass:Inherited from IdentificationClass class -# @param CommonHeaderClass: Inherited from CommonHeaderClass class -# @param DefineClass:Inherited from DefineClass class -# -# @var DscSpecification: To store value for DscSpecification -# @var SupArchList: To store value for SupArchList, selection scope is in below list -#EBC | IA32 | X64 | IPF | ARM | PPC | AARCH64 -# @var BuildTargets: To store value for BuildTargets, selection scope is in below list -#RELEASE | DEBUG -# @var IntermediateDirectories: To store value for IntermediateDirectories, selection scope is in below list -#MODULE | UNIFIED -# @var OutputDirectory: To store value for OutputDirectory -# @var ForceDebugTarget: To store value for ForceDebugTarget -# @var SkuIdName:To store value for SkuIdName -# @var BuildNumber: To store value for BuildNumber -# @var MakefileName: To store value for MakefileName -# @var ClonedFrom: To store value for ClonedFrom, it is a list structure as -#[ ClonedRecordClass, ... ] -# -class PlatformHeaderClass(IdentificationClass, CommonHeaderClass, DefineClass): -def __init__(self): -IdentificationClass.__init__(self) -CommonHeaderClass.__init__(self) -DefineClass.__init__(self) -self.DscSpecification = '' -self.SupArchList = [] -self.BuildTargets = [] -self.IntermediateDirectories = '' -self.OutputDirectory = '' -self.ForceDebugTarget = '' -self.SkuIdName = [] -self.BuildNumber = '' -self.MakefileName = '' -self.ClonedFrom = [] - -## PlatformFlashDefinitionFileClass -# -# This class defined FlashDefinitionFile item used in platform file -# -# @param object: Inherited from object class -# -# @var Id: To store value for Id -# @var UiName: To store value for UiName -# @var Preferred: To store value for Preferred -# @var FilePath: To store value for FilePath -# -class PlatformFlashDefinitionFileClass(object): -def __init__(self): -self.Id = '' -self.UiName = '' -self.Preferred = False -self.FilePath = '' - -## BuildScriptClass -# -# This class defined PREBUILD/POSTBUILD item used in platform file -# -# @param object: Inherited from object class -# -# @var Id: To store value for Id -# @var UiName: To store value for UiName -# @var Preferred: To store value for Preferred -# @var FilePath: To store value for FilePath -# -class BuildScriptClass(object): -def __init__(self): -self.Id = '' -self.UiName = '' -self.Preferred = False -self.FilePath = '' - -## PlatformFvImageOptionClass -# -# This class defined FvImageOption item used in platform file -# -# @param object: Inherited from object class -# -# @var
Re: [edk2] [PATCH edk2-platforms 23/39] Platform/NXP: Compilation for LS1046A RDB Board
On Fri, Feb 16, 2018 at 02:20:19PM +0530, Meenakshi wrote: > From: Vabhav> > Adding firmware device,description and declaration files to enable > compilation for NXP LS1046ARDB board. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Vabhav No comments on this beyond the aforementioned include handling and varstore changes for upstream. / Leif > --- > Platform/NXP/LS1046aRdbPkg/LS1046aRdbPkg.dec | 29 > Platform/NXP/LS1046aRdbPkg/LS1046aRdbPkg.dsc | 94 + > Platform/NXP/LS1046aRdbPkg/LS1046aRdbPkg.fdf | 197 > +++ > 3 files changed, 320 insertions(+) > create mode 100644 Platform/NXP/LS1046aRdbPkg/LS1046aRdbPkg.dec > create mode 100644 Platform/NXP/LS1046aRdbPkg/LS1046aRdbPkg.dsc > create mode 100644 Platform/NXP/LS1046aRdbPkg/LS1046aRdbPkg.fdf > > diff --git a/Platform/NXP/LS1046aRdbPkg/LS1046aRdbPkg.dec > b/Platform/NXP/LS1046aRdbPkg/LS1046aRdbPkg.dec > new file mode 100644 > index 000..a872ade > --- /dev/null > +++ b/Platform/NXP/LS1046aRdbPkg/LS1046aRdbPkg.dec > @@ -0,0 +1,29 @@ > +# LS1046aRdbPkg.dec > +# LS1046a board package. > +# > +# Copyright 2017 NXP > +# > +# 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] > + PACKAGE_NAME = LS1046aRdbPkg > + PACKAGE_GUID = c0c8d5e4-f63b-4470-89bc-73c13c13b247 > + > + > +# > +# Include Section - list of Include Paths that are provided by this package. > +# Comments are used for Keywords and Module Types. > +# > +# Supported Module Types: > +# BASE SEC PEI_CORE PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER > DXE_SMM_DRIVER DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION > +# > + > +[Includes.common] > + Include# Root include for the package > diff --git a/Platform/NXP/LS1046aRdbPkg/LS1046aRdbPkg.dsc > b/Platform/NXP/LS1046aRdbPkg/LS1046aRdbPkg.dsc > new file mode 100644 > index 000..36002d5 > --- /dev/null > +++ b/Platform/NXP/LS1046aRdbPkg/LS1046aRdbPkg.dsc > @@ -0,0 +1,94 @@ > +# LS1046aRdbPkg.dsc > +# > +# LS1046ARDB Board package. > +# > +# Copyright 2017 NXP > +# > +# 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 Section - statements that will be processed to create a Makefile. > +# > + > +[Defines] > + # > + # Defines for default states. These can be changed on the command line. > + # -D FLAG=VALUE > + # > + PLATFORM_NAME = LS1046aRdbPkg > + PLATFORM_GUID = 43920156-3f3b-4199-9b29-c6db1fb792b0 > + OUTPUT_DIRECTORY = Build/LS1046aRdbPkg > + FLASH_DEFINITION = > Platform/NXP/LS1046aRdbPkg/LS1046aRdbPkg.fdf > + > +!include ../NxpQoriqLs.dsc > +!include ../../../Silicon/NXP/LS1046A/LS1046A.dsc > + > +[LibraryClasses.common] > + > ArmPlatformLib|Platform/NXP/LS1046aRdbPkg/Library/PlatformLib/ArmPlatformLib.inf > + > ResetSystemLib|ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSystemLib.inf > + SerialPortLib|Silicon/NXP/Library/DUartPortLib/DUartPortLib.inf > + BeIoLib|Silicon/NXP/Library/BeIoLib/BeIoLib.inf > + SocLib|Silicon/NXP/Chassis/LS1046aSocLib.inf > + RealTimeClockLib|Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129RtcLib.inf > + IfcLib|Silicon/NXP/Library/IfcLib/IfcLib.inf > + BoardLib|Platform/NXP/LS1046aRdbPkg/Library/BoardLib/BoardLib.inf > + FpgaLib|Platform/NXP/LS1046aRdbPkg/Library/FpgaLib/FpgaLib.inf > + > +[PcdsFixedAtBuild.common] > + > + # > + # LS1046a board Specific PCDs > + # XX (DRAM - Region 1 2GB) > + # (NOR - IFC Region 1 512MB) > + gArmTokenSpaceGuid.PcdSystemMemoryBase|0x8000 > + gArmTokenSpaceGuid.PcdSystemMemorySize|0x8000 > + gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x0200 > + > + # > + # Board Specific Pcds > + # > +
Re: [edk2] [PATCH edk2-platforms] Silicon/Socionext/SynQuacer: update PHY reference clock rate
Hi Ard, Yes, please apply to all boards. Thank you. On 19 April 2018 at 20:15, Ard Biesheuvelwrote: > On 16 April 2018 at 13:25, Masahisa Kojima wrote: >> Hi Ard, >> >>> Please confirm that the modification to ogma_config.h is correct. >> >> Thank you very much for your update. >> We confirmed and your modification is correct. >> > > Thank you Masahisa > > Does this change apply to all boards? EVB, rev 0.1 etc? ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms 22/39] Platform/NXP: LS1046 RDB Board FPGA library
On Fri, Feb 16, 2018 at 02:20:18PM +0530, Meenakshi wrote: > From: Meenakshi Aggarwal> > Library to provide functions for accessing FPGA > on LS1046ARDB board. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Vabhav > Signed-off-by: Meenakshi Aggarwal I compare this one to LS1043aRdbPkg/Library/FpgaLib, and the differences in the .c file are --- Platform/NXP/LS1043aRdbPkg/Library/FpgaLib/FpgaLib.c 2018-04-18 15:13:08.507949763 +0100 +++ Platform/NXP/LS1046aRdbPkg/Library/FpgaLib/FpgaLib.c 2018-04-18 15:13:08.531949605 +0100 @@ -1,5 +1,5 @@ /** @FpgaLib.c - Fpga Library for LS1043A-RDB board, containing functions to + Fpga Library for LS1046A-RDB board, containing functions to program and read the Fpga registers. FPGA is connected to IFC Controller and so MMIO APIs are used @@ -137,6 +137,8 @@ Sd1RefClkSel = FPGA_READ(Sd1RefClkSel); DEBUG((DEBUG_INFO, "SD1_CLK1 = %a, SD1_CLK2 = %a\n", Sd1RefClkSel ? SERDES_FREQ2 : SERDES_FREQ1, SERDES_FREQ1)); + DEBUG((DEBUG_INFO, "SD2_CLK1 = %a, SD2_CLK2 = %a\n", + SERDES_FREQ1, SERDES_FREQ1)); return; } Could these two libraries be merged into a single LS104xx variant? The LS2088a one seems to have substantial differences, so that makes sense to keep separate. No other comments on this patch. / Leif > --- > .../NXP/LS1046aRdbPkg/Include/Library/FpgaLib.h| 97 ++ > .../NXP/LS1046aRdbPkg/Library/FpgaLib/FpgaLib.c| 144 > + > .../NXP/LS1046aRdbPkg/Library/FpgaLib/FpgaLib.inf | 32 + > 3 files changed, 273 insertions(+) > create mode 100644 Platform/NXP/LS1046aRdbPkg/Include/Library/FpgaLib.h > create mode 100644 Platform/NXP/LS1046aRdbPkg/Library/FpgaLib/FpgaLib.c > create mode 100644 Platform/NXP/LS1046aRdbPkg/Library/FpgaLib/FpgaLib.inf > > diff --git a/Platform/NXP/LS1046aRdbPkg/Include/Library/FpgaLib.h > b/Platform/NXP/LS1046aRdbPkg/Include/Library/FpgaLib.h > new file mode 100644 > index 000..c8f7411 > --- /dev/null > +++ b/Platform/NXP/LS1046aRdbPkg/Include/Library/FpgaLib.h > @@ -0,0 +1,97 @@ > +/** FpgaLib.h > +* Header defining the LS1046a Fpga specific constants (Base addresses, > sizes, flags) > +* > +* Copyright 2017 NXP > +* > +* 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 __LS1046A_FPGA_H__ > +#define __LS1046A_FPGA_H__ > + > +/** > + FPGA register set of LS1046ARDB board-specific. > + **/ > +typedef struct { > + UINT8 FpgaVersionMajor; // 0x0 - FPGA Major Revision Register > + UINT8 FpgaVersionMinor; // 0x1 - FPGA Minor Revision Register > + UINT8 PcbaVersion; // 0x2 - PCBA Revision Register > + UINT8 SystemReset; // 0x3 - system reset register > + UINT8 SoftMuxOn;// 0x4 - Switch Control Enable Register > + UINT8 RcwSource1; // 0x5 - Reset config word 1 > + UINT8 RcwSource2; // 0x6 - Reset config word 1 > + UINT8 Vbank;// 0x7 - Flash bank selection Control > + UINT8 SysclkSelect; // 0x8 - System clock selection Control > + UINT8 UartSel; // 0x9 - Uart selection Control > + UINT8 Sd1RefClkSel; // 0xA - Serdes1 reference clock selection Control > + UINT8 TdmClkMuxSel; // 0xB - TDM Clock Mux selection Control > + UINT8 SdhcSpiCsSel; // 0xC - SDHC/SPI Chip select selection Control > + UINT8 StatusLed;// 0xD - Status Led > + UINT8 GlobalReset; // 0xE - Global reset > + UINT8 SdEmmc; // 0xF - SD or EMMC Interface Control Regsiter > + UINT8 VddEn;// 0x10 - VDD Voltage Control Enable Register > + UINT8 VddSel; // 0x11 - VDD Voltage Control Register > +} FPGA_REG_SET; > + > +/** > + Function to read FPGA register. > +**/ > +UINT8 > +FpgaRead ( > + UINTN Reg > + ); > + > +/** > + Function to write FPGA register. > +**/ > +VOID > +FpgaWrite ( > + UINTN Reg, > + UINT8 Value > + ); > + > +/** > + Function to read FPGA revision. > +**/ > +VOID > +FpgaRevBit ( > + UINT8 *Value > + ); > + > +/** > + Function to initialize FPGA timings. > +**/ > +VOID > +FpgaInit ( > + VOID > + ); > + > +/** > + Function to print board personality. > +**/ > +VOID > +PrintBoardPersonality ( > + VOID > + ); > + > +#define FPGA_BASE_PHYS 0x7fb0 > + > +#define SRC_VBANK 0x25 > +#define SRC_NAND0x106 > +#define SRC_QSPI0x44 > +#define SRC_SD 0x40 > + > +#define SERDES_FREQ1"100.00
Re: [edk2] [PATCH edk2-platforms 21/39] Platform/NXP: Add ArmPlatformLib for LS1046A
On Fri, Feb 16, 2018 at 02:20:17PM +0530, Meenakshi wrote: > From: Vabhav> > Adding support of ArmPlatformLib for NXP LS1046ARDB board > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Vabhav > Signed-off-by: Meenakshi Aggarwal > --- > .../Library/PlatformLib/ArmPlatformLib.c | 105 ++ > .../Library/PlatformLib/ArmPlatformLib.inf | 66 + > .../Library/PlatformLib/NxpQoriqLsHelper.S | 35 + > .../Library/PlatformLib/NxpQoriqLsMem.c| 152 > + > 4 files changed, 358 insertions(+) > create mode 100644 > Platform/NXP/LS1046aRdbPkg/Library/PlatformLib/ArmPlatformLib.c > create mode 100644 > Platform/NXP/LS1046aRdbPkg/Library/PlatformLib/ArmPlatformLib.inf > create mode 100644 > Platform/NXP/LS1046aRdbPkg/Library/PlatformLib/NxpQoriqLsHelper.S > create mode 100644 > Platform/NXP/LS1046aRdbPkg/Library/PlatformLib/NxpQoriqLsMem.c > > diff --git a/Platform/NXP/LS1046aRdbPkg/Library/PlatformLib/ArmPlatformLib.c > b/Platform/NXP/LS1046aRdbPkg/Library/PlatformLib/ArmPlatformLib.c > new file mode 100644 > index 000..a0bb01d > --- /dev/null > +++ b/Platform/NXP/LS1046aRdbPkg/Library/PlatformLib/ArmPlatformLib.c > @@ -0,0 +1,105 @@ > +/** ArmPlatformLib.c > +* > +* Contains board initialization functions. > +* > +* Based on BeagleBoardPkg/Library/BeagleBoardLib/BeagleBoard.c > +* > +* Copyright (c) 2011-2012, ARM Limited. All rights reserved. > +* Copyright (c) 2016, Freescale Semiconductor, Inc. All rights reserved. > +* Copyright 2017 NXP > +* > +* 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 > + > +extern VOID SocInit (VOID); > + > +/** > + Return the current Boot Mode > + > + This function returns the boot reason on the platform > + > +**/ > +EFI_BOOT_MODE > +ArmPlatformGetBootMode ( > + VOID > + ) > +{ > + return BOOT_WITH_FULL_CONFIGURATION; > +} > + > +/** > + Placeholder for Platform Initialization > +**/ > +EFI_STATUS > +ArmPlatformInitialize ( > + IN UINTN MpId > + ) > +{ > + SocInit (); > + > + return EFI_SUCCESS; Indentation 2 spaces. With that fixed: Reviewed-by: Leif Lindholm > +} > + > +ARM_CORE_INFO LS1046aMpCoreInfoCTA72x4[] = { > + { > +// Cluster 0, Core 0 > +0x0, 0x0, > + > +// MP Core MailBox Set/Get/Clear Addresses and Clear Value > +(EFI_PHYSICAL_ADDRESS)0, > +(EFI_PHYSICAL_ADDRESS)0, > +(EFI_PHYSICAL_ADDRESS)0, > +(UINT64)0x > + }, > +}; > + > +EFI_STATUS > +PrePeiCoreGetMpCoreInfo ( > + OUT UINTN *CoreCount, > + OUT ARM_CORE_INFO **ArmCoreTable > + ) > +{ > + *CoreCount= sizeof (LS1046aMpCoreInfoCTA72x4) / sizeof (ARM_CORE_INFO); > + *ArmCoreTable = LS1046aMpCoreInfoCTA72x4; > + > + return EFI_SUCCESS; > +} > + > +ARM_MP_CORE_INFO_PPI mMpCoreInfoPpi = { PrePeiCoreGetMpCoreInfo }; > + > +EFI_PEI_PPI_DESCRIPTOR gPlatformPpiTable[] = { > + { > +EFI_PEI_PPI_DESCRIPTOR_PPI, > +, > + > + } > +}; > + > +VOID > +ArmPlatformGetPlatformPpiList ( > + OUT UINTN *PpiListSize, > + OUT EFI_PEI_PPI_DESCRIPTOR **PpiList > + ) > +{ > + *PpiListSize = sizeof (gPlatformPpiTable); > + *PpiList = gPlatformPpiTable; > +} > + > + > +UINTN > +ArmPlatformGetCorePosition ( > + IN UINTN MpId > + ) > +{ > + return 1; > +} > diff --git > a/Platform/NXP/LS1046aRdbPkg/Library/PlatformLib/ArmPlatformLib.inf > b/Platform/NXP/LS1046aRdbPkg/Library/PlatformLib/ArmPlatformLib.inf > new file mode 100644 > index 000..49b57fc > --- /dev/null > +++ b/Platform/NXP/LS1046aRdbPkg/Library/PlatformLib/ArmPlatformLib.inf > @@ -0,0 +1,66 @@ > +# @file > +# > +# Copyright 2017 NXP > +# > +# This program and the accompanying materials > +# are licensed and made available under the terms and conditions of the BSD > License > +# which accompanies this distribution. The full text of the license may be > found at > +# http://opensource.org/licenses/bsd-license.php > +# > +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR > IMPLIED. > +# > + > +[Defines] > + INF_VERSION= 0x0001001A > + BASE_NAME = PlatformLib > + FILE_GUID = 05a9029b-266f-421d-bb46-0e8385c64aa0 > + MODULE_TYPE= BASE > + VERSION_STRING = 1.0 > + LIBRARY_CLASS
Re: [edk2] [PATCH edk2-platforms 20/39] Platform/NXP: LS1046A RDB Board Library
On Fri, Feb 16, 2018 at 02:20:16PM +0530, Meenakshi wrote: > From: Meenakshi Aggarwal> > Library to provide board specific timings for LS1046ARDB > board with interfacing to IFC controller for accessing > FPGA and NAND. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Vabhav > Signed-off-by: Meenakshi Aggarwal Reviewed-by: Leif Lindholm > --- > .../NXP/LS1046aRdbPkg/Include/IfcBoardSpecific.h | 83 > ++ > .../NXP/LS1046aRdbPkg/Library/BoardLib/BoardLib.c | 61 > .../LS1046aRdbPkg/Library/BoardLib/BoardLib.inf| 31 > 3 files changed, 175 insertions(+) > create mode 100644 Platform/NXP/LS1046aRdbPkg/Include/IfcBoardSpecific.h > create mode 100644 Platform/NXP/LS1046aRdbPkg/Library/BoardLib/BoardLib.c > create mode 100644 Platform/NXP/LS1046aRdbPkg/Library/BoardLib/BoardLib.inf > > diff --git a/Platform/NXP/LS1046aRdbPkg/Include/IfcBoardSpecific.h > b/Platform/NXP/LS1046aRdbPkg/Include/IfcBoardSpecific.h > new file mode 100644 > index 000..e15100d > --- /dev/null > +++ b/Platform/NXP/LS1046aRdbPkg/Include/IfcBoardSpecific.h > @@ -0,0 +1,83 @@ > +/** IfcBoardSpecificLib.h > + > + IFC Flash Board Specific Macros and structure > + > + Copyright 2017 NXP > + > + 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 __IFC__BOARD_SPECIFIC_H__ > +#define __IFC__BOARD_SPECIFIC_H__ > + > +#include > + > +// On board flash support > +#define IFC_NAND_BUF_BASE0x7E80 > + > +// On board Inegrated flash Controller chip select configuration > +#define IFC_NOR_CSIFC_CS_MAX > +#define IFC_NAND_CS IFC_CS0 > +#define IFC_FPGA_CS IFC_CS2 > + > +// board-specific NAND timing > +#define NAND_FTIM0(IFC_FTIM0_NAND_TCCST(0x7) | \ > + IFC_FTIM0_NAND_TWP(0x18) | \ > + IFC_FTIM0_NAND_TWCHT(0x7) | \ > + IFC_FTIM0_NAND_TWH(0xa)) > + > +#define NAND_FTIM1(IFC_FTIM1_NAND_TADLE(0x32) | \ > + IFC_FTIM1_NAND_TWBE(0x39) | \ > + IFC_FTIM1_NAND_TRR(0xe) | \ > + IFC_FTIM1_NAND_TRP(0x18)) > + > +#define NAND_FTIM2(IFC_FTIM2_NAND_TRAD(0xf) | \ > + IFC_FTIM2_NAND_TREH(0xa) | \ > + IFC_FTIM2_NAND_TWHRE(0x1e)) > + > +#define NAND_FTIM30x0 > + > +#define NAND_CSPR (IFC_CSPR_PHYS_ADDR(IFC_NAND_BUF_BASE) \ > +| IFC_CSPR_PORT_SIZE_8 \ > +| IFC_CSPR_MSEL_NAND \ > +| IFC_CSPR_V) > + > +#define NAND_CSPR_EXT 0x0 > +#define NAND_AMASK 0x > + > +#define NAND_CSOR (IFC_CSOR_NAND_ECC_ENC_EN /* ECC on encode */ \ > + | IFC_CSOR_NAND_ECC_DEC_EN /* ECC on decode */ \ > + | IFC_CSOR_NAND_ECC_MODE_8 /* 8-bit ECC */ \ > + | IFC_CSOR_NAND_RAL_3 /* RAL = 3 Bytes */ \ > + | IFC_CSOR_NAND_PGS_4K /* Page Size = 4K */ \ > + | IFC_CSOR_NAND_SPRZ_224 /* Spare size = 224 */ \ > + | IFC_CSOR_NAND_PB(6)) /* 2^6 Pages Per Block */ > + > +// board-specific fpga timing > +#define FPGA_BASE_PHYS 0x7fb0 > +#define FPGA_CSPR_EXT 0x0 > +#define FPGA_CSPR (IFC_CSPR_PHYS_ADDR(FPGA_BASE_PHYS) | \ > +IFC_CSPR_PORT_SIZE_8 | \ > +IFC_CSPR_MSEL_GPCM | \ > +IFC_CSPR_V) > + > +#define FPGA_AMASK IFC_AMASK(64 * 1024) > +#define FPGA_CSOR IFC_CSOR_NOR_ADM_SHIFT(16) > + > +#define FPGA_FTIM0 (IFC_FTIM0_GPCM_TACSE(0x0e) | \ > +IFC_FTIM0_GPCM_TEADC(0x0e) | \ > +IFC_FTIM0_GPCM_TEAHC(0x0e)) > +#define FPGA_FTIM1 (IFC_FTIM1_GPCM_TACO(0xff) | \ > +IFC_FTIM1_GPCM_TRAD(0x3f)) > +#define FPGA_FTIM2 (IFC_FTIM2_GPCM_TCS(0xf) | \ > +IFC_FTIM2_GPCM_TCH(0xf) | \ > +IFC_FTIM2_GPCM_TWP(0x3E)) > +#define FPGA_FTIM3 0x0 > + > +#endif //__IFC__BOARD_SPECIFIC_H__ > diff --git a/Platform/NXP/LS1046aRdbPkg/Library/BoardLib/BoardLib.c > b/Platform/NXP/LS1046aRdbPkg/Library/BoardLib/BoardLib.c > new file mode 100644 > index 000..0971935 > --- /dev/null > +++ b/Platform/NXP/LS1046aRdbPkg/Library/BoardLib/BoardLib.c > @@ -0,0 +1,61 @@ > +/** @file > + > + Copyright 2018 NXP > + > + This program and the accompanying materials > +
Re: [edk2] [PATCH edk2-platforms 19/39] Silicon/NXP:Add support for PCF2129 Real Time Clock Library
On Thu, Apr 19, 2018 at 12:33:50PM +, Meenakshi Aggarwal wrote: > > > +EFI_STATUS > > > +EFIAPI > > > +LibSetTime ( > > > + IN EFI_TIME*Time > > > + ) > > > +{ > > > + UINT8 Buffer[8]; > > > + UINT8 Index; > > > + EFI_STATUS Status; > > > + RTC_I2C_REQUEST Req; > > > + UINT8 RtcRegAddr; > > > + > > > + Index = 0; > > > + Status = EFI_SUCCESS; > > > + RtcRegAddr = PCF2129_CTRL1_REG_ADDR; > > > + > > > + if (mI2cMaster == NULL) { > > > +return EFI_DEVICE_ERROR; > > > + } > > > + > > > + // start register address > > > + Buffer[Index++] = PCF2129_SEC_REG_ADDR; > > > + > > > + // hours, minutes and seconds > > > + Buffer[Index++] = DecimalToBcd8 (Time->Second); > > > + Buffer[Index++] = DecimalToBcd8 (Time->Minute); > > > + Buffer[Index++] = DecimalToBcd8 (Time->Hour); > > > + Buffer[Index++] = DecimalToBcd8 (Time->Day); > > > + Buffer[Index++] = EfiTimeToWday (Time) & 0x07; > > > > Why mask at the call site? > > > In GetTime function, data is been read from RTC device so we need to > mask the unnecessary bits > [as described in RTC registers] while > In SetTime, we are receiving the appropriate buffer so no need to > mask the data. But EfiTimeToWday returns an integer in the range 0-6: return (EpochDays + 4) % 7; Anding the result of that with 0x7 has no effect. / Leif ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [RFC v2 0/4] Add FmpDevicePkg
On 17 April 2018 at 23:05, Kinney, Michael Dwrote: > https://bugzilla.tianocore.org/show_bug.cgi?id=922 > Could we document somewhere why this new code is a better implementation of FMP than we already have in SignedCapsulePkg? > Changes in V2 > = > * FmpDevicePkg DEC file > + Change PcdFmpDeviceSystemResetRequired from FeatureFlag > to FixedAtBuild > + Add PcdFmpDeviceTestKeySha256Digest for test key detection. > Set to {0} to disable test key detection. > * FmpDevicePkg DSC file > + Fix ARM and AARCH64 build issues > + Update DisplayUpdateProgressLib mappings to match patches in > Bug_801_DisplayUpdateProgressLib_V2 > * FmpDeviceLib Class and Instance > + Update FmpDeviceGetSize() to return EFI_STATUS > + Update FmpDeviceGetAttributes() to return EFI_STATUS > + Update FmpDeviceGetVersionString() to return EFI_STATUS > * FmpDxe > + Set depex to Variable Arch Write Protocol and Variable Lock Protocol > + Break out test key detection in FmpDxe into DetectTestKey.c > + Change LockAllVars() to LockAllFmpVariables() > + Update LockAllFmpVariables() to lock each of the UEFI variables used. > + Always lock UEFI variables when PcdFmpDeviceLockEventGuid is signaled > + Remove ComputeVersionName(). FmpDeviceLib must provide version string > > Based on content from the following branch: > > https://github.com/Microsoft/MS_UEFI/tree/share/MsCapsuleSupport/MsCapsuleUpdatePkg > > Branch for review: > > https://github.com/mdkinney/edk2/tree/Bug_922_FmpDevicePkg_V2 > > This package provides an implementation of a Firmware Management Protocol > instance that supports the update of firmware storage devices using UEFI > Capsules. The behavior of the Firmware Management Protocol instance is > customized using libraries and PCDs. > > Cc: Sean Brogan > Cc: Jiewen Yao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Michael D Kinney > > Kinney, Michael D (4): > FmpDevicePkg: Add package, library classes, and PCDs > FmpDevicePkg: Add library instances > FmpDevicePkg: Add FmpDxe module > FmpDevicePkg: Add DSC file to build all package components > > FmpDevicePkg/FmpDevicePkg.dec | 132 ++ > FmpDevicePkg/FmpDevicePkg.dsc | 134 ++ > FmpDevicePkg/FmpDevicePkg.uni | 80 ++ > FmpDevicePkg/FmpDevicePkgExtra.uni | 18 + > FmpDevicePkg/FmpDxe/DetectTestKey.c| 166 +++ > FmpDevicePkg/FmpDxe/FmpDxe.c | 1451 > > FmpDevicePkg/FmpDxe/FmpDxe.inf | 93 ++ > FmpDevicePkg/FmpDxe/FmpDxe.uni | 20 + > FmpDevicePkg/FmpDxe/FmpDxeExtra.uni| 18 + > FmpDevicePkg/FmpDxe/FmpDxeLib.inf | 90 ++ > FmpDevicePkg/FmpDxe/VariableSupport.c | 461 +++ > FmpDevicePkg/FmpDxe/VariableSupport.h | 180 +++ > .../Include/Library/CapsuleUpdatePolicyLib.h | 120 ++ > FmpDevicePkg/Include/Library/FmpDeviceLib.h| 405 ++ > FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h | 100 ++ > .../CapsuleUpdatePolicyLibNull.c | 136 ++ > .../CapsuleUpdatePolicyLibNull.inf | 45 + > .../CapsuleUpdatePolicyLibNull.uni | 17 + > .../Library/FmpDeviceLibNull/FmpDeviceLib.c| 427 ++ > .../Library/FmpDeviceLibNull/FmpDeviceLibNull.inf | 48 + > .../Library/FmpDeviceLibNull/FmpDeviceLibNull.uni | 18 + > .../FmpPayloadHeaderLibV1/FmpPayloadHeaderLib.c| 188 +++ > .../FmpPayloadHeaderLibV1.inf | 48 + > .../FmpPayloadHeaderLibV1.uni | 21 + > 24 files changed, 4416 insertions(+) > create mode 100644 FmpDevicePkg/FmpDevicePkg.dec > create mode 100644 FmpDevicePkg/FmpDevicePkg.dsc > create mode 100644 FmpDevicePkg/FmpDevicePkg.uni > create mode 100644 FmpDevicePkg/FmpDevicePkgExtra.uni > create mode 100644 FmpDevicePkg/FmpDxe/DetectTestKey.c > create mode 100644 FmpDevicePkg/FmpDxe/FmpDxe.c > create mode 100644 FmpDevicePkg/FmpDxe/FmpDxe.inf > create mode 100644 FmpDevicePkg/FmpDxe/FmpDxe.uni > create mode 100644 FmpDevicePkg/FmpDxe/FmpDxeExtra.uni > create mode 100644 FmpDevicePkg/FmpDxe/FmpDxeLib.inf > create mode 100644 FmpDevicePkg/FmpDxe/VariableSupport.c > create mode 100644 FmpDevicePkg/FmpDxe/VariableSupport.h > create mode 100644 FmpDevicePkg/Include/Library/CapsuleUpdatePolicyLib.h > create mode 100644 FmpDevicePkg/Include/Library/FmpDeviceLib.h > create mode 100644 FmpDevicePkg/Include/Library/FmpPayloadHeaderLib.h > create mode 100644 > FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.c > create mode 100644 > FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf > create mode 100644 >
Re: [edk2] [PATCH edk2-non-osi v2 1/1] Hisilicon/Sm750Dxe: Unify binary and fix GOP frame buffer base
On 31 March 2018 at 02:36, Guo Heyiwrote: > Yes, it is https://github.com/iwishguo/edk2-non-osi/tree/patch-sm750-fix-v2 > > I just put in the cover letter :) > Pushed as a608c352766efbea4c32123d26073e10daf87d62 > On Fri, Mar 30, 2018 at 11:56:01AM +0100, Ard Biesheuvel wrote: >> On 29 March 2018 at 01:06, Guo Heyi wrote: >> > Ah, I made the change locally but forgot to send it out... >> > >> > Now it is there :) >> > >> >> Thanks. >> >> Do you have a repo link for the binary patch? >> >> >> >> > On Wed, Mar 28, 2018 at 03:37:19PM +0200, Ard Biesheuvel wrote: >> >> On 26 March 2018 at 10:25, Heyi Guo wrote: >> >> > Sm750Dxe is a generic PCIe device driver for SM750 VGA device, so it >> >> > is not necessary to maintain two different binary images for D03 and >> >> > D05 respectively. >> >> > >> >> > The main difference between D03 and D05 is the implementation of >> >> > SerialPortLib, which causes BaseDebugLibSerialPort to be different. So >> >> > we switch to null DebugLib for release build and get a unified >> >> > Sm750Dxe binary. >> >> > >> >> > The code in SM750 driver treated the address returned from >> >> > PciIo->GetBarAttributes() as device address; this should be fixed >> >> > after edk2 commit dc080d3 since GetBarAttributes() returns host >> >> > address from then on. >> >> > >> >> > Contributed-under: TianoCore Contribution Agreement 1.1 >> >> > Signed-off-by: Heyi Guo >> >> > Signed-off-by: Yi Li >> >> > Cc: Ard Biesheuvel >> >> > Cc: Leif Lindholm >> >> > Cc: Michael D Kinney >> >> >> >> Reviewed-by: Ard Biesheuvel >> >> >> >> Obviously, this requires a matching update in edk2-platforms, so >> >> please send that out and we can apply both at the same time. >> >> >> >> >> >> > --- >> >> > Platform/Hisilicon/D03/Drivers/Sm750Dxe/UefiSmi.inf | 32 >> >> > >> >> > Platform/Hisilicon/{D05 => }/Drivers/Sm750Dxe/UefiSmi.inf | 0 >> >> > Platform/Hisilicon/D03/Drivers/Sm750Dxe/SmiGraphicsOutput.efi | Bin >> >> > 17728 -> 0 bytes >> >> > Platform/Hisilicon/D05/Drivers/Sm750Dxe/SmiGraphicsOutput.efi | Bin >> >> > 18592 -> 0 bytes >> >> > Platform/Hisilicon/Drivers/Sm750Dxe/SmiGraphicsOutput.efi | Bin 0 >> >> > -> 17760 bytes >> >> > 5 files changed, 32 deletions(-) >> >> > >> >> > diff --git a/Platform/Hisilicon/D03/Drivers/Sm750Dxe/UefiSmi.inf >> >> > b/Platform/Hisilicon/D03/Drivers/Sm750Dxe/UefiSmi.inf >> >> > deleted file mode 100644 >> >> > index a2618331440f.. >> >> > --- a/Platform/Hisilicon/D03/Drivers/Sm750Dxe/UefiSmi.inf >> >> > +++ /dev/null >> >> > @@ -1,32 +0,0 @@ >> >> > -#/** @file >> >> > -# >> >> > -#Copyright (c) 2016, Hisilicon Limited. All rights reserved. >> >> > -#Copyright (c) 2016, Linaro 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. >> >> > -# >> >> > -#**/ >> >> > - >> >> > - >> >> > -[Defines] >> >> > - INF_VERSION = 0x00010005 >> >> > - BASE_NAME= SmiGraphicsOutput >> >> > - FILE_GUID= BFB7B510-B09B-11DB-96E3-005056C8 >> >> > - MODULE_TYPE = UEFI_DRIVER >> >> > - VERSION_STRING = 1.0 >> >> > - >> >> > - PCI_VENDOR_ID= 0x126F >> >> > - PCI_DEVICE_ID= 0x0750 >> >> > - PCI_CLASS_CODE = 0x03 >> >> > - PCI_REVISION = 0xA1 >> >> > - COMPRESS = TRUE >> >> > - >> >> > -[Binaries] >> >> > - PE32|SmiGraphicsOutput.efi|* >> >> > - >> >> > diff --git a/Platform/Hisilicon/D05/Drivers/Sm750Dxe/UefiSmi.inf >> >> > b/Platform/Hisilicon/Drivers/Sm750Dxe/UefiSmi.inf >> >> > similarity index 100% >> >> > rename from Platform/Hisilicon/D05/Drivers/Sm750Dxe/UefiSmi.inf >> >> > rename to Platform/Hisilicon/Drivers/Sm750Dxe/UefiSmi.inf >> >> > diff --git >> >> > a/Platform/Hisilicon/D03/Drivers/Sm750Dxe/SmiGraphicsOutput.efi >> >> > b/Platform/Hisilicon/D03/Drivers/Sm750Dxe/SmiGraphicsOutput.efi >> >> > deleted file mode 100644 >> >> > index 16c91e2b18ef.. >> >> > Binary files >> >> > a/Platform/Hisilicon/D03/Drivers/Sm750Dxe/SmiGraphicsOutput.efi and >> >> > /dev/null differ >> >> > diff --git >> >> > a/Platform/Hisilicon/D05/Drivers/Sm750Dxe/SmiGraphicsOutput.efi >> >> > b/Platform/Hisilicon/D05/Drivers/Sm750Dxe/SmiGraphicsOutput.efi >> >> > deleted file
Re: [edk2] [PATCH edk2-platforms 1/1] Hisilicon/D0x: Use unified Sm750Dxe driver binary
On 29 March 2018 at 02:04, Heyi Guowrote: > Sm750Dxe is a generic PCIe device driver for SM750 VGA device and it > is not necessary to maintain two different binary images for D03 and > D05 respectively. > > This patch depends on another patch of unifying Sm750Dxe driver in > edk2-non-osi. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Heyi Guo > Signed-off-by: Yi Li > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Cc: Michael D Kinney Reviewed-by: Ard Biesheuvel Pushed as a30a05ba4580a90f84c13abec4971e5ca01c6a3f Thanks > --- > Platform/Hisilicon/D03/D03.dsc | 2 +- > Platform/Hisilicon/D05/D05.dsc | 2 +- > Platform/Hisilicon/D03/D03.fdf | 2 +- > Platform/Hisilicon/D05/D05.fdf | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/Platform/Hisilicon/D03/D03.dsc b/Platform/Hisilicon/D03/D03.dsc > index 26081a33a00a..d7b4cf035144 100644 > --- a/Platform/Hisilicon/D03/D03.dsc > +++ b/Platform/Hisilicon/D03/D03.dsc > @@ -469,7 +469,7 @@ [Components.common] > > > Platform/Hisilicon/D03/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.inf >Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.inf > - Platform/Hisilicon/D03/Drivers/Sm750Dxe/UefiSmi.inf > + Platform/Hisilicon/Drivers/Sm750Dxe/UefiSmi.inf > >Silicon/Hisilicon/Drivers/SasPlatform/SasPlatform.inf >Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClassDxe.inf > diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc > index d6febf471630..81cdc78b9468 100644 > --- a/Platform/Hisilicon/D05/D05.dsc > +++ b/Platform/Hisilicon/D05/D05.dsc > @@ -623,7 +623,7 @@ [Components.common] > > > Platform/Hisilicon/D05/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.inf >Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.inf > - Platform/Hisilicon/D05/Drivers/Sm750Dxe/UefiSmi.inf > + Platform/Hisilicon/Drivers/Sm750Dxe/UefiSmi.inf >Silicon/Hisilicon/Drivers/SasPlatform/SasPlatform.inf >MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf >Silicon/Hisilicon/Drivers/Smbios/MemorySubClassDxe/MemorySubClassDxe.inf > diff --git a/Platform/Hisilicon/D03/D03.fdf b/Platform/Hisilicon/D03/D03.fdf > index 0c843a3ce671..bc67ae70894a 100644 > --- a/Platform/Hisilicon/D03/D03.fdf > +++ b/Platform/Hisilicon/D03/D03.fdf > @@ -270,7 +270,7 @@ [FV.FvMain] >INF > Platform/Hisilicon/D03/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.inf ># VGA Driver ># > - INF Platform/Hisilicon/D03/Drivers/Sm750Dxe/UefiSmi.inf > + INF Platform/Hisilicon/Drivers/Sm750Dxe/UefiSmi.inf > >INF Silicon/Hisilicon/Drivers/SasPlatform/SasPlatform.inf >INF Platform/Hisilicon/D03/Drivers/Sas/SasDxeDriver.inf > diff --git a/Platform/Hisilicon/D05/D05.fdf b/Platform/Hisilicon/D05/D05.fdf > index b530e8e785a4..08766a54e611 100644 > --- a/Platform/Hisilicon/D05/D05.fdf > +++ b/Platform/Hisilicon/D05/D05.fdf > @@ -292,7 +292,7 @@ [FV.FvMain] >INF > Platform/Hisilicon/D05/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.inf ># VGA Driver ># > - INF Platform/Hisilicon/D05/Drivers/Sm750Dxe/UefiSmi.inf > + INF Platform/Hisilicon/Drivers/Sm750Dxe/UefiSmi.inf >INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf >INF Silicon/Hisilicon/Drivers/SasPlatform/SasPlatform.inf >INF Platform/Hisilicon/D05/Drivers/Sas/SasDxeDriver.inf > -- > 2.7.4 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms] Silicon/SynQuacer/NetsecDxe: fix buffer allocation bug
On 19 April 2018 at 12:44, Leif Lindholmwrote: > On Thu, Apr 12, 2018 at 11:23:49AM +0200, Ard Biesheuvel wrote: >> The receive buffers of the NETSEC driver are owned by the driver itself >> (as opposed to the protocol client in the case of the transmit path), >> and so the descriptors and the buffers (which are of a fixed size) are >> allocated in one go. The idea is that the 'buffer' member of the >> descriptor should point to a DMA aligned offset into the same allocation, >> but the code in pfdep_alloc_pkt_buf() calculates the value incorrectly, >> resulting in corruption of the descriptor metadata if the pool allocation >> happens to be DMA aligned. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ard Biesheuvel > > Reviewed-by: Leif Lindholm > Thanks Pushed as 61716249316b >> --- >> >> Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c >> | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git >> a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c >> >> b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c >> index b43d1aaff037..0875558c08ea 100644 >> --- >> a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c >> +++ >> b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c >> @@ -134,7 +134,7 @@ pfdep_alloc_pkt_buf ( >>return PFDEP_ERR_ALLOC; >> } >> >> -(*pkt_handle_p)->Buffer = ALIGN_POINTER (*pkt_handle_p, >> +(*pkt_handle_p)->Buffer = ALIGN_POINTER (*pkt_handle_p + 1, >> mCpu->DmaBufferAlignment); >>} >> >> -- >> 2.17.0 >> ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] ArmPkg/ArmMmuLib ARM: fix Mva to use idx instead of table base
On 16 April 2018 at 21:45, Chris Cowrote: > Hi Leif, > >> -Original Message- >> From: Leif Lindholm >> Sent: Monday, April 16, 2018 3:44 AM >> To: Chris Co >> Cc: edk2-devel@lists.01.org; Ard Biesheuvel >> Subject: Re: [PATCH] ArmPkg/ArmMmuLib ARM: fix Mva to use idx instead >> of table base >> >> On Fri, Apr 13, 2018 at 11:43:27PM +, Chris Co wrote: >> > Mva address calculation should use the left-shifted current section >> > index instead of the left-shifted table base address. >> > >> > Using the table base address here has the side-effect of potentially >> > causing an access violation depending on the base address value. >> > >> > Cc: Leif Lindholm >> > Cc: Ard Biesheuvel >> > Contributed-under: TianoCore Contribution Agreement 1.1 >> > Signed-off-by: Christopher Co >> > --- >> > ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c | 2 +- >> > 1 file changed, 1 insertion(+), 1 deletion(-) >> > >> > diff --git a/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c >> > b/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c >> > index 774a7ccf59..9bf4ba03fd 100644 >> > --- a/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c >> > +++ b/ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c >> > @@ -716,7 +716,7 @@ UpdateSectionEntries ( >> >Descriptor |= EntryValue; >> > >> >if (CurrentDescriptor != Descriptor) { >> > -Mva = (VOID *)(UINTN)(((UINTN)FirstLevelTable) << >> TT_DESCRIPTOR_SECTION_BASE_SHIFT); >> > +Mva = (VOID *)(UINTN)(((UINTN)FirstLevelIdx + i) << >> > + TT_DESCRIPTOR_SECTION_BASE_SHIFT); >> >> So, this clearly looks like you've found a bug - thanks! >> >> But I am a little bit confused about the patch - should this not need to >> incorporate the descriptor size in some way? >> I.e. something like >> Mva = (VOID *)(UINTN)(((UINTN)FirstLevelIdx + (i * sizeof(UINTN))) << >> TT_DESCRIPTOR_SECTION_BASE_SHIFT); >> or >> ... [FirstLevelIndex + i] ... >> >> ? >> >> Regards, >> >> Leif >> > I don't think descriptor size is needed here. > > My understanding is that Mva is the base address of the current section. > > FirstLevelidx is derived by the first section's BaseAddress >> 20. The > current section > index is then (FirstLevelIdx + i), which makes the base address of the current > section (FirstLeveLidx + i) << 20. > Indeed. 'Index' is a bit misleading here, given that it is the top level index into the entire VA space, and so it is congruent with the virtual base address itself. The use of 'FirstLevelTable' in this context is obviously incorrect, given that it refers to the [physical] address of the page tables itself, not to the virtual region they describe. Reviewed-by: Ard Biesheuvel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v1 1/1] BaseTools: remove EdkIIWorkspace as its not used.
Hi Jaben, Forgot to update the Makefile. Best Regards, Zhu Yonghong -Original Message- From: Carsey, Jaben Sent: Thursday, April 19, 2018 6:13 AM To: edk2-devel@lists.01.org Cc: Gao, Liming; Zhu, Yonghong Subject: [PATCH v1 1/1] BaseTools: remove EdkIIWorkspace as its not used. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Common/EdkIIWorkspace.py | 317 1 file changed, 317 deletions(-) diff --git a/BaseTools/Source/Python/Common/EdkIIWorkspace.py b/BaseTools/Source/Python/Common/EdkIIWorkspace.py deleted file mode 100644 index d75b9f8025b3.. --- a/BaseTools/Source/Python/Common/EdkIIWorkspace.py +++ /dev/null @@ -1,317 +0,0 @@ -## @file -# This is the base class for applications that operate on an EDK II Workspace -# -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved. -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# 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. -# - -## -# Import Modules -# -import Common.LongFilePathOs as os, sys, time -from DataType import * -from Common.LongFilePathSupport import OpenLongFilePath as open -from Common.MultipleWorkspace import MultipleWorkspace as mws - -## EdkIIWorkspace -# -# Collect WorkspaceDir from the environment, the Verbose command line flag, and detect an icon bitmap file. -# -# @var StartTime: Time of build system starting -# @var PrintRunTime:Printable time of build system running -# @var PrintRunStatus: Printable status of build system running -# @var RunStatus: Status of build system running -# -class EdkIIWorkspace: -def __init__(self): -self.StartTime = time.time() -self.PrintRunTime = False -self.PrintRunStatus = False -self.RunStatus = '' - -# -# Check environment valiable 'WORKSPACE' -# -if os.environ.get('WORKSPACE') is None: -print 'ERROR: WORKSPACE not defined.Please run EdkSetup from the EDK II install directory.' -return False - -self.CurrentWorkingDir = os.getcwd() - -self.WorkspaceDir = os.path.realpath(os.environ.get('WORKSPACE')) -(Drive, Path) = os.path.splitdrive(self.WorkspaceDir) -if Drive == '': -(Drive, CwdPath) = os.path.splitdrive(self.CurrentWorkingDir) -if Drive != '': -self.WorkspaceDir = Drive + Path -else: -self.WorkspaceDir = Drive.upper() + Path - -self.WorkspaceRelativeWorkingDir = self.WorkspaceRelativePath (self.CurrentWorkingDir) - -try: -# -# Load TianoCoreOrgLogo, used for GUI tool -# -self.Icon = wx.Icon(self.WorkspaceFile('tools/Python/TianoCoreOrgLogo.gif'), wx.BITMAP_TYPE_GIF) -except: -self.Icon = None - -self.Verbose = False -for Arg in sys.argv: -if Arg.lower() == '-v': -self.Verbose = True - -## Close build system -# -# Close build system and print running time and status -# -def Close(self): -if self.PrintRunTime: -Seconds = int(time.time() - self.StartTime) -if Seconds < 60: -print 'Run Time: %d seconds' % (Seconds) -else: -Minutes = Seconds / 60 -Seconds = Seconds % 60 -if Minutes < 60: -print 'Run Time: %d minutes %d seconds' % (Minutes, Seconds) -else: -Hours = Minutes / 60 -Minutes = Minutes % 60 -print 'Run Time: %d hours %d minutes %d seconds' % (Hours, Minutes, Seconds) -if self.RunStatus != '': -print self.RunStatus - -## Convert to a workspace relative filename -# -# Convert a full path filename to a workspace relative filename. -# -# @param FileName: The filename to be Converted -# -# @retval NoneWorkspace dir is not found in the full path -# @retval string The relative filename -# -def WorkspaceRelativePath(self, FileName): -FileName = os.path.realpath(FileName) -if FileName.find(self.WorkspaceDir) != 0: -return None -return FileName.replace (self.WorkspaceDir, '').strip('\\').strip('/') - -## Convert to a full path filename -# -# Convert a workspace relative filename to a full
Re: [edk2] [PATCH edk2-platforms 19/39] Silicon/NXP:Add support for PCF2129 Real Time Clock Library
> -Original Message- > From: Leif Lindholm [mailto:leif.lindh...@linaro.org] > Sent: Thursday, April 19, 2018 3:42 PM > To: Meenakshi Aggarwal> Cc: ard.biesheu...@linaro.org; edk2-devel@lists.01.org; Udit Kumar > ; Varun Sethi ; Vabhav Sharma > > Subject: Re: [PATCH edk2-platforms 19/39] Silicon/NXP:Add support for > PCF2129 Real Time Clock Library > > On Fri, Feb 16, 2018 at 02:20:15PM +0530, Meenakshi wrote: > > From: Vabhav > > > > Library to provide functions for NXP pcf2129 real time clock library > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Vabhav > > --- > > Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129Rtc.h | 43 +++ > > Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129RtcLib.c | 330 > + > > .../NXP/Library/Pcf2129RtcLib/Pcf2129RtcLib.inf| 47 +++ > > 3 files changed, 420 insertions(+) > > create mode 100644 Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129Rtc.h > > create mode 100644 Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129RtcLib.c > > create mode 100644 Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129RtcLib.inf > > > > diff --git a/Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129Rtc.h > b/Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129Rtc.h > > new file mode 100644 > > index 000..735f697 > > --- /dev/null > > +++ b/Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129Rtc.h > > @@ -0,0 +1,43 @@ > > +/** Pcf2129Rtc.h > > +* > > +* Copyright 2017 NXP > > +* > > +* 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 > > +* > https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fope > nsource.org%2Flicenses%2Fbsd- > license.php=02%7C01%7Cmeenakshi.aggarwal%40nxp.com%7Cac3a81 > 31870a4f555cbc08d5a5ddfdc8%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0 > %7C0%7C636597295251146941=WheF7lR6B7iBUJBG2TGfGzJoiVhO%2F > I1VZywt3l%2FeXug%3D=0 > > +* > > +* 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 __PCF2129RTC_H__ > > +#define __PCF2129RTC_H__ > > + > > +/* > > + * RTC register addresses > > + */ > > +#define PCF2129_CTRL1_REG_ADDR 0x00 // Control Register 1 > > +#define PCF2129_CTRL2_REG_ADDR 0x01 // Control Register 2 > > +#define PCF2129_CTRL3_REG_ADDR 0x02 // Control Register 3 > > +#define PCF2129_SEC_REG_ADDR0x03 > > +#define PCF2129_MIN_REG_ADDR0x04 > > +#define PCF2129_HR_REG_ADDR 0x05 > > +#define PCF2129_DAY_REG_ADDR0x06 > > +#define PCF2129_WEEKDAY_REG_ADDR0x07 > > +#define PCF2129_MON_REG_ADDR0x08 > > +#define PCF2129_YR_REG_ADDR 0x09 > > + > > +#define PCF2129_CTRL3_BIT_BLF BIT2/* Battery Low Flag*/ > > + > > +// Define EPOCH (1998-JANUARY-01) in the Julian Date representation > > +#define EPOCH_JULIAN_DATE 2450815 > > + > > +typedef struct { > > + UINTN OperationCount; > > + EFI_I2C_OPERATION SetAddressOp; > > + EFI_I2C_OPERATION GetSetDateTimeOp; > > +} RTC_I2C_REQUEST; > > + > > +#endif // __PCF2129RTC_H__ > > diff --git a/Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129RtcLib.c > b/Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129RtcLib.c > > new file mode 100644 > > index 000..2e21014 > > --- /dev/null > > +++ b/Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129RtcLib.c > > @@ -0,0 +1,330 @@ > > +/** @PCF2129RtcLib.c > > + Implement EFI RealTimeClock with runtime services via RTC Lib for > PCF2129 RTC. > > + > > + Based on RTC implementation available in > > + EmbeddedPkg/Library/TemplateRealTimeClockLib/RealTimeClockLib.c > > + > > + Copyright (c) 2008 - 2009, Apple Inc. All rights reserved. > > + Copyright 2017 NXP > > + > > + 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 > > + > https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fope > nsource.org%2Flicenses%2Fbsd- > license.php=02%7C01%7Cmeenakshi.aggarwal%40nxp.com%7Cac3a81 > 31870a4f555cbc08d5a5ddfdc8%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0 > %7C0%7C636597295251146941=WheF7lR6B7iBUJBG2TGfGzJoiVhO%2F > I1VZywt3l%2FeXug%3D=0 > > + > > + 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 > > + > > +#include "Pcf2129Rtc.h" > > + > > +STATIC EFI_I2C_MASTER_PROTOCOL
Re: [edk2] [PATCH v1 1/1] BaseTools: remove PlatformClass as it's not used
The makefile also need update. Best Regards, Zhu Yonghong -Original Message- From: Carsey, Jaben Sent: Thursday, April 19, 2018 6:03 AM To: edk2-devel@lists.01.org Cc: Gao, Liming; Zhu, Yonghong Subject: [PATCH v1 1/1] BaseTools: remove PlatformClass as it's not used Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/CommonDataClass/PlatformClass.py | 456 1 file changed, 456 deletions(-) diff --git a/BaseTools/Source/Python/CommonDataClass/PlatformClass.py b/BaseTools/Source/Python/CommonDataClass/PlatformClass.py deleted file mode 100644 index a93d1ce2a1db.. --- a/BaseTools/Source/Python/CommonDataClass/PlatformClass.py +++ /dev/null @@ -1,456 +0,0 @@ -## @file -# This file is used to define a class object to describe a platform -# -# Copyright (c) 2007 - 2016, 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. - -## -# Import Modules -# -from CommonClass import * - -## SkuInfoListClass -# -# This class defined sku info list item used in platform file -# -# @param IncludeStatementClass: Inherited from IncludeStatementClass class -# -# @var SkuInfoList: To store value for SkuInfoList, it is a set structure as -#{ SkuName : SkuId } -# -class SkuInfoListClass(IncludeStatementClass): -def __init__(self): -IncludeStatementClass.__init__(self) -self.SkuInfoList = {} - -## PlatformHeaderClass -# -# This class defined header items used in Platform file -# -# @param IdentificationClass:Inherited from IdentificationClass class -# @param CommonHeaderClass: Inherited from CommonHeaderClass class -# @param DefineClass:Inherited from DefineClass class -# -# @var DscSpecification: To store value for DscSpecification -# @var SupArchList: To store value for SupArchList, selection scope is in below list -#EBC | IA32 | X64 | IPF | ARM | PPC | AARCH64 -# @var BuildTargets: To store value for BuildTargets, selection scope is in below list -#RELEASE | DEBUG -# @var IntermediateDirectories: To store value for IntermediateDirectories, selection scope is in below list -#MODULE | UNIFIED -# @var OutputDirectory: To store value for OutputDirectory -# @var ForceDebugTarget: To store value for ForceDebugTarget -# @var SkuIdName:To store value for SkuIdName -# @var BuildNumber: To store value for BuildNumber -# @var MakefileName: To store value for MakefileName -# @var ClonedFrom: To store value for ClonedFrom, it is a list structure as -#[ ClonedRecordClass, ... ] -# -class PlatformHeaderClass(IdentificationClass, CommonHeaderClass, DefineClass): -def __init__(self): -IdentificationClass.__init__(self) -CommonHeaderClass.__init__(self) -DefineClass.__init__(self) -self.DscSpecification = '' -self.SupArchList = [] -self.BuildTargets = [] -self.IntermediateDirectories = '' -self.OutputDirectory = '' -self.ForceDebugTarget = '' -self.SkuIdName = [] -self.BuildNumber = '' -self.MakefileName = '' -self.ClonedFrom = [] - -## PlatformFlashDefinitionFileClass -# -# This class defined FlashDefinitionFile item used in platform file -# -# @param object: Inherited from object class -# -# @var Id: To store value for Id -# @var UiName: To store value for UiName -# @var Preferred: To store value for Preferred -# @var FilePath: To store value for FilePath -# -class PlatformFlashDefinitionFileClass(object): -def __init__(self): -self.Id = '' -self.UiName = '' -self.Preferred = False -self.FilePath = '' - -## BuildScriptClass -# -# This class defined PREBUILD/POSTBUILD item used in platform file -# -# @param object: Inherited from object class -# -# @var Id: To store value for Id -# @var UiName: To store value for UiName -# @var Preferred: To store value for Preferred -# @var FilePath: To store value for FilePath -# -class BuildScriptClass(object): -def __init__(self): -self.Id = '' -self.UiName = '' -
Re: [edk2] [PATCH edk2-platforms] Silicon/Socionext/SynQuacer: update PHY reference clock rate
On 16 April 2018 at 13:25, Masahisa Kojimawrote: > Hi Ard, > >> Please confirm that the modification to ogma_config.h is correct. > > Thank you very much for your update. > We confirmed and your modification is correct. > Thank you Masahisa Does this change apply to all boards? EVB, rev 0.1 etc? ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms] Silicon/SynQuacer/NetsecDxe: fix buffer allocation bug
On Thu, Apr 12, 2018 at 11:23:49AM +0200, Ard Biesheuvel wrote: > The receive buffers of the NETSEC driver are owned by the driver itself > (as opposed to the protocol client in the case of the transmit path), > and so the descriptors and the buffers (which are of a fixed size) are > allocated in one go. The idea is that the 'buffer' member of the > descriptor should point to a DMA aligned offset into the same allocation, > but the code in pfdep_alloc_pkt_buf() calculates the value incorrectly, > resulting in corruption of the descriptor metadata if the pool allocation > happens to be DMA aligned. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard BiesheuvelReviewed-by: Leif Lindholm > --- > > Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c > | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git > a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c > > b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c > index b43d1aaff037..0875558c08ea 100644 > --- > a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c > +++ > b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c > @@ -134,7 +134,7 @@ pfdep_alloc_pkt_buf ( >return PFDEP_ERR_ALLOC; > } > > -(*pkt_handle_p)->Buffer = ALIGN_POINTER (*pkt_handle_p, > +(*pkt_handle_p)->Buffer = ALIGN_POINTER (*pkt_handle_p + 1, > mCpu->DmaBufferAlignment); >} > > -- > 2.17.0 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH edk2-platforms v3 1/2] Platform/HiKey960: register predefined boot options
Create 4 boot options on HiKey960 platform. They're "Boot from SD", "Grub", "Android Boot" and "Android Fastboot". Cc: Laszlo ErsekCc: Leif Lindholm Cc: Ard Biesheuvel Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Haojian Zhuang --- Platform/Hisilicon/HiKey960/HiKey960.dec | 35 Platform/Hisilicon/HiKey960/HiKey960.dsc | 6 + .../Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe.c | 185 + .../Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe.inf | 11 ++ 4 files changed, 237 insertions(+) create mode 100644 Platform/Hisilicon/HiKey960/HiKey960.dec diff --git a/Platform/Hisilicon/HiKey960/HiKey960.dec b/Platform/Hisilicon/HiKey960/HiKey960.dec new file mode 100644 index ..922d7199c5a5 --- /dev/null +++ b/Platform/Hisilicon/HiKey960/HiKey960.dec @@ -0,0 +1,35 @@ +# +# Copyright (c) 2018, Linaro 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. +# + +[Defines] + DEC_SPECIFICATION = 0x00010019 + PACKAGE_NAME = HiKey960 + PACKAGE_GUID = 1892b5b5-d18d-47a3-8fab-e3ae6b4226b0 + PACKAGE_VERSION= 0.1 + + +# +# Include Section - list of Include Paths that are provided by this package. +# Comments are used for Keywords and Module Types. +# +# Supported Module Types: +# BASE SEC PEI_CORE PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SMM_DRIVER DXE_SAL_DRIVER UEFI_DRIVER UEFI_APPLICATION +# + +[Guids.common] + gHiKey960TokenSpaceGuid= { 0x99a14446, 0xaad7, 0xe460, {0xb4, 0xe5, 0x1f, 0x79, 0xaa, 0xa4, 0x93, 0xfd } } + +[PcdsFixedAtBuild.common] + gHiKey960TokenSpaceGuid.PcdAndroidBootDevicePath|L""|VOID*|0x0001 + gHiKey960TokenSpaceGuid.PcdAndroidBootFile|{ 0x36, 0x8b, 0x73, 0x3a, 0xc5, 0xb9, 0x63, 0x47, 0xab, 0xbd, 0x6c, 0xbd, 0x4b, 0x25, 0xf9, 0xff }|VOID*|0x0002 + gHiKey960TokenSpaceGuid.PcdAndroidFastbootFile|{ 0x2a, 0x50, 0x88, 0x95, 0x70, 0x53, 0xe3, 0x11, 0x86, 0x31, 0xd7, 0xc5, 0x95, 0x13, 0x64, 0xc8 }|VOID*|0x0003 + gHiKey960TokenSpaceGuid.PcdSdBootDevicePath|L""|VOID*|0x0004 diff --git a/Platform/Hisilicon/HiKey960/HiKey960.dsc b/Platform/Hisilicon/HiKey960/HiKey960.dsc index 859ab84f8415..475d39916262 100644 --- a/Platform/Hisilicon/HiKey960/HiKey960.dsc +++ b/Platform/Hisilicon/HiKey960/HiKey960.dsc @@ -132,6 +132,12 @@ [PcdsFixedAtBuild.common] gEmbeddedTokenSpaceGuid.PcdAndroidFastbootUsbVendorId|0x18d1 gEmbeddedTokenSpaceGuid.PcdAndroidFastbootUsbProductId|0xd00d + # + # Android Loader + # + gHiKey960TokenSpaceGuid.PcdAndroidBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,3BFF00)/UFS(0x0,0x3)/HD(7,GPT,D3340696-9B95-4C64-8DF6-E6D4548FBA41,0x12100,0x4000)" + gHiKey960TokenSpaceGuid.PcdSdBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00F037FF00)/SD(0x0)" + # # Components Section - list of all EDK II Modules needed by this Platform diff --git a/Platform/Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe.c b/Platform/Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe.c index 473d61ed384e..44b3711dfbe1 100644 --- a/Platform/Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe.c +++ b/Platform/Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe.c @@ -30,10 +30,16 @@ #include #include #include +#include #include +#include #include +#include +#include #include +#include +#include #include #define ADC_ADCIN0 0 @@ -86,6 +92,10 @@ #define DETECT_SW_FASTBOOT 68// GPIO8_4 +#define HIKEY960_BOOT_OPTION_NUM 4 + +#define GRUB_FILE_NAME L"\\EFI\\BOOT\\GRUBAA64.EFI" + typedef struct { UINT64Magic; UINT64Data; @@ -359,6 +369,171 @@ OnEndOfDxe ( } } +STATIC +EFI_STATUS +GetPlatformBootOptionsAndKeys ( + OUT EFI_BOOT_MANAGER_LOAD_OPTION **BootOptions, + OUT EFI_INPUT_KEY **BootKeys + ) +{ + EFI_DEVICE_PATH*DevicePath; + EFI_DEVICE_PATH*FileDevicePath; + EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *DPProtocol; + FILEPATH_DEVICE_PATH *FilePath; + EFI_GUID *FileGuid; + EFI_LOADED_IMAGE_PROTOCOL
[edk2] [PATCH edk2-platforms v3 2/2] Platform/HiKey: create 4 boot options
Create 4 predefined boot options for HiKey. They're "Boot from SD", "Grub", "Android Boot" and "Android Fastboot". Cc: Laszlo ErsekCc: Leif Lindholm Cc: Ard Biesheuvel Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Haojian Zhuang --- Platform/Hisilicon/HiKey/HiKey.dec | 8 +- Platform/Hisilicon/HiKey/HiKey.dsc | 7 + Platform/Hisilicon/HiKey/HiKeyDxe/HiKeyDxe.c | 184 + Platform/Hisilicon/HiKey/HiKeyDxe/HiKeyDxe.inf | 11 ++ 4 files changed, 207 insertions(+), 3 deletions(-) diff --git a/Platform/Hisilicon/HiKey/HiKey.dec b/Platform/Hisilicon/HiKey/HiKey.dec index 537138eb45a1..bb94c5cab13f 100644 --- a/Platform/Hisilicon/HiKey/HiKey.dec +++ b/Platform/Hisilicon/HiKey/HiKey.dec @@ -1,5 +1,5 @@ # -# Copyright (c) 2014-2017, Linaro Limited. All rights reserved. +# Copyright (c) 2014-2018, Linaro Limited. All rights reserved. # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -32,5 +32,7 @@ [Guids.common] gHiKeyTokenSpaceGuid = { 0x91148425, 0xcdd2, 0x4830, { 0x8b, 0xd0, 0xc6, 0x1c, 0x6d, 0xea, 0x36, 0x21 } } [PcdsFixedAtBuild.common] - gHiKeyTokenSpaceGuid.PcdAndroidFastbootNvmDevicePath|L""|VOID*|0x0001 - gHiKeyTokenSpaceGuid.PcdArmFastbootFlashLimit|L""|VOID*|0x0002 + gHiKeyTokenSpaceGuid.PcdAndroidBootDevicePath|L""|VOID*|0x0001 + gHiKeyTokenSpaceGuid.PcdAndroidBootFile|{ 0x36, 0x8b, 0x73, 0x3a, 0xc5, 0xb9, 0x63, 0x47, 0xab, 0xbd, 0x6c, 0xbd, 0x4b, 0x25, 0xf9, 0xff }|VOID*|0x0002 + gHiKeyTokenSpaceGuid.PcdAndroidFastbootFile|{ 0x2a, 0x50, 0x88, 0x95, 0x70, 0x53, 0xe3, 0x11, 0x86, 0x31, 0xd7, 0xc5, 0x95, 0x13, 0x64, 0xc8 }|VOID*|0x0003 + gHiKeyTokenSpaceGuid.PcdSdBootDevicePath|L""|VOID*|0x0004 diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc b/Platform/Hisilicon/HiKey/HiKey.dsc index 83dd68a820b1..5b5dc48a693a 100644 --- a/Platform/Hisilicon/HiKey/HiKey.dsc +++ b/Platform/Hisilicon/HiKey/HiKey.dsc @@ -138,6 +138,13 @@ [PcdsFixedAtBuild.common] gEmbeddedTokenSpaceGuid.PcdAndroidFastbootUsbVendorId|0x18d1 gEmbeddedTokenSpaceGuid.PcdAndroidFastbootUsbProductId|0xd00d + # + # Android Loader + # + gHiKeyTokenSpaceGuid.PcdAndroidBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00D023F700)/eMMC(0x0)/Ctrl(0x0)/HD(6,GPT,5C0F213C-17E1-4149-88C8-8B50FB4EC70E,0x7000,0x2)" + gHiKeyTokenSpaceGuid.PcdSdBootDevicePath|L"VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,00E023F700)/SD(0x0)" + + # # Components Section - list of all EDK II Modules needed by this Platform diff --git a/Platform/Hisilicon/HiKey/HiKeyDxe/HiKeyDxe.c b/Platform/Hisilicon/HiKey/HiKeyDxe/HiKeyDxe.c index 65e800116b76..223affa33635 100644 --- a/Platform/Hisilicon/HiKey/HiKeyDxe/HiKeyDxe.c +++ b/Platform/Hisilicon/HiKey/HiKeyDxe/HiKeyDxe.c @@ -18,12 +18,18 @@ #include #include #include +#include #include +#include #include #include #include +#include +#include #include +#include +#include #include #include @@ -42,6 +48,9 @@ #define ADB_REBOOT_BOOTLOADER0x77665500 #define ADB_REBOOT_NONE 0x77665501 +#define HIKEY_BOOT_OPTION_NUM4 + +#define GRUB_FILE_NAME L"\\EFI\\BOOT\\GRUBAA64.EFI" typedef struct { UINT64Magic; @@ -121,6 +130,171 @@ HiKeyInitPeripherals ( return EFI_SUCCESS; } +STATIC +EFI_STATUS +GetPlatformBootOptionsAndKeys ( + OUT EFI_BOOT_MANAGER_LOAD_OPTION **BootOptions, + OUT EFI_INPUT_KEY **BootKeys + ) +{ + EFI_DEVICE_PATH*DevicePath; + EFI_DEVICE_PATH*FileDevicePath; + EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *DPProtocol; + FILEPATH_DEVICE_PATH *FilePath; + EFI_GUID *FileGuid; + EFI_LOADED_IMAGE_PROTOCOL *LoadedImage; + MEDIA_FW_VOL_FILEPATH_DEVICE_PATH FileNode; + CHAR16 *PathStr; + EFI_STATUS Status; + UINTN Size; + + if ((BootOptions == NULL) || (BootKeys == NULL)) { +return EFI_INVALID_PARAMETER; + } + // + // Leave the last entry as empty + // + Size = sizeof (EFI_BOOT_MANAGER_LOAD_OPTION) * (HIKEY_BOOT_OPTION_NUM + 1); + *BootOptions = (EFI_BOOT_MANAGER_LOAD_OPTION *)AllocateZeroPool (Size); + if (*BootOptions == NULL) { +DEBUG ((DEBUG_ERROR, "Failed to allocate memory for BootOptions\n")); +return EFI_BUFFER_TOO_SMALL; + } + // + // Leave the last entry as empty + // + Size = sizeof (EFI_INPUT_KEY) * (HIKEY_BOOT_OPTION_NUM + 1); + *BootKeys = (EFI_INPUT_KEY *)AllocateZeroPool (Size); + if (*BootKeys ==
[edk2] [PATCH v3 1/2] EmbeddedPkg: add platform boot manager protocol
Create the PlatformBootManagerProtocol that is used to add predefined boot options in platform driver. This interface will be used in ArmPkg/PlatformBootManagerLib. Cc: Laszlo ErsekCc: Leif Lindholm Cc: Ard Biesheuvel Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Haojian Zhuang --- EmbeddedPkg/EmbeddedPkg.dec| 1 + EmbeddedPkg/Include/Protocol/PlatformBootManager.h | 46 ++ 2 files changed, 47 insertions(+) create mode 100644 EmbeddedPkg/Include/Protocol/PlatformBootManager.h diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec index eb135340b173..9cd50738363b 100644 --- a/EmbeddedPkg/EmbeddedPkg.dec +++ b/EmbeddedPkg/EmbeddedPkg.dec @@ -81,6 +81,7 @@ [Protocols.common] gPlatformGpioProtocolGuid = { 0x52ce9845, 0x5af4, 0x43e2, {0xba, 0xfd, 0x23, 0x08, 0x12, 0x54, 0x7a, 0xc2 }} gAndroidBootImgProtocolGuid = { 0x9859bb19, 0x407c, 0x4f8b, {0xbc, 0xe1, 0xf8, 0xda, 0x65, 0x65, 0xf4, 0xa5 }} gPlatformVirtualKeyboardProtocolGuid = { 0x0e3606d2, 0x1dc3, 0x4e6f, { 0xbe, 0x65, 0x39, 0x49, 0x82, 0xa2, 0x65, 0x47 }} + gPlatformBootManagerProtocolGuid = { 0x7197c8a7, 0x6559, 0x4c93, { 0x93, 0xd5, 0x8a, 0x84, 0xf9, 0x88, 0x79, 0x8b }} [Ppis] gEdkiiEmbeddedGpioPpiGuid = { 0x21c3b115, 0x4e0b, 0x470c, { 0x85, 0xc7, 0xe1, 0x05, 0xa5, 0x75, 0xc9, 0x7b }} diff --git a/EmbeddedPkg/Include/Protocol/PlatformBootManager.h b/EmbeddedPkg/Include/Protocol/PlatformBootManager.h new file mode 100644 index ..8fd63c8b45d6 --- /dev/null +++ b/EmbeddedPkg/Include/Protocol/PlatformBootManager.h @@ -0,0 +1,46 @@ +/** @file + + Copyright (c) 2018, Linaro. 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 __PLATFORM_BOOT_MANAGER_PROTOCOL_H__ +#define __PLATFORM_BOOT_MANAGER_PROTOCOL_H__ + +// +// Protocol interface structure +// +typedef struct _PLATFORM_BOOT_MANAGER_PROTOCOL PLATFORM_BOOT_MANAGER_PROTOCOL; + +// +// Function Prototypes +// + +/* + Get predefined boot options for platform. + + @param[out] BootOptions An array of predefined boot options. + @param[out] BootKeys An array of predefined keys. +*/ +typedef +EFI_STATUS +(EFIAPI *GET_PLATFORM_BOOT_OPTIONS_AND_KEYS) ( + OUT EFI_BOOT_MANAGER_LOAD_OPTION **BootOptions, + OUT EFI_INPUT_KEY **BootKeys + ); + +struct _PLATFORM_BOOT_MANAGER_PROTOCOL { + GET_PLATFORM_BOOT_OPTIONS_AND_KEYS GetPlatformBootOptionsAndKeys; +}; + +extern EFI_GUID gPlatformBootManagerProtocolGuid; + +#endif /* __PLATFORM_BOOT_MANAGER_PROTOCOL_H__ */ -- 2.7.4 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v3 0/2] add platform boot manager protocol
Changelog: v3: * Update the name of interface. * Move the initialization into platform driver. * Fix comment style. * Fix minor issues with comments. v2: * Avoid to use hardcoding value. Create boot options by functions. Haojian Zhuang (2): EmbeddedPkg: add platform boot manager protocol ArmPkg/PlatformBootManagerLib: load platform boot options ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 83 ++ .../PlatformBootManagerLib.inf | 2 + EmbeddedPkg/EmbeddedPkg.dec| 1 + EmbeddedPkg/Include/Protocol/PlatformBootManager.h | 46 4 files changed, 132 insertions(+) create mode 100644 EmbeddedPkg/Include/Protocol/PlatformBootManager.h -- 2.7.4 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v3 2/2] ArmPkg/PlatformBootManagerLib: load platform boot options
Make platform driver to create predefined boot options and related hot keys. Cc: Laszlo ErsekCc: Leif Lindholm Cc: Ard Biesheuvel Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Haojian Zhuang --- ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 83 ++ .../PlatformBootManagerLib.inf | 2 + 2 files changed, 85 insertions(+) diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c index 61ab61ccc780..3a40592b58dd 100644 --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -392,6 +393,86 @@ PlatformRegisterFvBootOption ( STATIC VOID +GetPlatformOptions ( + VOID + ) +{ + EFI_STATUS Status; + EFI_BOOT_MANAGER_LOAD_OPTION*CurrentBootOptions; + EFI_BOOT_MANAGER_LOAD_OPTION*PlatformBootOptionArray; + EFI_INPUT_KEY *PlatformKeyArray; + PLATFORM_BOOT_MANAGER_PROTOCOL *PlatformBootManager; + UINTN CurrentBootOptionCount; + UINTN OptionIndex; + UINTN Index; + + Status = gBS->LocateProtocol (, NULL, + (VOID **)); + if (EFI_ERROR (Status)) { +return; + } + Status = PlatformBootManager->GetPlatformBootOptionsAndKeys ( + , + + ); + if (EFI_ERROR (Status)) { +return; + } + CurrentBootOptions = EfiBootManagerGetLoadOptions ( + , LoadOptionTypeBoot + ); + OptionIndex = EfiBootManagerFindLoadOption ( + [0], + CurrentBootOptions, + CurrentBootOptionCount + ); + if (OptionIndex == -1) { +OptionIndex = 1; + } else { +OptionIndex = OptionIndex + 1; + } + Index = 0; + // + // Last entries of PlatformBootOptionArray and PlatformKeyArray are empty. + // + while (PlatformBootOptionArray[Index].Description != NULL) { +if (OptionIndex == 1) { + // + // Append the BootLoadOption + // + Status = EfiBootManagerAddLoadOptionVariable ( + [Index], + OptionIndex + Index + ); + ASSERT_EFI_ERROR (Status); +} +// +// If UnicodeChar isn't empty, there's a hot key. +// +if (PlatformKeyArray[Index].UnicodeChar) { + // + // The index of Boot Options counts from 1. + // The last index equals to the count of total Boot Options. + // + Status = EfiBootManagerAddKeyOptionVariable ( + NULL, OptionIndex + Index, 0, + PlatformKeyArray[Index], NULL + ); + ASSERT_EFI_ERROR (Status); +} +Index++; + } + EfiBootManagerFreeLoadOptions ( +CurrentBootOptions, CurrentBootOptionCount +); + EfiBootManagerFreeLoadOptions ( +PlatformBootOptionArray, Index +); + FreePool (PlatformKeyArray); +} + +STATIC +VOID PlatformRegisterOptionsAndKeys ( VOID ) @@ -402,6 +483,8 @@ PlatformRegisterOptionsAndKeys ( EFI_INPUT_KEYEsc; EFI_BOOT_MANAGER_LOAD_OPTION BootOption; + GetPlatformOptions (); + // // Register ENTER as CONTINUE key // diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index 71f1d04a87ee..e8cbb10dabdd 100644 --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -35,6 +35,7 @@ [Sources] PlatformBm.c [Packages] + EmbeddedPkg/EmbeddedPkg.dec MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec ShellPkg/ShellPkg.dec @@ -84,3 +85,4 @@ [Protocols] gEfiPciRootBridgeIoProtocolGuid gEfiSimpleFileSystemProtocolGuid gEsrtManagementProtocolGuid + gPlatformBootManagerProtocolGuid -- 2.7.4 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH edk2-platforms v3 0/2] add platform boot options
Changelog: v3: * Move in initilization of boot entry. * Update the name of interface in platform boot manager protocol. v2: * Update with platform boot manager protocol. Haojian Zhuang (2): Platform/HiKey960: register predefined boot options Platform/HiKey: create 4 boot options Platform/Hisilicon/HiKey/HiKey.dec | 8 +- Platform/Hisilicon/HiKey/HiKey.dsc | 7 + Platform/Hisilicon/HiKey/HiKeyDxe/HiKeyDxe.c | 184 Platform/Hisilicon/HiKey/HiKeyDxe/HiKeyDxe.inf | 11 ++ .../{HiKey/HiKey.dec => HiKey960/HiKey960.dec} | 17 +- Platform/Hisilicon/HiKey960/HiKey960.dsc | 6 + .../Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe.c | 185 + .../Hisilicon/HiKey960/HiKey960Dxe/HiKey960Dxe.inf | 11 ++ 8 files changed, 417 insertions(+), 12 deletions(-) copy Platform/Hisilicon/{HiKey/HiKey.dec => HiKey960/HiKey960.dec} (56%) -- 2.7.4 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] Nt32Pkg/NtGopInput: ReadKeyStrokeEx always return key state
Today's implementation only return key state when there is key. But when user doesn't press any key, the key state cannot be returned. The patch changes the ReadKeyStrokeEx() to always return the key state even there is no key pressed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu NiCc: Star Zeng --- Nt32Pkg/WinNtGopDxe/WinNtGopInput.c | 79 ++--- 1 file changed, 48 insertions(+), 31 deletions(-) diff --git a/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c b/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c index 6a0f4b7892..b19dfdc2ec 100644 --- a/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c +++ b/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -270,73 +270,87 @@ WinNtGopSimpleTextInTimerHandler ( } /** - TODO: Add function description - - @param Private TODO: add argument description - @param Key TODO: add argument description - - @retval EFI_NOT_READY TODO: Add description for return value - @retval EFI_SUCCESS TODO: Add description for return value + Initialize the key state. + @param Private The GOP_PRIVATE_DATA instance. + @param KeyState A pointer to receive the key state information. **/ -EFI_STATUS -GopPrivateAddKey ( +VOID +InitializeKeyState ( IN GOP_PRIVATE_DATA*Private, - IN EFI_INPUT_KEY Key + IN EFI_KEY_STATE *KeyState ) { - EFI_KEY_DATAKeyData; - - KeyData.Key = Key; - - KeyData.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID; - KeyData.KeyState.KeyToggleState = EFI_TOGGLE_STATE_VALID; + KeyState->KeyShiftState = EFI_SHIFT_STATE_VALID; + KeyState->KeyToggleState = EFI_TOGGLE_STATE_VALID; // // Record Key shift state and toggle state // if (Private->LeftCtrl) { -KeyData.KeyState.KeyShiftState |= EFI_LEFT_CONTROL_PRESSED; +KeyState->KeyShiftState |= EFI_LEFT_CONTROL_PRESSED; } if (Private->RightCtrl) { -KeyData.KeyState.KeyShiftState |= EFI_RIGHT_CONTROL_PRESSED; +KeyState->KeyShiftState |= EFI_RIGHT_CONTROL_PRESSED; } if (Private->LeftAlt) { -KeyData.KeyState.KeyShiftState |= EFI_LEFT_ALT_PRESSED; +KeyState->KeyShiftState |= EFI_LEFT_ALT_PRESSED; } if (Private->RightAlt) { -KeyData.KeyState.KeyShiftState |= EFI_RIGHT_ALT_PRESSED; +KeyState->KeyShiftState |= EFI_RIGHT_ALT_PRESSED; } if (Private->LeftShift) { -KeyData.KeyState.KeyShiftState |= EFI_LEFT_SHIFT_PRESSED; +KeyState->KeyShiftState |= EFI_LEFT_SHIFT_PRESSED; } if (Private->RightShift) { -KeyData.KeyState.KeyShiftState |= EFI_RIGHT_SHIFT_PRESSED; +KeyState->KeyShiftState |= EFI_RIGHT_SHIFT_PRESSED; } if (Private->LeftLogo) { -KeyData.KeyState.KeyShiftState |= EFI_LEFT_LOGO_PRESSED; +KeyState->KeyShiftState |= EFI_LEFT_LOGO_PRESSED; } if (Private->RightLogo) { -KeyData.KeyState.KeyShiftState |= EFI_RIGHT_LOGO_PRESSED; +KeyState->KeyShiftState |= EFI_RIGHT_LOGO_PRESSED; } if (Private->Menu) { -KeyData.KeyState.KeyShiftState |= EFI_MENU_KEY_PRESSED; +KeyState->KeyShiftState |= EFI_MENU_KEY_PRESSED; } if (Private->SysReq) { -KeyData.KeyState.KeyShiftState |= EFI_SYS_REQ_PRESSED; +KeyState->KeyShiftState |= EFI_SYS_REQ_PRESSED; } if (Private->CapsLock) { -KeyData.KeyState.KeyToggleState |= EFI_CAPS_LOCK_ACTIVE; +KeyState->KeyToggleState |= EFI_CAPS_LOCK_ACTIVE; } if (Private->NumLock) { -KeyData.KeyState.KeyToggleState |= EFI_NUM_LOCK_ACTIVE; +KeyState->KeyToggleState |= EFI_NUM_LOCK_ACTIVE; } if (Private->ScrollLock) { -KeyData.KeyState.KeyToggleState |= EFI_SCROLL_LOCK_ACTIVE; +KeyState->KeyToggleState |= EFI_SCROLL_LOCK_ACTIVE; } if (Private->IsPartialKeySupport) { -KeyData.KeyState.KeyToggleState |= EFI_KEY_STATE_EXPOSED; +KeyState->KeyToggleState |= EFI_KEY_STATE_EXPOSED; } +} + +/** + TODO: Add function description + + @param Private TODO: add argument description + @param Key TODO: add argument description + + @retval EFI_NOT_READY TODO: Add description for return value + @retval EFI_SUCCESS TODO: Add description for return value + +**/ +EFI_STATUS +GopPrivateAddKey ( + IN GOP_PRIVATE_DATA*Private, + IN EFI_INPUT_KEY Key + ) +{ + EFI_KEY_DATAKeyData; + + KeyData.Key = Key; + InitializeKeyState (Private, ); // // Convert Ctrl+[1-26] to Ctrl+[A-Z] @@ -503,6 +517,9 @@ GopPrivateReadKeyStrokeWorker ( // WinNtGopSimpleTextInTimerHandler
Re: [edk2] [platforms PATCH 1/1] Marvell/Drivers: MvFvbDxe: Fix uninstallation of protocol
On 18 April 2018 at 03:54, Marcin Wojtaswrote: > Recently added installation of gEdkiiNvVarStoreFormattedGuid > introduced bug in the error path. gBS->UninstallProtocolInterface > takes an actual handle as an argument (not the pointer). Fix this > and on the occasion fix indentation of multiline call. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Marcin Wojtas Reviewed-by: Ard Biesheuvel Pushed as 3454e932107c7524f6a89fcab35d430d0b422b2e Thanks > --- > Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c > b/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c > index 6e583a3..1a41a4f 100644 > --- a/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c > +++ b/Silicon/Marvell/Drivers/Spi/MvFvbDxe/MvFvbDxe.c > @@ -1142,9 +1142,9 @@ ErrorSetMemAttr: >gDS->RemoveMemorySpace (RegionBaseAddress, RuntimeMmioRegionSize); > > ErrorAddSpace: > - gBS->UninstallProtocolInterface (, > - , > - NULL); > + gBS->UninstallProtocolInterface (gImageHandle, > + , > + NULL); > > ErrorInstallNvVarStoreFormatted: >gBS->UninstallMultipleProtocolInterfaces (>Handle, > -- > 2.7.4 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms 18/39] Silicon/NXP:Add LS1046ARDB SoCLib Support
On Thu, Apr 19, 2018 at 10:05:45AM +, Meenakshi Aggarwal wrote: > > CCSR_SCFG_USBDRVVBUS_SELCR_USB1); > > > + UsbPwrFault = (CCSR_SCFG_USBPWRFAULT_DEDICATED << > > > +CCSR_SCFG_USBPWRFAULT_USB3_SHIFT) | > > > +(CCSR_SCFG_USBPWRFAULT_DEDICATED << > > > +CCSR_SCFG_USBPWRFAULT_USB2_SHIFT) | > > > +(CCSR_SCFG_USBPWRFAULT_SHARED << > > > +CCSR_SCFG_USBPWRFAULT_USB1_SHIFT); > > > > Can you change indentation like so?: > > > > UsbPwrFault = (CCSR_SCFG_USBPWRFAULT_DEDICATED << > > CCSR_SCFG_USBPWRFAULT_USB3_SHIFT) | > > (CCSR_SCFG_USBPWRFAULT_DEDICATED << > > CCSR_SCFG_USBPWRFAULT_USB2_SHIFT) | > > (CCSR_SCFG_USBPWRFAULT_SHARED << > > CCSR_SCFG_USBPWRFAULT_USB1_SHIFT); > > > I will accommodate all other changes except I am not getting the > difference between above two. Please tell a bit about the change. Apologies, I could have been more clear. First of all, it makes the relation between the items within parameters immediately obvious. It is a continuation of the statement within the parentheses. Secondly, it aligns up all of the CCSR_SCFG_USBPWRFAULT_, which makes it a lot easier to see that all the prefixes are the same. In summary, it makes code review easier. Best Regards, Leif ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms 17/39] LS1043 : Enable NOR driver for LS1043aRDB package.
Yes, it needs changes corresponding to commit 6281a2ed3bb3ffe57ed54cabd9a31dcf13b415f8. > -Original Message- > From: Leif Lindholm [mailto:leif.lindh...@linaro.org] > Sent: Thursday, April 19, 2018 3:25 PM > To: Meenakshi Aggarwal> Cc: ard.biesheu...@linaro.org; edk2-devel@lists.01.org; Udit Kumar > ; Varun Sethi > Subject: Re: [PATCH edk2-platforms 17/39] LS1043 : Enable NOR driver for > LS1043aRDB package. > > On Fri, Feb 16, 2018 at 02:20:13PM +0530, Meenakshi wrote: > > From: Meenakshi Aggarwal > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Meenakshi Aggarwal > > Will this one require any changes to build (and work correctly) > against current edk2? > > If not: > Reviewed-by: Leif Lindholm > > / > Leif > > > --- > > Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc | 16 > +++- > > Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf | 9 - > > 2 files changed, 23 insertions(+), 2 deletions(-) > > > > diff --git a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > > index df4d917..7708e0a 100644 > > --- a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > > +++ b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > > @@ -41,6 +41,7 @@ > >IfcLib|Silicon/NXP/Library/IfcLib/IfcLib.inf > >BoardLib|Platform/NXP/LS1043aRdbPkg/Library/BoardLib/BoardLib.inf > >FpgaLib|Platform/NXP/LS1043aRdbPkg/Library/FpgaLib/FpgaLib.inf > > + NorFlashLib|Silicon/NXP/Library/NorFlashLib/NorFlashLib.inf > > > > [PcdsFixedAtBuild.common] > > > > @@ -70,6 +71,13 @@ > >gDs1307RtcLibTokenSpaceGuid.PcdI2cSlaveAddress|0x68 > >gDs1307RtcLibTokenSpaceGuid.PcdI2cBusFrequency|10 > > > > + # > > + # NV Storage PCDs. > > + # > > + gArmTokenSpaceGuid.PcdVFPEnabled|1 > > + gNxpQoriqLsTokenSpaceGuid.PcdFlashDeviceBase64|0x06000 > > + > gNxpQoriqLsTokenSpaceGuid.PcdFlashReservedRegionBase64|0x6030 > > + > > > ## > ## > > # > > # Components Section - list of all EDK II Modules needed by this Platform > > @@ -79,9 +87,15 @@ > ># > ># Architectural Protocols > ># > > - > MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntime > Dxe.inf > > + > > + > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf{ > > + > > + NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf > > + } > > + > MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.in > f > > > >Silicon/NXP/Drivers/WatchDog/WatchDogDxe.inf > >Silicon/NXP/Drivers/I2cDxe/I2cDxe.inf > > + Silicon/NXP/Drivers/NorFlashDxe/NorFlashDxe.inf > > > > ## > > diff --git a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf > b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf > > index fa6510c..6b5b63f 100644 > > --- a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf > > +++ b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf > > @@ -55,6 +55,7 @@ > gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize > > FV = FVMAIN_COMPACT > > > > !include ../FVRules.fdf.inc > > +!include VarStore.fdf.inc > > > ## > ## > > # > > # FV Section > > @@ -103,7 +104,8 @@ READ_LOCK_STATUS = TRUE > >INF > MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf > >INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf > >INF > EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter > .inf > > - INF > MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntime > Dxe.inf > > + INF > MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf > > + INF > MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.in > f > >INF > MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntime > Dxe.inf > > > >INF Silicon/NXP/Drivers/I2cDxe/I2cDxe.inf > > @@ -123,6 +125,11 @@ READ_LOCK_STATUS = TRUE > >INF EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOutSerial.inf > > > ># > > + # NOR Driver > > + # > > + INF Silicon/NXP/Drivers/NorFlashDxe/NorFlashDxe.inf > > + > > + # > ># Network modules > ># > >INF MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf > > -- > > 1.9.1 > > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms 19/39] Silicon/NXP:Add support for PCF2129 Real Time Clock Library
On Fri, Feb 16, 2018 at 02:20:15PM +0530, Meenakshi wrote: > From: Vabhav> > Library to provide functions for NXP pcf2129 real time clock library > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Vabhav > --- > Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129Rtc.h | 43 +++ > Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129RtcLib.c | 330 > + > .../NXP/Library/Pcf2129RtcLib/Pcf2129RtcLib.inf| 47 +++ > 3 files changed, 420 insertions(+) > create mode 100644 Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129Rtc.h > create mode 100644 Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129RtcLib.c > create mode 100644 Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129RtcLib.inf > > diff --git a/Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129Rtc.h > b/Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129Rtc.h > new file mode 100644 > index 000..735f697 > --- /dev/null > +++ b/Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129Rtc.h > @@ -0,0 +1,43 @@ > +/** Pcf2129Rtc.h > +* > +* Copyright 2017 NXP > +* > +* 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 __PCF2129RTC_H__ > +#define __PCF2129RTC_H__ > + > +/* > + * RTC register addresses > + */ > +#define PCF2129_CTRL1_REG_ADDR 0x00 // Control Register 1 > +#define PCF2129_CTRL2_REG_ADDR 0x01 // Control Register 2 > +#define PCF2129_CTRL3_REG_ADDR 0x02 // Control Register 3 > +#define PCF2129_SEC_REG_ADDR0x03 > +#define PCF2129_MIN_REG_ADDR0x04 > +#define PCF2129_HR_REG_ADDR 0x05 > +#define PCF2129_DAY_REG_ADDR0x06 > +#define PCF2129_WEEKDAY_REG_ADDR0x07 > +#define PCF2129_MON_REG_ADDR0x08 > +#define PCF2129_YR_REG_ADDR 0x09 > + > +#define PCF2129_CTRL3_BIT_BLF BIT2/* Battery Low Flag*/ > + > +// Define EPOCH (1998-JANUARY-01) in the Julian Date representation > +#define EPOCH_JULIAN_DATE 2450815 > + > +typedef struct { > + UINTN OperationCount; > + EFI_I2C_OPERATION SetAddressOp; > + EFI_I2C_OPERATION GetSetDateTimeOp; > +} RTC_I2C_REQUEST; > + > +#endif // __PCF2129RTC_H__ > diff --git a/Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129RtcLib.c > b/Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129RtcLib.c > new file mode 100644 > index 000..2e21014 > --- /dev/null > +++ b/Silicon/NXP/Library/Pcf2129RtcLib/Pcf2129RtcLib.c > @@ -0,0 +1,330 @@ > +/** @PCF2129RtcLib.c > + Implement EFI RealTimeClock with runtime services via RTC Lib for PCF2129 > RTC. > + > + Based on RTC implementation available in > + EmbeddedPkg/Library/TemplateRealTimeClockLib/RealTimeClockLib.c > + > + Copyright (c) 2008 - 2009, Apple Inc. All rights reserved. > + Copyright 2017 NXP > + > + 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 > + > +#include "Pcf2129Rtc.h" > + > +STATIC EFI_I2C_MASTER_PROTOCOL*mI2cMaster; > + > +/** > + returns Day of the week [0-6] 0=Sunday > + Don't try to provide a Year that's before 1998, please ! (You should probably add an assert for that, in that case.) > + **/ > +UINTN > +EfiTimeToWday ( This looks like a completely generic function. Could it be submitted to edk2 EmbeddedPkg/Library/TimeBaseLib? > + IN EFI_TIME *Time > + ) > +{ > + UINTN MonthDiff; > + UINTN Year; > + UINTN Month; > + UINTN JulianDate; // Absolute Julian Date representation of the supplied > Time > + UINTN EpochDays; // Number of days elapsed since EPOCH_JULIAN_DAY > + > + MonthDiff = (14 - Time->Month) / 12 ; > + Year = Time->Year + 4800 - MonthDiff; > + Month = Time->Month + (12*MonthDiff) - 3; > + > + JulianDate = Time->Day + ((153*Month + 2)/5) + (365*Year) + (Year/4) - > (Year/100) + (Year/400) - 32045; > + > + ASSERT (JulianDate >= EPOCH_JULIAN_DATE); > + EpochDays = JulianDate - EPOCH_JULIAN_DATE; > + > + // 4=1/1/1998 was a Thursday Extra space in indentation. > + > + return (EpochDays + 4) % 7; > +} > + > +/** > + Write RTC register. > + > + @param RtcRegAddr Register offset of RTC to write. > + @param Val
Re: [edk2] [PATCH edk2-platforms 18/39] Silicon/NXP:Add LS1046ARDB SoCLib Support
> -Original Message- > From: Leif Lindholm [mailto:leif.lindh...@linaro.org] > Sent: Thursday, April 19, 2018 3:31 PM > To: Meenakshi Aggarwal> Cc: ard.biesheu...@linaro.org; edk2-devel@lists.01.org; Udit Kumar > ; Varun Sethi ; Vabhav Sharma > > Subject: Re: [PATCH edk2-platforms 18/39] Silicon/NXP:Add LS1046ARDB > SoCLib Support > > On Fri, Feb 16, 2018 at 02:20:14PM +0530, Meenakshi wrote: > > From: Meenakshi Aggarwal > > > > On LS1046A NXP SoC,Provide Functions to initialize peripherals > > ,print board, soc information. > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Vabhav > > --- > > Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc | 1 + > > Silicon/NXP/Chassis/Chassis.c| 1 + > > Silicon/NXP/Chassis/Chassis.h| 1 + > > Silicon/NXP/Chassis/Chassis2/Soc.c | 51 - > > Silicon/NXP/Chassis/LS1043aSocLib.inf| 2 + > > Silicon/NXP/Chassis/LS1046aSocLib.inf| 51 + > > Silicon/NXP/LS1046A/Include/SocSerDes.h | 55 > ++ > > Silicon/NXP/LS1046A/LS1046A.dec | 22 + > > Silicon/NXP/LS1046A/LS1046A.dsc | 68 > > > Silicon/NXP/NxpQoriqLs.dec | 2 + > > 10 files changed, 253 insertions(+), 1 deletion(-) > > create mode 100644 Silicon/NXP/Chassis/LS1046aSocLib.inf > > create mode 100644 Silicon/NXP/LS1046A/Include/SocSerDes.h > > create mode 100644 Silicon/NXP/LS1046A/LS1046A.dec > > create mode 100644 Silicon/NXP/LS1046A/LS1046A.dsc > > > > diff --git a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > > index 7708e0a..b2b514e 100644 > > --- a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > > +++ b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > > @@ -59,6 +59,7 @@ > >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x021c0500 > >gNxpQoriqLsTokenSpaceGuid.PcdSerdes2Enabled|FALSE > >gNxpQoriqLsTokenSpaceGuid.PcdPlatformFreqDiv|0x1 > > + gNxpQoriqLsTokenSpaceGuid.PcdMuxToUsb3|TRUE > > > ># > ># I2C controller Pcds > > diff --git a/Silicon/NXP/Chassis/Chassis.c b/Silicon/NXP/Chassis/Chassis.c > > index 9f2928b..ce07fdc 100644 > > --- a/Silicon/NXP/Chassis/Chassis.c > > +++ b/Silicon/NXP/Chassis/Chassis.c > > @@ -44,6 +44,7 @@ GurRead ( > > */ > > STATIC CPU_TYPE CpuTypeList[] = { > >CPU_TYPE_ENTRY (LS1043A, LS1043A, 4), > > + CPU_TYPE_ENTRY (LS1046A, LS1046A, 4), > > }; > > > > /* > > diff --git a/Silicon/NXP/Chassis/Chassis.h b/Silicon/NXP/Chassis/Chassis.h > > index 4bdb4d0..0beb44c 100644 > > --- a/Silicon/NXP/Chassis/Chassis.h > > +++ b/Silicon/NXP/Chassis/Chassis.h > > @@ -56,6 +56,7 @@ CpuMaskNext ( > > > > #define SVR_WO_E0xFE > > #define SVR_LS1043A 0x879200 > > +#define SVR_LS1046A 0x870700 > > > > #define SVR_MAJOR(svr) (((svr) >> 4) & 0xf) > > #define SVR_MINOR(svr) (((svr) >> 0) & 0xf) > > diff --git a/Silicon/NXP/Chassis/Chassis2/Soc.c > b/Silicon/NXP/Chassis/Chassis2/Soc.c > > index 17de7e4..658df2d 100644 > > --- a/Silicon/NXP/Chassis/Chassis2/Soc.c > > +++ b/Silicon/NXP/Chassis/Chassis2/Soc.c > > @@ -17,6 +17,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -139,6 +140,44 @@ GetSysInfo ( > > } > > > > /** > > + Function to select pins depending upon pcd using supplemental > > + configuration unit(SCFG) extended RCW controlled pinmux control > > + register which contains the bits to provide pin multiplexing control. > > + This register is reset on HRESET. > > + **/ > > +VOID > > +ConfigScfgMux (VOID) > > +{ > > + CCSR_SCFG *Scfg; > > + UINT32 UsbPwrFault; > > + > > + Scfg = (VOID *)PcdGet64 (PcdScfgBaseAddr); > > + // Configures functionality of the IIC3_SCL to USB2_DRVVBUS > > + // Configures functionality of the IIC3_SDA to USB2_PWRFAULT > > + > > + // LS1043A > > + // Configures functionality of the IIC4_SCL to USB3_DRVVBUS > > + // Configures functionality of the IIC4_SDA to USB3_PWRFAULT > > + > > + // LS1046A > > + // USB3 is not used, configure mux to IIC4_SCL/IIC4_SDA > > + if (PcdGetBool (PcdMuxToUsb3)) { > > +BeMmioWrite32 ((UINTN)>RcwPMuxCr0, > CCSR_SCFG_RCWPMUXCRO_SELCR_USB); > > + } else { > > +BeMmioWrite32 ((UINTN)>RcwPMuxCr0, > CCSR_SCFG_RCWPMUXCRO_NOT_SELCR_USB); > > + } > > + BeMmioWrite32 ((UINTN)>UsbDrvVBusSelCr, > CCSR_SCFG_USBDRVVBUS_SELCR_USB1); > > + UsbPwrFault = (CCSR_SCFG_USBPWRFAULT_DEDICATED << > > +CCSR_SCFG_USBPWRFAULT_USB3_SHIFT) | > > +(CCSR_SCFG_USBPWRFAULT_DEDICATED << > > +CCSR_SCFG_USBPWRFAULT_USB2_SHIFT) | > > +(CCSR_SCFG_USBPWRFAULT_SHARED << > >
Re: [edk2] [PATCH edk2-platforms 18/39] Silicon/NXP:Add LS1046ARDB SoCLib Support
On Fri, Feb 16, 2018 at 02:20:14PM +0530, Meenakshi wrote: > From: Meenakshi Aggarwal> > On LS1046A NXP SoC,Provide Functions to initialize peripherals > ,print board, soc information. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Vabhav > --- > Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc | 1 + > Silicon/NXP/Chassis/Chassis.c| 1 + > Silicon/NXP/Chassis/Chassis.h| 1 + > Silicon/NXP/Chassis/Chassis2/Soc.c | 51 - > Silicon/NXP/Chassis/LS1043aSocLib.inf| 2 + > Silicon/NXP/Chassis/LS1046aSocLib.inf| 51 + > Silicon/NXP/LS1046A/Include/SocSerDes.h | 55 ++ > Silicon/NXP/LS1046A/LS1046A.dec | 22 + > Silicon/NXP/LS1046A/LS1046A.dsc | 68 > > Silicon/NXP/NxpQoriqLs.dec | 2 + > 10 files changed, 253 insertions(+), 1 deletion(-) > create mode 100644 Silicon/NXP/Chassis/LS1046aSocLib.inf > create mode 100644 Silicon/NXP/LS1046A/Include/SocSerDes.h > create mode 100644 Silicon/NXP/LS1046A/LS1046A.dec > create mode 100644 Silicon/NXP/LS1046A/LS1046A.dsc > > diff --git a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > index 7708e0a..b2b514e 100644 > --- a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > +++ b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > @@ -59,6 +59,7 @@ >gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x021c0500 >gNxpQoriqLsTokenSpaceGuid.PcdSerdes2Enabled|FALSE >gNxpQoriqLsTokenSpaceGuid.PcdPlatformFreqDiv|0x1 > + gNxpQoriqLsTokenSpaceGuid.PcdMuxToUsb3|TRUE > ># ># I2C controller Pcds > diff --git a/Silicon/NXP/Chassis/Chassis.c b/Silicon/NXP/Chassis/Chassis.c > index 9f2928b..ce07fdc 100644 > --- a/Silicon/NXP/Chassis/Chassis.c > +++ b/Silicon/NXP/Chassis/Chassis.c > @@ -44,6 +44,7 @@ GurRead ( > */ > STATIC CPU_TYPE CpuTypeList[] = { >CPU_TYPE_ENTRY (LS1043A, LS1043A, 4), > + CPU_TYPE_ENTRY (LS1046A, LS1046A, 4), > }; > > /* > diff --git a/Silicon/NXP/Chassis/Chassis.h b/Silicon/NXP/Chassis/Chassis.h > index 4bdb4d0..0beb44c 100644 > --- a/Silicon/NXP/Chassis/Chassis.h > +++ b/Silicon/NXP/Chassis/Chassis.h > @@ -56,6 +56,7 @@ CpuMaskNext ( > > #define SVR_WO_E0xFE > #define SVR_LS1043A 0x879200 > +#define SVR_LS1046A 0x870700 > > #define SVR_MAJOR(svr) (((svr) >> 4) & 0xf) > #define SVR_MINOR(svr) (((svr) >> 0) & 0xf) > diff --git a/Silicon/NXP/Chassis/Chassis2/Soc.c > b/Silicon/NXP/Chassis/Chassis2/Soc.c > index 17de7e4..658df2d 100644 > --- a/Silicon/NXP/Chassis/Chassis2/Soc.c > +++ b/Silicon/NXP/Chassis/Chassis2/Soc.c > @@ -17,6 +17,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -139,6 +140,44 @@ GetSysInfo ( > } > > /** > + Function to select pins depending upon pcd using supplemental > + configuration unit(SCFG) extended RCW controlled pinmux control > + register which contains the bits to provide pin multiplexing control. > + This register is reset on HRESET. > + **/ > +VOID > +ConfigScfgMux (VOID) > +{ > + CCSR_SCFG *Scfg; > + UINT32 UsbPwrFault; > + > + Scfg = (VOID *)PcdGet64 (PcdScfgBaseAddr); > + // Configures functionality of the IIC3_SCL to USB2_DRVVBUS > + // Configures functionality of the IIC3_SDA to USB2_PWRFAULT > + > + // LS1043A > + // Configures functionality of the IIC4_SCL to USB3_DRVVBUS > + // Configures functionality of the IIC4_SDA to USB3_PWRFAULT > + > + // LS1046A > + // USB3 is not used, configure mux to IIC4_SCL/IIC4_SDA > + if (PcdGetBool (PcdMuxToUsb3)) { > +BeMmioWrite32 ((UINTN)>RcwPMuxCr0, CCSR_SCFG_RCWPMUXCRO_SELCR_USB); > + } else { > +BeMmioWrite32 ((UINTN)>RcwPMuxCr0, > CCSR_SCFG_RCWPMUXCRO_NOT_SELCR_USB); > + } > + BeMmioWrite32 ((UINTN)>UsbDrvVBusSelCr, > CCSR_SCFG_USBDRVVBUS_SELCR_USB1); > + UsbPwrFault = (CCSR_SCFG_USBPWRFAULT_DEDICATED << > +CCSR_SCFG_USBPWRFAULT_USB3_SHIFT) | > +(CCSR_SCFG_USBPWRFAULT_DEDICATED << > +CCSR_SCFG_USBPWRFAULT_USB2_SHIFT) | > +(CCSR_SCFG_USBPWRFAULT_SHARED << > +CCSR_SCFG_USBPWRFAULT_USB1_SHIFT); Can you change indentation like so?: UsbPwrFault = (CCSR_SCFG_USBPWRFAULT_DEDICATED << CCSR_SCFG_USBPWRFAULT_USB3_SHIFT) | (CCSR_SCFG_USBPWRFAULT_DEDICATED << CCSR_SCFG_USBPWRFAULT_USB2_SHIFT) | (CCSR_SCFG_USBPWRFAULT_SHARED << CCSR_SCFG_USBPWRFAULT_USB1_SHIFT); > + BeMmioWrite32 ((UINTN)>UsbPwrFaultSelCr, UsbPwrFault); > + BeMmioWrite32 ((UINTN)>UsbPwrFaultSelCr, UsbPwrFault); > +} > + > +/** >Function to initialize SoC specific constructs >CPU Info >SoC Personality > @@ -170,8
[edk2] [PATCH 1/1] OvmfPkg/README: add HTTPS Boot
Add the new section for HTTPS Boot. Cc: Ard BiesheuvelCc: Jordan Justen Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Gary Lin --- OvmfPkg/README | 50 1 file changed, 50 insertions(+) diff --git a/OvmfPkg/README b/OvmfPkg/README index 00fb71848200..a84b6a30aaed 100644 --- a/OvmfPkg/README +++ b/OvmfPkg/README @@ -254,6 +254,56 @@ longer.) VirtioNetDxe |x Intel BootUtil (X64) | x +=== HTTPS Boot === + +HTTPS Boot is an alternative solution to PXE. It replaces the tftp server +with a HTTPS server so the firmware can download the images through a trusted +and encrypted connection. + +* To enable HTTPS Boot, you have to build OVMF with -D HTTP_BOOT_ENABLE and + -D TLS_ENABLE. The former brings in the HTTP stack from NetworkPkg while the + the later enables TLS support in both NetworkPkg and CryptPkg. + +* By default, there is no trusted certificate. The user has to import the + certificates either manually with "Tls Auth Configuration" utility in the + firmware UI or through the fw_cfg entry, etc/edk2/https/cacerts. + + -fw_cfg name=etc/edk2/https/cacerts,file= + + The blob for etc/edk2/https/cacerts has to be in the format of Signature + Database(*1). You can use p11-kit(*2) or efisiglit(*3) to create the + certificate list. + +* Bsides the trusted certificates, it's also possible to configure the trusted + cipher suites for HTTPS through another fw_cfg entry: etc/edk2/https/ciphers. + + -fw_cfg name=etc/edk2/https/ciphers,file= + + OVMF expects a binary UINT16 array which is compirsed of the cipher suites + HEX IDs(*4). If the cipher suite list is given, OVMF will choose the cipher + suite from the intersection of the given list and the built-in cipher + suites. Otherwise, OVMF just chooses whatever proper cipher suites from the + built-in ones. + + While the tool(*5) to create the cipher suite array is still under + development, the array can be generated with the following script: + + export LC_ALL=C + openssl ciphers -V \ + | sed -r -n \ + -e 's/^ *0x([0-9A-F]{2}),0x([0-9A-F]{2}) - .*$/x\1 x\2/p' \ + | xargs -r -- printf -- '%b' > ciphers.bin + + This script creates ciphers.bin that contains all the cipher suite IDs + supported by openssl. Of course, you can append your own list to + "openssl ciphers -V" in the script to limit the supported cipher suites. + +(*1) See "31.4.1 Signature Database" in UEFI specification 2.7 errata A. +(*2) p11-kit: https://github.com/p11-glue/p11-kit/ +(*3) efisiglist: https://github.com/rhboot/pesign/blob/master/src/efisiglist.c +(*4) https://wiki.mozilla.org/Security/Server_Side_TLS#Cipher_names_correspondence_table +(*5) update-crypto-policies: https://github.com/nmav/fedora-crypto-policies + === OVMF Flash Layout === Like all current IA32/X64 system designs, OVMF's firmware device (rom/flash) -- 2.16.3 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms 17/39] LS1043 : Enable NOR driver for LS1043aRDB package.
On Fri, Feb 16, 2018 at 02:20:13PM +0530, Meenakshi wrote: > From: Meenakshi Aggarwal> > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Meenakshi Aggarwal Will this one require any changes to build (and work correctly) against current edk2? If not: Reviewed-by: Leif Lindholm / Leif > --- > Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc | 16 +++- > Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf | 9 - > 2 files changed, 23 insertions(+), 2 deletions(-) > > diff --git a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > index df4d917..7708e0a 100644 > --- a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > +++ b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.dsc > @@ -41,6 +41,7 @@ >IfcLib|Silicon/NXP/Library/IfcLib/IfcLib.inf >BoardLib|Platform/NXP/LS1043aRdbPkg/Library/BoardLib/BoardLib.inf >FpgaLib|Platform/NXP/LS1043aRdbPkg/Library/FpgaLib/FpgaLib.inf > + NorFlashLib|Silicon/NXP/Library/NorFlashLib/NorFlashLib.inf > > [PcdsFixedAtBuild.common] > > @@ -70,6 +71,13 @@ >gDs1307RtcLibTokenSpaceGuid.PcdI2cSlaveAddress|0x68 >gDs1307RtcLibTokenSpaceGuid.PcdI2cBusFrequency|10 > > + # > + # NV Storage PCDs. > + # > + gArmTokenSpaceGuid.PcdVFPEnabled|1 > + gNxpQoriqLsTokenSpaceGuid.PcdFlashDeviceBase64|0x06000 > + gNxpQoriqLsTokenSpaceGuid.PcdFlashReservedRegionBase64|0x6030 > + > > > # > # Components Section - list of all EDK II Modules needed by this Platform > @@ -79,9 +87,15 @@ ># ># Architectural Protocols ># > - MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf > + > + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf{ > + > + NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf > + } > + MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf > >Silicon/NXP/Drivers/WatchDog/WatchDogDxe.inf >Silicon/NXP/Drivers/I2cDxe/I2cDxe.inf > + Silicon/NXP/Drivers/NorFlashDxe/NorFlashDxe.inf > > ## > diff --git a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf > b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf > index fa6510c..6b5b63f 100644 > --- a/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf > +++ b/Platform/NXP/LS1043aRdbPkg/LS1043aRdbPkg.fdf > @@ -55,6 +55,7 @@ > gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize > FV = FVMAIN_COMPACT > > !include ../FVRules.fdf.inc > +!include VarStore.fdf.inc > > > # > # FV Section > @@ -103,7 +104,8 @@ READ_LOCK_STATUS = TRUE >INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf >INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf >INF EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf > - INF MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf > + INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf > + INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf >INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf > >INF Silicon/NXP/Drivers/I2cDxe/I2cDxe.inf > @@ -123,6 +125,11 @@ READ_LOCK_STATUS = TRUE >INF EmbeddedPkg/SimpleTextInOutSerial/SimpleTextInOutSerial.inf > ># > + # NOR Driver > + # > + INF Silicon/NXP/Drivers/NorFlashDxe/NorFlashDxe.inf > + > + # ># Network modules ># >INF MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf > -- > 1.9.1 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v2 1/1] ArmPkg/PlatformBootManagerLib: load boot options from platform
Hi Laszlo, I'll fix them in v3. Best Regards Haojian From: Laszlo ErsekSent: Tuesday, April 17, 2018 9:02 AM To: Haojian Zhuang Cc: edk2-devel@lists.01.org; Ard Biesheuvel; Leif Lindholm (Linaro address) Subject: Re: [edk2] [PATCH v2 1/1] ArmPkg/PlatformBootManagerLib: load boot options from platform On 04/17/18 07:11, Haojian Zhuang wrote: > Platform drivers sets up the array of predefined boot options. > ArmPkg/PlatformBootManager converts the array to boot options. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Haojian Zhuang > --- > ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 81 > ++ > .../PlatformBootManagerLib.inf | 2 + > EmbeddedPkg/EmbeddedPkg.dec| 1 + > EmbeddedPkg/Include/Protocol/PlatformBootManager.h | 39 +++ (1) Please split this patch in two, minimally; one per package. > 4 files changed, 123 insertions(+) > create mode 100644 EmbeddedPkg/Include/Protocol/PlatformBootManager.h > > diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c > b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c > index 61ab61ccc780..68a06f5855d8 100644 > --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c > +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c > @@ -30,6 +30,7 @@ > #include > #include > #include > +#include > #include > #include > > @@ -392,6 +393,84 @@ PlatformRegisterFvBootOption ( > > STATIC > VOID > +GetPlatformOptions ( > + VOID > + ) > +{ > + EFI_STATUS Status; > + EFI_BOOT_MANAGER_LOAD_OPTIONNewOption; > + EFI_BOOT_MANAGER_LOAD_OPTION*CurrentBootOptions; > + EFI_BOOT_MANAGER_LOAD_OPTION*PlatformOption; > + EFI_BOOT_MANAGER_LOAD_OPTION*PlatformBootOptionArray; > + EFI_INPUT_KEY *PlatformKeyArray; > + EFI_INPUT_KEY *PlatformKey; > + PLATFORM_BOOT_MANAGER_PROTOCOL *PlatformBootManager; > + UINTN CurrentBootOptionCount; > + UINTN OptionIndex; > + > + Status = gBS->LocateProtocol (, NULL, > + (VOID **)); > + if (!EFI_ERROR (Status)) { (2) It would simplify nesting if you returned from the function at once on error. > +if (PlatformBootManager->Register) { (3) This check should be unnecessary. I haven't heard of any protocol where a function pointer member was allowed to be absent. Members may return constant EFI_UNSUPPORTED, but they always exist. > + // Last entries of PlatformBootOptionArray and PlatformKeyArray are > empty. (4) Comment style is not valid. > + Status = PlatformBootManager->Register ( > + , > + > + ); > + if (!EFI_ERROR (Status)) { (5) While this kind of nesting / error handling / resource release is entirely valid, in edk2 we prefer error handling labels and "goto" statements. Edk2 identifiers are incredibly long, compared to common C source code, so columns are a premium. We should avoid unnecessary nesting if we can. > +PlatformOption = PlatformBootOptionArray; > +PlatformKey = PlatformKeyArray; > +while (PlatformOption->Description != NULL) { OK, this seems to be a valid check. Description should always be non-NULL for actual entries (if there is nothing to say, it should be an empty string). > + Status = EfiBootManagerInitializeLoadOption ( > + , > + LoadOptionNumberUnassigned, > + LoadOptionTypeBoot, > + LOAD_OPTION_ACTIVE, > + PlatformOption->Description, > + PlatformOption->FilePath, > + NULL, > + 0 > + ); I see no reason for *not* passing in PlatformOption->OptionalData and PlatformOption->OptionalDataSize as well. (6) In fact, there's an argument to be made that this entire initialization should be done by the "platform boot manager protocol" itself -- each element in the returned array of platform boot options should already be initialized with EfiBootManagerInitializeLoadOption() inside the protocol, and the loop here should use (even modify -- see below) those elements in-place. The "NewOption" variable should not be necessary. > + ASSERT_EFI_ERROR (Status); > + CurrentBootOptions = EfiBootManagerGetLoadOptions ( > + , LoadOptionTypeBoot > + ); (7) I don't think it's a good idea to call EfiBootManagerGetLoadOptions() within the loop; it's an expensive operation. It should be good enough to call it once before the loop -- we expect the "platform boot manager protocol" to provide a unique list of options (such that those don't overlap between each other), so it's enough to check every one of them
Re: [edk2] Source code debugging of OVMF
On 04/19/18 04:46, Rebecca Cran wrote: > On 04/16/18 12:25, Rebecca Cran wrote: >> On 04/16/18 10:13, Laszlo Ersek wrote: >> >>> Here's another thread that you might find useful: >>> >>> http://edk2-devel.narkive.com/6BRVus92/qestion-about-how-to-debug-ovmf-on-qemu >> >> I should get my Phabricator wiki running again, which has a >> nicely-formatted version of that - I haven't set it up again after >> moving systems. >> > > https://code.bluestop.org/w/tianocore/debugging-with-gdb/ is now working > again. > Thank you! Laszlo ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v2] ArmPkg/TimerDxe: remove workaround for KVM timer handling
On 17 April 2018 at 08:03, Ard Biesheuvelwrote: > When we first ported EDK2 to KVM/arm, we implemented a workaround for > the quirky timer handling on the KVM side. This has been fixed in > Linux commit f120cd6533d2 ("KVM: arm/arm64: timer: Allow the timer to > control the active state") dated 23 June 2014, which was incorporated > into Linux release 4.3. > > So almost 4 years later, it should be safe to drop this workaround on > the EDK2 side. > > This reverts commit b1a633434ddc. > > Cc: cross-dis...@lists.linaro.org > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel > Acked-by: Marc Zyngier > Reviewed-by: Leif Lindholm > Acked-by: Laszlo Ersek Pushed as 411a373ed6426fb1bff253905b6a59ada44e18ad Thanks all > --- > v2: add acks > > Note to cross-distro readers: this means guest firmware built with this patch > will not work on KVM/ARM hosts using kernel v4.2 or earlier. > > ArmPkg/Drivers/TimerDxe/TimerDxe.c > | 1 - > ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c > | 10 -- > 2 files changed, 11 deletions(-) > > diff --git a/ArmPkg/Drivers/TimerDxe/TimerDxe.c > b/ArmPkg/Drivers/TimerDxe/TimerDxe.c > index a3202fa056f3..bd616d2efc73 100644 > --- a/ArmPkg/Drivers/TimerDxe/TimerDxe.c > +++ b/ArmPkg/Drivers/TimerDxe/TimerDxe.c > @@ -337,7 +337,6 @@ TimerInterruptHandler ( > > // Set next compare value > ArmGenericTimerSetCompareVal (CompareValue); > -ArmGenericTimerEnableTimer (); > ArmInstructionSynchronizationBarrier (); >} > > diff --git > a/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c > > b/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c > index 69a4ceb62db6..c941895a3574 100644 > --- > a/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c > +++ > b/ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c > @@ -26,16 +26,6 @@ ArmGenericTimerEnableTimer ( > >TimerCtrlReg = ArmReadCntvCtl (); >TimerCtrlReg |= ARM_ARCH_TIMER_ENABLE; > - > - // > - // When running under KVM, we need to unmask the interrupt on the timer > side > - // as KVM will mask it when servicing the interrupt at the hypervisor level > - // and delivering the virtual timer interrupt to the guest. Otherwise, the > - // interrupt will fire again, trapping into the hypervisor again, etc. etc. > - // This is scheduled to be fixed on the KVM side, but there is no harm in > - // leaving this in once KVM gets fixed. > - // > - TimerCtrlReg &= ~ARM_ARCH_TIMER_IMASK; >ArmWriteCntvCtl (TimerCtrlReg); > } > > -- > 2.17.0 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] BaseTools: Support DSC component !include PCD items
Reviewed-by: Yonghong ZhuBest Regards, Zhu Yonghong -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yonghong Zhu Sent: Wednesday, April 18, 2018 4:56 PM To: edk2-devel@lists.01.org Cc: Feng, YunhuaX Subject: [edk2] [PATCH] BaseTools: Support DSC component !include PCD items From: Yunhua Feng DSC format: [Components] TestPkg/TestDriver.inf { !include TestPkg/Test.txt } Test.txt content: PcdToken.PcdCName | 0x123 Per spec we should support this usage. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index f4c1868483..fb275aef82 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1536,13 +1536,17 @@ class DscParser(MetaFileParser): Line=self._LineIndex + 1, ExtraData=ErrorInfo1 + "\n" + ErrorInfo2) self._FileWithError = IncludedFile1 IncludedFileTable = MetaFileStorage(self._Table.Cur, IncludedFile1, MODEL_FILE_DSC, False) -Owner = self._Content[self._ContentIndex - 1][0] +FromItem = self._Content[self._ContentIndex - 1][0] +if self._Content[self._ContentIndex - 1][8] != -1.0: +Owner = self._Content[self._ContentIndex - 1][8] +else: +Owner = self._Content[self._ContentIndex - 1][0] Parser = DscParser(IncludedFile1, self._FileType, self._Arch, IncludedFileTable, - Owner=Owner, From=Owner) + Owner=Owner, From=FromItem) self.IncludedFiles.add (IncludedFile1) # Does not allow lower level included file to include upper level included file if Parser._From != Owner and int(Owner) > int (Parser._From): @@ -1550,11 +1554,14 @@ class DscParser(MetaFileParser): Line=self._LineIndex + 1, ExtraData="{0} is already included at a higher level.".format(IncludedFile1)) # set the parser status with current status Parser._SectionName = self._SectionName -Parser._SectionType = self._SectionType +if self._InSubsection: +Parser._SectionType = self._SubsectionType +else: +Parser._SectionType = self._SectionType Parser._Scope = self._Scope Parser._Enabled = self._Enabled # Parse the included file Parser.Start() -- 2.12.2.windows.2 ___ 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