diff options
author | cognet <cognet@FreeBSD.org> | 2004-11-05 19:50:48 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2004-11-05 19:50:48 +0000 |
commit | bb1d95fb3901bffda122204d0ca2d62b93f47359 (patch) | |
tree | ff84da9e9f0bda239726dcebc901b66e3ee22d98 /sys/arm | |
parent | ae291dcae985e7cfb31dafb89fe7ea89a0d51bb9 (diff) | |
download | FreeBSD-src-bb1d95fb3901bffda122204d0ca2d62b93f47359.zip FreeBSD-src-bb1d95fb3901bffda122204d0ca2d62b93f47359.tar.gz |
Implement casuptr.
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/fusu.S | 53 | ||||
-rw-r--r-- | sys/arm/arm/support.S | 4 |
2 files changed, 51 insertions, 6 deletions
diff --git a/sys/arm/arm/fusu.S b/sys/arm/arm/fusu.S index f49ecea..b7ad506 100644 --- a/sys/arm/arm/fusu.S +++ b/sys/arm/arm/fusu.S @@ -52,6 +52,56 @@ __FBSDID("$FreeBSD$"); * Fetch an int from the user's address space. */ +ENTRY(casuptr) +#ifdef MULTIPROCESSOR + /* XXX Probably not appropriate for non-Hydra SMPs */ + stmfd sp!, {r0, r14} + bl _C_LABEL(cpu_number) + ldr r2, .Lcpu_info + ldr r2, [r2, r0, lsl #2] + ldr r2, [r2, #CI_CURPCB] + ldmfd sp!, {r0, r14} +#else + ldr r3, .Lcurpcb + ldr r3, [r3] +#endif + +#ifdef DIAGNOSTIC + teq r3, #0x00000000 + beq .Lfusupcbfault +#endif + stmfd sp!, {r4} + adr r4, .Lfusufault + str r4, [r3, #PCB_ONFAULT] + ldmfd sp!, {r4} + ldrt r3, [r0] + cmp r3, r1 + movne r0, r3 + movne pc, lr + strt r2, [r0] + mov r0, r1 +#ifdef MULTIPROCESSOR + /* XXX Probably not appropriate for non-Hydra SMPs */ + stmfd sp!, {r0, r14} + bl _C_LABEL(cpu_number) + ldr r2, .Lcpu_info + ldr r2, [r2, r0, lsl #2] + ldr r2, [r2, #CI_CURPCB] + ldmfd sp!, {r0, r14} +#else + ldr r3, .Lcurpcb + ldr r3, [r3] +#endif + mov r1, #0x00000000 + str r1, [r3, #PCB_ONFAULT] + mov pc, lr + + +/* + * fuword(caddr_t uaddr); + * Fetch an int from the user's address space. + */ + ENTRY(fuword32) ENTRY(fuword) #ifdef MULTIPROCESSOR @@ -254,6 +304,7 @@ fusupcbfaulttext: * Store an int in the user's address space. */ +ENTRY(suword32) ENTRY(suword) #ifdef MULTIPROCESSOR /* XXX Probably not appropriate for non-Hydra SMPs */ @@ -282,8 +333,6 @@ ENTRY(suword) str r0, [r2, #PCB_ONFAULT] mov pc, lr -ENTRY(suword32) - adr pc, _C_LABEL(suword) /* * suswintr(caddr_t uaddr, short x); * Store a short in the user's address space. Can be called during an diff --git a/sys/arm/arm/support.S b/sys/arm/arm/support.S index c2eca41..5a8c738 100644 --- a/sys/arm/arm/support.S +++ b/sys/arm/arm/support.S @@ -30,10 +30,6 @@ __FBSDID("$FreeBSD$"); #include "assym.s" -ENTRY(casuptr) - mov r1, r2 - bl suword - /* * memset: Sets a block of memory to the specified value * |