summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/Library
Commit message (Collapse)AuthorAgeFilesLines
...
* ArmPlatformPkg/PL031RealTimeClockLib: remove validation and DST handlingArd Biesheuvel2017-11-131-171/+15
| | | | | | | | | | | | | This library, which is intended to encapsulate the hardware specifics of the ARM PL031 RTC, also implements its own input validation routines and record the timezone and DST settings in its own set of EFI variables. This functionality has recently been added to the core driver, so let's remove it here. 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,ArmVirtPkg: delete redundant PL031 functionsLeif Lindholm2017-05-102-124/+4
| | | | | | | | | | Remove the functions now provided by TimeBaseLib from PL031RealTimeClockLib. Add TimeBaseLib resolution to ArmVirtPkg in same commit to prevent breakage. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmPlatformPkg/EblCmdLib: remove dependency on deprecated ARM BdsLibArd Biesheuvel2017-04-112-2/+48
| | | | | | | | | | The EBL alternative shell depends indirectly on the deprecated ARM BdsLib via EblCmdLib, which only uses a single helper function that can easily be cloned. So clone it, and remove the dependency. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/ArmShellCmdRunAxf: remove BdsLib dependencyArd Biesheuvel2017-04-052-2/+57
| | | | | | | | | | | Remove ArmShellCmdRunAxf's dependency on the deprecated BdsLib by cloning the ShutdownUefiBootServices() routine into a local source file; this is the only BdsLib feature 'runaxf' depends on. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/PlatformIntelBdsLib: don't clobber ConSplitter handleArd Biesheuvel2017-03-031-10/+15
| | | | | | | | | | | | | | | | The InitializeConsolePipe() routine takes care to only set its output argument *Interface if it is not already set, to prevent overwriting the ConSplitter interface pointer that may have already been assigned. However, the associated OUT argument 'Handle' is clobbered by the subsequent unnecessary LocateDevicePath() invocation, which should similarly be made dependent on whether *Interface has been set already. Reported-by: "Lee, Terry Ping-Chung" <terry.lee@hpe.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/ArmPlatformStackLib: use callee preserved registersArd Biesheuvel2017-02-221-24/+19
| | | | | | | | | | | | | | | | | | The entry code in ArmPlatformStackSet () is a 1:1 transliteration of the ARM version, which uses the callee preserved registers r3 - r7 (*) to preserve the function arguments and the link register across a call to ArmPlatformIsPrimaryCore (). However, x3 - x7 are not callee preserved on AARCH64, and so we should use registers >= x19 instead. While we're at it, drop an unnecessary preserve of the link register, and simplify/deobfuscate the calculation of the secondary stack position. (*) Note that r3 is not actually a callee saved register even on ARM. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: Use EfiEventGroupSignal from UefiLibStar Zeng2017-01-203-36/+6
| | | | | | | | | | | | | | | Use EfiEventGroupSignal from UefiLib and remove EmptyCallbackFunction. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=298 Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Liming Gao <liming.gao@intel.com> Cc: Michael Kinney <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmPlatformPkg/ArmShellCmdRunAxf: Reference MdePkg protocol definitionRuiyu Ni2016-10-191-4/+2
| | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmPlatformPkg: Remove UINTN cast when setting BaudRate.Alexei2016-10-111-1/+1
| | | | | | | | | | | | | | | SerialPortInitialize() set the BaudRate variable (type UINT64) as: BaudRate = (UINTN)FixedPcdGet64 (PcdUartDefaultBaudRate); This commit fixes a potential problem on ARM 32-bit builds, where the UINTN type is defined as UINT32, by removing the cast: BaudRate = FixedPcdGet64 (PcdUartDefaultBaudRate); Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Alexei Fedorov <alexei.fedorov@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: Correct mendacious comments.Alexei2016-10-111-10/+7
| | | | | | | | | | | Correct some obviously incorrect comments that have invalid details for the returned values. (Copy /Paste problem?) There are no functional changes in this commit. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Alexei Fedorov <alexei.fedorov@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPkg ArmPlatformPkg ArmVirtPkg: ARM GICv2/v3 Base Address width fix-upDennis Chen2016-09-081-4/+4
| | | | | | | | | | | According to the ACPI 6.0/6.1 spec, the physical base address of GICC, GICD, GICR and GIC ITS is 64-bit. So change the type of the various GIC base address PCDs to 64-bit, and fix up all users. Contributed-under: TianoCore Contribution Agreement 1.0 Cc: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Dennis Chen <dennis.chen@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmPlatformPkg/ArmPlatformStackLib: switch to ASM_FUNC() asm macroArd Biesheuvel2016-08-112-48/+12
| | | | | | | | | | | | | Annotate functions with ASM_FUNC() so that they are emitted into separate sections. While we're at it, replace some inefficient uses of LoadConstantToReg(), and remove the workaround that was added to allow conditional branches to functions with external linkage. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/ArmPlatformLibNull: switch to ASM_FUNC() asm macroArd Biesheuvel2016-08-112-42/+14
| | | | | | | | | | | Annotate functions with ASM_FUNC() so that they are emitted into separate sections. While we're at it, replace some inefficient uses of LoadConstantToReg() Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg RVCT: drop dependency on GCC macro libraryArd Biesheuvel2016-08-112-11/+4
| | | | | | | | | | | The RVCT .asm files include AsmMacroIoLib.h only for the definition of LoadConstantToReg (), which makes it tedious to make change to that file without the risk of making the RVCT assembler unhappy. So simply replace LoadConstantToReg() with mov32, which does the right thing in all cases. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg: Add support to configure PL011 UART clockEvan Lloyd2016-06-152-14/+17
| | | | | | | | | | | | | | | | | | | | | | | On some platforms the UART clock is not the same for all the serial ports. The PL011 driver must be capable of handling serial ports with different clock rates, so must not rely on a PCD for the clock rate. This patch allows the UART clock rate to be passed as a parameter to PL011UartInitializePort(), which is called from the serial port library. This patch also contains the corresponding changes in the serial port library. The PCD in Drivers/PL011Uart is replaced by an extra parameter for PL011UartInitializePort. The PCD is moved to Library/PL011SerialPortLib to supply the value to pass. A corresponding patch to ArmVirtPkg is included in the same bundle to align that with these changes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
* ArmPlatformPkg: Update PL011 Serial PCDs to Fixed PCDsEvan Lloyd2016-06-152-13/+13
| | | | | | | | | | | | The PCDs used in the PL011 UART Driver and Serial Port Library are inherently "fixed at build". This change updates the source to use Fixed PCDs for these values. This improves clarity and efficiency. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
* ArmPlatformPkg: Tidy PL011 UART driverEvan Lloyd2016-06-151-47/+65
| | | | | | | | | | | | | | | | | This cosmetic change only tidies things up in preparation for actual updates. (This reflects responses to a previously submitted patch, which has been split into several discrete changes.) There are no functional changes in this commit. Changes comprise: Minor corrections to comment typos. Minor formatting mods. Expansion of function comments. Remove OUT from UartBase parameter. Addition of #define for "magic mumbers". Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
* ArmPlatformPkg/PL031RealTimeClockLib: remove local copy of gRT pointerArd Biesheuvel2016-05-111-10/+6
| | | | | | | | | | Since the only reason for keeping a local copy mRT of the gRT pointer is to be able to call GetVariable/SetVariable at runtime, use the UefiRuntimeLib helpers instead, so that we can drop mRT altogether. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/PL031RealTimeClockLib: don't clobber gRT tableArd Biesheuvel2016-05-111-6/+0
| | | | | | | | | | | | | | | PL031RealTimeClockLib is a base library that could potentially (although unlikely) be incorporated into other modules than the DXE_RUNTIME_DRIVER module that it was intended to complement. This means the library has no business whatsoever setting the Runtime Service table pointers directly (since we have no way of knowing which instance will 'win', and the pointers may end up referring to a module that is not a DXE_RUNTIME_DRIVER). So remove the assignment altogether. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmPlatformPkg/IntelBds: call BdsLibConnectAll()Leif Lindholm2016-02-241-0/+7
| | | | | | | | | | | | Currently, we don't pick up removable media (USB drives) or storage devices connected via plug-in cards. Take the sledge hammer approach for now. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmPlatformPkg: Rectify file modesEvan Lloyd2016-02-025-0/+0
| | | | | | | | | | | | | | | | Problems have been encountered because some of the source files have execute permission set. This can cause git to report them as changed when they are checked out onto a file system with inherited permissions. This has been seen using Cygwin, MinGW and PowerShell Git. This patch makes no change to source file content, and only aims to correct the file modes/permissions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19787 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg: Convert all .uni files to utf-8Jordan Justen2015-12-151-0/+0
| | | | | | | | | | | | | To convert these files I ran: $ python3 BaseTools/Scripts/ConvertUni.py ArmPlatformPkg Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19249 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/ArmPlatformLibNull: use declared PPI rather than module local varArd Biesheuvel2015-12-142-3/+4
| | | | | | | | | | | | We can refer to gArmMpCoreInfoPpiGuid directly if we declare it under [Ppis] in the library's .inf so there is no need to copy it into a module local variable. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19239 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/PlatformIntelBdsLib: drop bogus gArmGlobalVariableGuid depArd Biesheuvel2015-11-271-1/+0
| | | | | | | | | | | PlatformIntelBdsLib does not use gArmGlobalVariableGuid so drop the declaration from the .inf. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19002 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/EblCmdLib: drop bogus ArmGlobalVariableHob.h includeArd Biesheuvel2015-11-271-1/+0
| | | | | | | | | | | EblCmdLib does not use anything that is declared by ArmGlobalVariableHob.h, so remove the include. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19001 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg: remove all ArmPlatformGlobalVariableLib implementationsArd Biesheuvel2015-11-278-515/+0
| | | | | | | | | | | | This removes the SEC, PEI and DXE variants of ArmPlatformGlobalVariableLib, which is no longer used, and should not be used since it violates the PI spec. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18990 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg: remove PeiServicesTablePointerLib implementationArd Biesheuvel2015-11-272-135/+0
| | | | | | | | | | | | | This removes the PeiServicesTablePointerLib implementation under ArmPlatformPkg that violates the PI spec, and hence should not be used. Instead, the implementation that resides under ArmPkg should be used. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18989 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/PrePiHobListPointerLib: use thread ID registerArd Biesheuvel2015-11-272-14/+5
| | | | | | | | | | | | | | | | | | This updates the PrePiHobListPointerLib implementation in ArmPlatformPkg to move away from ArmPlatformGlobalVariableLib and instead use the thread ID CPU registers (TPIDRURW and TPIDR_EL0 for v7 and v8, respectively) for storing the HobList pointer. Since PrePiHobListPointerLib is specific to PrePi (where PEI core is skipped) we can share these registers with the PEI services table pointer. By the same reasoning, the PEI services table pointer and the HobList pointer already shared the same offset in the ArmPlatformGlobalVariable array. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18982 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg: Use SerialDxe in MdeModulePkg instead of EmbeddedPkgStar Zeng2015-11-263-182/+115
| | | | | | | | | | | | | | It is also to integrate PL011SerialPortExtLib to PL011SerialPortLib. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18971 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg: signal EndOfDxe event in PlatformBsdInitArd Biesheuvel2015-09-043-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | Like the ArmVirtPkg platforms up until SVN r17713, the ArmPlatformPkg platforms built with the Intel BDS fail to signal the end-of-DXE event 'gEfiEndOfDxeEventGroupGuid' when entering the BDS phase, which results in some loss of functionality, i.e., variable reclaim in the VariableDxe drivers, and the splitting of the memory regions that is part of the recently added UEFI 2.5 properties table feature. As discussed on the edk2-devel mailing list here: http://thread.gmane.org/gmane.comp.bios.tianocore.devel/16088/focus=16109 it is up to the platform BDS to signal that event, since there may be platform specific ordering constraints with respect to the signalling of the event that are difficult to honor at the generic level. So add the SignalEvent () call to PlatformBdsInit () of ArmPlatformPkg's PlatformBdsLib implementation for the Intel BDS. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18394 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/PlatformIntelBdsLib: add splash screen supportArd Biesheuvel2015-09-012-0/+6
| | | | | | | | | | | | | Add a call to EnableQuietBoot () to BdsPlatformPolicyBehavior(), so that a splash screen is shown in case one is present under the correct GUID in the FV, and we have graphics support. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18377 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/PlatformIntelBdsLib: fix and clean up error handlingArd Biesheuvel2015-09-011-5/+5
| | | | | | | | | | | | | InitializeConsolePipe () shadowed its own Status variable, and then clobbered the top one before printing its error message. Instead, use a NULL check on the LocateProtocol () output argument. Also clean up coding style on the error path. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18376 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/PlatformIntelBdsLib: remove ARM BDS dependencyArd Biesheuvel2015-09-013-8/+15
| | | | | | | | | | | | The Intel BDS platform library still depends on the ARM BDS specific BdsLib. So replace its invocations with GenericBdsLib counterparts, and fix up where needed, so that we can drop the dependency. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18375 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/PrePi: Make dynamic the top of the System MemoryOlivier Martin2015-07-062-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | This change allows to change the top of the System Memory that was hardcoded by: FixedPcdGet64 (PcdSystemMemoryBase) + FixedPcdGet64 (PcdSystemMemorySize) It allows to add support when the Trusted Firmware reserves the top of the System Memory as Trusted. The size of this region might not be known in advance. Note: The reason why the start of the System Memory has not been made dynamic is because the early code calculates where to place the stack from the top of the System Memory. So there is no need to make the start of the System Memory a dynamic value at the early stage of the boot phase. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <Olivier.Martin@arm.com> Reviewed-by: Ronald Cron <Ronald.Cron@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17835 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg: Fix Ebl dumpgcd bug with memory type and IO typeHeyi Guo2015-05-271-7/+24
| | | | | | | | | | | | | | | | | | 1. Data type for GcdMemoryType and GcdIoType is enumeration type rather than bit field, so we need to use strict equation "==" instead of bit-and "&"; 2. Testing for GcdIoType should use EfiGcdIoType*** constants rather than EfiGcdMemoryType***; 3. As we are going to use strict equation, it is clearer to use switch-case than if-else. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Reviewed-by: Olivier Martin <Olivier.Martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17527 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg: Use the new PCDs defined in MdePkg and MdeModulePkg.Ruiyu Ni2015-05-061-1/+1
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Olivier Martin <Olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17324 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg/BdsLib: Exposed ShutdownUefiBootServices() in the BdsLib interfaceOlivier Martin2015-05-052-58/+3
| | | | | | | | | | | | Other libraries/modules could use it (eg: EFI Shell command `runaxf`). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Ronald Cron <Ronald.Cron@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17297 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg: fix two instances of FreePool () on NULL valueArd Biesheuvel2015-03-271-1/+1
| | | | | | | | | | | | This is a copy/paste of the exact same code in both cases: Buffer should only be freed on the success path, otherwise it will be NULL Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Ronald Cron <Ronald.Cron@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17078 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg: allow patchable PCD for FD base addressArd Biesheuvel2015-02-281-1/+1
| | | | | | | | | | | | | | This moves the reference to gArmTokenSpaceGuid.PcdFdBaseAddress from the [FixedPcd] to the [Pcd] section in the INF file of PrePiArmPlatformGlobalVariableLib so that its users may choose to use a patchable PCD instead. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Olivier Martin <olivier.martin@arm.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16955 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/Bds: Remove any use of the "Fdt" UEFI variableRonald Cron2015-02-262-27/+13
| | | | | | | | | | | | | | | | Remove the option to update the "Fdt" UEFI variable in the ARM BDS as the "setfdt" EFI Shell command provides this service from now. Remove the use of this variable in the legacy kernel boot loader and use the FDT installed in the configuration table instead. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <Ronald.Cron@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16940 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg: fix undefined reference to memcpyScott Duplichan2014-11-121-1/+1
| | | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Scott Duplichan <scott@notabs.org> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16340 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg: Increase more ARM address Pcd entries to 64-bit.Leif Lindholm2014-11-114-13/+14
| | | | | | | | | | | | | | Some AArch64 platforms have RAM and flash devices >4GB. Update some additional Pcd entries to 64-bit, and change the corresponding PcdGet32 calls to PcdGet64. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16325 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg: Clarify the declaration of SerialPortGetControl()Ronald Cron2014-10-271-7/+25
| | | | | | | | | | | | | Rework the PL011UartGetControl() function removing a TODO by the way. Update of the header comment blocks of (PL011Uart|SerialPort)GetControl() functions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <ronald.cron@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16252 6f19259b-4bc3-4df7-8a09-765794883524
* EmbeddedPkg: Clarify the declaration of SerialPortSetControl()Ronald Cron2014-10-271-8/+24
| | | | | | | | | | | | | Rework of PL011UartSetControl() as a consequence as well as update of function header comment blocks. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <ronald.cron@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16251 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/ArmShellCmdRunAxf: Added 'runaxf' cmd to shell (..cont)Harry Liebel2014-10-271-0/+0
| | | | | | | | | | | | Added missing file from the previous commit. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel <Harry.Liebel@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16248 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/ArmShellCmdRunAxf: Added 'runaxf' cmd to shellHarry Liebel2014-10-2711-0/+2830
| | | | | | | | | | | | | | | | Use the command to load and start a ARM Executable File from mass storage. This is basically just an ELF file. The program is copied to memory and the Entrypoint is called. Control is not expected to return back to the Shell. This has only been tested on AArch64 with a limited set of AXF binaries. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel <Harry.Liebel@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16247 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/ArmVirtualizationPkg: Added support for Intel BDSOlivier Martin2014-10-133-0/+476
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16208 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg: Introduced ArmPlatformSysConfigLib NULL libraryOlivier Martin2014-09-182-0/+113
| | | | | | | | | | | | | | Some platforms do not have SysConfig controller used by the ARM Versatile Express. Some peripheral drivers currently rely on SysConfigLib (eg: PL031 RTC driver, LCD driver). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16143 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPlatformPkg/PL031RealTimeClockLib: use virtual address of runtime servicesArd Biesheuvel2014-09-101-13/+15
| | | | | | | | | | | | | | | | | | This library accesses SystemTable->RuntimeServices at runtime, which means it should take care to use its updated value after SetVirtualAddressMap () is called. Replace references to gRT with mRT, which we initialize to gRT and update to its virtual value on a virtual address change event. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16091 6f19259b-4bc3-4df7-8a09-765794883524
* ArmPkg,ArmPlatformPkg: Allow dynamic PCDs for memory base and sizeArd Biesheuvel2014-09-091-3/+4
| | | | | | | | | | | | | | | | | | | | | This changes the definition and a bunch of references to gArmTokenSpaceGuid.PcdSystemMemoryBase and gArmTokenSpaceGuid.PcdSystemMemorySize so they can be declared as dynamic PCDs by the platform. Also, move the non-SEC call to ArmPlatformInitializeSystemMemory() earlier, so a platform has a chance to set these PCDs before they are first referenced. The purpose is allowing dynamically instantiated virtual machines to declare the system memory by passing a device tree. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16079 6f19259b-4bc3-4df7-8a09-765794883524