Commit Graph

43 Commits

Author SHA1 Message Date
oliviermartin 063ad84e20 ArmPlatformPkg/PrePi: Removed magic values
Introduced CPSR (Coprocessor Status Register) definitions

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14097 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-25 12:05:17 +00:00
oliviermartin 17839a45b8 ArmPlatformPkg/ArmPlatformStackLib: Introduced helper library to initialize stacks
The new functions are:
- ArmPlatformStackSet(IN UINTN StackBase, IN UINTN MpId, IN UINTN PrimaryStackSize, IN UINTN SecondaryStackSize);
- ArmPlatformStackSetPrimary(IN UINTN StackBase, IN UINTN MpId, IN UINTN PrimaryStackSize, IN UINTN SecondaryStackSize);
- ArmPlatformStackSetSecondary(IN UINTN StackBase, IN UINTN MpId, IN UINTN PrimaryStackSize, IN UINTN SecondaryStackSize);

The stack topology can be changed by implementing a new ArmPlatformStackLib

Signed-off-by: Olivier Martin <olivier.martin@arm.com>




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13774 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 11:01:36 +00:00
oliviermartin 695df8ba90 ArmPlatformPkg: Introduction of gArmPlatformTokenSpaceGuid.PcdCoreCount
On ARM PLatforms, there is no standard way to know how many cores are
available on the platform.
This PCD is expected to contain this number.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13769 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 10:43:28 +00:00
oliviermartin fb47559347 ArmPlatformPkg/PrePi: Moved Exception Vector Table to ArmPkg/DebugAgentBaseLib
In case a DebugAgent library is supported for a specific debugger, we would
expect the exception be caught by DebugAgentLib.
The DebugAgentBaseLib exposes the cause of the exception to the user in the
Serial Terminal.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13766 6f19259b-4bc3-4df7-8a09-765794883524
2012-09-28 09:54:13 +00:00
oliviermartin ce88684e2a ARM Packages: Fixed mispellings
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13502 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:23:21 +00:00
oliviermartin 0dbbacdf18 ArmPlatformPkg/PrePi: Declared the ARM MP Core Info
Registered the gArmMpCoreInfoGuid Data Hob.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13497 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:17:46 +00:00
oliviermartin 92034e14da ARM Packages: Clean code (Remove unused PCDs, ...)
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13494 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:12:29 +00:00
oliviermartin a32dae4878 ArmPkg/AsmMacroIoLib: Renamed 'GetCorePositionInStack' macro into 'GetCorePositionFromMpId'
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13493 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:10:18 +00:00
oliviermartin 2575b72620 ArmPkg: Fixed RVCT compiler warnings
Signed-off-by: Olivier Martin <olivier.martin@arm.com>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13490 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:06:23 +00:00
oliviermartin 315649cda2 ArmPkg/ArmGicLib: Replaced 'ArmGicAcknowledgeSgiFrom' by 'ArmGicAcknowledgeInterrupt'
The function 'ArmGicAcknowledgeSgiFrom' was actually acknowledging Interrupts (and not only SGIs).


ArmPkg/ArmGicLib: Introduced the PCD PcdGicPrimaryCoreId

This PCD defines the Id of the primary core in the GIC.


Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13259 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 20:09:16 +00:00
oliviermartin 4c19ece32a ArmPkg/ArmGicLib: Changed ArmGicSendSgiTo() to allow to send a specific SGI
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13258 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 20:08:03 +00:00
oliviermartin b1d41be7c9 ArmPkg/ArmCpuLib: Replaced complex functions ArmCpuSynchronizeWait & ArmCpuSynchronizeSignal by sev & wfe
Previsouly the synchronization of MpCore was using the SGI (Software
Generated Interrupt) to synchronize MpCore during the early boot.
This commit replaced this mechanism by the more appropriate SEV/WFE
instructions (Send/Wait Event instructions).
That also eases the port to a new cpu/platform.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13249 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 19:55:32 +00:00
oliviermartin f437141a9c ArmPlatformPkg: Renamed and Invoked earlier ArmPlatformNormalInitialize()
- ArmPlatformNormalInitialize() has been renamed into ArmPlatformInitialize()
- Make the function be called at the early stage of the PEI phase as some
  platforms require their interconnects or clocks to be initialize before any
  access to Timers or UARTs.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13245 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 19:49:35 +00:00
oliviermartin 82325f95c5 ARM Packages: Minor changes (fixed mispelling, line endings, incorrect comments)
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13243 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 19:46:40 +00:00
oliviermartin 37363dff65 ArmPlatformPkg/PrePi: Added Firmware Version String to the 'welcome' statement
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13139 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 11:08:32 +00:00
oliviermartin 7defe7b354 ArmPlatformPkg/PrePi: Fix comment (minor change)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13125 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 10:48:45 +00:00
oliviermartin 1377db63ff ArmPlatformPkg: Updated the stack setup to have the same geometry between the Secure and Normal World
Having a similar setup reduces the error during the MPCore stack setup.
The stack setup is described on this wikipage:
https://sourceforge.net/apps/mediawiki/tianocore/index.php?title=ArmPlatformPkg/Stack



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13058 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:23:53 +00:00
oliviermartin 2569b06868 ArmPlatformPkg/PrePi: Fixed stack setup when System Memory is mapped upto 0xFFFFFFFF
The stacks must be 32-bit aligned (which is not the case of 0xFFFFFFFF).
This change ensures the stacks are setup properperly in case the system
memory is available at 0xFFFFFFFF.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13057 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:22:13 +00:00
oliviermartin 1aa9860e8f ArmPlatformPkg/PrePi: Ony synchronize cores when it is a MPCore System
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12726 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-16 12:53:25 +00:00
oliviermartin 5f5b907c0d ArmPlatformPkg: Fix Global Variable region initialization when GlobalVariable's size is zero
The exit loop was not considering a size of zero for the Global Variable region.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12678 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-09 11:52:37 +00:00
oliviermartin aa26b8f6c8 ArmPlatformPkg/PrePi: Remove duplicate call of BuildMemoryTypeInformationHob()
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12645 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-01 23:45:09 +00:00
oliviermartin 031f52ce0f ArmPlatformPkg: Fix initialization of the Global Variable when stack pointer higher than 0x7FFFFFFF
Fixed signed comparison error.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12639 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-01 23:42:29 +00:00
oliviermartin 99565b88c1 ArmPlatform/PrePi: Fixed PrePi for MP Cores platform and Global Variable region settings
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12638 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-01 23:41:52 +00:00
oliviermartin 89bbce116a Arm Packages: Fix builds for XCODE32 toolchain
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12509 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-04 13:58:28 +00:00
oliviermartin 886f97c86b ARM Packages: Fixed Build failings/warnings/EDK2 coding convention
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12458 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-27 16:42:47 +00:00
oliviermartin bd6b97994a ArmPkg/ArmLib: Clean ArmV7Lib
- Move the non specific ArmV7 functions to ArmLib.
- Clean the ARM Platform common components to not depend on ArmV7 if not required



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12453 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-27 16:31:20 +00:00
oliviermartin 1d2bbdbb8d ArmPkg: Removed deprecated 'ArmMPCoreMailBoxLib'
This library has been replaced by ArmMpCoreInfo PPI and HOBs.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12424 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-22 23:16:04 +00:00
oliviermartin 44788bae6f ArmPkg: Create MpCoreInfo PPI and HOB to describe CPU Cores on a MPCore platform
These info are:
- ClusterId, CoreId
- MailBox Set/Get/Clear address



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12423 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-22 23:14:01 +00:00
oliviermartin 8fc38a3f50 ArmPlatformPkg: Introduce ArmPlatformGlobalVariableLib
This library hides where the 'XIP' Global Variable are located in the memory.
It is expected the Sec/PrePi modules define the Global Variable area through
the GlobalVariable HOB.

The ArmPlatformGlobalVariableLib library allows access to global variables by
their offsets in this region.




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12420 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-22 23:11:03 +00:00
oliviermartin c524ffbb67 ArmPlatformPkg/PrePi: Removed the dependency on 'PcdCPUCoresNonSecStackBase'
In PrePi the StackBase is automatically calculated from the top of the memory.
The information is now passed from the assembly files to the C code.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12418 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-22 23:07:55 +00:00
oliviermartin f92b93c9a3 ARM Packages: Rename PcdNormal* into Pcd* PCDs
The denomination 'Normal' was used to make reference to the 'Normal'
or 'Non Secure' or 'Non Trusted' world.
To avoid confusion, this prefix has been removed from PCDs to define
the normal world.

The PCDs explicitely related to the Secure/Trusted World continue to
have the 'Sec' prefix.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12416 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-22 23:06:31 +00:00
oliviermartin 2dbcb8f0a3 ArmPlatformPkg: Changed memory model for the stacks
In the previous version, every cores had the same stack size.
To avoid to waste memory with secondary core stacks, the primary core stack
size is now different from the secondary cores stack size.

These are the Stack PCDs and their default values:

gArmPlatformTokenSpaceGuid.PcdCPUCoresSecStackBase|0
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecPrimaryStackSize|0x10000
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecSecondaryStackSize|0x1000

gArmPlatformTokenSpaceGuid.PcdCPUCoresSecMonStackBase|0
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecMonStackSize|0x1000

gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x10000
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize|0x1000




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12415 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-22 23:05:20 +00:00
oliviermartin 0787bc6184 ArmPlatformPkg: Introduce Primary core macros
On MpCore system, the primary core can now be any core of the system.

To identify the primary core, you can use 'gArmTokenSpaceGuid.PcdArmPrimaryCoreMask'
and 'gArmTokenSpaceGuid.PcdArmPrimaryCore'.
These PCDs by default use the ClusterId and CoreId to identify the core. And the
primary core is defined as the ClusetrId=0 and CoreId=0.

The helper macros are: IS_PRIMARY_CORE(MpId), GET_CORE_ID(MpId), GET_CLUSTER_ID(MpId),
GET_CORE_POS(MpId), PRIMARY_CORE_ID.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12412 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-22 23:01:13 +00:00
oliviermartin 55a0d64b88 ArmPkg: Renamed library 'PL390GicLib' into 'ArmGicLib'
This library is the interface for the ARM Generic Interrupt Controller
Architecture Specification.
ARM Platform can use any GIC controller (not necessary PL390 GIC).




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12411 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-22 22:59:52 +00:00
oliviermartin 11c20f4e06 Arm Packages: Fixed coding style/Line endings to follow EDK2 coding convention
Arm Packages: Fixed mispelling

Arm Packages: Reduced warnings all over the code




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12407 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-22 22:53:54 +00:00
oliviermartin 3757392733 ArmPlatformPkg/PrePi: Removed harcoded HobList pointer calculation to use PrePeiHobListPointerLib function
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12166 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-18 11:17:09 +00:00
oliviermartin 11e667fbab ArmPlatformPkg/PrePi: Removed second initialization of DebugAgenLib
This second initialization does not make sense in this context.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12164 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-18 10:17:59 +00:00
oliviermartin 2ee8536623 ArmPlatformPkg: Fix warnings
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12001 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-07 10:52:07 +00:00
oliviermartin d269095b71 ArmPlatformPkg: Change the memory model for the ARM Platform components
In the former memory model, the UEFI firmware was expected to be located
at the top of the system memory. Stacks & Pi memory regions were set below
the firmware.
On some platform, the UEFI firmware could be shadowed by the ROM firmware
(case of the BeagleBoard) and in some cases the firmware is copied at the
beginning of the system memory.

With this new memory model, stack and Pi/DXE memory regions are set at the
top of the system memory wherever the UEFI firmware is located in the memory
map.
Because DXE core does not support shadowed firmwares, the system memory covered
by the UEFI firmware is marked as 'Non Present' to avoid to be overlapped by
DXE allocations.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11992 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-06 16:27:21 +00:00
oliviermartin a6caee65ac ArmPlatformPkg: Remove PcdStandalone from Sec module and Introduce ArmPlatformSecExtraAction()
The PcdStandalone is a PCD ARM Ltd uses to make the difference between a standalone UEFI (boot
from cold boot to Boot Manager without user intervention) and a Debug UEFI firmware (the firmware
engineer has to copy the Normale World image into the DRAM to enable his/her firmware).

By coping the firmware into DRAM in the non standalone version it is much faster than reflashing
the NOR Flash after each build.

ArmPlatformSecExtraAction() function is called just before the Sec module jump to normal world.
The platform firmware can run extra actions at this stage.
The 'ARM Standalone' concept has moved to the implementation of ArmPlatformSecExtraAction() for
the ARM development boards (in ArmPlatformPkg/Library/DebugSecExtraActionLib).


ArmPlatformPkg: Enable DebugAgentLib in Sec and PrePeiCore


ArmPlatformPkg: Fix line endings in some source files

Use CR+LF line endings as defined by the EDK2 coding convention




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11991 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-06 16:07:54 +00:00
oliviermartin fb42fffeb8 ArmPlatformPkg: Fix build issues
Other compiler version ... other warnings



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11970 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-04 10:18:18 +00:00
oliviermartin 5cc45b70c3 ArmPkg: Move ARM Platform drivers from ArmPkg/Drivers/ to ArmPlatformPkg/Drivers/
The idea is to keep ArmPkg responsible for the ARM architectural modules and ArmPlatformPkg
the ARM development platform packages (with their respective drivers).


ArmPlatformPkg: Reduce driver dependency on ArmPlatform.h

- Move some driver definitions from C-Macro to PCD values
- Unify PCD driver namespace




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11956 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-01 15:30:01 +00:00
oliviermartin cd872e401a ArmPlatformPkg/PrePi: Add support for PrePi module
This module should handle the Pre PI phase before the DXE core is
executed when there is no PEI Core support.
It declares the required information needed by the DXE core through HOBs.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11949 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-01 11:09:00 +00:00