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
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
**/
|
||||
VOID
|
||||
ArmPlatformTrustzoneInit (
|
||||
VOID
|
||||
IN UINTN MpId
|
||||
)
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
|
@@ -52,3 +52,6 @@
|
||||
gArmTokenSpaceGuid.PcdTrustzoneSupport
|
||||
|
||||
gArmTokenSpaceGuid.PcdL2x0ControllerBase
|
||||
|
||||
gArmTokenSpaceGuid.PcdArmPrimaryCoreMask
|
||||
gArmTokenSpaceGuid.PcdArmPrimaryCore
|
||||
|
@@ -32,9 +32,14 @@
|
||||
**/
|
||||
VOID
|
||||
ArmPlatformTrustzoneInit (
|
||||
VOID
|
||||
IN UINTN MpId
|
||||
)
|
||||
{
|
||||
// Nothing to do
|
||||
if (!IS_PRIMARY_CORE(MpId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Setup TZ Protection Controller
|
||||
//
|
||||
|
@@ -31,7 +31,7 @@
|
||||
**/
|
||||
VOID
|
||||
ArmPlatformTrustzoneInit (
|
||||
VOID
|
||||
IN UINTN MpId
|
||||
)
|
||||
{
|
||||
// No TZPC or TZASC on RTSM to initialize
|
||||
|
@@ -140,7 +140,7 @@ ArmPlatformInitializeSystemMemory (
|
||||
**/
|
||||
VOID
|
||||
ArmPlatformTrustzoneInit (
|
||||
VOID
|
||||
IN UINTN MpId
|
||||
);
|
||||
|
||||
/**
|
||||
|
@@ -25,9 +25,14 @@
|
||||
**/
|
||||
VOID
|
||||
ArmPlatformTrustzoneInit (
|
||||
VOID
|
||||
IN UINTN MpId
|
||||
)
|
||||
{
|
||||
// Secondary cores might have to set the Secure SGIs into the GICD_IGROUPR0
|
||||
if (!IS_PRIMARY_CORE(MpId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
ASSERT(FALSE);
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#/* @file
|
||||
# Copyright (c) 2011, ARM Limited. All rights reserved.
|
||||
# Copyright (c) 2011-2012, ARM Limited. All rights reserved.
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -37,3 +37,6 @@
|
||||
|
||||
[FixedPcd]
|
||||
gArmTokenSpaceGuid.PcdFvBaseAddress
|
||||
|
||||
gArmTokenSpaceGuid.PcdArmPrimaryCoreMask
|
||||
gArmTokenSpaceGuid.PcdArmPrimaryCore
|
||||
|
@@ -144,14 +144,14 @@ TrustedWorldInitialization (
|
||||
// Set up Monitor World (Vector Table, etc)
|
||||
ArmSecureMonitorWorldInitialize ();
|
||||
|
||||
// Transfer the interrupt to Non-secure World
|
||||
ArmGicSetupNonSecure (MpId, PcdGet32(PcdGicDistributorBase), PcdGet32(PcdGicInterruptInterfaceBase));
|
||||
|
||||
// Initialize platform specific security policy
|
||||
ArmPlatformTrustzoneInit (MpId);
|
||||
|
||||
// Setup the Trustzone Chipsets
|
||||
if (IS_PRIMARY_CORE(MpId)) {
|
||||
// Transfer the interrupt to Non-secure World
|
||||
ArmGicSetupNonSecure (PcdGet32(PcdGicDistributorBase), PcdGet32(PcdGicInterruptInterfaceBase));
|
||||
|
||||
// Initialize platform specific security policy
|
||||
ArmPlatformTrustzoneInit ();
|
||||
|
||||
if (ArmIsMpCore()) {
|
||||
// Waiting for the Primary Core to have finished to initialize the Secure World
|
||||
ArmCpuSynchronizeSignal (ARM_CPU_EVENT_SECURE_INIT);
|
||||
|
Reference in New Issue
Block a user