summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/Drivers
Commit message (Collapse)AuthorAgeFilesLines
* 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-154-22/+22
| | | | | | | | | | | | | | | 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>
* ArmPlatformPkg/NorFlashDxe: use correct PCD accessorsArd Biesheuvel2021-01-183-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>
* ArmPlatformPkg: Enable support for flash in 64-bit address spaceVijayenthiran Subramaniam2021-01-075-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>
* ArmPlatformPkg/NorFlashDxe: implement standalone MM versionMasahisa Kojima2021-01-042-0/+427
| | | | | | | | | | 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>
* ArmPlatformPkg/NorFlashDxe: factor out DXE specific piecesMasahisa Kojima2021-01-046-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>
* ArmPlatformPkg: Fix Ecc error 8005Pierre Gondois2021-01-042-48/+48
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* ArmPlatformPkg: Fix Ecc error 10014 in SP805WatchdogDxePierre Gondois2020-12-091-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>
* ArmPlatformPkg: Fix Ecc error 10014 in PL061GpioDxePierre Gondois2020-12-091-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>
* ArmPlatformPkg: Fix Ecc error 10014 in LcdGraphicsOutputDxePierre Gondois2020-12-091-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>
* ArmPlatformPkg: Fix Ecc error 5007 in PL061GpioDxePierre Gondois2020-12-091-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>
* ArmPlatformPkg: Fix Ecc error 5007 in NorFlashDxePierre Gondois2020-12-091-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>
* ArmPlatformPkg: Fix Ecc error 5007 in LcdGraphicsOutputDxePierre Gondois2020-12-092-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>
* ArmPlatformPkg: Fix Ecc error 3002 in PL061GpioDxePierre Gondois2020-12-091-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>
* ArmPlatformPkg: Fix Ecc error 3001 in NorFlashDxePierre Gondois2020-12-091-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>
* ArmPlatformPkg: Dynamic flash variable baseSami Mujawar2020-10-161-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>
* ArmPlatformPkg: remove PL180 SD controller driverArd Biesheuvel2020-05-053-771/+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>
* EmbeddedPkg: rename gEfiMmcHostProtocolGuid to gEmbeddedMmcHostProtocolGuidArd Biesheuvel2020-04-302-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>
* ArmPlatformPkg/LcdGraphicsOutputDxe: add missing protocol dependencyArd Biesheuvel2020-03-041-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>
* ArmPlatformPkg: list module-internal header files in INF [Sources]Laszlo Ersek2019-07-231-0/+1
| | | | | | | | | | | | | | | | | | The BaseTools build feature introduced for TianoCore#1804 / in commit 1fa6699e6cd4 ("BaseTools: Add a checking for Sources section in INF file", 2019-06-10) logs some (non-fatal) warnings about unlisted internal header files. List those files explicitly. Note: header files are added in lexicographical order only if the underlying INF file already keeps the [Sources] and [LibraryClasses] sections in lexicographical order. Otherwise, header files are added in rough "logical" order. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: Fix various typosAntoine Cœur2019-07-041-2/+2
| | | | | | | Fix various typos in ArmPlatformPkg. Signed-off-by: Coeur <coeur@gmx.fr> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-0918-126/+18
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/SP805WatchdogDxe: switch to interrupt modeArd Biesheuvel2018-12-202-27/+79
| | | | | | | | | | | | | | | | | The SP805 watchdog driver doesn't implement the PI watchdog protocol fully, but always simply resets the system if the watchdog time runs out. However, the hardware does support the intended usage model, as long as the SP805 is wired up correctly. So let's implement interrupt based mode involving a handler that is registered by the DXE core and invoked when the watchdog runs out. In the interrupt handler, we invoke the notify function if one was registered, before calling the ResetSystem() runtime service (as per the UEFI spec) Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/SP805WatchdogDxe: cosmetic cleanupArd Biesheuvel2018-12-202-56/+52
| | | | | | | | | Before fixing the SP805 driver, let's clean it up a bit. No functional changes. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/NorFlashDxe: use one GUID plus index to identify flash banksArd Biesheuvel2018-11-262-3/+4
| | | | | | | | | | | | | | | | | | | | | | Currently, each flash bank controlled by ArmPlatformPkg/NorFlashDxe has its own VendorHw GUID, and instances of NorFlashPlatformLib describe each bank to the driver, along with the GUID for each. This works ok for bare metal platforms, but it would be useful for virtual platforms if we could obtain this information from a device tree, which would require us to invent GUIDs on the fly, given that the 'cfi-flash' binding does not include a GUID. So instead, let's switch to a single GUID for all flash banks, and update the driver's device path handling to include an index to identify each bank uniquely. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Thomas Abraham <thomas.abraham@arm.com>
* ArmPlatformPkg/NorFlashDxe: prepare for devicepath format changeArd Biesheuvel2018-11-262-3/+8
| | | | | | | | | | | | | | | A subsequent patch will change the layout of devicepath nodes produced by this driver. In preparation, make some tweaks to the code to use a packed struct for the devicepath and to pass the device index to NorFlashCreateInstance(). These are cosmetic changes only, the resulting binaries should be identical. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Thomas Abraham <thomas.abraham@arm.com>
* ArmPlatformPkg: Tidy Lcd code: Updated commentsGirish Pathak2018-04-231-12/+8
| | | | | | | | | | | | There is no functional modification in this change some comments are modified and a few new comments are added. This is to prevent mixing formatting changes with functional changes. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Girish Pathak <girish.pathak@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: Tidy Lcd code: Coding standardGirish Pathak2018-04-232-96/+105
| | | | | | | | | | | | There is no functional modification in this change As preparation for further work, the formatting is corrected to meet the EDKII coding standard. Of specific note, some invalid include guards were fixed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Girish Pathak <girish.pathak@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/NorFlashDxe: depend on gEfiCpuArchProtocolGuidLaszlo Ersek2018-04-121-1/+1
| | | | | | | | | | | | | | | | | | NorFlashFvbInitialize() calls gDS->SetMemorySpaceAttributes() to mark the varstore flash region as uncached. This DXE service depends on the CPU Architectural protocol, and the DXE core is allowed to return EFI_NOT_AVAILABLE_YET if it hasn't dispatched ArmPkg/Drivers/CpuDxe earlier. Make the dependency explicit. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Steve Capper <steve.capper@linaro.org> Cc: Supreeth Venkatesh <Supreeth.Venkatesh@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Steve Capper <steve.capper@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/NorFlashDxe: cue the variable driver with NvVarStoreFormattedLaszlo Ersek2018-04-122-4/+16
| | | | | | | | | | | | | | | | | | | | | | The BEFORE depex opcode that we currently use to force ourselves in front of the variable driver cannot be combined with other depex opcodes. Replace the depex with TRUE, and signal NvVarStoreFormattedLib through the installation of "gEdkiiNvVarStoreFormattedGuid". Platforms that rely on NorFlashDxe to format the variable store (as opposed to formatting a variable store template through an FDF file, as part of the build) should hook NvVarStoreFormattedLib into the variable drivers they use, so that the latter await our cue. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Steve Capper <steve.capper@linaro.org> Cc: Supreeth Venkatesh <Supreeth.Venkatesh@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Steve Capper <steve.capper@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/NorFlashDxe: initialize varstore headers eagerlyLaszlo Ersek2018-04-123-27/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lazy initialization of the varstore FVB makes no longer sense at this point: - "mNorFlashInstanceTemplate.Initialize" is NULL; - in NorFlashCreateInstance(), we only set Instance->Initialize to non-NULL -- namely NorFlashFvbInitialize() -- if the FVB stands for the variable store (see "ContainVariableStorage" / "SupportFvb"); - we call Instance->Initialize() from three places: - from NorFlashWriteSingleBlock(), which is too late for the variable read service ("variable write" depends on "variable read"); - from InitializeFvAndVariableStoreHeaders(), but that is only reachable from NorFlashFvbInitialize(), i.e. recursively from Instance->Initialize() itself; - and from FvbRead(), which is never called by the variable driver, only by the FTW driver. However, the variable driver may read (not write) the memory-mapped varstore flash chip before the FTW driver is dispatched. Therefore the lazy initialization is both superfluous and insufficient. Initialize the varstore headers eagerly, before we install the FVB protocol interface. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Steve Capper <steve.capper@linaro.org> Cc: Supreeth Venkatesh <Supreeth.Venkatesh@arm.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Steve Capper <steve.capper@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: remove old PL111/HdLcd driver codeArd Biesheuvel2017-12-126-615/+0
| | | | | | | | | Now that LcdGraphicsOutputDxe has been refactored, remove the old code that is no longer used. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: create hw-agnostic LcdGraphicsOutputDxe driverArd Biesheuvel2017-12-122-20/+55
| | | | | | | | | | | | | | | Create a new LcdGraphicsOutputDxe driver from the existing sources that takes its hardware abstractions from a LcdHwLib library instance rather than from a .c file linked directly. All we need is a new .inf file, and a minimal tweak to LcdGraphicsOutputDxe.h to reuse the LcdHwlib prototypes rather than open code them. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Girish Pathak <girish.pathak@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> [ardb: add it to ArmPlatformPkg.dsc so we can build test it standalone] Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: remove unused SP804 driver and TimerLib implementationArd Biesheuvel2017-12-082-454/+0
| | | | | | | | None of the platforms we support use these so remove them. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: remove unused ArmTrustZone driverArd Biesheuvel2017-12-082-146/+0
| | | | | | | | This driver is no longer used anywhere so remove it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: remove unused PL310 driverArd Biesheuvel2017-12-082-157/+0
| | | | | | | | This driver is not used by any platforms so remove it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: remove PL34xDmc driverArd Biesheuvel2017-12-082-256/+0
| | | | | | | | Remove PL34xDmc driver which is not used by any platforms Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: remove unused PL35x driverArd Biesheuvel2017-12-083-151/+0
| | | | | | | | No platform uses this so remove it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: remove unused PL301Axi driverArd Biesheuvel2017-12-082-135/+0
| | | | | | | | No platforms use this driver so remove it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/LcdGraphicsOutputDxe: move headers into driver directoryArd Biesheuvel2017-12-084-4/+240
| | | | | | | | | | The HdLcd.h and PL111Lcd.h header files are internal headers that should not be used by other drivers. So move them from Include/Drivers into the driver directory instead. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: remove old PL011UartLib implementationArd Biesheuvel2017-12-082-512/+0
| | | | | | | | | Remove the PL011UartLib implementation that has been superseded by the one under Library/ Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/LcdGraphicsOutputDxe: remove VExpressPkg dependencyArd Biesheuvel2017-12-042-2/+0
| | | | | | | | | | | The two instantiations of LcdGraphicsOutputDxe reference VExpressPkg.dec without actually relying on anything it defines. In preparation of moving out VExpressPkg into edk2-platforms, drop these references so we can keep LcdGraphicsOutputDxe in EDK2. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: move internal SP805 header into driver directoryArd Biesheuvel2017-11-302-1/+50
| | | | | | | | | Move the internal SP805 watchdog header file into the driver directory. It shouldn't be referenced directly by other modules anyway. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: move internal PL061 header into driver directoryArd Biesheuvel2017-11-302-1/+51
| | | | | | | | | Move the internal PL061 GPIO header file into the driver directory. It shouldn't be referenced directly by other modules anyway. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: Support different PL011 reg offsetJun Nie2017-07-171-0/+1
| | | | | | | | | ZTE/SanChip version pl011 has different reg offset and bit offset for some registers. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jun Nie <jun.nie@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/NorFlashDxe: correct NumOfLba vararg type in EraseBlocks()Laszlo Ersek2017-05-181-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the PI spec, Volume 3, EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL.EraseBlocks(): > The variable argument list is a list of tuples. Each tuple describes a > range of LBAs to erase and consists of the following: > * An EFI_LBA that indicates the starting LBA > * A UINTN that indicates the number of blocks to erase (NB, in edk2, EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL is a typedef to EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL.) In this driver, the NumOfLba local variable is defined with type UINTN, but the TYPE argument passed to VA_ARG() is UINT32. Fix the mismatch. In addition, update the DEBUG macro invocation where NumOfLba is formatted with the %d conversion specifier: UINTN values should be converted to UINT64 and printed with %Lu or %Lx for portability between 32-bit and 64-bit. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Reported-by: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* ArmPlatformPkg/PL061Gpio: fix the offset value in Get functionHaojian Zhuang2017-02-161-1/+1
| | | | | | | | | When call PL061GetPins() or PL061SetPins(), should use GPIO_PIN_MASK(offset) as parameter, not offset. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmPlatformPkg/PL061: remove duplicated PL061_GPIO_DATA_REGHaojian Zhuang2017-02-161-4/+4
| | | | | | | | | | PL061_GPIO_DATA_REG offset is referenced in PL061EffectiveAddress () already. So remove the duplicated reference when invoke PL061GetPins () or PL061SetPins (). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmPlatformPkg/TZASC: Allow specifying subregions to be disabledBhupesh Sharma2017-01-261-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | ARM TZASC-380 IP provides a mechanism to split memory regions being protected via it into eight equal-sized sub-regions. A bit-setting allows the corresponding subregion to be disabled. Several NXP/FSL SoCs support the TZASC-380 IP block and allow the DDR connected via the TZASC to be partitioned into regions having different security settings and also allow subregions to be disabled. This patch enables this support and can be used for SoCs which support such a partition of DDR regions. Details of the 'subregion_disable' register can be viewed here: http://infocenter.arm.com/help/topic/com.arm.doc.ddi0431c/CHDIGDCI.html Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Bhupesh Sharma <bhupesh.sharma@nxp.com> [bhupesh.linux@gmail.com : Added gmail ID as NXP one is no longer valid] Signed-off-by: Bhupesh Sharma <bhupesh.linux@gmail.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>