25#if defined (RT_USING_CACHE) || defined(RT_USING_SMP) || defined(RT_HW_INCLUDE_CPUPORT)
37#define HWREG64(x) (*((volatile rt_uint64_t *)(x)))
40#define HWREG32(x) (*((volatile rt_uint32_t *)(x)))
43#define HWREG16(x) (*((volatile rt_uint16_t *)(x)))
46#define HWREG8(x) (*((volatile rt_uint8_t *)(x)))
49#ifndef RT_CPU_CACHE_LINE_SZ
50#define RT_CPU_CACHE_LINE_SZ 32
80#define rt_hw_cpu_icache_enable(...)
81#define rt_hw_cpu_icache_disable(...)
82#define rt_hw_cpu_icache_ops(...)
83#define rt_hw_cpu_dcache_enable(...)
84#define rt_hw_cpu_dcache_disable(...)
85#define rt_hw_cpu_dcache_ops(...)
87#define rt_hw_cpu_icache_status(...) 0
88#define rt_hw_cpu_dcache_status(...) 0
102#ifdef RT_USING_HW_STACK_GUARD
116#ifdef RT_USING_INTERRUPT_INFO
117 char name[RT_NAME_MAX];
146#define rt_hw_interrupt_disable rt_cpus_lock
147#define rt_hw_interrupt_enable rt_cpus_unlock
152#define rt_hw_local_irq_disable rt_hw_interrupt_disable
153#define rt_hw_local_irq_enable rt_hw_interrupt_enable
199#if defined(RT_USING_SMP) || defined(RT_USING_AMP)
203void rt_hw_ipi_send(
int ipi_vector,
unsigned int cpu_mask);
208void rt_hw_spin_lock_init(rt_hw_spinlock_t *lock);
214#define __RT_HW_SPIN_LOCK_INITIALIZER(lockname) {0}
216#define __RT_HW_SPIN_LOCK_UNLOCKED(lockname) \
217 (rt_hw_spinlock_t) __RT_HW_SPIN_LOCK_INITIALIZER(lockname)
219#define RT_DEFINE_HW_SPINLOCK(x) rt_hw_spinlock_t x = __RT_HW_SPIN_LOCK_UNLOCKED(x)
224void rt_hw_secondary_cpu_up(
void);
229void rt_hw_secondary_cpu_idle_exec(
void);
233#define RT_DEFINE_HW_SPINLOCK(x) rt_ubase_t x
235#define rt_hw_spin_lock(lock) *(lock) = rt_hw_interrupt_disable()
236#define rt_hw_spin_unlock(lock) rt_hw_interrupt_enable(*(lock))
241#ifndef RT_USING_CACHE
rt_base_t rt_cpus_lock(void)
This function will lock all cpus's scheduler and disable local irq.
void rt_cpus_unlock(rt_base_t level)
This function will restore all cpus's scheduler and restore local irq.
rt_hw_spinlock_t _cpus_lock
rt_bool_t rt_hw_interrupt_is_disabled(void)
void rt_hw_cpu_shutdown(void)
rt_err_t rt_hw_backtrace_frame_unwind(rt_thread_t thread, struct rt_hw_backtrace_frame *frame)
Unwind the target frame
const char * rt_hw_cpu_arch(void)
rt_err_t rt_hw_backtrace_frame_get(rt_thread_t thread, struct rt_hw_backtrace_frame *frame)
Get the inner most frame of target thread
void rt_hw_us_delay(rt_uint32_t us)
void rt_hw_cpu_reset(void)
struct rt_thread * rt_thread_t
#define rt_hw_cpu_dcache_status(...)
void rt_hw_exception_install(rt_err_t(*exception_handle)(void *context))
#define rt_hw_cpu_icache_enable(...)
#define rt_hw_spin_lock(lock)
void rt_hw_console_output(const char *str)
void rt_hw_context_switch_to(rt_ubase_t to)
#define rt_hw_cpu_icache_status(...)
#define rt_hw_cpu_dcache_ops(...)
void rt_hw_interrupt_enable(rt_base_t level)
rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler, void *param, const char *name)
#define rt_hw_cpu_icache_disable(...)
void rt_hw_interrupt_uninstall(int vector, rt_isr_handler_t handler, void *param)
#define rt_hw_spin_unlock(lock)
void(* rt_isr_handler_t)(int vector, void *param)
void rt_hw_context_switch_interrupt(rt_ubase_t from, rt_ubase_t to, rt_thread_t from_thread, rt_thread_t to_thread)
void rt_hw_interrupt_mask(int vector)
void rt_hw_show_memory(rt_uint32_t addr, rt_size_t size)
#define rt_hw_cpu_dcache_disable(...)
#define rt_hw_local_irq_disable
rt_uint8_t * rt_hw_stack_init(void *entry, void *parameter, rt_uint8_t *stack_addr, void *exit)
rt_base_t rt_hw_interrupt_disable(void)
void rt_hw_context_switch(rt_ubase_t from, rt_ubase_t to)
#define rt_hw_cpu_icache_ops(...)
void rt_hw_interrupt_init(void)
#define rt_hw_local_irq_enable
#define rt_hw_cpu_dcache_enable(...)
void rt_hw_interrupt_umask(int vector)