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
This commit is contained in:
oliviermartin 2012-05-02 20:08:03 +00:00
parent 1e40431699
commit 4c19ece32a
10 changed files with 17 additions and 17 deletions

View File

@ -31,10 +31,11 @@ EFIAPI
ArmGicSendSgiTo ( ArmGicSendSgiTo (
IN INTN GicDistributorBase, IN INTN GicDistributorBase,
IN INTN TargetListFilter, IN INTN TargetListFilter,
IN INTN CPUTargetList IN INTN CPUTargetList,
IN INTN SgiId
) )
{ {
MmioWrite32 (GicDistributorBase + ARM_GIC_ICDSGIR, ((TargetListFilter & 0x3) << 24) | ((CPUTargetList & 0xFF) << 16) | PcdGet32(PcdGicSgiIntId)); MmioWrite32 (GicDistributorBase + ARM_GIC_ICDSGIR, ((TargetListFilter & 0x3) << 24) | ((CPUTargetList & 0xFF) << 16) | SgiId);
} }
UINT32 UINT32

View File

@ -1,5 +1,5 @@
#/* @file #/* @file
# Copyright (c) 2011, ARM Limited. All rights reserved. # Copyright (c) 2011-2012, ARM Limited. All rights reserved.
# #
# This program and the accompanying materials # This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # are licensed and made available under the terms and conditions of the BSD License
@ -26,6 +26,3 @@
[Packages] [Packages]
ArmPkg/ArmPkg.dec ArmPkg/ArmPkg.dec
MdePkg/MdePkg.dec MdePkg/MdePkg.dec
[FixedPcd]
gArmTokenSpaceGuid.PcdGicSgiIntId

View File

@ -34,7 +34,5 @@
PcdLib PcdLib
[FixedPcd.common] [FixedPcd.common]
gArmTokenSpaceGuid.PcdGicSgiIntId
gArmTokenSpaceGuid.PcdArmPrimaryCoreMask gArmTokenSpaceGuid.PcdArmPrimaryCoreMask
gArmTokenSpaceGuid.PcdArmPrimaryCore gArmTokenSpaceGuid.PcdArmPrimaryCore

View File

@ -113,7 +113,8 @@ EFIAPI
ArmGicSendSgiTo ( ArmGicSendSgiTo (
IN INTN GicDistributorBase, IN INTN GicDistributorBase,
IN INTN TargetListFilter, IN INTN TargetListFilter,
IN INTN CPUTargetList IN INTN CPUTargetList,
IN INTN SgiId
); );
UINT32 UINT32

View File

@ -1,6 +1,6 @@
/** @file /** @file
* *
* Copyright (c) 2011, ARM Limited. All rights reserved. * Copyright (c) 2011-2012, ARM Limited. All rights reserved.
* *
* This program and the accompanying materials * This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License * are licensed and made available under the terms and conditions of the BSD License
@ -87,7 +87,7 @@ ArmPlatformSecExtraAction (
} else if (FeaturePcdGet (PcdSystemMemoryInitializeInSec)) { } else if (FeaturePcdGet (PcdSystemMemoryInitializeInSec)) {
if (IS_PRIMARY_CORE(MpId)) { if (IS_PRIMARY_CORE(MpId)) {
// Signal the secondary cores they can jump to PEI phase // Signal the secondary cores they can jump to PEI phase
ArmGicSendSgiTo (PcdGet32(PcdGicDistributorBase), ARM_GIC_ICDSGIR_FILTER_EVERYONEELSE, 0x0E); ArmGicSendSgiTo (PcdGet32(PcdGicDistributorBase), ARM_GIC_ICDSGIR_FILTER_EVERYONEELSE, 0x0E, PcdGet32 (PcdGicSgiIntId));
// To enter into Non Secure state, we need to make a return from exception // To enter into Non Secure state, we need to make a return from exception
*JumpAddress = PcdGet32(PcdFvBaseAddress); *JumpAddress = PcdGet32(PcdFvBaseAddress);

View File

@ -36,7 +36,7 @@
[LibraryClasses] [LibraryClasses]
DebugLib DebugLib
PcdLib PcdLib
ArmGicSecLib ArmGicLib
PrintLib PrintLib
SerialPortLib SerialPortLib
@ -52,3 +52,4 @@
gArmTokenSpaceGuid.PcdGicDistributorBase gArmTokenSpaceGuid.PcdGicDistributorBase
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
gArmTokenSpaceGuid.PcdGicSgiIntId

View File

@ -115,7 +115,7 @@ PrimaryMain (
// If ArmVe has not been built as Standalone then we need to wake up the secondary cores // If ArmVe has not been built as Standalone then we need to wake up the secondary cores
if (FeaturePcdGet (PcdSendSgiToBringUpSecondaryCores)) { if (FeaturePcdGet (PcdSendSgiToBringUpSecondaryCores)) {
// Sending SGI to all the Secondary CPU interfaces // Sending SGI to all the Secondary CPU interfaces
ArmGicSendSgiTo (PcdGet32(PcdGicDistributorBase), ARM_GIC_ICDSGIR_FILTER_EVERYONEELSE, 0x0E); ArmGicSendSgiTo (PcdGet32(PcdGicDistributorBase), ARM_GIC_ICDSGIR_FILTER_EVERYONEELSE, 0x0E, PcdGet32 (PcdGicSgiIntId));
} }
// Adjust the Temporary Ram as the new Ppi List (Common + Platform Ppi Lists) is created at // Adjust the Temporary Ram as the new Ppi List (Common + Platform Ppi Lists) is created at

View File

@ -1,7 +1,7 @@
#/** @file #/** @file
# Pre PeiCore - Hand-off to PEI Core in Normal World # Pre PeiCore - Hand-off to PEI Core in Normal World
# #
# Copyright (c) 2011, ARM Limited. All rights reserved. # Copyright (c) 2011-2012, ARM Limited. All rights reserved.
# #
# This program and the accompanying materials # This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # are licensed and made available under the terms and conditions of the BSD License
@ -70,3 +70,4 @@
gArmTokenSpaceGuid.PcdGicDistributorBase gArmTokenSpaceGuid.PcdGicDistributorBase
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
gArmTokenSpaceGuid.PcdGicSgiIntId

View File

@ -1,6 +1,6 @@
/** @file /** @file
* *
* Copyright (c) 2011, ARM Limited. All rights reserved. * Copyright (c) 2011-2012, ARM Limited. All rights reserved.
* *
* This program and the accompanying materials * This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License * are licensed and made available under the terms and conditions of the BSD License
@ -65,7 +65,7 @@ PrimaryMain (
// In some cases, the secondary cores are waiting for an SGI from the next stage boot loader toresume their initialization // In some cases, the secondary cores are waiting for an SGI from the next stage boot loader toresume their initialization
if (!FixedPcdGet32(PcdSendSgiToBringUpSecondaryCores)) { if (!FixedPcdGet32(PcdSendSgiToBringUpSecondaryCores)) {
// Sending SGI to all the Secondary CPU interfaces // Sending SGI to all the Secondary CPU interfaces
ArmGicSendSgiTo (PcdGet32(PcdGicDistributorBase), ARM_GIC_ICDSGIR_FILTER_EVERYONEELSE, 0x0E); ArmGicSendSgiTo (PcdGet32(PcdGicDistributorBase), ARM_GIC_ICDSGIR_FILTER_EVERYONEELSE, 0x0E, PcdGet32 (PcdGicSgiIntId));
} }
PrePiMain (UefiMemoryBase, StacksBase, GlobalVariableBase, StartTimeStamp); PrePiMain (UefiMemoryBase, StacksBase, GlobalVariableBase, StartTimeStamp);

View File

@ -1,6 +1,6 @@
#/** @file #/** @file
# #
# Copyright (c) 2011, ARM Ltd. All rights reserved.<BR> # Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>
# This program and the accompanying materials # This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License # are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at # which accompanies this distribution. The full text of the license may be found at
@ -85,6 +85,7 @@
gArmTokenSpaceGuid.PcdGicDistributorBase gArmTokenSpaceGuid.PcdGicDistributorBase
gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase
gArmTokenSpaceGuid.PcdGicSgiIntId
gArmTokenSpaceGuid.PcdSystemMemoryBase gArmTokenSpaceGuid.PcdSystemMemoryBase
gArmTokenSpaceGuid.PcdSystemMemorySize gArmTokenSpaceGuid.PcdSystemMemorySize