git: 516df1558204 - main - Implement suword16() for the 32-bit ARMv6/v7 architecture.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 19 Dec 2021 11:23:20 UTC
The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=516df155820471dd333a9cbc35bca3680d7b0051 commit 516df155820471dd333a9cbc35bca3680d7b0051 Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2021-12-19 11:12:58 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2021-12-19 11:21:21 +0000 Implement suword16() for the 32-bit ARMv6/v7 architecture. This fixes compilation of usb(4) after 0ec590d24e415dd36e38648630a0b963412ad87e . MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/arm/arm/fusu.S | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/sys/arm/arm/fusu.S b/sys/arm/arm/fusu.S index 1a77377cb148..300ccb5f020f 100644 --- a/sys/arm/arm/fusu.S +++ b/sys/arm/arm/fusu.S @@ -212,6 +212,35 @@ fusupcbfaulttext: .align 2 #endif +/* + * suword16(caddr_t uaddr, int x); + * Store an uint16_t in the user's address space. + */ + +ENTRY(suword16) + ldr r3, =(VM_MAXUSER_ADDRESS-3) + cmp r0, r3 + mvncs r0, #0 + RETc(cs) + + GET_PCB(r2) + ldr r2, [r2] + +#ifdef DIAGNOSTIC + teq r2, #0x00000000 + beq .Lfusupcbfault +#endif + + adr r3, .Lfusufault + str r3, [r2, #PCB_ONFAULT] + + strht r1, [r0] + + mov r0, #0x00000000 + str r0, [r2, #PCB_ONFAULT] + RET +END(suword16) + /* * suword(caddr_t uaddr, int x); * Store an int in the user's address space.