]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/ArmLib/Common/ArmLibSupport.S
Update remaining ARM .S files with INTERWORK_FUNC macro. This is the 2nd half of...
[mirror_edk2.git] / ArmPkg / Library / ArmLib / Common / ArmLibSupport.S
index d80100c788b660ca8f48ebf6b04b8baf4e8add06..a432acbb808bd15f0ccfd06c3a0f17089842229e 100644 (file)
@@ -1,8 +1,8 @@
 #------------------------------------------------------------------------------ 
 #
-# Copyright (c) 2008-2009 Apple Inc. All rights reserved.
+# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
 #
-# 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
 # which accompanies this distribution.  The full text of the license may be found at
 # http://opensource.org/licenses/bsd-license.php
 .text
 .align 2
 .globl ASM_PFX(Cp15IdCode)
+INTERWORK_FUNC(Cp15IdCode)
 .globl ASM_PFX(Cp15CacheInfo)
+INTERWORK_FUNC(Cp15CacheInfo)
 .globl ASM_PFX(ArmEnableInterrupts)
+INTERWORK_FUNC(ArmEnableInterrupts)
 .globl ASM_PFX(ArmDisableInterrupts)
+INTERWORK_FUNC(ArmDisableInterrupts)
 .globl ASM_PFX(ArmGetInterruptState)
+INTERWORK_FUNC(ArmGetInterruptState)
+.globl ASM_PFX(ArmEnableFiq)
+INTERWORK_FUNC(ArmEnableFiq)
+.globl ASM_PFX(ArmDisableFiq)
+INTERWORK_FUNC(ArmDisableFiq)
+.globl ASM_PFX(ArmGetFiqState)
+INTERWORK_FUNC(ArmGetFiqState)
 .globl ASM_PFX(ArmInvalidateTlb)
+INTERWORK_FUNC(ArmInvalidateTlb)
 .globl ASM_PFX(ArmSetTranslationTableBaseAddress)
+INTERWORK_FUNC(ArmSetTranslationTableBaseAddress)
+.globl ASM_PFX(ArmGetTranslationTableBaseAddress)
+INTERWORK_FUNC(ArmGetTranslationTableBaseAddress)
 .globl ASM_PFX(ArmSetDomainAccessControl)
+INTERWORK_FUNC(ArmSetDomainAccessControl)
 .globl ASM_PFX(CPSRMaskInsert)
+INTERWORK_FUNC(CPSRMaskInsert)
 .globl ASM_PFX(CPSRRead)
+INTERWORK_FUNC(CPSRRead)
+
 
 #------------------------------------------------------------------------------
 
@@ -57,6 +76,28 @@ ASM_PFX(ArmGetInterruptState):
        movne   R0,#0
        bx      LR
 
+ASM_PFX(ArmEnableFiq):
+       mrs     R0,CPSR
+       bic     R0,R0,#0x40             @Enable FIQ interrupts
+       msr     CPSR_c,R0
+       bx      LR
+
+ASM_PFX(ArmDisableFiq):
+       mrs     R0,CPSR
+       orr     R1,R0,#0x40             @Disable FIQ interrupts
+       msr     CPSR_c,R1
+  tst     R0,#0x80
+  moveq   R0,#1
+  movne   R0,#0
+       bx      LR
+
+ASM_PFX(ArmGetFiqState):
+       mrs     R0,CPSR
+       tst     R0,#0x80            @Check if FIQ is enabled.
+       moveq   R0,#1
+       movne   R0,#0
+       bx      LR
+
 ASM_PFX(ArmInvalidateTlb):
   mov     r0,#0
   mcr     p15,0,r0,c8,c7,0
@@ -66,6 +107,11 @@ ASM_PFX(ArmSetTranslationTableBaseAddress):
   mcr     p15,0,r0,c2,c0,0
   bx      lr
 
+ASM_PFX(ArmGetTranslationTableBaseAddress):
+  mrc     p15,0,r0,c2,c0,0
+  bx      lr
+
+
 ASM_PFX(ArmSetDomainAccessControl):
   mcr     p15,0,r0,c3,c0,0
   bx      lr