summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg
AgeCommit message (Collapse)AuthorFilesLines
2022-05-13ArmPlatformPkg: Remove RVCT supportRebecca Cran13-540/+1
RVCT is obsolete and no longer used. Remove support for it. Signed-off-by: Rebecca Cran <quic_rcran@quicinc.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-05-03ArmPlatformPkg: Fix EDK2_DSC check in Scripts/MakefileRebecca Cran1-1/+1
With GNU Make 4.2.1, ifeq ($(EDK2_DSC),"") doesn't catch the case where EDK2_DSC isn't defined. So, switch to using ifndef. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-05-03ArmPlatformPkg: Fix target initialisation in cmd_load_symbols.pyRebecca Cran1-3/+2
The debugger in Arm Development Studio 2021.2 doesn't work with "ec = debugger.getExecutionContext(0)" because it's subsequently unable to access memory. Fix it by switching to "ec = debugger.getCurrentExecutionContext()". The documentation for waitForStop() says: "It is not needed after a call to stop() because stop() is blocking." So, remove the call to waitForStop. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-05-03ArmPlatformPkg: Fix error message in Scripts/Ds5/edk2_debugger.pyRebecca Cran1-1/+1
An error message in Scripts/Ds5/edk2_debugger.py was missing the word 'not'. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2022-01-30ArmPkg: Replace CoreId and ClusterId with Mpidr in ARM_CORE_INFO structRebecca Cran3-6/+10
Remove the ClusterId and CoreId fields in the ARM_CORE_INFO structure in favor of a new Mpidr field. Update code in ArmPlatformPkg/PrePeiCore/MainMPCore and ArmPlatformPkg/PrePi/MainMPCore.c to use the new field and call new macros GET_MPIDR_AFF0 and GET_MPIDR_AFF1 instead. Signed-off-by: Rebecca Cran <rebecca@nuviainc.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-12-07ArmPlatformPkg: Apply uncrustify changesMichael Kubacki47-2691/+2875
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the ArmPlatformPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Andrew Fish <afish@apple.com>
2021-12-07ArmPlatformPkg: Change OPTIONAL keyword usage styleMichael D Kinney2-6/+6
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Andrew Fish <afish@apple.com>
2021-12-07ArmPlatformPkg: Change use of EFI_D_* to DEBUG_*Michael D Kinney7-22/+21
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3739 Update all use of EFI_D_* defines in DEBUG() macros to DEBUG_* defines. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-11-30ArmPlatformPkg: Update YAML to ignore specific ECC files/errorsMichael D Kinney1-1/+2
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3749 Update package YAML files to ignore ECC errors that are already present. These issues must be fixed in the future, but should not block source code changes for these known issues. Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Bret Barkelew <Bret.Barkelew@microsoft.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2021-08-03ArmPlatformPkg: Create include file for default key content.Grzegorz Bernacki1-0/+70
This commits add file which can be included by platform Flash Description File. It allows to specify certificate files, which will be embedded into binary file. The content of these files can be used to initialize Secure Boot default keys and databases. Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
2021-07-19ArmPlatformPkg/Scripts: Infer dll load address from console outputArtem Kopotev2-2/+83
cmd_load_symbols.py can only load symbols from FV. Add the possibility to use UEFI console output to calculate dll load address and send add-symbol-file commands directly to ArmDS debugger dll load address can't be used directly from UEFI output, see comment in DebugPeCoffExtraActionLib: "This may not work correctly if you generate PE/COFF directly as then the Offset would not be required". 1) Use objdump -S module.dll | grep <_ModuleEntryPoint> to get offset in dll (offset) 2) Use Entrypoint=<address> from UEFI console output (entrypoint) 3) dll load address is (entrypoint)-(offset) Signed-off-by: Artem Kopotev <artem.kopotev@arm.com> Tested-by: Pierre Gondois <Pierre.Gondois@arm.com>
2021-06-16ArmPlatformPkg: SpellCheck: Switch spellcheck CI to AuditOnlySean Brogan1-1/+1
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 switches the spellcheck for ArmPlatformPkg to AuditOnly to avoid potentially numerous spell errors. The correction action is to be revisited by package maintainers once the tool incompatibility is resolved. Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> 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-04-28ArmPlatformPkg: Add ArmPlatformPkg.ci.yamlPierre Gondois1-0/+100
Add ArmPlatformPkg.ci.yaml to configure the CI for the ArmPlatformPkg. 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-28ArmPlatformPkg: Document libraries in ArmPlatformPkg.decPierre Gondois1-1/+18
This patch documents the libraries advertised in ArmPlatformPkg.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>
2021-04-15ArmPkg: Fix Ecc error 8001 in ChipsetPierre Gondois1-5/+5
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-04-15ArmPlatformPkg: Remove package dependency in NorFlashStandaloneMmPierre Gondois1-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>
2021-04-15ArmPlatformPkg: Fix Ecc error 9001Pierre Gondois2-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>
2021-04-15ArmPlatformPkg: Fix Ecc error 8001Pierre Gondois29-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>
2021-03-31ArmPlatformPkg: 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-01-18ArmPlatformPkg/NorFlashDxe: use correct PCD accessorsArd Biesheuvel3-8/+9
Commit 8015f3f6d4005d83 ("ArmPlatformPkg: Enable support for flash in 64-bit address space") updated the NorFlash DXE and StMM drivers to take alternate PCDs into account when discovering the base of the NOR flash regions. This introduced a disparity between the declarations of the PCD references in the .INF files, which permits the use of dynamic PCDs, and the code itself, which now uses FixedPcdGet() accessors. On platforms that actually use dynamic PCDs, this results in a build error. So let's clean this up: - for the DXE version, use the generic PcdGet() accessors, so dynamic PCDs are permitted - for the standalone MM version, redeclare the PCDs as [FixedPcd] in the .INF description, and switch to the FixedPcdGet() accessors. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
2021-01-07ArmPlatformPkg: Enable support for flash in 64-bit address spaceVijayenthiran Subramaniam5-23/+92
The existing NOR Flash DXE and StandaloneMm driver supports NOR flash devices connected in the 32-bit address space. Extend these drivers to allow NOR flash devices connected to 64-bit address space to be usable as well. Also, convert the base address and size sanity check from ASSERT() to if condition so that even if the firmware is build in release mode, it can return error if the parameter(s) is/are invalid. Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com> Tested-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2021-01-04ArmPlatformPkg/NorFlashDxe: implement standalone MM versionMasahisa Kojima3-0/+436
Implement a version of the NOR Flash driver that can execute in standalone MM context. This is used to access the secure variable storage, it only supports EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2021-01-04ArmPlatformPkg/NorFlashDxe: factor out DXE specific piecesMasahisa Kojima6-1080/+1159
In preparation of creating a standalone MM version of the NOR Flash driver, refactor the existing pieces into a core driver. NorFlashDxe.c has the DXE instantiation code, FVB initialization code and some common functions. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2021-01-04ArmPlatformPkg: Fix Ecc error 8005Pierre Gondois3-57/+58
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' Indeed, according to the EDK II C Coding Standards Specification, s5.6.2.2 "Enumerated Types" and s4.3.4 Function and Data Names, elements of an enumerated type shoud be a mixed upper- and lower-case text. A max element is also added, as advised by s5.6.2.2.3 of the same document. Reference: https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification/ Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-21ArmPlatformPkg/PL031RealTimeClockLib: cast EfiTimeToEpoch() val. to UINT32Laszlo Ersek1-1/+1
In preparation for changing EfiTimeToEpoch()'s return type to UINTN, cast EfiTimeToEpoch()'s retval to UINT32 explicitly, in LibSetTime(). Currently, this is a no-op, and even after widening the retval, it will make no difference, as LibSetTime() explicitly restricts Time->Year under 2106, given that "the PL031 is a 32-bit counter counting seconds". The patch is made for preventing compiler warnings. Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20201221113657.6779-2-lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-09ArmPlatformPkg: Fix cspell reported spelling/wordingPierre Gondois4-8/+8
The edk2 CI runs the "cspell" spell checker tool. Some words are not recognized by the tool, triggering errors. This patch modifies some spelling/wording detected by cspell. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-09ArmPlatformPkg: Fix Ecc error 8001 in PrePiPierre Gondois1-3/+1
This patch fixes the following Ecc reported error: Only capital letters are allowed to be used for #define declarations The "SerialPrint" macro is definied for the PrePi module residing in the ArmPlatformPkg. It is never used in the module. The macro is thus removed. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-09ArmPlatformPkg: Fix Ecc error 10006 in ArmPlatformPkg.dscPierre Gondois1-1/+4
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 [TimeBaseLib] is not used in any platform" "The Library Class [PL011UartClockLib] is not used in any platform" "The Library Class [PL011UartLib] is not used in any platform" Indeed, the PL011SerialPortLib module requires the PL011UartClockLib and PL011UartLib libraries. The PL031RealTimeClockLib module requires the TimeBaseLib library. ArmPlatformPkg/ArmPlatformPkg.dsc builds the two modules, 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: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-09ArmPlatformPkg: Fix Ecc error 10014 in SP805WatchdogDxePierre Gondois1-1/+2
This patch fixes the following Ecc reported error: No used module files found The source file [ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.h] is existing in module directory but it is not described in INF file. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-09ArmPlatformPkg: Fix Ecc error 10014 in PL061GpioDxePierre Gondois1-1/+2
This patch fixes the following Ecc reported error: No used module files found The source file [ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.h] is existing in module directory but it is not described in INF file. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-09ArmPlatformPkg: Fix Ecc error 10014 in LcdGraphicsOutputDxePierre Gondois1-2/+3
This patch fixes the following Ecc reported error: No used module files found The source file [ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.h] is existing in module directory but it is not described in INF file. Files in [Sources.common] are also alphabetically re-ordered. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-09ArmPlatformPkg: Fix Ecc error 10016 in LcdPlatformNullLibPierre Gondois1-1/+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: edk2\ArmPlatformPkg\PrePeiCore\PrePeiCoreMPCore.inf edk2\ArmPlatformPkg\Library\LcdPlatformNullLib\LcdPlatformNullLib.inf The PrePeiCoreMPCore module has been imported in 2011 and the LcdPlatformNullLib module has been created in 2017. The PrePeiCoreMPCore has the precedence. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-09ArmPlatformPkg: Fix Ecc error 10016 in PrePiPierre Gondois1-1/+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: edk2\ArmPlatformPkg\PrePi\PeiUniCore.inf edk2\ArmPlatformPkg\PrePi\PeiMPCore.inf Both files seem to have been imported from the previous svn repository as the same time. Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-09ArmPlatformPkg: Fix Ecc error 5007 in PL031RealTimeClockLibPierre Gondois1-2/+2
This patch fixes the following Ecc reported error: There should be no initialization of a variable as part of its declaration Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-09ArmPlatformPkg: Fix Ecc error 5007 in PL061GpioDxePierre Gondois1-3/+3
This patch fixes the following Ecc reported error: There should be no initialization of a variable as part of its declaration Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-09ArmPlatformPkg: Fix Ecc error 5007 in NorFlashDxePierre Gondois1-1/+3
This patch fixes the following Ecc reported error: There should be no initialization of a variable as part of its declaration Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-09ArmPlatformPkg: Fix Ecc error 5007 in LcdGraphicsOutputDxePierre Gondois2-8/+12
This patch fixes the following Ecc reported error: There should be no initialization of a variable as part of its declaration Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-09ArmPlatformPkg: Fix Ecc error 3002 in PL061GpioDxePierre Gondois1-3/+3
This patch fixes the following Ecc reported error: Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=) Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-09ArmPlatformPkg: Fix Ecc error 3002 in PL011UartLibPierre Gondois1-6/+6
This patch fixes the following Ecc reported error: Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=) Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-12-09ArmPlatformPkg: Fix Ecc error 3001 in NorFlashDxePierre Gondois1-2/+2
This patch fixes the following Ecc reported error: Boolean values and variable type BOOLEAN should not use explicit comparisons to TRUE or FALSE Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-10-16ArmPlatformPkg: Dynamic flash variable baseSami Mujawar1-2/+2
Some virtual machine managers like kvmtool can relocate the devices in the system memory map. The information about the devices location in memory is described in the device tree. Therefore, the CFI memory region and the associated Non volatile storage variables need to be adjusted accordingly. To support such use cases the non-volatile storage variable base PCD PcdFlashNvStorageVariableBase has been defined as a dynamic PCD. The NOR flash driver was using the Flash non-volatile storage variable base PCD as a fixed PCD, thereby preventing runtime resolution of the variable base address. Therefore update the NOR flash driver to load the PCD using PcdGet32 instead of FixedPcdGet32. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Ard Biesheuvel <Ard.Biesheuvel@arm.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
2020-07-02ArmPlatformPkg/PL011UartLib: Check PID2 if FiFoDepth is zeroIrene Park2-3/+8
PL011UartLib determines its FIFO depth based on the PID2 value but the register PID2 is not mandatory as per the SBSA spec. This change won't check PID2 if PcdUartDefaultReceiveFifoDepth is set to a value > 0. Signed-off-by: Irene Park <ipark@nvidia.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-05-05ArmPlatformPkg: remove PL180 SD controller driverArd Biesheuvel5-776/+0
The PL180 SD host controller driver is only used on emulated ARM platforms, uses an obsolete version of the MMC host protocol and does not adhere to the UEFI driver model. It has been moved into edk2-platforms alongside the only platforms that use it, so we can drop it from the EDK2 core repository. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2020-04-30EmbeddedPkg: rename gEfiMmcHostProtocolGuid to gEmbeddedMmcHostProtocolGuidArd Biesheuvel2-2/+2
In EDK2, identifiers carrying the EFI prefix are reserved for ones that are defined in the UEFI or PI specifications. Since the MMC host protocol defined in EmbeddedPkg is not the one that the UEFI spec defines, and given the confusion around this, let's rename it to from gEfiMmcHostProtocolGuid to gEmbeddedMmcHostProtocolGuid. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2020-03-25ArmPlatformPkg/ArmPlatformPkg.dsc: Add missing componentsMichael Kubacki1-0/+3
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2575 The following components are currently missing from the [Components] section of ArmPlatformPkg.dsc: * ArmPlatformPkg/Library/HdLcd/HdLcd.inf * ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.inf This commit includes the components in the package DSC build. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2020-03-05ArmPlatformPkg/PrePi: replace set/way cache ops with by-VA onesArd Biesheuvel3-3/+7
Cache maintenance operations by set/way are only intended to be used in the context of on/offlining a core, while it has been taken out of the coherency domain. Any use intended to ensure that the contents of the cache have made it to main memory is unreliable, since cacheline migration and non-architected system caches may cause these contents to linger elsewhere, without being visible in main memory once the MMU and caches are disabled. In KVM on Linux, there are horrid hacks in place to ensure that such set/way operations are trapped, and replaced with a single by-VA clean/invalidate of the entire guest VA space once the MMU state changes, which can be costly, and is unnecessary if we manage the caches a bit more carefully, and perform maintenance by virtual address only. So let's get rid of the call to ArmInvalidateDataCache () in the PrePeiCore startup code, and instead, invalidate the UEFI memory region by virtual address, which is the only memory region we will be touching with the caches and MMU both disabled and enabled. (This will lead to data corruption if data written with the MMU off is shadowed by clean, stale cachelines that stick around when the MMU is enabled again.) Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Pete Batard <pete@akeo.ie> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2020-03-05ArmPlatformPkg/PrePi: fix IS_XIPAndrei Warkentin1-1/+1
This wasn't correctly testing for FD to be outside RAM, when RAM base immediately follows the FD. This is part of some cleanup for RPi4 in edk2-platform. Signed-off-by: Andrei Warkentin <awarkentin@vmware.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2020-03-04ArmPlatformPkg/PrePeiCore: replace set/way cache ops with by-VA onesArd Biesheuvel3-2/+6
Cache maintenance operations by set/way are only intended to be used in the context of on/offlining a core, while it has been taken out of the coherency domain. Any use intended to ensure that the contents of the cache have made it to main memory is unreliable, since cacheline migration and non-architected system caches may cause these contents to linger elsewhere, without being visible in main memory once the MMU and caches are disabled. In KVM on Linux, there are horrid hacks in place to ensure that such set/way operations are trapped, and replaced with a single by-VA clean/invalidate of the entire guest VA space once the MMU state changes, which can be costly, and is unnecessary if we manage the caches a bit more carefully, and perform maintenance by virtual address only. So let's get rid of the call to ArmInvalidateDataCache () in the PrePeiCore startup code, and instead, invalidate the temporary RAM region by virtual address, which is the only memory region we will be touching with the caches and MMU both disabled and enabled, which will lead to data corruption if data written with the MMU off is shadowed by clean, stale cachelines that stick around when the MMU is enabled again. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com> Reviewed-by: Leif Lindholm <leif@nuviainc.com> Acked-by: Laszlo Ersek <lersek@redhat.com>
2020-03-04ArmPlatformPkg/LcdGraphicsOutputDxe: add missing protocol dependencyArd Biesheuvel1-0/+1
This driver depends on the gEfiCpuArchProtocolGuid protocol but does not declare it, and so this dependency gets satisfied transitively via ArmLib. However, ArmLib will drop this dependency as it does not actually use it, so declare it for LcdGraphicsOutputDxe instead. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2020-03-04ArmPlatformPkg: convert LFs to CRLF, expand hard TABsLaszlo Ersek1-328/+328
We're going to switch the internal line terminators globally to LF at some point, but until then, let's use CRLF consistently. Convert source files with LFs in them to CRLF, using "unix2dos". "git show -b" prints no code changes for this patch. (I collected all the file name suffixes in this package, with: $ git ls-files -- $PACKAGE | rev | cut -f 1 -d . | sort -u | rev I eliminated those suffixes that didn't stand for text files, then blanket-converted the rest with unix2dos. Finally, picked up the actual changes with git-add.) At the same time, the following file had to undergo TAB expansion: ArmPlatformPkg/Scripts/Ds5/profile.py I used "expand -t 4", conforming to the Indentation section of PEP-8 <https://www.python.org/dev/peps/pep-0008/#indentation>. Both the CRLF conversion and the TAB expansion are motivated by "PatchCheck.py". "PatchCheck.py" is also the reason why CRLF conversion and TAB expansion have to happen in the same patch. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1659 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20200227213903.13884-4-lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>