18#ifndef ZEPHYR_INCLUDE_ARCH_TRICORE_ARCH_H_
19#define ZEPHYR_INCLUDE_ARCH_TRICORE_ARCH_H_
32#define ARCH_STACK_PTR_ALIGN 8
46 unsigned int key = cr_read(TRICORE_ICR);
48 __asm__
volatile(
"disable" :::
"memory");
56 __asm__
volatile(
"enable" :::
"memory");
62 return !!(key &
BIT(15));
67 return !!(cr_read(TRICORE_ICR) &
BIT(15));
84static ALWAYS_INLINE
void arch_nop(
void)
86 __asm__
volatile(
"nop");
TriCore specific IRQ macros and helpers.
TriCore specific thread definitions.
TriCore Core Special Function Register (CSFR) addresses.
static bool arch_irq_unlocked(unsigned int key)
Test if calling arch_irq_unlock() with this key would unlock irqs.
static unsigned int arch_irq_lock(void)
Lock interrupts on the current CPU.
static void arch_irq_unlock(unsigned int key)
Unlock interrupts on the current CPU.
static bool arch_cpu_irqs_are_enabled(void)
Probe the current CPU overall interrupt controller lock state without modifying it.
static void arch_nop(void)
Do nothing and return.
static uint32_t arch_k_cycle_get_32(void)
Obtain the current cycle count, in units specified by CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC.
static uint64_t arch_k_cycle_get_64(void)
As for arch_k_cycle_get_32(), but with a 64 bit return value.
uint64_t sys_clock_cycle_get_64(void)
64 bit hardware cycle counter
uint32_t sys_clock_cycle_get_32(void)
Hardware cycle counter.
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44
TriCore public error handling.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
TriCore public exception handling.