diff options
author | Chris Kay <chris.kay@arm.com> | 2020-05-29 15:15:52 +0100 |
---|---|---|
committer | Chris Kay <chris@cjkay.com> | 2020-06-05 19:16:35 +0100 |
commit | 3e70c804525eb812558becca04581df3d2968cc3 (patch) | |
tree | ed78b7acbd6cf4f1cd81e212df04dd7423ea49ce /arch | |
parent | 7a025658d8318e95dbab4259a8ff7834ae6d8061 (diff) |
arch: Use generic `arch_` prefix
Symbols originating from the architecture layer are now encouraged to
use the unified `arch_` prefix to indicate their origin when context is
not provided (such as when listing symbols exposed by a firmware image).
Change-Id: I3ff23cb95ef225a3422b8daadeb671a7d0642d3e
Signed-off-by: Chris Kay <chris.kay@arm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/src/arm_main.c | 12 | ||||
-rw-r--r-- | arch/src/arm_mm.c | 2 | ||||
-rw-r--r-- | arch/src/arm_nvic.c | 36 | ||||
-rw-r--r-- | arch/src/armv7-m/exceptions.c | 30 | ||||
-rw-r--r-- | arch/src/armv7-m/exceptions.h | 4 | ||||
-rw-r--r-- | arch/src/armv7-m/handlers.c | 4 | ||||
-rw-r--r-- | arch/src/armv7-m/ld.S | 2 | ||||
-rw-r--r-- | arch/src/host.c | 4 | ||||
-rw-r--r-- | arch/src/host_interrupt.c | 2 |
9 files changed, 48 insertions, 48 deletions
diff --git a/arch/src/arm_main.c b/arch/src/arm_main.c index 92b84c36..69cbf4b7 100644 --- a/arch/src/arm_main.c +++ b/arch/src/arm_main.c @@ -20,8 +20,8 @@ #define SCB_CCR_DIV_0_TRP_MASK (1U << 4) #define SCB_CCR_STKALIGN_MASK (1U << 9) -extern int arm_nvic_init(struct fwk_arch_interrupt_driver **driver); -extern int arm_mm_init(struct fwk_arch_mm_data *data); +extern int arch_nvic_init(struct fwk_arch_interrupt_driver **driver); +extern int arch_mm_init(struct fwk_arch_mm_data *data); #if defined(__ARMCC_VERSION) /* @@ -57,11 +57,11 @@ void _exit(int status) #endif static struct fwk_arch_init_driver arch_init_driver = { - .mm = arm_mm_init, - .interrupt = arm_nvic_init, + .mm = arch_mm_init, + .interrupt = arch_nvic_init, }; -static void arm_init_ccr(void) +static void arch_init_ccr(void) { /* * Set up the Configuration Control Register (CCR) in the System Control @@ -83,7 +83,7 @@ static void arm_init_ccr(void) int main(void) { - arm_init_ccr(); + arch_init_ccr(); return fwk_arch_init(&arch_init_driver); } diff --git a/arch/src/arm_mm.c b/arch/src/arm_mm.c index f1058bd9..9abb58bf 100644 --- a/arch/src/arm_mm.c +++ b/arch/src/arm_mm.c @@ -15,7 +15,7 @@ #include <stddef.h> #include <stdint.h> -int arm_mm_init(struct fwk_arch_mm_data *data) +int arch_mm_init(struct fwk_arch_mm_data *data) { fwk_assert(data != NULL); diff --git a/arch/src/arm_nvic.c b/arch/src/arm_nvic.c index 0012da10..1bd8b14a 100644 --- a/arch/src/arm_nvic.c +++ b/arch/src/arm_nvic.c @@ -25,7 +25,7 @@ # include <rtx_os.h> #endif -extern noreturn void arm_exception_invalid(void); +extern noreturn void arch_exception_invalid(void); #define SCB_SHCSR ((FWK_RW uint32_t *)(0xE000ED24UL)) #define SCB_VTOR ((FWK_RW uint32_t *)(0xE000ED08UL)) @@ -241,21 +241,21 @@ static int get_current(unsigned int *interrupt) return FWK_SUCCESS; } -static const struct fwk_arch_interrupt_driver arm_nvic_driver = { - .global_enable = global_enable, - .global_disable = global_disable, - .is_enabled = is_enabled, - .enable = enable, - .disable = disable, - .is_pending = is_pending, - .set_pending = set_pending, - .clear_pending = clear_pending, - .set_isr_irq = set_isr_irq, +static const struct fwk_arch_interrupt_driver arch_nvic_driver = { + .global_enable = global_enable, + .global_disable = global_disable, + .is_enabled = is_enabled, + .enable = enable, + .disable = disable, + .is_pending = is_pending, + .set_pending = set_pending, + .clear_pending = clear_pending, + .set_isr_irq = set_isr_irq, .set_isr_irq_param = set_isr_irq_param, - .set_isr_nmi = set_isr_nmi, + .set_isr_nmi = set_isr_nmi, .set_isr_nmi_param = set_isr_nmi_param, - .set_isr_fault = set_isr_fault, - .get_current = get_current, + .set_isr_fault = set_isr_fault, + .get_current = get_current, }; static void irq_invalid(void) @@ -263,7 +263,7 @@ static void irq_invalid(void) disable(__get_IPSR()); } -int arm_nvic_init(const struct fwk_arch_interrupt_driver **driver) +int arch_nvic_init(const struct fwk_arch_interrupt_driver **driver) { uint32_t ictr_intlinesnum; uint32_t align_entries; @@ -302,14 +302,14 @@ int arm_nvic_init(const struct fwk_arch_interrupt_driver **driver) vector = fwk_mm_alloc_aligned(isr_count, sizeof(vector[0]), align_word); /* - * Initialize all exception entries to point to the arm_exception_invalid() + * Initialize all exception entries to point to the arch_exception_invalid() * handler. * * Note: Initialization starts from entry 1 since entry 0 is not an * exception pointer but the default stack pointer. */ for (i = 1; i < EXCEPTION_NUM_COUNT; i++) - vector[i] = arm_exception_invalid; + vector[i] = arch_exception_invalid; /* Initialize IRQs */ for (i = 0; i < irq_count; i++) { @@ -339,7 +339,7 @@ int arm_nvic_init(const struct fwk_arch_interrupt_driver **driver) SCB_SHCSR_BUSFAULTENA_MASK | SCB_SHCSR_USGFAULTENA_MASK; - *driver = &arm_nvic_driver; + *driver = &arch_nvic_driver; return FWK_SUCCESS; } diff --git a/arch/src/armv7-m/exceptions.c b/arch/src/armv7-m/exceptions.c index 64ee723c..8994a581 100644 --- a/arch/src/armv7-m/exceptions.c +++ b/arch/src/armv7-m/exceptions.c @@ -54,11 +54,11 @@ enum { #ifdef __ARMCC_VERSION extern char Image$$ARM_LIB_STACKHEAP$$ZI$$Limit; -# define arm_exception_stack (&Image$$ARM_LIB_STACKHEAP$$ZI$$Limit) +# define arch_exception_stack (&Image$$ARM_LIB_STACKHEAP$$ZI$$Limit) #else extern char __stackheap_end__; -# define arm_exception_stack (&__stackheap_end__) +# define arch_exception_stack (&__stackheap_end__) #endif /* @@ -70,18 +70,18 @@ extern char __stackheap_end__; const struct { uintptr_t stack; uintptr_t exceptions[15]; -} arm_exceptions __attribute__((section(".exceptions"))) = { - .stack = (uintptr_t)(arm_exception_stack), +} arch_exceptions __attribute__((section(".exceptions"))) = { + .stack = (uintptr_t)(arch_exception_stack), .exceptions = { - [EXCEPTION_RESET] = (uintptr_t)(arm_exception_reset), - [EXCEPTION_NMI] = (uintptr_t)(arm_exception_invalid), - [EXCEPTION_HARDFAULT] = (uintptr_t)(arm_exception_invalid), - [EXCEPTION_MEMMANAGE] = (uintptr_t)(arm_exception_invalid), - [EXCEPTION_BUSFAULT] = (uintptr_t)(arm_exception_invalid), - [EXCEPTION_USAGEFAULT] = (uintptr_t)(arm_exception_invalid), - [EXCEPTION_SVCALL] = (uintptr_t)(arm_exception_invalid), - [EXCEPTION_DEBUGMONITOR] = (uintptr_t)(arm_exception_invalid), - [EXCEPTION_PENDSV] = (uintptr_t)(arm_exception_invalid), - [EXCEPTION_SYSTICK] = (uintptr_t)(arm_exception_invalid), - } + [EXCEPTION_RESET] = (uintptr_t)(arch_exception_reset), + [EXCEPTION_NMI] = (uintptr_t)(arch_exception_invalid), + [EXCEPTION_HARDFAULT] = (uintptr_t)(arch_exception_invalid), + [EXCEPTION_MEMMANAGE] = (uintptr_t)(arch_exception_invalid), + [EXCEPTION_BUSFAULT] = (uintptr_t)(arch_exception_invalid), + [EXCEPTION_USAGEFAULT] = (uintptr_t)(arch_exception_invalid), + [EXCEPTION_SVCALL] = (uintptr_t)(arch_exception_invalid), + [EXCEPTION_DEBUGMONITOR] = (uintptr_t)(arch_exception_invalid), + [EXCEPTION_PENDSV] = (uintptr_t)(arch_exception_invalid), + [EXCEPTION_SYSTICK] = (uintptr_t)(arch_exception_invalid), + }, }; diff --git a/arch/src/armv7-m/exceptions.h b/arch/src/armv7-m/exceptions.h index 0d1bce59..f3e95555 100644 --- a/arch/src/armv7-m/exceptions.h +++ b/arch/src/armv7-m/exceptions.h @@ -12,7 +12,7 @@ * * \details This is the first function that executes when the core comes online. */ -noreturn void arm_exception_reset(void); +noreturn void arch_exception_reset(void); /*! * \brief Invalid exception handler. @@ -20,4 +20,4 @@ noreturn void arm_exception_reset(void); * \details This handler is used as the default in order to catch exceptions * that have not been configured with a handler of their own. */ -noreturn void arm_exception_invalid(void); +noreturn void arch_exception_invalid(void); diff --git a/arch/src/armv7-m/handlers.c b/arch/src/armv7-m/handlers.c index 19f22dce..5999d1b1 100644 --- a/arch/src/armv7-m/handlers.c +++ b/arch/src/armv7-m/handlers.c @@ -14,7 +14,7 @@ #include <stdbool.h> -noreturn void arm_exception_reset(void) +noreturn void arch_exception_reset(void) { /* * When entering the firmware, before the framework is entered the following @@ -40,7 +40,7 @@ noreturn void arm_exception_reset(void) #endif } -noreturn __attribute__((weak)) void arm_exception_invalid(void) +noreturn __attribute__((weak)) void arch_exception_invalid(void) { while (true) __WFI(); diff --git a/arch/src/armv7-m/ld.S b/arch/src/armv7-m/ld.S index 506c3d42..e74115e7 100644 --- a/arch/src/armv7-m/ld.S +++ b/arch/src/armv7-m/ld.S @@ -10,7 +10,7 @@ #include "scatter.h" -ENTRY(arm_exception_reset) +ENTRY(arch_exception_reset) MEMORY { #if FIRMWARE_MEM_MODE == FWK_MEM_MODE_SINGLE_REGION diff --git a/arch/src/host.c b/arch/src/host.c index f30b0087..81613223 100644 --- a/arch/src/host.c +++ b/arch/src/host.c @@ -12,7 +12,7 @@ #include <stdio.h> #include <stdlib.h> -extern int host_interrupt_init(struct fwk_arch_interrupt_driver **driver); +extern int arch_interrupt_init(struct fwk_arch_interrupt_driver **driver); /* * Catches early failures in the initialization. @@ -40,7 +40,7 @@ static int mm_init(struct fwk_arch_mm_data *data) static const struct fwk_arch_init_driver arch_init_driver = { .mm = mm_init, - .interrupt = host_interrupt_init, + .interrupt = arch_interrupt_init, }; int main(void) diff --git a/arch/src/host_interrupt.c b/arch/src/host_interrupt.c index 26bc7360..3a517f49 100644 --- a/arch/src/host_interrupt.c +++ b/arch/src/host_interrupt.c @@ -104,7 +104,7 @@ static const struct fwk_arch_interrupt_driver driver = { .get_current = get_current, }; -int host_interrupt_init(const struct fwk_arch_interrupt_driver **_driver) +int arch_interrupt_init(const struct fwk_arch_interrupt_driver **_driver) { if (_driver == NULL) return FWK_E_PARAM; |