     PRESERVE8 
























































    EXPORT    PCUWriteEnterCriticalRegion
    EXPORT    PCUWriteLeaveCriticalRegion


        AREA Startup_bss, DATA, READWRITE, NOINIT
shadowDomainPermission
              DCD   0



    AREA SysInterlocked, CODE, READONLY

    CODE32



PCUWriteEnterCriticalRegion
     STMFD    sp!,{r4,lr}


     MRS     r0, CPSR
     ORR     r1, r0, #0x80:OR:0x40
     MSR     CPSR_c, r1


     MOV       r3,#3
     MOV       r4,r3,LSL #(3*2)
     MRC       p15,0x0,r3,c3,c0,0
     LDR       r2,=shadowDomainPermission
     STR        r3,[r2]
     ORR       r3,r3,r4
     MCR       p15,0x0,r3,c3,c0,0



    LDMFD    sp!,{r4,lr}
    BX LR



PCUWriteLeaveCriticalRegion
    STMFD    sp!,{r4,lr}


     LDR       r3,=shadowDomainPermission
     LDR        r3,[r3]
     MCR       p15,0x0,r3,c3,c0,0


     MSR     CPSR_c, r0
     LDMFD    sp!,{r4,lr}
     BX          LR



    : END OF FILE 
    END

