Commit Graph

117 Commits

Author SHA1 Message Date
Olivier Martin 71fd27cbee ArmPkg/CpuDxe: Removed LR adjustement for SVC call
The Link Register (LR) does not need adjustement when receiving a Supervisor Call (SVC).
Note: SVC might be generated by debuggers.

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@14911 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-28 21:38:56 +00:00
Olivier Martin 54ed21dbbb ArmPlatformPkg/ArmVExpressPkg: Removed unused PCDs declaration from INF 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@14907 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-28 21:37:10 +00:00
Olivier Martin 017baa1cf3 ARM Packages: Renamed PL390Gic driver into ArmGic driver
The aim is to make this driver follows the ARM GIC specifications and
be implementation independent.

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@14810 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-29 06:36:34 +00:00
Olivier Martin eb5c268fb6 ArmPkg/PL390Gic: Fixed setting of the Interrupt Processor Targets Registers when Uniprocessor
When running on a uniprocessor implementation, the ICDIPTRn registers are RAZ (Read as Zero).
So the previous assertion was not correct.

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@14798 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-24 11:49:32 +00:00
Olivier Martin 0127372430 ArmPkg/CpuDxe: Fixed confusion in AArch64 Table descriptor types
Table Descriptor and Level-3 Block entry descriptors have the same
translation table type value (ie: 0x3).

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@14771 6f19259b-4bc3-4df7-8a09-765794883524
2013-10-14 16:32:38 +00:00
Olivier Martin 5ad9b48f98 ArmPkg/CpuDxe: Fixed the condition that checks if the level-1 descriptor points to a level-2 page 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@14700 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-23 09:38:53 +00:00
Olivier Martin 429358b59d ArmPkg/CpuDxe: Fixed attribute setting in GetNextEntryAttribute()
The wrong attribute was used to set the region.

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@14676 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-16 09:32:59 +00:00
Eugene Cohen 1bc3923d08 ArmPkg/CpuDxe: Exception Handling SP Adjust
The exception handling support code appears to adjust the stack pointer in the wrong direction.
It decrements the stack pointer by 0x60, but this should be an increment (add) for the
downward-growing stack.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14646 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-10 10:10:56 +00:00
Roy Franz 1616719773 ArmPkg/CpuPei: Remove unused functions from the driver
The ConfigureMmu() function is unused - the only call to it
is commented out, and the functionality has been moved to
InitMmu() in MemoryInitPeiLib.c.
This change also removes the unused definitions from the file.

Change-Id: Ice795bfee25c403142d0c078533f8a46d04f82e9
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@14621 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-03 10:14:02 +00:00
Olivier Martin b75d7605b4 ArmPkg/CpuDxe: Fixed calculation of the Page Table Index (Level 2 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@14617 6f19259b-4bc3-4df7-8a09-765794883524
2013-09-02 13:12:17 +00:00
Olivier Martin 2e969d2e9e ArmPkg/CpuDxe: Added support to not set a memory region with the same attribute
Changing the attribute implies some cache management (clean & invalidate).
Preventing the cache management should improve the performance.

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@14568 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-19 17:38:39 +00:00
Olivier Martin 6adbd5b4d2 ArmPkg/ArmLib: Added ConvertSectionAttributesToPageAttributes()
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-19 17:37:50 +00:00
Olivier Martin 047c0cbb1e ArmPkg/CpuDxe: Fixed AArch64 MMU/GCD synchronization
- Fix the length used to set the GCD Memory Space attribute
- Print a warning message if the given length of a memory space region is not 4KB-aligned

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@14562 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-19 17:33:31 +00:00
Girish K S 6a343fac2c ArmPkg/CpuDxe: AArch64: Fix wrong comparison of exception type
During the interrupt registration comparison is made against
max value of exception types for ARMV7, but in the common handling
function the check is made against max value of exceptions types
for ARMV8. This can lead to undefined behaviour during registration
of interrupts.

This patch modifies the registration function to handle only AArch64
exceptions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Girish K S <ks.giri@samsung.com>
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14561 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-19 13:49:09 +00:00
Olivier Martin 5b53eaffe8 ArmPkg,ArmPlatformPkg: Free memory allocated by Get.*SpaceMap()
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@14507 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-26 17:12:12 +00:00
Harry Liebel 25402f5d06 ArmPkg: Added Aarch64 support
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-18 18:07:46 +00:00
Olivier Martin 591fb3781a ArmPkg/CpuDxe: Moved memory mapping functions that are not architecture specific to 'CpuMmuCommon.c'
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@14482 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-18 06:20:33 +00:00
Olivier Martin da275244e3 ArmPkg: Removed the non-used PCD PcdGicPrimaryCoreId
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@14480 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-17 06:26:10 +00:00
Olivier Martin a1cca63885 ArmPkg/PL390Gic: Populate the GIC Distributor Target Register with the GIC CPU ID retrieved from the GIC
The GIC CPU Id (the GIC CPU interface the CPU is connected to) can be retrieved by reading the first
registers of the GIC CPU Target Registers.
The first GIC Distributor Target registers correspond to the SGIs.

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@14479 6f19259b-4bc3-4df7-8a09-765794883524
2013-07-17 06:25:15 +00:00
Olivier Martin 6f050ad6bf ArmPkg: Made ArmConfigureMmu() returns a status code
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-27 18:16:06 +00:00
Olivier Martin e703b085f6 ArmPkg/Drivers/TimerDxe: Improve Timer initialisation.
- Registering a interrupt handler implicitly enables said interrupt. This
  is in the UEFI Spec. No need to enable the interrupts a second time.
- Make sure the Timer is completely disabled before configuring it. Only
  enable after configuration is complete.

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@14433 6f19259b-4bc3-4df7-8a09-765794883524
2013-06-19 18:08:02 +00:00
oliviermartin bebda7ceec ArmPlatformPkg/ArmPlatformLib: Added support for ArmPlatformIsPrimaryCore()
Checking if a core if the primary/boot core used to be done with the macro
IS_PRIMARY_CORE().
Some platforms exposes configuration registers to change the primary core.
Replacing the macro IS_PRIMARY_CORE() by ArmPlatformIsPrimaryCore() allows
some flexibility in the way to check the primary core.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Acked-by: Ryan Harkin <ryan.harkin@linaro.org>


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14344 6f19259b-4bc3-4df7-8a09-765794883524
2013-05-10 12:41:27 +00:00
oliviermartin 81742bb085 ArmPkg/PL390Gic: Do not try to clear spurious interrupts.
If we have a pending spurious interrupt we should not try to clear it,
just ignore.

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@14265 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-14 09:27:33 +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 111339d2a2 ArmPkg/ArmV7.h: Introduced ARM_ARCH_EXCEPTION_IRQ
This constant allows to reduce architecture difference in the position
of the IRQ in the exception table.

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



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14099 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-25 12:11:03 +00:00
oliviermartin 3eef284c2e ArmPkg: Fixed ArmPkg.dsc RELEASE build
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14098 6f19259b-4bc3-4df7-8a09-765794883524
2013-01-25 12:07:00 +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 21de944e03 ARM Packages: Moved ARM assembly files to 'Arm' subdirectory
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
2012-09-28 10:52:16 +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 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 ae42bc88ee ArmPkg/TimerDxe: Fixed incorrect TimerTicks calculation
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13498 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:18:41 +00:00
oliviermartin 9736c29721 ArmPkg/PL390Gic: Added support for ArmGicDisableInterruptInterface()
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13489 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 20:02:49 +00:00
oliviermartin d69503998a ArmPkg/PL390Gic: Fixed initialization when the primary core is not (Cluster0,Cpu0)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13488 6f19259b-4bc3-4df7-8a09-765794883524
2012-07-04 19:58:54 +00:00
oliviermartin f8181c90f4 ArmPlatformPkg: Replaced 'ArmGicSecLib' by 'ArmGicLib'
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13265 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 20:19:00 +00:00
oliviermartin 9d59a88be1 ArmPkg/ArmCpuLib: Fixed SMP Cortex-A9 and Cortex-A15
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13261 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 20:14:55 +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 124dfbf6da ArmPkg/ArmCpuLib: Removed unused files
Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13250 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 19:57:43 +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 e9f7c58f25 ArmPkg: Replaced gArmTokenSpaceGuid.PcdGicNumInterrupts by ArmGicGetMaxNumInterrupts()
The maximum number of interrupts can be retrieve through the GIC distributor.

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



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13244 6f19259b-4bc3-4df7-8a09-765794883524
2012-05-02 19:48:00 +00:00
oliviermartin 5e7731443c ArmPlatformPkg/Sec: Allowed the Secondary Cores to set the Secure/Non Secure bits to their PPIs
The GICD_IGROUPR0 is banked for each connected processor. It means the
Non-Secure bits for the PPIs (Private Peripheral Interrupts) must be
configured for every processor.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13135 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 11:03:36 +00:00
oliviermartin 645890ba40 ArmPkg/Drivers/PL390Gic: Removed acknowledge of special interrupts (spurious interrupt)
Cleaning a special interrupt has an unpredictable behaviour.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13129 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 10:54:49 +00:00
oliviermartin be613c8b2c ArmPkg/PL390Gic: Introduced PcdGicSgiIntId to define which SGI is used for core synchronisation
By default this PCD is set to use SGI #0.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13123 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 10:46:25 +00:00
oliviermartin 9253410646 ArmPkg/ArmGicLib: Added function ArmGicSetSecureInterrupts() to define the secure interrupts
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13122 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-26 10:45:27 +00:00
oliviermartin 0db25ccc6c ArmPlatformPkg: Minor code changes (comments, misspellings, coding stylei, line endings)
- Fixed misspellings
- Updated Copyright
- Remove unused sections in INF file
- Fixed incorrect commentsi
- Fixed coding style
- Fixed line endings (CRLR)



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13052 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28 17:11:42 +00:00
oliviermartin 1bccfbe5ab ArmPkg/PL390Gic: Removed duplicated line of codes disabling the interrupts
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13040 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-27 10:20:46 +00:00
oliviermartin 9207c5d758 ArmPkg: Changed ARM CPU SetMemoryAttributes to always use strongly ordered for the EFI_MEMORY_UC attribute
Changed ARM CPU SetMemoryAttributes to always use strongly ordered for the EFI_MEMORY_UC attribute. 

Signed-off-by: 
Reviewed-by: eugenecohen
Reviewed-by: yanivtal




git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13011 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-14 15:54:05 +00:00
oliviermartin 81be6e070f ArmPkg/ArmCpuLib: Fix GCC/XCode builds
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12626 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-01 23:32:04 +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