Commit Graph

97 Commits

Author SHA1 Message Date
oliviermartin 3809e6e071 ArmPkg/BdsLib: Do not create additional 'cpu' nodes if the 'cpus' node 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-14 09:33:35 +00:00
oliviermartin 1a7b6d9ea2 ArmPkg/BdsLib: Replace ARM magic value by a proper defined value.
"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-04-14 09:30:46 +00:00
oliviermartin 2edb5ad38c ArmPkg/BdsLib: Fixed TFTP and PXE Boot
- 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-12 01:04:10 +00:00
oliviermartin a90e327921 ArmPkg/BdsLib: Free the memory when Linux fails to start
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-12 01:02:44 +00:00
oliviermartin 7e91decd13 ArmPkg/BdsLinuxFdt.c: Check that FDT blob is correctly loaded.
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-12 01:01:55 +00:00
oliviermartin 39f58c9b40 ArmPkg/BdsLib: Update 'cpu-release-addr' with the UEFI locations if the 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-12 01:01:11 +00:00
oliviermartin bc87b5075a ArmPkg/BdsLib: Added support to declare Power State Coordination Interface (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-12 00:56:37 +00:00
oliviermartin a01e042dfa ArmPkg/BdsLib: Passed reserved memory regions to the Device Tree
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-12 00:54:58 +00:00
oliviermartin c63626b7d3 ArmPkg: Fixed unsigned type to be architecture independent
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-12 00:50:46 +00:00
oliviermartin 2614b0c474 ArmPkg: Moved ARMv7 specific files to a 'Arm' subdirectory
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-12 00:49:42 +00:00
oliviermartin 6f711615ba ARM Packages: Fixed coding style and typos
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-12 00:45:29 +00:00
oliviermartin c0b2e4775d ArmPkg: Introduce GetGlobalEnvironmentVariable() function.
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-12 00:42:59 +00:00
oliviermartin c26aa6f1d4 ArmPkg/BdsLib: Added TimerLib to INF file
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-25 11:53:45 +00:00
oliviermartin 1e57a46299 ARM Packages: Fixed line endings
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
2013-01-25 11:28:06 +00:00
oliviermartin 0a6653bc2a ArmPkg/BdsLib: Added FDT support for BdsLib
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13768 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 09:58:42 +00:00
oliviermartin b34e4db382 ARM Packages: Minor typo, mispellings and coding style changes
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13752 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-27 13:39:40 +00:00
oliviermartin ed71a22c18 ArmPkg/BdsLib: Fixed cache cleaning in PreparePlatformHardware()
Because the D&I caches were clean before to be disabled, the cache
lines might have got dirty during the cache maintenance operations.
This fix disables D&I caches before to clean them. The performance
drops should be minimised as invalidating the I cache is only a
couple of instruction.

Signed-off-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13503 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:24:25 +00:00
oliviermartin 7422411e38 ArmPkg/BdsLib: Fixed ShutdownUefiBootServices() in case the first gBS->GetMemoryMap() was successful
If the first call of gBS->GetMemoryMap() succeeded (could happen if the Memory Map
has changed between the two gBS->GetMemoryMap() calls) in the loop block then
gBS->ExitBootServices() was never called.

Signed-off-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13500 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:21:13 +00:00
oliviermartin c0a1f7776b ArmPkg/BdsLib: Added support for using uInitrd
Detect if there is a u-boot header on the initrd (by checking the
signature) and skip it.

Signed-off-by: ryan.harkin@linaro.org
Reviewed-by: oliviermartin




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13031 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-24 16:11:51 +00:00
oliviermartin 1093e3074f ArmPkg/BdsLib: Fixed LinuxImageSize if uImagei format
The uImage is 64Bytes smaller (size of the u-boot header) than
the size of the file read from the file system.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13030 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-24 16:05:00 +00:00
oliviermartin 3d565dd674 ArmPkg/BdsLib: Fixed memory leak
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12996 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-09 15:28:25 +00:00
oliviermartin 7598f36265 ArmPkg/BdsLib: Fixed incorrect typecasting
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12995 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-09 15:27:22 +00:00
oliviermartin 4671d15d7a ArmPkg/BdsLib: Load initrd next to the Linux kernel to allow to reduce the memory from the Linux command line
The initrd was loaded at the top of the UEFI System Memory. By consequence, if the system memory
was reduced by the Linux command line then the initrd was not part of the system memory.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12994 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-09 15:25:40 +00:00
oliviermartin 995d9676c8 ArmPkg/BdsLib: Added support to start uImage
Detect if there is a u-boot header (by checking the signature) and skip it.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12993 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-09 15:23:58 +00:00
oliviermartin 19a7404aec ArmPkg/BdsLib: Fix incorrect pointer casting
A physical address (64bit) was cast to a 32bit pointer.

Signed-off-by: Eugene Cohen (HP)
Reviewed-by: oliviermartin



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12460 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-27 18:27:20 +00:00
oliviermartin d9325c8e4f ArmPkg/BdsLib: Move the code specific to the Atag preparation into a separate file
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12409 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-22 22:55:54 +00:00
oliviermartin 76d17c3156 ArmPkg/BdsLib: Use two distinct functions to boot Linux either by Atag or Fdt
Separate the BdsBootLinux() function into two functions for Atag and Fdt specific Linux booting
- BdsBootLinuxAtag ()
- BdsBootLinuxFdt ()



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12408 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-22 22:54:38 +00:00
oliviermartin a6d4d0ac16 ArmPkg/BdsLib: Add missing BdsLoadOption.c file
Missing from my commit "ArmPkg/BdsLib: Move some functions used to
create/update BDS Boot Entry from ArmPlatformPkg/Bds to
ArmPkg/BdsLib"



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12325 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-12 09:37:11 +00:00
oliviermartin aa863d357a ArmPkg/BdsLib: Fix MemMap Device Path node support
The previous version was only checking if the Remaining Device Path node
was a MemMap DevicePath node.
This fix also checks if the Root DevicePath node is a MemMap DevicePath node.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12315 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-09 10:55:26 +00:00
oliviermartin 4aa2417061 ArmPkg/BdsLib: Move some functions used to create/update BDS Boot Entry from ArmPlatformPkg/Bds to ArmPkg/BdsLib
These functions can be reused by any EFI application to add/update a BDS Boot Entry.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12314 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-09 10:54:33 +00:00
oliviermartin 2755d844f9 ArmPkg/BdsLib: Add support to pass argument to a loaded EFI application
OptionalData argument has to be set in the Loaded Image Protocol of the
new EFI application.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12313 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-09 10:53:42 +00:00
oliviermartin 48be3ea2e0 ArmPkg/BdsLib: InitrdImageSize was not initialized when no initrd was
passed

The PrepareAtagList function is using this variable to determine if a
initrd was passed to the kernel.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12181 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-22 11:01:44 +00:00
oliviermartin 1c6f402c24 ArmPkg/BdsLib: Fixed parameters passed to AllocatePages()
Typo issue ...



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12176 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-19 15:37:16 +00:00
oliviermartin 8c454d9800 BeagleBoardPkg: Use gArmTokenSpaceGuid.PcdSystemMemoryBase/Size to define System Memory
These PCDs are used by ArmPlatformPkg/Bds to know where to load the Linux kernel and its parameters.




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12171 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-18 21:15:50 +00:00
oliviermartin bd54c237f3 ArmPkg/BdsLib: Allocate memory with AnyPage type if it failed with the one initially requested
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12170 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-18 21:11:27 +00:00
oliviermartin 656416bc2e ArmPlatformPkg/Bds: Add Linux 'initrd' support to BDS
An 'initrd' file can be specified for a Linux kernel.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12169 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-18 13:21:14 +00:00
oliviermartin 1c1e70fa6e ArmPkg/BdsLib: Linux kernel supports either FDT or ATAG
If a FDT blob is passed to the kernel it is required we can load it.
If we fail to load the binary then we must abort the Linux booting
process.


ArmPkg/CpuDxe: Ensure the reset vector passed to the CP15 VBAR register is aligned on the right boundary





git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11968 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-04 10:02:49 +00:00
oliviermartin 3723a71a33 ArmPlatformPkg: Fix builds
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11964 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-01 19:51:48 +00:00
oliviermartin 5b491514ec ArmPkg/BdsLib: Check if the performance timer is counting down or up in PrintPerformance()
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11914 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-28 11:41:34 +00:00
oliviermartin 6bab33c7b6 ArmPlatformPkg/Bds: Fix various bugs in the new BDS
The errors were:
- uncaught returned error
- used of uninitialized variables


ArmPlatformPkg/Bds: Implement the update of MemMap Boot Device



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11830 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-15 19:56:50 +00:00
oliviermartin e862cd50c6 ArmPkg: Fix warnings raised by ARMGCC
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11829 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-15 19:53:15 +00:00
oliviermartin a355a3654f ArmPkg/BdsLib: Upgrade the library to use natively the Device Path
The previous version was using the string representation of the Device Path.
This new version takes as paramater the binary representation of the Device Path

It also tries to detect which kind of device support it refers by using the remaining
part of the Device Path after it has been loaded by gBS->ConnectController()

Lots of bug have been fixed as well in this new version.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11799 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-11 11:56:30 +00:00
oliviermartin cf3a77a02a ArmPkg/BdsLib: Fix GetSystemMemoryResources()
The function was not correctly merging the system memory chunks.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11479 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-31 12:17:37 +00:00
oliviermartin bad880b172 ArmPkg/BdsLib: Prevent application to hang the platform using watchdog
Before to start an image we start the watchdog. And it stops when the
application returns.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11478 6f19259b-4bc3-4df7-8a09-765794883524
2011-03-31 12:16:28 +00:00
andrewfish 2ac288f919 Fix issue with fixing tabs.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11297 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-02 23:19:30 +00:00
andrewfish 58b5d037b4 Remove tabs from all text files in the package.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11295 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-02 22:52:07 +00:00
andrewfish 1bfda055df Sync up ArmPkg with patch from mailing list. Changed name of BdsLib.h to BdsUnixLib.h and fixed a lot of issues with Xcode building.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11293 6f19259b-4bc3-4df7-8a09-765794883524
2011-02-02 22:35:30 +00:00