summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* RedfishPkg: Add EDK2 Redfish Foundation diagramsAbner Chang2021-04-162-0/+1082
| | | | | | | | | | | | | | | | | | | | The Readme.md to delineate the EDK2 Redfish foundation driver stack diagrams. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Ting Ye <ting.ye@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Fan Wang <fan.wang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Andrew Fish <afish@apple.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
* ArmPkg: Fix Ecc error 8005 for SCMI_MESSAGE_ID_PERFORMANCEPierre Gondois2021-04-153-15/+15
| | | | | | | | | | | | This patch fixes the following Ecc reported error: Variable name does not follow the rules: 1. First character should be upper case 2. Must contain lower case characters 3. No white space characters 4. Global variable name must start with a 'g' Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 8005 for SCMI_CLOCK_RATE_FORMATPierre Gondois2021-04-153-11/+11
| | | | | | | | | | | | This patch fixes the following Ecc reported error: Variable name does not follow the rules: 1. First character should be upper case 2. Must contain lower case characters 3. No white space characters 4. Global variable name must start with a 'g' Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 8005 for SCMI_MESSAGE_ID_CLOCKPierre Gondois2021-04-152-10/+10
| | | | | | | | | | | | This patch fixes the following Ecc reported error: Variable name does not follow the rules: 1. First character should be upper case 2. Must contain lower case characters 3. No white space characters 4. Global variable name must start with a 'g' Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 8005 for SCMI_MESSAGE_ID_BASEPierre Gondois2021-04-152-11/+11
| | | | | | | | | | | | This patch fixes the following Ecc reported error: Variable name does not follow the rules: 1. First character should be upper case 2. Must contain lower case characters 3. No white space characters 4. Global variable name must start with a 'g' Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 8005 for SCMI_MESSAGE_IDPierre Gondois2021-04-152-6/+6
| | | | | | | | | | | | This patch fixes the following Ecc reported error: Variable name does not follow the rules: 1. First character should be upper case 2. Must contain lower case characters 3. No white space characters 4. Global variable name must start with a 'g' Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 8005 for SCMI_STATUSPierre Gondois2021-04-152-12/+12
| | | | | | | | | | | | This patch fixes the following Ecc reported error: Variable name does not follow the rules: 1. First character should be upper case 2. Must contain lower case characters 3. No white space characters 4. Global variable name must start with a 'g' Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 8005 for SCMI_MESSAGE_TYPEPierre Gondois2021-04-152-4/+4
| | | | | | | | | | | | This patch fixes the following Ecc reported error: Variable name does not follow the rules: 1. First character should be upper case 2. Must contain lower case characters 3. No white space characters 4. Global variable name must start with a 'g' Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 8005 for SCMI_PROTOCOL_IDPierre Gondois2021-04-155-34/+34
| | | | | | | | | | | | This patch fixes the following Ecc reported error: Variable name does not follow the rules: 1. First character should be upper case 2. Must contain lower case characters 3. No white space characters 4. Global variable name must start with a 'g' Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 8005/8007 in ArmDisassemblerLibPierre Gondois2021-04-152-154/+163
| | | | | | | | | | | | | | | | This patch fixes the following Ecc reported error: 8005: Variable name does not follow the rules: 1. First character should be upper case 2. Must contain lower case characters 3. No white space characters 4. Global variable name must start with a 'g' 8007: There should be no use of short (single character) variable names Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 7008 for OPTEE_MESSAGE_PARAMPierre Gondois2021-04-151-4/+7
| | | | | | | | | | This patch fixes the following Ecc reported error: Complex types should be typedef-ed The error is due to the a nested structure declaration. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 7008 for SCMI_CLOCK_RATEPierre Gondois2021-04-152-8/+18
| | | | | | | | | | This patch fixes the following Ecc reported error: Complex types should be typedef-ed The error is due to the a nested structure declaration. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Rename include guard in ArmGicLib.hPierre Gondois2021-04-151-4/+4
| | | | | | | | | | | | | | Edk2 coding standard states that: "Names starting with one or two underscores, such as _MACRO_GUARD_FILE_NAME_H_, must not be used." Ref: https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/ 5_source_files/53_include_files# 5-3-5-all-include-file-contents-must-be-protected-by-a-include-guard Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 6001 in ArmSoftFloatLibPierre Gondois2021-04-151-0/+6
| | | | | | | | | This patch fixes the following Ecc reported error: All include file contents should be guarded by a #ifndef statement. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 6001 in MmCommunicationDxePierre Gondois2021-04-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following Ecc reported error: All include file contents should be guarded by a #ifndef statement. This patch replaces a "#if !defined [...]" statement by a "#ifndef [...]" statement, preventing Ecc to throw an error. Edk2 coding standard stating that: "Names starting with one or two underscores, such as _MACRO_GUARD_FILE_NAME_H_, must not be used." the include guard is also updated. Ref: https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/ 5_source_files/53_include_files# 5-3-5-all-include-file-contents-must-be-protected-by-a-include-guard Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 5003 in ArmExceptionLibPierre Gondois2021-04-152-3/+6
| | | | | | | | | | | This patch fixes the following Ecc reported error: Function name should be left justified, followed by the beginning of the parameter list, with the closing parenthesis on its own line, indented two spaces Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Remove ArmGic/ArmGicSecLib.cPierre Gondois2021-04-151-58/+0
| | | | | | | | | | Commit: 142fa386eb907df55c239311cd5fa2d40f5007dd removes the ArmGicSecLib. The file ArmGic/ArmGicSecLib.c was exclusively used by this library. Thus, this file should also be removed. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 10014 in SemihostLibPierre Gondois2021-04-151-1/+2
| | | | | | | | | | | | | | This patch fixes the following Ecc reported error: No used module files found The source files [ArmPkg/Library/SemihostLib/SemihostPrivate.h] is existing in module ArmPkg/Library/SemihostLib/SemihostLib.inf but is not described in the INF file. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 10014 in MmCommunicationDxePierre Gondois2021-04-151-1/+2
| | | | | | | | | | | | | | This patch fixes the following Ecc reported error: No used module files found The source files [ArmPkg/Drivers/MmCommunicationDxe/MmCommunicate.h] is existing in module ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf but is not described in the INF file. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 10014 in GenericWatchdogDxePierre Gondois2021-04-151-1/+2
| | | | | | | | | | | | | | This patch fixes the following Ecc reported error: No used module files found The source files [ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h] is existing in module ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf but is not described in the INF file. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 10014 in ArmScmiDxePierre Gondois2021-04-151-2/+7
| | | | | | | | | | | | | | | | | | | | | This patch fixes the following Ecc reported error: No used module files found The source files [ArmPkg/Drivers/ArmScmiDxe/ArmScmiPerformanceProtocolPrivate.h] [ArmPkg/Drivers/ArmScmiDxe/ScmiPrivate.h] [ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.h] [ArmPkg/Drivers/ArmScmiDxe/ArmScmiBaseProtocolPrivate.h] [ArmPkg/Drivers/ArmScmiDxe/ArmScmiClockProtocolPrivate.h] are existing in module ArmPkg/Drivers/ArmScmiDxe/ArmScmiDxe.inf but are not described in INF the file. The patch also re-orders the files in the [Sources.common] section. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 10016 in StandaloneMmMmuLibPierre Gondois2021-04-151-2/+2
| | | | | | | | | | | | | | | | This patch fixes the following Ecc reported error: Module file has FILE_GUID collision with other module file The two .inf files with clashing GUID are: ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmLib.inf As ArmMmuBaseLib.inf is older than ArmMmuStandaloneMmLib.inf, it has precedence. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 10006 in ArmPkg.dscPierre Gondois2021-04-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following Ecc reported error: There should be no unnecessary inclusion of library classes in the INF file This comes with the additional information: The Library Class [BootLogoLib] is not used in any platform The Library Class [DxeServicesLib] is not used in any platform The Library Class [UefiBootManagerLib] is not used in any platform The Library Class [PeCoffExtraActionLib] is not used in any platform ArmPkg/ArmPkg.dsc builds the modules requiring thses libraries, but doesn't build the required libraries. This patch adds the missing libraries to the [LibraryClasses.common] section. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 9005 in CpuDxePierre Gondois2021-04-151-2/+2
| | | | | | | | | | | | | | This patch fixes the following Ecc reported error: Only Doxygen commands '@bug', '@todo', '@example', '@file', '@attention', '@param', '@post', '@pre', '@retval', '@return', '@sa', '@since', '@test', '@note', '@par', '@endcode', '@code', '@{', '@}' are allowed to mark the code This patch removes the ":" character following the "@param" doxygen command. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 8001 in ArmArchTimerLibPierre Gondois2021-04-151-6/+6
| | | | | | | | | This patch fixes the following Ecc reported error: Only capital letters are allowed to be used for #define declarations Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 8001 in SemihostLibPierre Gondois2021-04-152-53/+53
| | | | | | | | | This patch fixes the following Ecc reported error: Only capital letters are allowed to be used for #define declarations Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPkg: Fix Ecc error 8001 in ChipsetPierre Gondois2021-04-156-24/+24
| | | | | | | | | | | | | | | | | | | This patch fixes the following Ecc reported error: Only capital letters are allowed to be used for #define declarations Edk2 coding standard stating that: "Names starting with one or two underscores, such as _MACRO_GUARD_FILE_NAME_H_, must not be used." the include guard of ArmCortexA5x.h is also updated. Ref: https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/ 5_source_files/53_include_files# 5-3-5-all-include-file-contents-must-be-protected-by-a-include-guard Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPlatformPkg: Remove package dependency in NorFlashStandaloneMmPierre Gondois2021-04-151-1/+0
| | | | | | | | | | | The DependencyCheck available in .pytool detects an unnecessary dependency of the NorFlashStandaloneMm.inf module over the EmbeddedPkg package. This patch removes this dependency. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Tested-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
* ArmPlatformPkg: Fix Ecc error 9001Pierre Gondois2021-04-152-15/+15
| | | | | | | | | | This patch fixes the following Ecc reported error: INF/DEC/DSC/FDF file header comment should begin with "## @file" or "# @file" at the very top file Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* ArmPlatformPkg: Fix Ecc error 8001Pierre Gondois2021-04-1529-151/+151
| | | | | | | | | | | | | | | This patch fixes the following Ecc reported error: File header doesn't exist File header comment missing the ""Copyright"" Even though a copyright is present in the header file, the leading '*' char prevents the Ecc tool from detecting it. According to the edk2 coding specifcation, section 5.2.3 "File Heading", there should not be leading '*' char. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* BaseTools/Source/Python: Remove CPU architecture assumptionsMichael D Kinney2021-04-153-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3308 The EDK II Build Specifications do not restrict the set of CPU architectures that can be supported. Remove places in the EDK II that assume a fixed set of CPU architectures. Remove build breaks in the following tools when a check against a fixed set of CPU architectures is made. * Build * GenFds * TargetTool Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Abner Chang <abner.chang@hpe.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* BaseTools/Source/C: Remove CPU architecture assumptionsMichael D Kinney2021-04-152-6/+4
| | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3308 The EDK II Build Specifications do not restrict the set of CPU architectures that can be supported. Remove places in the EDK II that assume a fixed set of CPU architectures. Remove build breaks in the following tools when a check against a fixed set of CPU architectures is made. * GenFw Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Abner Chang <abner.chang@hpe.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* CryptoPkg/Library/Include: Allow CPU specific defines to be predefinedMichael D Kinney2021-04-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3308 The EDK II Build Specifications do not restrict the set of CPU architectures that can be supported. Remove places in the EDK II that assume a fixed set of CPU architectures. Update SIXTY_FOUR_BIT and THIRTY_TWO_BIT defines in the CryptoPkg to allow one of them to be predefined on the EDK II build command line using /D flag or in DSC file [BuildOptions] sections. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com> Cc: Guomin Jiang <guomin.jiang@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Abner Chang <abner.chang@hpe.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Abner Chang <abner.chang@hpe.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
* MdePkg/Include: Allow CPU specific defines to be predefinedMichael D Kinney2021-04-152-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3308 The EDK II Build Specifications do not restrict the set of CPU architectures that can be supported. Remove places in the EDK II that assumes a fixed set of CPU architectures. Update EFI_REMOVABLE_MEDIA_FILE_NAME to allow it to be predefined in tools_def.txt or a DSC file [BuildOptions] section using a *_*_*_CC_FLAGS statement. Add support for the following two defines. If neither are defines, then preserve the current behavior. If either is defined, then compare these 16-bit values to Machine in the EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) and EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) macros. * EFI_IMAGE_MACHINE_TYPE_VALUE * EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Andrew Fish <afish@apple.com> Cc: Abner Chang <abner.chang@hpe.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Abner Chang <abner.chang@hpe.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* RedfishPkg/RestJsonStructureDxe: Fix typo in function headerAbner Chang2021-04-151-1/+1
| | | | | | | | | | | | In v2, BZ reference is added. BZ#:3030 Fix the typo [in]/[out] of parameter DestroyStructure in function header. Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Nickle Wang <nickle.wang@hpe.com> Reviewed-by: Nickle Wang <nickle.wang@hpe.com>
* UnitTestFrameworkPkg: Use TianoCore mirror of cmocka repositoryMichael D Kinney2021-04-144-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3301 The cmocka repository https://git.cryptomilk.org/projects/cmocka.git has gone down a few times in past year. When it is down, it blocks EDK II CI. A mirror of this repository has been created in the TianoCore organization at https://github.com/tianocore/edk2-cmocka.git and uses a GitHub Action to auto-sync changes from https://git.cryptomilk.org/projects/cmocka.git. * Update .gitmodules to use https://github.com/tianocore/edk2-cmocka.git instead of https://git.cryptomilk.org/projects/cmocka.git. * Update README.rst to reference the COPYING file in https://github.com/tianocore/edk2-cmocka.git with the cmocka license. * Update Azure Pipelines YML files to remove a temporary workaround that used an alternate GitHub mirror of cmocka. With the workaround removed, EDK II CI always uses the TianoCore mirror of cmocka. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Andrew Fish <afish@apple.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Leif Lindholm <leif@nuviainc.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* BaseTools/PlatformAutoGen: MAKE_FLAGS and MAKE_PATH fixesMichael D Kinney2021-04-141-15/+21
| | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3312 Update parsing of MAKE_FLAGS in DSC [BuildOptions] sections to split the flags into a list to be compatible with running the make command using Popen(). Parsing MAKE_FLAGS from tools_def.txt already uses _SplitOption(). This change uses the same _SplitOption() method for MAKE_FLAGS from a DSC [BuildOptions] section. Also update the parsing of MAKE_PATH to support MAKE_PATH from tools_def.txt or the DSC [BuildOptions] section. MAKE_PATH in DSC [BuildOptions] section is higher priority than MAKE_PATH in tools_def.txt. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
* MdePkg: Fix AsmReadMsr64() and AsmWriteMsr64() with GCC toolchainTakuto Naito2021-04-141-4/+3
| | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3325 1. AsmReadMsr64() in X64/GccInlinePriv.c AsmReadMsr64 can return uninitialized value if FilterBeforeMsrRead returns False. This causes build error with the CLANG toolchain. 2. AsmWriteMsr64() in X64/GccInlinePriv.c In the case that FilterBeforeMsrWrite changes Value and returns True, The original Value, not the changed Value, is written to the MSR. This behavior is different from the one of AsmWriteMsr64() in X64/WriteMsr64.c for the MSFT toolchain. Signed-off-by: Takuto Naito <naitaku@gmail.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* DynamicTablesPkg: Remove EArmObjExtendedInterruptInfoPierre Gondois2021-04-131-2/+0
| | | | | | | | The EArmObjExtendedInterruptInfo doesn't exist. Remove any reference to this enum. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* DynamicTablesPkg: Re-order GicItsIdentifierArray structPierre Gondois2021-04-131-11/+11
| | | | | | | | The structure is not correctly placed in the file. Move it so it follows the EARM_OBJECT_ID enum order. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* OvmfPkg/OvmfXen: Set PcdFSBClockAnthony PERARD2021-04-133-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update gEfiMdePkgTokenSpaceGuid.PcdFSBClock so it can have the correct value when SecPeiDxeTimerLibCpu start to use it for the APIC timer. Currently, nothing appear to use the value in PcdFSBClock before XenPlatformPei had a chance to set it even though TimerLib is included in modules run before XenPlatformPei. XenPlatformPei doesn't use any of the functions that would use that value. No other modules in the PEI phase seems to use the TimerLib before PcdFSBClock is set. There are currently two other modules in the PEI phase that needs the TimerLib: - S3Resume2Pei, but only because LocalApicLib needs it, but nothing is using the value from PcdFSBClock. - CpuMpPei, but I believe it only runs after XenPlatformPei Before the PEI phase, there's the SEC phase, and SecMain needs TimerLib because of LocalApicLib. And it initialise the APIC timers for the debug agent. But I don't think any of the DebugLib that OvmfXen could use are actually using the *Delay functions in TimerLib, and so would not use the value from PcdFSBClock which would be uninitialised. A simple runtime test showed that TimerLib doesn't use PcdFSBClock value before it is set. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2490 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20210412133003.146438-8-anthony.perard@citrix.com> [lersek@redhat.com: cast Freq to UINT32 for PcdSet32S(), not for ASSERT()]
* OvmfPkg/XenPlatformPei: Calibrate APIC timer frequencyAnthony PERARD2021-04-134-0/+185
| | | | | | | | | | | | | | | | | | | | | | | | | Calculate the frequency of the APIC timer that Xen provides. Even though the frequency is currently hard-coded, it isn't part of the public ABI that Xen provides and thus may change at any time. OVMF needs to determine the frequency by an other mean. Fortunately, Xen provides a way to determines the frequency of the TSC, so we can use TSC to calibrate the frequency of the APIC timer. That information is found in the shared_info page which we map and unmap once done (XenBusDxe is going to map the page somewhere else). The shared_info page is mapped at the highest physical address allowed as it doesn't need to be in the RAM, thus there's a call to update the page table. The calculated frequency is only logged in this patch, it will be used in a following patch. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2490 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20210412133003.146438-7-anthony.perard@citrix.com>
* OvmfPkg/XenPlatformPei: Map extra physical addressAnthony PERARD2021-04-133-0/+77
| | | | | | | | | | | | | | | | | | | | | | Some information available in a Xen guest can be mapped anywhere in the physical address space and they don't need to be backed by RAM. For example, the shared info page. While it's easier to put those pages anywhere, it is better to avoid mapping it where the RAM is. It might split a nice 1G guest page table into 4k pages and thus reducing performance of the guest when it accesses its memory. Also mapping a page like the shared info page and then unmapping it or mapping it somewhere else would leave a hole in the RAM that the guest would propably not be able to use anymore. So the patch introduces a new function which can be used to 1:1 mapping of guest physical memory above 4G during the PEI phase so we can map the Xen shared pages outside of memory that can be used by guest, and as high as possible. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20210412133003.146438-6-anthony.perard@citrix.com>
* OvmfPkg/IndustryStandard: Introduce PageTable.hAnthony PERARD2021-04-132-142/+162
| | | | | | | | | | | | We are going to use the page table structure in yet another place, collect the types and macro that can be used from another module rather than making yet another copy. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2490 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Tom Lendacky <thomas.lendacky@amd.com> Message-Id: <20210412133003.146438-5-anthony.perard@citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* OvmfPkg/IndustryStandard/Xen: Apply EDK2 coding style to XEN_VCPU_TIME_INFOAnthony PERARD2021-04-131-8/+9
| | | | | | | | | | | We are going to use new fields from the Xen headers. Apply the EDK2 coding style so that the code that is going to use it doesn't look out of place. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2490 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20210412133003.146438-4-anthony.perard@citrix.com>
* MdePkg: Allow PcdFSBClock to by DynamicAnthony PERARD2021-04-131-4/+4
| | | | | | | | | | | We are going to want to change the value of PcdFSBClock at run time in OvmfXen, so move it to the PcdsDynamic section. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2490 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20210412133003.146438-3-anthony.perard@citrix.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
* OvmfPkg/XenResetVector: Silent a warning from nasmAnthony PERARD2021-04-131-1/+1
| | | | | | | | | | | To avoid nasm generating a warning, replace the macro by the value expected to be stored in eax. Ia32/XenPVHMain.asm:76: warning: dword data exceeds bounds Reported-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20210412133003.146438-2-anthony.perard@citrix.com>
* DynamicTablesPkg: add validation for PcdNonBsaCompliant16550SerialHidJoey Gouly2021-04-133-2/+113
| | | | | | | | | | | | According to ACPI 6.4, 6.1.5 _HID states: - A valid PNP ID must be of the form "AAA####" where A is an uppercase letter and # is a hex digit. - A valid ACPI ID must be of the form "NNNN####" where N is an uppercase letter or a digit ('0'-'9') and # is a hex digit. Signed-off-by: Joey Gouly <joey.gouly@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
* SecurityPkg/Tcg2Smm: Initialize local Status variableMichael Kubacki2021-04-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3277 Initializes the Status variable in TcgMmReadyToLock(). Fixes a Clang build failure: Tcg2Smm.c - SecurityPkg\Tcg\Tcg2Smm\Tcg2Smm.c:254:7: error: variable 'Status' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] Initializing this variable is required to address a practical scenario in which the return value of TcgMmReadyToLock() is undefined based on conditional evaluation in the function. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Qi Zhang <qi1.zhang@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Kun Qin <kun.q@outlook.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* MdeModulePkg: Initialize temp variable in VarCheckPolicyLibBret Barkelew2021-04-131-0/+1
| | | | | | | | | | | | | | | DumpVariablePolicy() will return EFI_INVALID_PARAMETER if the Buffer pointer is NULL and the indirect Size is anything but 0. Since this TempSize was not being initialized it is very likely that this sequence would not return the total buffer size as expected. Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=3310 Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Bret Barkelew <bret.barkelew@microsoft.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>