summaryrefslogtreecommitdiff
path: root/ArmPkg
AgeCommit message (Collapse)AuthorFilesLines
2021-08-30ArmPkg: Enable boot discovery policy for ARM package.Grzegorz Bernacki2-1/+122
This commit adds code which check BootDiscoveryPolicy variable and calls Boot Policy Manager Protocol to connect device specified by the variable. To enable that mechanism for platform EfiMdeModulePkgTokenSpaceGuid.PcdBootDiscoveryPolicy PCD must be added to DSC file and BootDiscoveryPolicyUiLib should be added to UiApp libraries. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-08-27ArmPkg/GicV3Dxe: Don't signal EOI on arbitrary interruptsArd Biesheuvel1-4/+0
Currently, at ExitBootServices() time, the GICv3 driver signals End-Of-Interrupt (EOI) on all interrupt lines that are supported by the interrupt controller. This appears to have been carried over from the GICv2 version, but has been turned into something that violates the GIC spec, and may trigger SError exceptions on some implementations. Marc puts it as follows: The GIC interrupt state machine is pretty strict. An interrupt can only be deactivated (with or without prior priority drop) if it has been acknowledged first. In GIC speak, this means that only the following sequences are valid: With EOImode==0: x = ICC_IAR{0,1}_EL1; ICC_EOIR{0,1}_EL1 = x; With EOImode==1: x = ICC_IAR{0,1}_EL1; ICC_EOIR{0,1}_EL1 = x; ICC_DIR_EL1 = x; Any write to ICC_EOIR{0,1}_EL1 that isn't the direct consequence of the same value being read from ICC_IAR{0,1}_EL1, and with the correct nesting, breaks the state machine and leads to unpredictable results that affects *all* interrupts in the system (most likely, the priority system is dead). See Figure 4-3 ("Interrupt handling state machine") in Arm IHI 0069F for a description of the acceptable transitions. Additionally, on implementations that have ICC_CTLR_EL1.SEIS==1, a SError may be generated to signal the error. See the various <quote> IMPLEMENTATION_DEFINED "SError ...."; </quote> that are all over the pseudocode contained in the same architecture spec. Needless to say, this is pretty final for any SW that would do silly things on such implementations (which do exist). Given that in our implementation, every signalled interrupt is acked, handled and EOId in sequence, there is no reason to EOI all interrupts at ExitBootServices() time in the first place, so let's just drop this code. This fixes an issue reported by Marc where an SError is triggered by this code, bringing down the system. Reported-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Marc Zyngier <maz@kernel.org> Tested-by: Marc Zyngier <maz@kernel.org> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-08-11ArmPkg: prepare 32bit ARM build of StandaloneMmPkgEtienne Carriere4-11/+14
Changes in ArmPkg to prepare building StandaloneMm firmware for 32bit Arm architectures. Adds ArmmmuStandaloneMmLib library to the list of the standard components build for ArmPkg on when ARM architectures. Changes path of source file AArch64/ArmMmuStandaloneMmLib.c and compile it for both 32bit and 64bit architectures. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-08-11ArmPkg/IndustryStandard: 32b/64b agnostic FF-A, Mm SVC and Std SMC IDsEtienne Carriere3-0/+35
Defines ARM_SVC_ID_FFA_* and ARM_SVC_ID_SP_* identifiers for 32bit function IDs as per SMCCC specification. Defines also generic ARM SVC identifier macros to wrap 32bit or 64bit identifiers upon target built architecture. Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-06-18ArmPkg: Move cache defs used in Universal/Smbios into ArmCache.hRebecca Cran7-131/+148
Many of the cache definitions in ArmLibPrivate.h are being used outside of ArmLib, in Universal/Smbios. Move them into ArmCache.h to make them public, and remove the include of ArmLibPrivate.h from files in Universal/Smbios. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-06-16ArmPkg: SpellCheck: Update valid acronyms in ExtendedWordsSean Brogan1-0/+19
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3445 Spellcheck was not covering all specified files due to CSpell v5 and Node v10 incompatibility of current CI pipeline configuration. This change updates ExtendedWords for ArmPkg with valid acronyms to avoid potential spell errors. Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Sean Brogan <sean.brogan@microsoft.com> Signed-off-by: Kun Qin <kuqin12@gmail.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-05-27ArmPkg/ArmGic: Fix maximum number of interrupts in GICv3edk2-stable202105Andreas Sandberg1-2/+9
Bugzilla: 3415 (https://bugzilla.tianocore.org/show_bug.cgi?id=3415) The GICv3 architecture supports up to 1020 ordinary interrupt lines. The actual number of interrupts supported is described by the ITLinesNumber field in the GICD_TYPER register. The total number of implemented registers is normally calculated as 32*(ITLinesNumber+1). However, maximum value (0x1f) is a special case since that would indicate that 1024 interrupts are implemented. Add handling for this special case in ArmGicGetMaxNumInterrupts. Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Signed-off-by: Joey Gouly <joey.gouly@arm.com> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
2021-05-10ArmPkg: Update SCMI Base Protocol version to 0x20000Nicola Mazzucato2-9/+11
The SCP-firmware has moved to full support for SCMIv2 which means that the base protocol can be either compliant with SCMI v1 or v2. Allow any version between SCMI v1.0 and SCMI v2.0 to be compatible with the current implementation. Signed-off-by: Nicola Mazzucato <nicola.mazzucato@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Tested-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-04-28ArmPkg: Add ArmPkg.ci.yamlPierre Gondois1-0/+221
Add ArmPkg.ci.yaml to configure the CI for the ArmPkg. Cc: Bret Barkelew <bret.barkelew@microsoft.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-04-28ArmPkg: Correct small typosPierre Gondois8-13/+13
The 'cspell' CI test detected some small typos in ArmPkg. Correct them. Cc: Bret Barkelew <bret.barkelew@microsoft.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-04-28ArmPkg: Add OemMiscLibNull library to ArmPkg.dscPierre Gondois1-0/+1
Add the OemMiscLibNull library to the [Components] section of ArmPkg.dsc, allowing to complete the 'DscCompleteCheck' CI test. According to .pytool/Readme about the 'DscCompleteCheck' test: The test considers it an error if any INF does not appear in the `Components` section of the package-level DSC. Cc: Bret Barkelew <bret.barkelew@microsoft.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-04-28ArmPkg: Re-order libraries in ArmPkg.decPierre Gondois1-33/+33
This patch alphabetically orders libraries advertised in ArmPkg.dec. Cc: Bret Barkelew <bret.barkelew@microsoft.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2021-04-28ArmPkg: Document libraries in ArmPkg.decPierre Gondois1-0/+47
This patch documents the libraries advertised in ArmPkg.dec. Cc: Bret Barkelew <bret.barkelew@microsoft.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2021-04-28ArmPkg: Add missing library headers to ArmPkg.decPierre Gondois1-3/+9
Some library headers are missing/incorrect in ArmPkg.dec. This makes the 'LibraryClassCheck' CI test fail. This patch adds/corrects them. According to .pytool/Readme about the 'LibraryClassCheck' test: This test scans at all library header files found in the `Library` folders in all of the package's declared include directories and ensures that all files have a matching LibraryClass declaration in the DEC file for the package. Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=3254 Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=3258 Cc: Bret Barkelew <bret.barkelew@microsoft.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Bret Barkelew <bret.barkelew@microsoft.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-04-28ArmPkg: Fix Ecc error 3002 in StandaloneMmMmuLibPierre Gondois1-1/+1
This patch fixes the following Ecc reported error: Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=) Cc: Bret Barkelew <bret.barkelew@microsoft.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-04-28ArmPkg: Fix Ecc error 8003Pierre Gondois33-99/+99
This patch fixes the following Ecc reported error: The #ifndef at the start of an include file should have one postfix underscore, and no prefix underscore character Some include guards have been modified to match the name of the header file. Some comments have also been added on the closing '#endif'. Cc: Bret Barkelew <bret.barkelew@microsoft.com> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-04-27ArmPkg: Fix typo of Manufacturer in comment in SmbiosMiscDxeRebecca Cran1-1/+1
'Manufacturer' was spelled wrongly in a comment in MiscChassisManufacturerData.c. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-04-27ArmPkg: Fix calculation of offset of chassis SKU Number in SmbiosMiscDxeRebecca Cran1-5/+7
The calculation of the chassis SKU number field was being calculated incorrectly, forgetting that there's one element already present in the structure. Fix the calculation and improve code readability by introducing a SkuNumberField variable. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-04-27ArmPkg: Allow platforms to report their boot status via OemMiscLib callRebecca Cran3-0/+27
Add a new function to OemMiscLib to allow platforms to report their boot status into the Type32 SMBIOS table. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-04-27ArmPkg: Allow platforms to supply more data for SMBIOS Type3 recordRebecca Cran3-0/+152
Add OemMiscLib calls to allow platforms to provide the following information about the chassis: o Bootup state o Power supply/supplies state o Thermal state o Security state o Chassis height (in RMU) o Number of power cords Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-04-15ArmPkg: Fix Ecc error 8005 for SCMI_MESSAGE_ID_PERFORMANCEPierre Gondois3-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>
2021-04-15ArmPkg: Fix Ecc error 8005 for SCMI_CLOCK_RATE_FORMATPierre Gondois3-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>
2021-04-15ArmPkg: Fix Ecc error 8005 for SCMI_MESSAGE_ID_CLOCKPierre Gondois2-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>
2021-04-15ArmPkg: Fix Ecc error 8005 for SCMI_MESSAGE_ID_BASEPierre Gondois2-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>
2021-04-15ArmPkg: Fix Ecc error 8005 for SCMI_MESSAGE_IDPierre Gondois2-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>
2021-04-15ArmPkg: Fix Ecc error 8005 for SCMI_STATUSPierre Gondois2-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>
2021-04-15ArmPkg: Fix Ecc error 8005 for SCMI_MESSAGE_TYPEPierre Gondois2-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>
2021-04-15ArmPkg: Fix Ecc error 8005 for SCMI_PROTOCOL_IDPierre Gondois5-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>
2021-04-15ArmPkg: Fix Ecc error 8005/8007 in ArmDisassemblerLibPierre Gondois2-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>
2021-04-15ArmPkg: Fix Ecc error 7008 for OPTEE_MESSAGE_PARAMPierre Gondois1-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>
2021-04-15ArmPkg: Fix Ecc error 7008 for SCMI_CLOCK_RATEPierre Gondois2-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>
2021-04-15ArmPkg: Rename include guard in ArmGicLib.hPierre Gondois1-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>
2021-04-15ArmPkg: Fix Ecc error 6001 in ArmSoftFloatLibPierre Gondois1-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>
2021-04-15ArmPkg: Fix Ecc error 6001 in MmCommunicationDxePierre Gondois1-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>
2021-04-15ArmPkg: Fix Ecc error 5003 in ArmExceptionLibPierre Gondois2-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>
2021-04-15ArmPkg: Remove ArmGic/ArmGicSecLib.cPierre Gondois1-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>
2021-04-15ArmPkg: Fix Ecc error 10014 in SemihostLibPierre Gondois1-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>
2021-04-15ArmPkg: Fix Ecc error 10014 in MmCommunicationDxePierre Gondois1-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>
2021-04-15ArmPkg: Fix Ecc error 10014 in GenericWatchdogDxePierre Gondois1-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>
2021-04-15ArmPkg: Fix Ecc error 10014 in ArmScmiDxePierre Gondois1-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>
2021-04-15ArmPkg: Fix Ecc error 10016 in StandaloneMmMmuLibPierre Gondois1-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>
2021-04-15ArmPkg: Fix Ecc error 10006 in ArmPkg.dscPierre Gondois1-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>
2021-04-15ArmPkg: Fix Ecc error 9005 in CpuDxePierre Gondois1-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>
2021-04-15ArmPkg: Fix Ecc error 8001 in ArmArchTimerLibPierre Gondois1-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>
2021-04-15ArmPkg: Fix Ecc error 8001 in SemihostLibPierre Gondois2-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>
2021-04-15ArmPkg: Fix Ecc error 8001 in ChipsetPierre Gondois5-19/+19
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>
2021-03-31ArmPkg: Consume MdeLibs.dsc.inc for RegisterFilterLibDandan Bi1-0/+2
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246 MdeLibs.dsc.inc was added for some basic/default library instances provided by MdePkg and RegisterFilterLibNull Library was also added into it as the first version of MdeLibs.dsc.inc. So update platform dsc to consume MdeLibs.dsc.inc for RegisterFilterLibNull which will be consumed by IoLib and BaseLib. Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-03-01ArmPkg/ArmGicLib: Fix GICR_IPRIORITYR address wrong issueMing Huang1-1/+4
The register address of GICR_IPRIORITYR is in SGI_base frame. Add IPRIORITY_ADDRESS macro for getting GICR_IPRIORITYR address. Otherwise GIC RAS error(Uncorrected software error) may report in ArmGicDxe. This resolves BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3236 Signed-off-by: Ming Huang <huangming@linux.alibaba.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com> Tested-by: Ard Biesheuvel <ardb@kernel.org> # QEMU/kvm guest on ThunderX2 Tested-by: Quan Nguyen <quan@os.amperecomputing.com>
2021-03-01ArmPkg/ArmGicLib: Fix two macros issue for offset parameterMing Huang1-2/+2
Modify two macros to put "offset" in parentheses and remove parentheses from "4 * offset". Signed-off-by: Ming Huang <huangming@linux.alibaba.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-02-27ArmPkg: Fix uninitialised variable in ArmMmuStandaloneMmLibSami Mujawar1-144/+179
The following patches added support for StandaloneMM using FF-A: 9da5ee116a28 ArmPkg: Allow FF-A calls to set memory region's attributes 0e43e02b9bd8 ArmPkg: Allow FF-A calls to get memory region's attributes However, in the error handling logic for the Get/Set Memory attributes, the CLANG compiler reports that a status variable could be used without initialisation. This issue is a false positive and is not seen with GCC. The Get/Set Memory attributes operation is atomic and therefore an FFA_INTERRUPT or FFA_SUCCESS response is not expected in response to FFA_MSG_SEND_DIRECT_REQ. So the remaining cases that could occur are: - the target sends FFA_MSG_SEND_DIRECT_RESP with a success or failure code. or - FFA_MSG_SEND_DIRECT_REQ transmission failure. Therefore, - reorder the error handling conditions such that it prevents the uninitialised variable issue being flagged by CLANG. - move the repetitive code to a static helper function and add documentation at the appropriate places. - fix error handling in functions that invoke GetMemoryPermissions(). Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>