mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-18 22:15:46 +01:00
Define a WFI macro that expands to the right form of wait-for-interrupt
depending on the architecture.
This commit is contained in:
parent
bd96d0895e
commit
54f9ec883d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276519
@ -461,7 +461,7 @@ ENTRY_NP(cpu_halt)
|
||||
teq r4, #0
|
||||
movne pc, r4
|
||||
1:
|
||||
wfi
|
||||
WFI
|
||||
b 1b
|
||||
|
||||
/*
|
||||
|
@ -227,14 +227,17 @@
|
||||
#define ISB isb
|
||||
#define DSB dsb
|
||||
#define DMB dmb
|
||||
#define WFI wfi
|
||||
#elif __ARM_ARCH == 6
|
||||
#define ISB mcr CP15_CP15ISB
|
||||
#define DSB mcr CP15_CP15DSB
|
||||
#define DMB mcr CP15_CP15DMB
|
||||
#define WFI mcr CP15_CP15WFI
|
||||
#else
|
||||
#define ISB mcr CP15_CP15ISB
|
||||
#define DSB mcr CP15_CP15DSB /* DSB and DMB are the */
|
||||
#define DMB mcr CP15_CP15DSB /* same prior to v6.*/
|
||||
/* No form of WFI available on v4, define nothing to get an error on use. */
|
||||
#endif
|
||||
|
||||
#endif /* !_MACHINE_ASM_H_ */
|
||||
|
@ -166,6 +166,7 @@
|
||||
/* Only ARMv6: */
|
||||
#define CP15_CP15DSB p15, 0, r0, c7, c10, 4 /* DSB */
|
||||
#define CP15_CP15DMB p15, 0, r0, c7, c10, 5 /* DMB */
|
||||
#define CP15_CP15WFI p15, 0, r0, c7, c0, 4 /* WFI */
|
||||
#endif
|
||||
|
||||
#if __ARM_ARCH >= 7
|
||||
|
Loading…
Reference in New Issue
Block a user