]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/ArmLib/Common/ArmLibSupport.asm
Update the copyright notice format
[mirror_edk2.git] / ArmPkg / Library / ArmLib / Common / ArmLibSupport.asm
index ecae8a31a2f08137351a52331123f3bc3e3679d7..459ebd44c887955c5cb3c5c59de765e8cf1e217a 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
@@ -18,6 +18,9 @@
     EXPORT  ArmEnableInterrupts
     EXPORT  ArmDisableInterrupts
     EXPORT  ArmGetInterruptState
+    EXPORT  ArmEnableFiq
+    EXPORT  ArmDisableFiq
+    EXPORT  ArmGetFiqState
     EXPORT  ArmInvalidateTlb
     EXPORT  ArmSetTranslationTableBaseAddress
     EXPORT  ArmGetTranslationTableBaseAddress
@@ -56,6 +59,28 @@ ArmGetInterruptState
        moveq   R0,#1
        movne   R0,#0
        bx      LR
+
+ArmEnableFiq
+       mrs     R0,CPSR
+       bic     R0,R0,#0x40             ;Enable IRQ interrupts
+       msr     CPSR_c,R0
+       bx      LR
+
+ArmDisableFiq
+       mrs     R0,CPSR
+       orr     R1,R0,#0x40             ;Disable IRQ interrupts
+       msr     CPSR_c,R1
+  tst     R0,#0x40
+  moveq   R0,#1
+  movne   R0,#0
+       bx      LR
+
+ArmGetFiqState
+       mrs     R0,CPSR
+       tst     R0,#0x40            ;Check if IRQ is enabled.
+       moveq   R0,#1
+       movne   R0,#0
+       bx      LR
   
 ArmInvalidateTlb
   mov     r0,#0
@@ -66,7 +91,7 @@ ArmSetTranslationTableBaseAddress
   mcr     p15,0,r0,c2,c0,0
   bx      lr
 
-ArmSetTranslationTableBaseAddress
+ArmGetTranslationTableBaseAddress
   mrc     p15,0,r0,c2,c0,0
   bx      lr