#------------------------------------------------------------------------------
#
-# 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)
+
#------------------------------------------------------------------------------
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