]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSM.c
ArmPlatformPkg: Renamed and Invoked earlier ArmPlatformNormalInitialize()
[mirror_edk2.git] / ArmPlatformPkg / ArmVExpressPkg / Library / ArmVExpressLibRTSM / RTSM.c
index 5741915b69c3c114b8b165885e623e468ef4b7bc..69ffd45fdf772a7fb969d3db068a72f68b9845b4 100644 (file)
@@ -1,6 +1,6 @@
 /** @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         
@@ -17,8 +17,6 @@
 #include <Library/DebugLib.h>
 #include <Library/PcdLib.h>
 
-#include <Drivers/SP804Timer.h>
-
 #include <Ppi/ArmMpCoreInfo.h>
 
 #include <ArmPlatform.h>
@@ -87,22 +85,6 @@ ArmPlatformGetBootMode (
   return BOOT_WITH_FULL_CONFIGURATION;
 }
 
-/**
-  Remap the memory at 0x0
-
-  Some platform requires or gives the ability to remap the memory at the address 0x0.
-  This function can do nothing if this feature is not relevant to your platform.
-
-**/
-VOID
-ArmPlatformBootRemapping (
-  VOID
-  )
-{
-  // Disable memory remapping and return to normal mapping
-  MmioOr32 (SP810_CTRL_BASE, BIT8);
-}
-
 /**
   Initialize controllers that must setup in the normal world
 
@@ -110,12 +92,19 @@ ArmPlatformBootRemapping (
   in the PEI phase.
 
 **/
-VOID
-ArmPlatformNormalInitialize (
-  VOID
+RETURN_STATUS
+ArmPlatformInitialize (
+  IN  UINTN                     MpId
   )
 {
-  // Nothing to do here
+  if (!IS_PRIMARY_CORE(MpId)) {
+    return RETURN_SUCCESS;
+  }
+
+  // Disable memory remapping and return to normal mapping
+  MmioOr32 (SP810_CTRL_BASE, BIT8);
+
+  return RETURN_SUCCESS;
 }
 
 /**
@@ -129,14 +118,7 @@ ArmPlatformInitializeSystemMemory (
   VOID
   )
 {
-  // Configure periodic timer (TIMER0) for 1MHz operation
-  MmioOr32 (SP810_CTRL_BASE + SP810_SYS_CTRL_REG, SP810_SYS_CTRL_TIMER0_TIMCLK);
-  // Configure 1MHz clock
-  MmioOr32 (SP810_CTRL_BASE + SP810_SYS_CTRL_REG, SP810_SYS_CTRL_TIMER1_TIMCLK);
-  // configure SP810 to use 1MHz clock and disable
-  MmioAndThenOr32 (SP810_CTRL_BASE + SP810_SYS_CTRL_REG, ~SP810_SYS_CTRL_TIMER2_EN, SP810_SYS_CTRL_TIMER2_TIMCLK);
-  // Configure SP810 to use 1MHz clock and disable
-  MmioAndThenOr32 (SP810_CTRL_BASE + SP810_SYS_CTRL_REG, ~SP810_SYS_CTRL_TIMER3_EN, SP810_SYS_CTRL_TIMER3_TIMCLK);
+  // Nothing to do here
 }
 
 EFI_STATUS
@@ -148,7 +130,7 @@ PrePeiCoreGetMpCoreInfo (
   UINT32   ProcType;
 
   ProcType = MmioRead32 (ARM_VE_SYS_PROCID0_REG) & ARM_VE_SYS_PROC_ID_MASK;
-  if (ProcType == ARM_VE_SYS_PROC_ID_CORTEX_A9) {
+  if ((ProcType == ARM_VE_SYS_PROC_ID_CORTEX_A9) || (ProcType == ARM_VE_SYS_PROC_ID_CORTEX_A15)) {
     // Only support one cluster
     *CoreCount    = ArmGetCpuCountPerCluster ();
     *ArmCoreTable = mVersatileExpressMpCoreInfoTable;