Skip to content
This repository was archived by the owner on Nov 7, 2022. It is now read-only.

Commit a1ae003

Browse files
authored
Add all memory barrier variants (#50)
The Arm A-profile A64 Instruction Set Architecture[0] specifies many memory barrier variants. In the 2022-09 version of the document, they are in pages 348 and 351 for the DMB and DSB respectively. The cortex-a crate only supports SY, ISH and ISHST currently. Add the rest. [0] https://developer.arm.com/documentation/ddi0602/
1 parent ecdb489 commit a1ae003

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/asm/barrier.rs

+19-1
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,30 @@ macro_rules! dmb_dsb {
5555
}
5656

5757
pub struct SY;
58+
pub struct ST;
59+
pub struct LD;
5860
pub struct ISH;
5961
pub struct ISHST;
62+
pub struct ISHLD;
63+
pub struct NSH;
64+
pub struct NSHST;
65+
pub struct NSHLD;
66+
pub struct OSH;
67+
pub struct OSHST;
68+
pub struct OSHLD;
6069

70+
dmb_dsb!(SY);
71+
dmb_dsb!(ST);
72+
dmb_dsb!(LD);
6173
dmb_dsb!(ISH);
6274
dmb_dsb!(ISHST);
63-
dmb_dsb!(SY);
75+
dmb_dsb!(ISHLD);
76+
dmb_dsb!(NSH);
77+
dmb_dsb!(NSHST);
78+
dmb_dsb!(NSHLD);
79+
dmb_dsb!(OSH);
80+
dmb_dsb!(OSHST);
81+
dmb_dsb!(OSHLD);
6482

6583
impl sealed::Isb for SY {
6684
#[inline(always)]

0 commit comments

Comments
 (0)