summaryrefslogtreecommitdiff
path: root/ArmPkg/Library/ArmLib
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg/Library/ArmLib')
-rw-r--r--ArmPkg/Library/ArmLib/Arm11/Arm11Lib.c27
-rw-r--r--ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c24
-rw-r--r--ArmPkg/Library/ArmLib/Arm9/Arm9Support.S19
-rw-r--r--ArmPkg/Library/ArmLib/Arm9/Arm9Support.asm18
4 files changed, 37 insertions, 51 deletions
diff --git a/ArmPkg/Library/ArmLib/Arm11/Arm11Lib.c b/ArmPkg/Library/ArmLib/Arm11/Arm11Lib.c
index 6f0f599d93..2cda363ceb 100644
--- a/ArmPkg/Library/ArmLib/Arm11/Arm11Lib.c
+++ b/ArmPkg/Library/ArmLib/Arm11/Arm11Lib.c
@@ -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
- )
-{
-}
diff --git a/ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c b/ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c
index 63d6830c1b..6b3d452ab9 100644
--- a/ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c
+++ b/ArmPkg/Library/ArmLib/Arm9/Arm9Lib.c
@@ -118,28 +118,4 @@ ArmConfigureMmu (
}
-VOID
-EFIAPI
-ArmDataMemoryBarrier (
- VOID
- )
-{
-}
-
-VOID
-EFIAPI
-ArmDataSyncronizationBarrier (
- VOID
- )
-{
-}
-
-VOID
-EFIAPI
-ArmInstructionSynchronizationBarrier (
- VOID
- )
-{
-}
-
diff --git a/ArmPkg/Library/ArmLib/Arm9/Arm9Support.S b/ArmPkg/Library/ArmLib/Arm9/Arm9Support.S
index d76afb90f5..7fd9de8d1a 100644
--- a/ArmPkg/Library/ArmLib/Arm9/Arm9Support.S
+++ b/ArmPkg/Library/ArmLib/Arm9/Arm9Support.S
@@ -30,6 +30,10 @@
.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
diff --git a/ArmPkg/Library/ArmLib/Arm9/Arm9Support.asm b/ArmPkg/Library/ArmLib/Arm9/Arm9Support.asm
index 82634c7929..e4acca1519 100644
--- a/ArmPkg/Library/ArmLib/Arm9/Arm9Support.asm
+++ b/ArmPkg/Library/ArmLib/Arm9/Arm9Support.asm
@@ -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