2008-02-07 20:04:31 +00:00
|
|
|
#ifndef _INTRIN_INTERNAL_
|
|
|
|
#define _INTRIN_INTERNAL_
|
|
|
|
|
2008-02-12 04:15:53 +00:00
|
|
|
FORCEINLINE
|
|
|
|
VOID
|
|
|
|
KeArmHaltProcessor(void)
|
2008-02-07 20:04:31 +00:00
|
|
|
{
|
|
|
|
//
|
|
|
|
// Enter Wait-For-Interrupt Mode
|
|
|
|
//
|
2008-02-12 04:15:53 +00:00
|
|
|
__asm__ __volatile__ ("mcr p15, 0, %0, c7, c0, 4" : : "r"(0) : "cc");
|
2008-02-07 20:04:31 +00:00
|
|
|
}
|
|
|
|
|
2008-02-12 04:15:53 +00:00
|
|
|
FORCEINLINE
|
|
|
|
ARM_CONTROL_REGISTER
|
|
|
|
KeArmControlRegisterGet(VOID)
|
|
|
|
{
|
|
|
|
ARM_CONTROL_REGISTER Value;
|
|
|
|
__asm__ __volatile__ ("mrc p15, 0, %0, c1, c0, 0" : "=r"(Value.AsUlong) : : "cc");
|
|
|
|
return Value;
|
|
|
|
}
|
2008-02-07 20:04:31 +00:00
|
|
|
|
2008-02-12 04:15:53 +00:00
|
|
|
FORCEINLINE
|
|
|
|
VOID
|
|
|
|
KeArmControlRegisterSet(IN ARM_CONTROL_REGISTER ControlRegister)
|
|
|
|
{
|
|
|
|
__asm__ __volatile__ ("mcr p15, 0, %0, c1, c0, 0" : : "r"(ControlRegister.AsUlong) : "cc");
|
|
|
|
}
|
|
|
|
|
|
|
|
FORCEINLINE
|
|
|
|
VOID
|
|
|
|
KeArmTranslationTableRegisterSet(IN ARM_TTB_REGISTER Ttb)
|
|
|
|
{
|
|
|
|
__asm__ __volatile__ ("mcr p15, 0, %0, c2, c0, 0" : : "r"(Ttb.AsUlong) : "cc");
|
|
|
|
}
|
|
|
|
|
|
|
|
FORCEINLINE
|
|
|
|
VOID
|
|
|
|
KeArmDomainRegisterSet(IN ARM_DOMAIN_REGISTER DomainRegister)
|
|
|
|
{
|
|
|
|
__asm__ __volatile__ ("mcr p15, 0, %0, c3, c0, 0" : : "r"(DomainRegister.AsUlong) : "cc");
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|