WS63 SDK 文档
7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
arch_barrier.h
浏览该文件的文档.
1
/*
2
* Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2021-2023. All rights reserved.
3
* Description: BARRIER
4
*
5
* Create: 2021-07-01
6
*/
7
8
#ifndef ARCH_BARRIER_H
9
#define ARCH_BARRIER_H
10
11
#ifdef __cplusplus
12
#if __cplusplus
13
extern
"C"
{
14
#endif
/* __cplusplus */
15
#endif
/* __cplusplus */
16
17
#ifdef dsb
18
#undef dsb
19
#endif
20
#define dsb() __asm__ __volatile__("fence":::"memory")
21
22
#ifdef isb
23
#undef isb
24
#endif
25
#define isb() __asm__ __volatile__("fence":::"memory")
26
27
#ifdef nop
28
#undef nop
29
#endif
30
#define nop() __asm__ __volatile__("nop");
31
32
#ifdef wfi
33
#undef wfi
34
#endif
35
#define wfi() __asm__ __volatile__("wfi")
36
37
#define get_int_status() !(read_csr(mstatus) & MSTATUS_MIE)
38
#define int_enter_lock() clear_csr(mstatus, MSTATUS_MIE)
39
#define int_exit_lock() set_csr(mstatus, MSTATUS_MIE)
40
41
#define int_disable_fault_exception()
42
#define int_enable_fault_exception()
43
44
#define get_temp_lr(temp_lr) __asm volatile("mv %0, x1" : "=r"(temp_lr))
45
#define get_temp_pc(temp_pc) __asm volatile("csrr %0, mepc" : "=r"(temp_pc))
46
#define get_temp_sp(temp_sp) __asm volatile("mv %0, sp" : "=r"(temp_sp))
47
48
#ifdef __cplusplus
49
#if __cplusplus
50
}
51
#endif
/* __cplusplus */
52
#endif
/* __cplusplus */
53
54
#endif
// BARRIER_H
src
drivers
chips
ws63
arch
riscv
riscv_common
arch_barrier.h
由
William Goodspeed
维护 | E-mail: gongzl@stu.hebust.edu.cn | Wechat: a23333344 | ALSO CHECKOUT
WS63FLASH
!
生成于 2025年 一月 4日 星期六 17:47:12 , 为 WS63 SDK 文档使用
1.9.8