summaryrefslogtreecommitdiff
path: root/ArmPkg/Library
AgeCommit message (Collapse)Author
2013-09-17ArmPkg/ArmLib: Revert data cache clean/disable order when turning MMU onRyan Harkin
Part of the change to ArmPkg/Library/BdsLib/BdsLinuxLoader.c causes A9 to hang when booting the kernel, so I reverted the change that caused the problem. Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
2013-09-02ArmPkg/ArmDmaLib: Fixed the calculation of the Base Address of the BufferOlivier Martin
The former calculation 'ALIGN_VALUE(*DeviceAddress - BASE_4KB - 1,BASE_4KB)' did not return the lowest aligned address. Example: *DeviceAddress = 0xB000C001; *DeviceAddress - BASE_4KB - 1 = 0xB000B000; Aligned value = 0xB000B000 + ((0x1000 - 0xB000B000)) & 0xFFF) = 0xB000B000 ... while we where expected 0xB000C000. 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@14618 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-02ArmPkg/ArmLib: Change comment to match code for setting of V bit in SCTLR ↵Roy Franz
register. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Roy Franz <roy.franz@linaro.org> Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14616 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-19ArmPkg/ArmLib: Added ConvertSectionAttributesToPageAttributes()Olivier Martin
This helper function converts the section attributes into their page equivalents. 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@14567 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-19ArmPkg/ArmLib: Introduced TT_LAST_BLOCK_ADDRESS()Olivier Martin
This macro return the address of the last entry of a translation table. 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@14565 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-06ARM: Remove NSACR from the common codeOlivier Martin
NSACR (Non-Secure Access Control Register) is AArch32 specific. 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@14522 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-26ArmPkg/ArmLib: Fixed TBLs invalidation in EL1Olivier Martin
'tlb alle1' was used to invalidate the TLBs in EL1. Expect this instruction can only be invoked from EL2. The correct instruction to invalidate TLBs in EL1 is 'tlbi vmalle1' - it invalidates the TLBs of the current VMID. 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@14509 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-26ArmPkg/Library: AArch64 MMU EL1 supportOlivier Martin
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@14508 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-26ArmPkg/ArmLib/AArch64: Use the appropriate macros and update commentsOlivier Martin
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@14506 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-24ArmPkg: Update the AArch64 Image File Machine Type to match the PE/COFF specOlivier Martin
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@14502 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-24ArmPkg/BdsLib: AArch64 MPCore Linux 'spin-table' boot cache fixHarry Liebel
Clean data cache after initialising mailboxes. 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@14501 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-24ArmPkg/ArmLib/AArch64: Fixed the calculation of the last entry in the ↵Olivier Martin
Translation Table 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@14500 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-18ArmPkg: Added AArch64 support (missing files)Harry Liebel
Some missing files from the initial AArch64 commit. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel <Harry.Liebel@arm.com> Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14488 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-18ArmPkg/BdsLib: Added Aarch64 support for booting LinuxHarry Liebel
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel <Harry.Liebel@arm.com> Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14487 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-18ArmPkg: Added Aarch64 supportHarry Liebel
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel <Harry.Liebel@arm.com> Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14486 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-16ArmPkg/UncachedMemoryAllocationLib: Removed unused header (Protocol/Cpu.h)Olivier Martin
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@14469 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-15ArmPkg: Fix UncachedFreeAlignedPages in UncachedMemoryAllocationLibEugene Cohen
Route both the setting and restoring of cacheability through DXE Services/GCD and stop using the CPU AP directly. The patch also removes all references to the CPU AP which eliminates the need for a library constructor. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eugene Cohen <eugene@hp.com> Reviewed-by: Senthil Ramakrishnan <senthil.ramakrishnan@hp.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14468 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-27ArmPkg/BdsLib: Fixed manipulation of the Memory Map returned by GetMemoryMap()Olivier Martin
The UEFI specification mandates that software uses the DescriptorSize returned by the GetMemoryMap() function to find the start of each EFI_MEMORY_DESCRIPTOR in the MemoryMap array. This allows for future expansion of the EFI_MEMORY_DESCRIPTOR. 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@14447 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-27ArmPkg/ArmLib: Marked functions as 'STATIC' if not exposed outside of the ↵Olivier Martin
scope of the source file 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@14446 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-27ArmPkg: Made ArmConfigureMmu() returns a status codeOlivier Martin
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@14445 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-19ArmPkg/ArmLib: Removed ArmInvalidateTlb when disabling cache as ↵Olivier Martin
ArmDisableMmu() already does it 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@14436 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-19ArmPkg: Moved PcdArmLinuxAtagMaxOffset to be ARM specificOlivier Martin
ATAG is specific to 32bit ARM architecture. 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@14435 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-19ArmPkg/BdsLib: Update FDT CPU node formatOlivier Martin
- Based on Doc here: Repo: http://www.linux-arm.org/git?p=linux-2.6-lp.git Branch: dt-cpus-bindings File: Documentation/devicetree/bindings/arm/cpus.txt 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@14434 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-12ArmPkg/BdsLinuxFdt.c: Fix creation of 'cpu' and 'psci' device tree nodes.oliviermartin
* Fix name of 'device_type' and 'migrate' properties. * Fix 'reg' property. It is supposed to contain the CPU MPIDR of the CPU being described. * Fix byte ordering of data in 'psci' node. * Fix some problems regarding the size of data. In a number of places it was assumed data would be 32-bits wide. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14351 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-12ArmPkg/BdsLinuxFdt.c: Introduce cpu_to_fdtn() function.oliviermartin
Introduce cpu_to_fdtn() function which will call the appropriate 32-bit or 64-bit version based on the size of a native integer. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14350 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-12ArmPkg/BdsLinuxFdt.c: Split PrepareFdt() into several functions.oliviermartin
PrepareFdt() function was getting pretty fat and big functions are more complex to understand and find the information one is looking for. This patch extracts some code from PrepareFdt() function and put it in some new functions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14349 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-14ArmPkg/BdsLib: Added support for FDT alignment through PcdArmLinuxFdtAlignmentoliviermartin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14274 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-14ArmPkg: Delete PCD value PcdArmLinuxKernelFixedOffset.oliviermartin
PcdArmLinuxKernelFixedOffset is supposed to indicate the offset from the beginning of the system memory at which the kernel will be loaded. However, this PCD value is not used at all. Instead the kernel is loaded just below a certain limit indicated by PCD value PcdArmLinuxKernelMaxOffset. This patch deletes PCD value PcdArmLinuxKernelFixedOffset to avoid any confusion. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14273 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-14ArmPkg/BdsLib: Fix uInitrd detectionoliviermartin
This patch corrects a problem detecting uInitrd signature when booting with FDT. BdsBootLinuxFdt was attempting to read the signature from InitrdImage which is zero at this point in the code. The code now reads the signature from InitrdImageBase. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14272 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-14ArmPkg/BdsLib: Do not create additional 'cpu' nodes if the 'cpus' node ↵oliviermartin
already exist UEFI must not add additional 'cpu' nodes if the 'cpus' node was already present. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14271 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-14ArmPkg/BdsLib: Replace ARM magic value by a proper defined value.oliviermartin
"ARMH" is the Four-Letter unique identifier used by ARM in the context of the fast SMC identification interface. This patch properly defines this value in a header file instead of using the numeric value directly in the code. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14268 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12ArmPkg/BdsLib: Fixed TFTP and PXE Bootoliviermartin
- An Ascii filename must be passed to the TFTP service (was a Unicode filename) - If the PXE service had already configured the connection we need to restart when we want to download a new file or do a do a PXE Boot. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14195 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12ArmPkg/BdsLib: Free the memory when Linux fails to startoliviermartin
Not freeing the memory prevents Linux to be started again. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14193 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12ArmPkg/BdsLinuxFdt.c: Check that FDT blob is correctly loaded.oliviermartin
Add some checks in the code loading an FDT blob from a memory-mapped device so that UEFI will detect and print an error message if the address range doesn't cover the whole file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14192 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12ArmPkg/BdsLib: Update 'cpu-release-addr' with the UEFI locations if the ↵oliviermartin
method is 'spin-table' Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14191 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12ArmPkg/ArmLib: Functions to access ARM HYP Vector base address register.oliviermartin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14189 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12ArmPkg/SemihostLib: Removed leading separator in FileName in SemihostFileOpen()oliviermartin
EFI Shell adds '\\' in front of the filename. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14188 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12ArmPkg/BdsLib: Added support to declare Power State Coordination Interface ↵oliviermartin
(PSCI) to the Flat Device Tree (FDT) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14185 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12ArmPkg/BdsLib: Passed reserved memory regions to the Device Treeoliviermartin
Go through the UEFI memory map and add OS 'runtime' regions as reserved regions to the Device Tree. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14183 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12ArmPkg: Fixed unsigned type to be architecture independentoliviermartin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14181 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12ArmPkg: Moved ARMv7 specific files to a 'Arm' subdirectoryoliviermartin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14180 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12ARM Packages: Fixed coding style and typosoliviermartin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14179 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-12ArmPkg: Introduce GetGlobalEnvironmentVariable() function.oliviermartin
Rename GetEnvironmentVariable() function into GetGlobalEnvironmentVariable(). GetEnvironmentVariable() function sill exists but caller must now pass a Guid. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14176 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-06ArmPkg: Move ArmSmcLib from ArmPlatformLib to ArmPkgoliviermartin
A ArmSmcLib Null implementation has also been added for CPU without the ARM Security Extension (Trustzone support). Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14164 6f19259b-4bc3-4df7-8a09-765794883524
2013-03-05ArmPkg/DebugPeCoffExtraActionLib: Checked the ImageContext->PdbPointer is ↵oliviermartin
not null This check prevents to get an assertion in case of null PdbPointer. 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://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14163 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-28ArmPkg/CompilerIntrinsicsLib: Add missing __aeabi_llsl and __aeabi_llsr for GCColiviermartin
Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14103 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-25ArmPkg/BdsLib: Added TimerLib to INF fileoliviermartin
TimerLib is required for GetPerformanceCounterProperties(). Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14092 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-25ArmPkg: Move Arm(Enable|Disable)Irq() functions from internal header to ↵oliviermartin
library header file Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14091 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-25ARM Packages: Fixed line endingsoliviermartin
This large code change only modifies the line endings to be CRLF to be compliant with the EDK2 coding convention document. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14088 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28ARM Packages: Moved ARM assembly files to 'Arm' subdirectoryoliviermartin
Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13772 6f19259b-4bc3-4df7-8a09-765794883524