]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Move ARMv5 (ARM9) barrier instructions into assembler files
authorandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 Feb 2010 23:20:00 +0000 (23:20 +0000)
committerandrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 24 Feb 2010 23:20:00 +0000 (23:20 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10064 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/Library/ArmLib/Arm11/Arm11Lib.c
ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c
ArmPkg/Library/ArmLib/Arm9/Arm9Support.S
ArmPkg/Library/ArmLib/Arm9/Arm9Support.asm

index 6f0f599d93841d898d31a4dae2cbf701904b56c8..2cda363cebc5fd2b5e4bcabac1759b2189337c39 100644 (file)
@@ -118,32 +118,5 @@ ArmConfigureMmu (
 }
 
 
-VOID
-EFIAPI
-ArmDataMemoryBarrier (
-  VOID
-  )
-{
-  // Should move to assembly with the 
-}
-  
-VOID
-EFIAPI
-ArmDataSyncronizationBarrier (
-  VOID
-  )
-{
-// MOV R0, #0
-// MCR P15, #0, R0, C7, C10, #4}
-}
-
-
-VOID
-EFIAPI
-ArmInstructionSynchronizationBarrier (
-  VOID
-  )
-{
-}
 
 
index 63d6830c1b0b420f83d1090c0ead692b1a72f6da..6b3d452ab91f4e04ff439af316fb1e01ed8e062f 100644 (file)
@@ -118,28 +118,4 @@ ArmConfigureMmu (
 }
 
 
-VOID
-EFIAPI
-ArmDataMemoryBarrier (
-  VOID
-  )
-{
-}
-  
-VOID
-EFIAPI
-ArmDataSyncronizationBarrier (
-  VOID
-  )
-{
-}
-
-VOID
-EFIAPI
-ArmInstructionSynchronizationBarrier (
-  VOID
-  )
-{
-}
-
 
index d76afb90f596d4341f8e3b2688d43275d3b59f0d..7fd9de8d1a63c041be8ba7df9e504c5126d1ef20 100644 (file)
 .globl ASM_PFX(ArmDisableInstructionCache)
 .globl ASM_PFX(ArmEnableBranchPrediction)
 .globl ASM_PFX(ArmDisableBranchPrediction)
+.globl ASM_PFX(ArmDataMemoryBarrier)
+.globl ASM_PFX(ArmDataSyncronizationBarrier) 
+.globl ASM_PFX(ArmInstructionSynchronizationBarrier)
+
 
 .set DC_ON, (1<<2)
 .set IC_ON, (1<<12)
@@ -130,5 +134,20 @@ ASM_PFX(ArmEnableBranchPrediction):
 ASM_PFX(ArmDisableBranchPrediction):
   bx      LR                      @Branch prediction is not supported.
 
+ASM_PFX(ArmDataMemoryBarrier):
+  mov R0, #0
+  mcr P15, #0, R0, C7, C10, #5    @ check if this is OK?
+  bx      LR
+  
+ASM_PFX(ArmDataSyncronizationBarrier):
+  mov R0, #0
+  mcr P15, #0, R0, C7, C10, #4   @ check if this is OK?
+  bx      LR
+  
+ASM_PFX(ArmInstructionSynchronizationBarrier):
+  mov R0, #0
+  mcr P15, #0, R0, C7, C5, #4     @ check if this is OK?
+  bx      LR
+
 ASM_FUNCTION_REMOVE_IF_UNREFERENCED
 
index 82634c7929562b04f95e25febf34c149304f9eba..e4acca15199600446550d24ba837cb89dadbf43a 100644 (file)
@@ -28,6 +28,9 @@
     EXPORT  ArmDisableInstructionCache
     EXPORT  ArmEnableBranchPrediction
     EXPORT  ArmDisableBranchPrediction
+    EXPORT  ArmDataMemoryBarrier
+    EXPORT  ArmDataSyncronizationBarrier
+    EXPORT  ArmInstructionSynchronizationBarrier
 
 
 DC_ON       EQU     ( 0x1:SHL:2 )
@@ -132,4 +135,19 @@ ArmEnableBranchPrediction
 ArmDisableBranchPrediction
   bx      LR                    ;Branch prediction is not supported.
 
+ASM_PFX(ArmDataMemoryBarrier):
+  mov R0, #0
+  mcr P15, #0, R0, C7, C10, #5  ; Check to see if this is correct
+  bx      LR
+  
+ASM_PFX(ArmDataSyncronizationBarrier):
+  mov R0, #0
+  mcr P15, #0, R0, C7, C10, #4 ; Check to see if this is correct
+  bx      LR
+  
+ASM_PFX(ArmInstructionSynchronizationBarrier):
+  MOV R0, #0
+  MCR P15, #0, R0, C7, C5, #4 ; Check to see if this is correct
+  bx      LR
+
     END