summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-11-07Marvell/Drivers: MvSpiFlash: Fix bank selection for SpansionMarcin Wojtas
Spansion SPI flash devices use different command for bank selection. Update it, basing on the first byte of flash ID. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-11-07Marvell/Applications: SpiTool: Do not override existing slave deviceMarcin Wojtas
Current usage of sf command requires running 'sf probe' prior to executing any other option. Because it is done in two separate steps, it turned out that SpiMasterProtocol->SetupDevice could easily overwrite valid Slave pointer when performing second operation. Fix the issue by allocating Slave device only once and keep it as global variable in the SpiTool application. This patch also updates FirmwareUpdate command to follow the modified SetupDevice operation. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-11-07Marvell/Drivers: MvSpiFlash: Remove duplicated macrosMarcin Wojtas
Flash commands macros are already defined in MvSpiFlash.h, so remove them from the protocol header. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-11-07Marvell/Drivers: MvSpiFlash: Enable dynamic SPI Flash detectionMarcin Wojtas
Hitherto mechanism of fixing SPI flash model in the PCDs, occured to be very inefficient and problematic. Enable dynamic detection by reworking MvSpiFlashReadId() command, which now uses newly added NorFlashInfoLib, that helps to obtain description of the JEDEC compliant devices. This patch updates the MvSpiFlashProtocol ReadId() protocol callback on both producer's (MvFlashDxe) and consumers' sides (FirmwareUpdate and SpiTool applications). Because all information about detected SPI NOR flash is now stored in the obtained NorFlashInfo structure fields, use them instead of the PCDs. Enable compilation of the NorFlashInfoLib and update PortingGuide documentation accordingly. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-11-07Marvell/Drivers: MvSpiFlash: Improve ReadIdMarcin Wojtas
Fix the ReadId routine by using master's ReadWrite callback instead of the raw Transfer - no longer swapping and byte shifting is needed. Simplify code by using local array instead of dynamic allocation. Moreover store the FlashId in an UINT8 array PCD instead of the concatenated UINT32 format - this way less overhead in the driver is needed for comparing the buffers. The new handling allowed for cleaning Fupdate and Sf shell commands FlashProbe routines. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-29Marvell/Drivers: XenonDxe: Do not modify FIFO default valuesMarcin Wojtas
Changing controller's FIFO default values is not necessary and possibly can cause instabilities, when using some devices. Disable the modification and rely on initial settings. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-29Marvell/Drivers: XenonDxe: Allow overriding base clock frequencyMarcin Wojtas
Some SdMmc host controllers are run by clocks with different frequency than it is reflected in Capabilities Register 1. Because the bitfield is only 8 bits wide, a maximum value that could be obtained from hardware is 255(MHz). In case the actual frequency exceeds 255MHz, the 8-bit BaseClkFreq member of SD_MMC_HC_SLOT_CAP structure occurs to be not sufficient to be used for setting the clock speed in SdMmcHcClockSupply function. This patch adds new UINT32 array ('BaseClkFreq[]') to SD_MMC_HC_PRIVATE_DATA structure for specifying the input clock speed for each slot of the host controller. All routines that are used for clock configuration are updated accordingly. Thanks to above the Xenon host controller driver could be modified to configure clock speed relatively to actual 400MHz input. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-29Marvell/Drivers: XenonDxe: Fix UHS signalling mode settingMarcin Wojtas
This patch fixes incorrect settings for UHS mode in SD_MMC_HC_HOST_CTRL2 register for SDR50 and SDR25, of which the latter was missing. This field should be set to: 0x4 for DDR52 0x2 for SDR50 0x1 for SDR25 0x0 for others. This way EmmcSwitchToHighSpeed function is on par with Linux set_uhs_signaling routine in the Xenon driver. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-29Marvell/Drivers: Pp2Dxe: Change settings for the always-up linkMarcin Wojtas
Currently initial forcing link status happened for all ports, not only marked as 'always-up'. Although this didn't actually matter for the MAC settings, because MAC is automatically updated with PHY HW polling feature of the controller, perform mv_gop110_fl_cfg only when the appropriate flag is true. Also in such case, force the link as up, using a new library routine. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-29Marvell/Library: MppLib: Take 0xFF placeholders into accountArd Biesheuvel
The MppSel definition PCDs contain 0xFF placeholders for values that should be left untouched. MppLib needs to be taught how to take those into account. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-29Marvell/Library: MppLib: Disable the stack protectorArd Biesheuvel
MppLib may be used very early (in SEC), at which point stack protection measures are more likely to cause harm than help, given that not even the UART has been configured to the point where we can complain usefully. So just disable it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-29Marvell/Library: MppLib: Prevent overwriting PCD valuesJoe Zhou
After enabling dynamic PCDs, it is possible to reconfigure MPP during platform initialization. It occurred that due to a faulty way of passing temporary values, information obtained from PCDs was overwritten. This patch fixes the issue, which on the occasion simplifies PcdToMppRegs function. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Joe Zhou <shjzhou@marvell.com> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-29Marvell/Drivers: MvI2cDxe: Reduce bus occupation timeDavid Greeson
During each transaction start, clearing the I2C_CONTROL_FLAG was surrounded by 3 uncoditional stalls. This was not necessary, so replace them with one busy-wait loop, whose polling count could be also safely reduced. Above improvements result in faster transfer initialization and allow to reduce the I2C bus occupation. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: David Greeson <dgreeson@cisco.com> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-29Marvell/Drivers: MvI2cDxe: Fix returning status in MvI2cStartRequestMarcin Wojtas
In MvI2cStartRequest the status was assigned to the variable without dereferencing a pointer. Fix it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-29Marvell/Drivers: MvI2cDxe: Abort transaction immediately upon failDavid Greeson
Although the I2C transaction routines were prepared to return their status, they were never used. This could cause bus lock-up e.g. in case of failing to send a slave address, the data transfer was attempted to be continued anyway. This patch fixes faulty behavior by checking transaction status and stopping it immediately, once the fail is detected. On the occasion fix style around modified functions calls. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: David Greeson <dgreeson@cisco.com> [Style adjustment and cleanup] Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-25Marvell/Armada: Add 32-bit ARM supportArd Biesheuvel
Update the included components and library classes to make this platform build for 32-bit ARM. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-25Marvell/Armada: Armada70x0Lib: Add support for 32-bit ARMArd Biesheuvel
Add an ARM implementation of ArmPlatformHelper.S. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-25Marvell/Armada: Enable dynamic DRAM size detectionMarcin Wojtas
Instead of using hardcoded value in PcdSystemMemorySize PCD, obtain DRAM size directly from SoC registers, which are filled by firmware during early initialization stage. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-25Marvell/Armada: Add MemoryInitPeiLib that reserves secure regionArd Biesheuvel
The default MemoryInitPeiLib implementation insists on reserving the region occupied by our own FV, while this is not necessary at all (the compressed payload is uncompressed elsewhere, so the moment we enter DXE core, we don't care about the FV contents in memory) So clone MemoryInitPeiLib and modify it to suit our needs. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-25Marvell/Armada: Add support for DRAM remappingMarcin Wojtas
The Armada 70x0/80x0 DRAM controller allows a single window of DRAM to be remapped to another location in the physical address space. Since DRAM starts at address 0, and normally exceeds 4GB on these systems, this allows us to free up some memory in the 32-bit addressable region for peripheral MMIO and PCI MMIO32 and CONFIG spaces. This patch adjusts memory blocks to the configuration done in ARM-TF. The remap parameters are otained directly from the registers. Moreover, the configuration space base address is now configurable via PCD, so that to satisfy a case, when remap is not enabled in the early firmware and ensure, that PcdSystemMemorySize is not overlapping it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-25Marvell/Armada: Remove custom reset library residuesMarcin Wojtas
When switching to generic PSCI reset library, obsolete parts of previous custom reset library (PCDs, documentation) remained. Remove them. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-25Marvell/Armada: Increase preallocated memory region sizeArd Biesheuvel
In order to prevent fragmentation of the UEFI memory map, increase the sizes of the preallocated regions. Note that this does not increase the memory footprint of UEFI, it just modifies it allocation policy to keep similar region types together. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-25Marvell/Armada: Implement EFI_RNG_PROTOCOL driver for EIP76 TRNGArd Biesheuvel
Add an implementation of EFI_RNG_PROTOCOL so that the OS loader has access to entropy for KASLR and other purposes (i.e., seeding the OS's entropy pool very early on). Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-17Platform/ARM: use appropriate ReportStatusCodeLib resolution for RT driversArd Biesheuvel
ResetSystemRuntimeDxe may be invoked by the OS at runtime, at which time it will attempt to call into ReportStatusCodeLib. If we use the default version for DXE drivers, this will access data structures that are no longer there so switch to the special runtime version instead. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Sudeep Holla <sudeep.holla@arm.com> Tested-by: Alexei Fedorov <Alexei.Fedorov@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-17Platforms/AMD/OverDrive: make capsule support conditionalArd Biesheuvel
The signed capsule update support added to the Overdrive platform in a recent patch inadvertently introduced a dependency on the external OpenSSL library, which many users may not have installed into their EDK2 tree by default. So add a DO_CAPSULE variable that defaults to FALSE, and only build the capsule pieces if it is set to TRUE. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-15Platforms/AMD/Overdrive: add signed capsule update supportArd Biesheuvel
Wire up the various modules and boilerplate configuration snippets to implement signed capsule update for AMD Overdrive. Note that this uses the insecure default key. The secure firmware on this SoC does not implement warm reboot, so we cannot support capsules that persist across reset. Instead, the capsule may be installed using CapsuleApp (from MdeModulePkg), from the UEFI Shell prompt. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2017-10-15Silicon/AMD/Styx: add PlatformFlashAccessLib implementationArd Biesheuvel
In preparation of adding capsule support to the AMD Styx aka Seattle based platforms, implement a PlatformFlashAccessLib instance that invokes the ISCP to update the FV containing our UEFI image. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-15Silicon/Amd/Styx: fix flasher supportArd Biesheuvel
The StyxFlashUefi application was not migrated correctly from OpenPlatformPkg to edk2-platforms. It will be superseded shortly by capsule update support, but let's put it back into a working state before we 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>
2017-10-15Silicon/AMD/Styx: update SMMU id to MMU-401Ard Biesheuvel
The IORT spec has been updated to include more specific defines for the MMU-401, which supports more page sizes than the generic SMMU v1. Note that this requires an OS that understands these new definitions. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-15Platform/AMD/Overdrive: remove StatusCodeLib referencesArd Biesheuvel
This fixes a reboot issue, which is caused by the inclusion of the wrong flavor of StatusCodeLib into ResetSystemRuntimeDxe. However, we don't use status codes in the first place, so let's replace all occurrences with the NULL resolution. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-11Marvell/Documentation: Follow EDK2 coding style in the PortingGuideMarcin Wojtas
This patch removes tabs and wrong line endings in the file, maiking it acceptable to the PatchCheck.py script. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-11Marvell/Armada: Add the UefiPxeBcDxe driverArd Biesheuvel
This driver allows automatic booting via the network. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-11Marvell/Armada: Remove outdated SEC alignment overrideArd Biesheuvel
The FDFs no longer require explicit alignment for sections containing aligned objects, so change it to 'Auto' and FIXED (which allows some padding to be removed), and remove some other cruft while at it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-11Marvell/Armada: Switch to unicore PrePiArd Biesheuvel
There is no point in using the MPCore PrePi, given that only the primary core will enter UEFI at EL2, and the secondaries will be held in EL3 until summoned by the OS. So use the unicore flavour instead. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-11Marvell/Armada: Disable PerformanceLibraryArd Biesheuvel
Remove the gEfiMdePkgTokenSpaceGuid.PcdPerformanceLibraryPropertyMask setting so it reverts to its default of 0, and disables performance profiling. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-11Marvell/Armada: Ensure GICC frames adjacencyArd Biesheuvel
The GIC architecture mandates that the CPU interface, which consists of 2 consecutive 4 KB frames, can be mapped using separate mappings. Since this is problematic on 64 KB pages, the MMU-400 aliases each frame 16 times, and the two consecutive frames can be found at offset 0xf000. Therefore use the last alias from the first series of aliases as the base address, so that the first frame from the second series becomes directly adjacent, whilst remaining covered by a separate 64KB page. This patch is intended to expose correct GICC alias via MADT, once ACPI support is added. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-11Marvell/Armada: Re-enable driver model diagnostics PCDsArd Biesheuvel
For some reason, one of the early ARM platforms disabled all the diagnostics related to the UEFI driver model, resulting in the output of UEFI shell utilities such as 'devices' or 'drivers' to become completely useless. Armada's shared .DSC include file inherited this for no good reason, so let's revert it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-11Marvell/Armada: Switch to generic BDSArd Biesheuvel
Switch from the Intel BDS to the generic BDS, which is preferred for ARM platforms given that it is completely legacy free. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-11Marvell/Armada: Use 4k/64k aligned sections for DXE/DXE-rt modulesArd Biesheuvel
Enable strict memory protection at boot time and under the OS, by using 4 KB section alignment for DXE_DRIVER, UEFI_DRIVER and UEFI_APPLICATION modules, and 64 KB alignment for DXE_RUNTIME_DRIVER modules. Note that the latter is mandated by the UEFI spec. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-11Marvell/Armada: Armada70x0Lib: Terminate call stack list at entryArd Biesheuvel
To avoid dereferencing junk when walking the call stack in exception handlers (which may prevent us from getting a full backtrace), set the frame pointer to 0x0 when first entering UEFI. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-11Marvell/Armada: Switch to dynamic PCDsArd Biesheuvel
For full functionality, including HII forms wired to non-volatile UEFI variables, we need dynamic PCDs as well. So let's enable those. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-11Marvell/Armada: Introduce platform initialization driverMarcin Wojtas
In order to enable modification of dynamic PCD's for the libraries and DXE drivers, this patch introduces new driver. It is executed prior to other drivers. Mpp, ComPhy and Utmi libraries initialization were moved from PrePi stage to DXE. To force the correct driver dispatch sequence, introduce a protocol GUID and install the protocol as a NULL protocol when PlatInitDxe executes. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> [Introduce protocol GUID to force correct driver dispatch order] Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-10ARM/JunoPkg: Add support for FPDT table.Alexei Fedorov
This commmit adds support for building FPDT table with firmware basic boot performance record data. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Alexei Fedorov <Alxei.Fedorov@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Graeme Gregory <graeme.gregory@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-09Platform/Marvell/Armada: Remove ParsePcdLibMarcin Wojtas
Current PCD handling in libraries and drivers allow to get rid of this code. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2017-10-09Marvell/Drivers: Pp2Dxe: Rework PHY handlingMarcin Wojtas
Hitherto PHY handling in Pp2Dxe was not flexible. It allowed for using only single MDIO controller, which may not be true on Armada 80x0 SoCs. For this purpose introduce the MDIO description, using the new structures and template in MvHwDescLib. This change enables addition of multiple CP110 hardware blocks with MDIO controllers. This change required different PHY handling and obtaining data over desired MDIO bus. Now given Pp2 port is matched with the PHY via its index in gMarvellTokenSpaceGuid.PcdPhyDeviceIds. The PHY itself is mapped to the MDIO controller, using gMarvellTokenSpaceGuid.PcdPhy2MdioController. Also obtaining SMI addresses was moved to the PHY initialization routine. All above allow for much cleaner and logical PHY description in the .dsc file, which now uses macros for connection type and speed. Update PortingGuide documentation accordingly and Armada 70x0 DB NIC/PHY description. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-09Marvell/Library: UtmiLib: Move devices description to MvHwDescLibMarcin Wojtas
This patch introduces UTMI description, using the new structures and template in MvHwDescLib. This change enables more flexible addition of multiple CP with UTMI PHY's and also significantly reduces amount of used PCD's for that purpose. Update PortingGuide documentation accordingly. This patch replaces string-based description of Utmi on Armada 70x0 DB with new, reduced format, which uses macros in Armada.dsc.inc file for better readability. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-09Marvell/Drivers: MvI2cDxe: Move devices description to MvHwDescLibMarcin Wojtas
This patch introduces I2c description, using the new structures and template in MvHwDescLib. This change enables more flexible addition of multiple I2c controllers and also allows for removal of string PCD parsing. Update Armada 70x0 DB description and PortingGuide accordingly. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-09Marvell/Library: ComPhyLib: Remove PCD string parsingMarcin Wojtas
Simplify obtaining lane data, using arrays with direct enum values, rather than strings. This is another step to completely remove ParsePcdLib. This patch replaces string-based description of ComPhy lanes on Armada 70x0 DB with the enum values of type and speed - for that purpose new [Defines] section was added to Armada.dsc.inc file in order to increase readability. PortingGuide is updated accordingly. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-06Platforms/ARM: SBSA Watchdog PCD and build optionSami Mujawar
Added PcdWatchdogCount to specify the number of Watchdog timers that are available on Juno and FVP platform. Also added DISABLE_SBSA_WATCHDOG option to disable the watchdog timers if required for testing. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-10-05Marvell/Drivers: MvSpiFlash: Minor style fixMarcin Wojtas
This patch correct style of two variables to the camel-case version. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas <mw@semihalf.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>