mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
arch: arm: armv7-a: fix nxstyle errors
Fix nxstyle errors to pass CI Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
committed by
Xiang Xiao
parent
1d1da330da
commit
3ea545e7f3
@@ -48,6 +48,7 @@
|
||||
# define PSR_MODE_HYP (26 << PSR_MODE_SHIFT) /* Hyp mode */
|
||||
# define PSR_MODE_UND (27 << PSR_MODE_SHIFT) /* Undefined mode */
|
||||
# define PSR_MODE_SYS (31 << PSR_MODE_SHIFT) /* System mode */
|
||||
|
||||
#define PSR_T_BIT (1 << 5) /* Bit 5: Thumb execution state bit */
|
||||
#define PSR_MASK_SHIFT (6) /* Bits 6-8: Mask Bits */
|
||||
#define PSR_MASK_MASK (7 << PSR_GE_SHIFT)
|
||||
|
||||
@@ -157,7 +157,9 @@ static int up_addrenv_initdata(uintptr_t l2table)
|
||||
flags = enter_critical_section();
|
||||
|
||||
#ifdef CONFIG_ARCH_PGPOOL_MAPPING
|
||||
/* Get the virtual address corresponding to the physical page table address */
|
||||
/* Get the virtual address corresponding to the physical page table
|
||||
* address
|
||||
*/
|
||||
|
||||
virtptr = (FAR uint32_t *)arm_pgvaddr(l2table);
|
||||
#else
|
||||
|
||||
@@ -204,7 +204,9 @@ void arm_addrenv_destroy_region(FAR uintptr_t **list, unsigned int listlen,
|
||||
flags = enter_critical_section();
|
||||
|
||||
#ifdef CONFIG_ARCH_PGPOOL_MAPPING
|
||||
/* Get the virtual address corresponding to the physical page address */
|
||||
/* Get the virtual address corresponding to the physical page
|
||||
* address
|
||||
*/
|
||||
|
||||
l2table = (FAR uint32_t *)arm_pgvaddr(paddr);
|
||||
#else
|
||||
|
||||
@@ -72,11 +72,11 @@ typedef uint32_t L1ndx_t;
|
||||
static pgndx_t g_pgndx;
|
||||
|
||||
/* After CONFIG_PAGING_NPAGED have been allocated, the pages will be re-used.
|
||||
* In order to re-used the page, we will have un-map the page from its previous
|
||||
* mapping. In order to that, we need to be able to map a physical address to
|
||||
* to an index into the PTE where it was mapped. The following table supports
|
||||
* this backward lookup - it is indexed by the page number index, and holds
|
||||
* another index to the mapped virtual page.
|
||||
* In order to re-used the page, we will have un-map the page from its
|
||||
* previous mapping. In order to that, we need to be able to map a physical
|
||||
* address to to an index into the PTE where it was mapped. The following
|
||||
* table supports this backward lookup - it is indexed by the page number
|
||||
* index, and holds another index to the mapped virtual page.
|
||||
*/
|
||||
|
||||
static L1ndx_t g_ptemap[CONFIG_PAGING_NPPAGED];
|
||||
@@ -111,11 +111,12 @@ static bool g_pgwrap;
|
||||
* NOTE 2: If an in-use page is un-mapped, it may be necessary to flush the
|
||||
* instruction cache in some architectures.
|
||||
*
|
||||
* NOTE 3: Allocating and filling a page is a two step process. arm_allocpage()
|
||||
* allocates the page, and up_fillpage() fills it with data from some non-
|
||||
* volatile storage device. This distinction is made because arm_allocpage()
|
||||
* can probably be implemented in board-independent logic whereas up_fillpage()
|
||||
* probably must be implemented as board-specific logic.
|
||||
* NOTE 3: Allocating and filling a page is a two step process.
|
||||
* arm_allocpage() allocates the page, and up_fillpage() fills it with data
|
||||
* from some non- volatile storage device. This distinction is made because
|
||||
* arm_allocpage() can probably be implemented in board-independent logic
|
||||
* whereas up_fillpage() probably must be implemented as board-specific
|
||||
* logic.
|
||||
*
|
||||
* NOTE 4: The initial mapping of vpage should be read-able and write-
|
||||
* able (but not cached). No special actions will be required of
|
||||
@@ -181,14 +182,16 @@ int arm_allocpage(FAR struct tcb_s *tcb, FAR void **vpage)
|
||||
pte = arm_va2pte(oldvaddr);
|
||||
*pte = 0;
|
||||
|
||||
/* Invalidate the instruction TLB corresponding to the virtual address */
|
||||
/* Invalidate the instruction TLB corresponding to the virtual
|
||||
* address
|
||||
*/
|
||||
|
||||
tlb_inst_invalidate_single(oldvaddr);
|
||||
|
||||
/* I do not believe that it is necessary to flush the I-Cache in this
|
||||
* case: The I-Cache uses a virtual address index and, hence, since the
|
||||
* NuttX address space is flat, the cached instruction value should be
|
||||
* correct even if the page mapping is no longer in place.
|
||||
* case: The I-Cache uses a virtual address index and, hence, since
|
||||
* the NuttX address space is flat, the cached instruction value should
|
||||
* be correct even if the page mapping is no longer in place.
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
* tcb - A reference to the task control block of the task that we believe
|
||||
* needs to have a page fill. Architecture-specific logic can
|
||||
* retrieve page fault information from the architecture-specific
|
||||
* context information in this TCB and can consult processor resources
|
||||
* (page tables or TLBs or ???) to determine if the fill still needs
|
||||
* to be performed or not.
|
||||
* context information in this TCB and can consult processor
|
||||
* resources (page tables or TLBs or ???) to determine if the fill
|
||||
* still needs to be performed or not.
|
||||
*
|
||||
* Returned Value:
|
||||
* This function will return true if the mapping is in place and false
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
|
||||
.file "arm_cpuhead.S"
|
||||
|
||||
/**********************************************************************************
|
||||
/****************************************************************************
|
||||
* Configuration
|
||||
**********************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* Hard-coded options */
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
int up_cpu_index(void)
|
||||
{
|
||||
/* Read the Multiprocessor Affinity Register (MPIDR) */
|
||||
/* Read the Multiprocessor Affinity Register (MPIDR) */
|
||||
|
||||
uint32_t mpidr = cp15_rdmpidr();
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
* additional input values are expected:
|
||||
*
|
||||
* dfar - Fault address register. On a data abort, the ARM MMU places the
|
||||
* miss virtual address (MVA) into the DFAR register. This is the address
|
||||
* of the data which, when accessed, caused the fault.
|
||||
* miss virtual address (MVA) into the DFAR register. This is the
|
||||
* address of the data which, when accessed, caused the fault.
|
||||
* dfsr - Fault status register. On a data a abort, the ARM MMU places an
|
||||
* encoded four-bit value, the fault status, along with the four-bit
|
||||
* encoded domain number, in the data DFSR
|
||||
@@ -69,8 +69,8 @@ uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr)
|
||||
struct tcb_s *tcb = this_task();
|
||||
uint32_t *savestate;
|
||||
|
||||
/* Save the saved processor context in CURRENT_REGS where it can be accessed
|
||||
* for register dumps and possibly context switching.
|
||||
/* Save the saved processor context in CURRENT_REGS where it can be
|
||||
* accessed for register dumps and possibly context switching.
|
||||
*/
|
||||
|
||||
savestate = (uint32_t *)CURRENT_REGS;
|
||||
@@ -147,8 +147,8 @@ segfault:
|
||||
|
||||
uint32_t *arm_dataabort(uint32_t *regs, uint32_t dfar, uint32_t dfsr)
|
||||
{
|
||||
/* Save the saved processor context in CURRENT_REGS where it can be accessed
|
||||
* for register dumps and possibly context switching.
|
||||
/* Save the saved processor context in CURRENT_REGS where it can be
|
||||
* accessed for register dumps and possibly context switching.
|
||||
*/
|
||||
|
||||
CURRENT_REGS = regs;
|
||||
|
||||
@@ -213,7 +213,7 @@ uint32_t *arm_doirq(int irq, uint32_t *regs)
|
||||
|
||||
/* Dispatch the interrupt to its attached handler */
|
||||
|
||||
regs = _arm_doirq(irq, regs);
|
||||
regs = _arm_doirq(irq, regs);
|
||||
|
||||
/* Then loop dispatching any pending SGI interrupts that occcurred during
|
||||
* processing of the interrupts.
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
.file "arm_head.S"
|
||||
|
||||
/**********************************************************************************
|
||||
/****************************************************************************
|
||||
* Configuration
|
||||
**********************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* Hard-coded options */
|
||||
|
||||
|
||||
@@ -39,9 +39,10 @@
|
||||
|
||||
.file "arm_pghead.S"
|
||||
|
||||
/**********************************************************************************
|
||||
/****************************************************************************
|
||||
* Configuration
|
||||
**********************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* Assume these are not needed */
|
||||
|
||||
#undef ALIGNMENT_TRAP
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
* initialization
|
||||
*
|
||||
* Assumptions:
|
||||
* - Called early in the platform initialization sequence so that no special
|
||||
* concurrency protection is required.
|
||||
* - Called early in the platform initialization sequence so that no
|
||||
* special concurrency protection is required.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
@@ -89,22 +89,25 @@ uintptr_t arm_physpgaddr(uintptr_t vaddr)
|
||||
/* Temporarily map the page into the virtual address space */
|
||||
|
||||
l1save = mmu_l1_getentry(ARCH_SCRATCH_VBASE);
|
||||
mmu_l1_setentry(paddr & ~SECTION_MASK, ARCH_SCRATCH_VBASE, MMU_MEMFLAGS);
|
||||
l2table = (FAR uint32_t *)(ARCH_SCRATCH_VBASE | (paddr & SECTION_MASK));
|
||||
mmu_l1_setentry(paddr & ~SECTION_MASK,
|
||||
ARCH_SCRATCH_VBASE, MMU_MEMFLAGS);
|
||||
l2table = (FAR uint32_t *)(ARCH_SCRATCH_VBASE |
|
||||
(paddr & SECTION_MASK));
|
||||
#endif
|
||||
if (l2table)
|
||||
{
|
||||
/* Invalidate D-Cache line containing this virtual address so that
|
||||
* we re-read from physical memory
|
||||
/* Invalidate D-Cache line containing this virtual address so
|
||||
* that we re-read from physical memory
|
||||
*/
|
||||
|
||||
index = (vaddr & SECTION_MASK) >> MM_PGSHIFT;
|
||||
up_invalidate_dcache((uintptr_t)&l2table[index],
|
||||
(uintptr_t)&l2table[index] + sizeof(uint32_t));
|
||||
(uintptr_t)&l2table[index] +
|
||||
sizeof(uint32_t));
|
||||
|
||||
/* Get the Level 2 page table entry corresponding to this virtual
|
||||
* address. Extract the physical address of the page containing
|
||||
* the mapping of the virtual address.
|
||||
/* Get the Level 2 page table entry corresponding to this
|
||||
* virtual address. Extract the physical address of the page
|
||||
* containing the mapping of the virtual address.
|
||||
*/
|
||||
|
||||
paddr = ((uintptr_t)l2table[index] & PTE_SMALL_PADDR_MASK);
|
||||
|
||||
@@ -53,19 +53,19 @@
|
||||
|
||||
uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr)
|
||||
{
|
||||
uint32_t *savestate;
|
||||
uint32_t *savestate;
|
||||
|
||||
/* Save the saved processor context in CURRENT_REGS where it can be accessed
|
||||
* for register dumps and possibly context switching.
|
||||
/* Save the saved processor context in CURRENT_REGS where it can be
|
||||
* accessed for register dumps and possibly context switching.
|
||||
*/
|
||||
|
||||
savestate = (uint32_t *)CURRENT_REGS;
|
||||
CURRENT_REGS = regs;
|
||||
|
||||
/* Get the (virtual) address of instruction that caused the prefetch abort.
|
||||
* When the exception occurred, this address was provided in the lr register
|
||||
* and this value was saved in the context save area as the PC at the
|
||||
* REG_R15 index.
|
||||
/* Get the (virtual) address of instruction that caused the prefetch
|
||||
* abort. When the exception occurred, this address was provided in the
|
||||
* lr register and this value was saved in the context save area as the
|
||||
* PC at the REG_R15 index.
|
||||
*
|
||||
* Check to see if this miss address is within the configured range of
|
||||
* virtual addresses.
|
||||
@@ -76,10 +76,10 @@ uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr)
|
||||
|
||||
if (regs[REG_R15] >= PG_PAGED_VBASE && regs[REG_R15] < PG_PAGED_VEND)
|
||||
{
|
||||
/* Save the offending PC as the fault address in the TCB of the currently
|
||||
* executing task. This value is, of course, already known in regs[REG_R15],
|
||||
* but saving it in this location will allow common paging logic for both
|
||||
* prefetch and data aborts.
|
||||
/* Save the offending PC as the fault address in the TCB of the
|
||||
* currently executing task. This value is, of course, already known
|
||||
* in regs[REG_R15], but saving it in this location will allow common
|
||||
* paging logic for both prefetch and data aborts.
|
||||
*/
|
||||
|
||||
struct tcb_s *tcb = this_task();
|
||||
@@ -99,9 +99,9 @@ uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr)
|
||||
|
||||
pg_miss();
|
||||
|
||||
/* Restore the previous value of CURRENT_REGS. NULL would indicate that
|
||||
* we are no longer in an interrupt handler. It will be non-NULL if we
|
||||
* are returning from a nested interrupt.
|
||||
/* Restore the previous value of CURRENT_REGS.
|
||||
* NULL would indicate thatwe are no longer in an interrupt handler.
|
||||
* It will be non-NULL if we are returning from a nested interrupt.
|
||||
*/
|
||||
|
||||
CURRENT_REGS = savestate;
|
||||
@@ -120,8 +120,8 @@ uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr)
|
||||
|
||||
uint32_t *arm_prefetchabort(uint32_t *regs, uint32_t ifar, uint32_t ifsr)
|
||||
{
|
||||
/* Save the saved processor context in CURRENT_REGS where it can be accessed
|
||||
* for register dumps and possibly context switching.
|
||||
/* Save the saved processor context in CURRENT_REGS where it can be
|
||||
* accessed for register dumps and possibly context switching.
|
||||
*/
|
||||
|
||||
CURRENT_REGS = regs;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* arch/arm/src/armv7-a/arm_restorefpu.S
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@@ -16,11 +16,11 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
@@ -30,19 +30,19 @@
|
||||
|
||||
.file "arm_restorefpu.S"
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Symbols
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
.globl arm_restorefpu
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
.text
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: arm_restorefpu
|
||||
*
|
||||
* Description:
|
||||
@@ -60,7 +60,7 @@
|
||||
* This function does not return anything explicitly. However, it is called from
|
||||
* interrupt level assembly logic that assumes that r0 is preserved.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
.globl arm_restorefpu
|
||||
.type arm_restorefpu, function
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* arch/arm/src/armv7-a/arm_savefpu.S
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@@ -16,11 +16,11 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
@@ -30,23 +30,23 @@
|
||||
|
||||
.file "arm_savefpu.S"
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Symbols
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
.globl arm_savefpu
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
.text
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: arm_savefpu
|
||||
*
|
||||
* Description:
|
||||
@@ -63,7 +63,7 @@
|
||||
* Returned Value:
|
||||
* None
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
.globl arm_savefpu
|
||||
.type arm_savefpu, function
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* arch/arm/src/armv7-a/arm_vectors.S
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@@ -16,11 +16,11 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/irq.h>
|
||||
@@ -31,9 +31,9 @@
|
||||
|
||||
.file "arm_vectors.S"
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
.data
|
||||
g_irqtmp:
|
||||
@@ -67,18 +67,18 @@ g_nestlevel:
|
||||
|
||||
#endif /* CONFIG_ARCH_INTERRUPTSTACK > 7 && CONFIG_ARMV7A_HAVE_GICv2 */
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Macro Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: cpuindex
|
||||
*
|
||||
* Description:
|
||||
* Return an index idenifying the current CPU. Single CPU case. Must be
|
||||
* provided by MCU-specific logic in chip.h for the SMP case.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
|
||||
.macro cpuindex, index
|
||||
@@ -86,14 +86,14 @@ g_nestlevel:
|
||||
.endm
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: setirqstack
|
||||
*
|
||||
* Description:
|
||||
* Set the current stack pointer to the "top" of the IRQ interrupt stack. Single
|
||||
* CPU case. Must be provided by MCU-specific logic in chip.h for the SMP case.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
|
||||
.macro setirqstack, tmp1, tmp2
|
||||
@@ -101,14 +101,14 @@ g_nestlevel:
|
||||
.endm
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: setfiqstack
|
||||
*
|
||||
* Description:
|
||||
* Set the current stack pointer to the "top" of the FIQ interrupt stack. Single
|
||||
* CPU case. Must be provided by MCU-specific logic in chip.h for the SMP case.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
|
||||
.macro setfiqstack, tmp1, tmp2
|
||||
@@ -116,23 +116,23 @@ g_nestlevel:
|
||||
.endm
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
.text
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: arm_vectorirq
|
||||
*
|
||||
* Description:
|
||||
* Interrupt exception. Entered in IRQ mode with spsr = SVC CPSR, lr = SVC PC
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
.globl arm_decodeirq
|
||||
.globl arm_vectorirq
|
||||
@@ -336,13 +336,13 @@ arm_vectorirq:
|
||||
.size arm_vectorirq, . - arm_vectorirq
|
||||
.align 5
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Function: arm_vectorsvc
|
||||
*
|
||||
* Description:
|
||||
* SVC interrupt. We enter the SVC in SVC mode.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
.globl arm_syscall
|
||||
.globl arm_vectorsvc
|
||||
@@ -460,7 +460,7 @@ arm_vectorsvc:
|
||||
|
||||
.align 5
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: arm_vectordata
|
||||
*
|
||||
* Description:
|
||||
@@ -469,7 +469,7 @@ arm_vectorsvc:
|
||||
* current processor state and gives control to data abort handler. This function
|
||||
* is entered in ABORT mode with spsr = SVC CPSR, lr = SVC PC
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
.globl arm_dataabort
|
||||
.globl arm_vectordata
|
||||
@@ -606,7 +606,7 @@ arm_vectordata:
|
||||
|
||||
.align 5
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: arm_vectorprefetch
|
||||
*
|
||||
* Description:
|
||||
@@ -615,7 +615,7 @@ arm_vectordata:
|
||||
* handler saves the current processor state and gives control to prefetch abort
|
||||
* handler. This function is entered in ABT mode with spsr = SVC CPSR, lr = SVC PC.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
.globl arm_prefetchabort
|
||||
.globl arm_vectorprefetch
|
||||
@@ -752,14 +752,14 @@ arm_vectorprefetch:
|
||||
|
||||
.align 5
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: arm_vectorundefinsn
|
||||
*
|
||||
* Description:
|
||||
* Undefined instruction entry exception. Entered in UND mode, spsr = SVC CPSR,
|
||||
* lr = SVC PC
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
.globl arm_undefinedinsn
|
||||
.globl arm_vectorundefinsn
|
||||
@@ -893,14 +893,14 @@ arm_vectorundefinsn:
|
||||
|
||||
.align 5
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: arm_vectorfiq
|
||||
*
|
||||
* Description:
|
||||
* Shouldn't happen unless a arm_decodefiq() is provided. FIQ is primarily used
|
||||
* with the TrustZone feature in order to handle secure interrupts.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARMV7A_DECODEFIQ
|
||||
.globl arm_decodefiq
|
||||
@@ -1051,9 +1051,9 @@ arm_vectorfiq:
|
||||
#endif
|
||||
.size arm_vectorfiq, . - arm_vectorfiq
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: g_intstackalloc/g_intstackbase
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7
|
||||
.bss
|
||||
@@ -1071,9 +1071,9 @@ g_intstackbase:
|
||||
.size g_intstackbase, 4
|
||||
.size g_intstackalloc, (CONFIG_ARCH_INTERRUPTSTACK & ~7)
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Name: g_fiqstackalloc/g_fiqstackbase
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
.globl g_fiqstackalloc
|
||||
.type g_fiqstackalloc, object
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* arch/arm/src/armv7-a/barriers.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@@ -16,18 +16,18 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ARCH_ARM_SRC_COMMON_ARMV7_A_BARRIERS_H
|
||||
#define __ARCH_ARM_SRC_COMMON_ARMV7_A_BARRIERS_H
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* ARMv7-A memory barriers */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* arch/arm/src/armv7-a/cp15.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@@ -16,7 +16,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* References:
|
||||
*
|
||||
@@ -30,15 +30,16 @@
|
||||
#ifndef __ARCH_ARM_SRC_ARMV7_A_CP15_H
|
||||
#define __ARCH_ARM_SRC_ARMV7_A_CP15_H
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* System control register descriptions.
|
||||
*
|
||||
* CP15 registers are accessed with MRC and MCR instructions as follows:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -117,7 +117,9 @@ void _start(int argc, FAR char *argv[])
|
||||
ARCH_DATA_RESERVE->ar_sigtramp = (addrenv_sigtramp_t)sig_trampoline;
|
||||
|
||||
/* Call C++ constructors */
|
||||
|
||||
/* Setup so that C++ destructors called on task exit */
|
||||
|
||||
/* REVISIT: Missing logic */
|
||||
|
||||
/* Call the main() entry point passing argc and argv. */
|
||||
|
||||
@@ -48,7 +48,9 @@
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Generic indexing helpers *************************************************/
|
||||
|
||||
/* 1x32 bit field per register */
|
||||
|
||||
#define GIC_INDEX1(n) (n) /* 1 field per word */
|
||||
@@ -92,6 +94,7 @@
|
||||
#define GIC_MASK32(n) (1 << GIC_SHIFT32(n)) /* 1-bit mask */
|
||||
|
||||
/* GIC Register Offsets *****************************************************/
|
||||
|
||||
/* CPU Interface registers */
|
||||
|
||||
#define GIC_ICCICR_OFFSET 0x0000 /* CPU Interface Control Register */
|
||||
@@ -127,6 +130,7 @@
|
||||
/* 0x000c-0x001c: Reserved */
|
||||
/* 0x0020-0x003c: Implementation defined */
|
||||
/* 0x0040-0x007c: Reserved */
|
||||
|
||||
/* Interrupt Security Registers: 0x0080-0x009c */
|
||||
|
||||
#define GIC_ICDISR_OFFSET(n) (0x0080 + GIC_OFFSET32(n))
|
||||
@@ -160,23 +164,28 @@
|
||||
#define GIC_ICDIPR_OFFSET(n) (0x0400 + GIC_OFFSET4(n))
|
||||
|
||||
/* 0x0500-0x07fc: Reserved */
|
||||
|
||||
/* Interrupt Processor Target Registers: 0x0800-0x08fc */
|
||||
|
||||
#define GIC_ICDIPTR_OFFSET(n) (0x0800 + GIC_OFFSET4(n))
|
||||
|
||||
/* 0x0900-0x0bfc: Reserved */
|
||||
|
||||
/* Interrupt Configuration Registers: 0x0c00-0x0c3c */
|
||||
|
||||
#define GIC_ICDICFR_OFFSET(n) (0x0c00 + GIC_OFFSET16(n))
|
||||
|
||||
/* 0x0d00-0x0dfc: Implementation defined */
|
||||
|
||||
/* PPI Status Register: 0x0d00 */
|
||||
|
||||
/* SPI Status Registers: 0x0d04-0x0d1c */
|
||||
|
||||
#define GIC_ICDPPISR_OFFSET 0x0d00 /* PPI Status Register */
|
||||
#define GIC_ICDSPISR_OFFSET(n) (0x0d00 + GIC_OFFSET32(n))
|
||||
|
||||
/* 0x0d80-0x0dfc: Reserved */
|
||||
|
||||
/* Non-secure Access Control Registers, optional: 00xe00-0x0efc */
|
||||
|
||||
#define GIC_ICDNSACR_OFFSET(n) (0x0e00 + GIC_OFFSET32(n))
|
||||
@@ -186,6 +195,7 @@
|
||||
#define GIC_ICDSGIR_OFFSET 0x0f00 /* Software Generated Interrupt Register */
|
||||
|
||||
/* 0x0f0c-0x0f0c: Reserved */
|
||||
|
||||
/* Peripheral Identification Registers: 0x0fd0-0xfe8 */
|
||||
|
||||
#define GIC_ICDPIDR_OFFSET(n) (0x0fd0 + ((n) << 2))
|
||||
@@ -199,7 +209,9 @@
|
||||
#define GIC_ICDSSPR_OFFSET(n) (0x0f20 + GIC_OFFSET8(n))
|
||||
|
||||
/* 0x0f30-0x0fcc: Reserved */
|
||||
|
||||
/* 0x0fd0-0x0ffc: Implementation defined */
|
||||
|
||||
/* Component Identification Registers: 0x0ff0-0x0ffc */
|
||||
|
||||
#define GIC_ICDCIDR_OFFSET(n) (0x0ff0 + ((n) << 2))
|
||||
@@ -207,6 +219,7 @@
|
||||
/* 0x0f04-0x0ffc: Reserved */
|
||||
|
||||
/* GIC Register Addresses ***************************************************/
|
||||
|
||||
/* The Interrupt Controller is a single functional unit that is located in a
|
||||
* Cortex-A9 MPCore design. There is one interrupt interface per Cortex-A9
|
||||
* processor. Registers are memory mapped and accessed through a chip-
|
||||
@@ -264,11 +277,15 @@
|
||||
/* GIC Register Bit Definitions *********************************************/
|
||||
|
||||
/* CPU Interface registers */
|
||||
|
||||
/* CPU Interface Control Register -- without security extensions */
|
||||
|
||||
#define GIC_ICCICR_ENABLE (1 << 0) /* Bit 0: Enable the CPU interface for this GIC */
|
||||
/* Bits 1-31: Reserved */
|
||||
/* CPU Interface Control Register -- with security extensions, non-secure copy */
|
||||
|
||||
/* CPU Interface Control Register -- with security extensions,
|
||||
* non-secure copy
|
||||
*/
|
||||
|
||||
#define GIC_ICCICRU_ENABLEGRP1 (1 << 0) /* Bit 0: Enable Group 1 interrupts for the CPU */
|
||||
/* Bits 1-4: Reserved */
|
||||
@@ -277,7 +294,10 @@
|
||||
/* Bits 7-8: Reserved */
|
||||
#define GIC_ICCICRU_EOIMODENS (1 << 9) /* Bit 9: Control EIOIR access (non-secure) */
|
||||
/* Bits 10-31: Reserved */
|
||||
/* CPU Interface Control Register -- with security extensions, secure copy */
|
||||
|
||||
/* CPU Interface Control Register -- with security extensions,
|
||||
* secure copy
|
||||
*/
|
||||
|
||||
#define GIC_ICCICRS_ENABLEGRP0 (1 << 0) /* Bit 0: Enable Group 0 interrupts for the CPU */
|
||||
#define GIC_ICCICRS_ENABLEGRP1 (1 << 1) /* Bit 1: Enable Group 1 interrupts for the CPU */
|
||||
@@ -291,6 +311,7 @@
|
||||
#define GIC_ICCICRS_EOIMODES (1 << 9) /* Bit 6: Control EIOIR access (secure) */
|
||||
#define GIC_ICCICRS_EOIMODENS (1 << 10) /* Bit 10: Control EIOIR access (non-secure) */
|
||||
/* Bits 11-31: Reserved */
|
||||
|
||||
/* Interrupt Priority Mask Register. Priority values are 8-bit unsigned
|
||||
* binary. A GIC supports a minimum of 16 and a maximum of 256 priority
|
||||
* levels. As a result, PMR settings make sense.
|
||||
@@ -300,6 +321,7 @@
|
||||
#define GIC_ICCPMR_MASK (0xff << GIC_ICCPMR_SHIFT)
|
||||
# define GIC_ICCPMR_VALUE(n) ((uint32_t)(n) << GIC_ICCPMR_SHIFT)
|
||||
/* Bits 8-31: Reserved */
|
||||
|
||||
/* Binary point Register and Aliased Non-secure Binary Point Register.
|
||||
* Priority values are 8-bit unsigned binary. A GIC supports a minimum of
|
||||
* 16 and a maximum of 256 priority levels. As a result, not all binary
|
||||
@@ -316,7 +338,9 @@
|
||||
# define GIC_ICCBPR_6_7 (5 << GIC_ICCBPR_SHIFT) /* Priority bits [7:6] compared for pre-emption */
|
||||
# define GIC_ICCBPR_7_7 (6 << GIC_ICCBPR_SHIFT) /* Priority bit [7] compared for pre-emption */
|
||||
# define GIC_ICCBPR_NOPREMPT (7 << GIC_ICCBPR_SHIFT) /* No pre-emption is performed */
|
||||
|
||||
/* Bits 3-31: Reserved */
|
||||
|
||||
/* Interrupt Acknowledge Register */
|
||||
|
||||
#define GIC_ICCIAR_INTID_SHIFT (0) /* Bits 0-9: Interrupt ID */
|
||||
@@ -325,7 +349,9 @@
|
||||
#define GIC_ICCIAR_CPUSRC_SHIFT (10) /* Bits 10-12: CPU source ID */
|
||||
#define GIC_ICCIAR_CPUSRC_MASK (7 << GIC_ICCIAR_CPUSRC_SHIFT)
|
||||
# define GIC_ICCIAR_CPUSRC(n) ((uint32_t)(n) << GIC_ICCIAR_CPUSRC_SHIFT)
|
||||
|
||||
/* Bits 13-31: Reserved */
|
||||
|
||||
/* End of Interrupt Register */
|
||||
|
||||
#define GIC_ICCEOIR_SPURIOUS (0x3ff)
|
||||
@@ -336,14 +362,18 @@
|
||||
#define GIC_ICCEOIR_CPUSRC_SHIFT (10) /* Bits 10-12: CPU source ID */
|
||||
#define GIC_ICCEOIR_CPUSRC_MASK (7 << GIC_ICCEOIR_CPUSRC_SHIFT)
|
||||
# define GIC_ICCEOIR_CPUSRC(n) ((uint32_t)(n) << GIC_ICCEOIR_CPUSRC_SHIFT)
|
||||
|
||||
/* Bits 13-31: Reserved */
|
||||
|
||||
/* Running Interrupt Register */
|
||||
|
||||
/* Bits 0-3: Reserved */
|
||||
#define GIC_ICCRPR_PRIO_SHIFT (4) /* Bits 4-7: Priority mask */
|
||||
#define GIC_ICCRPR_PRIO_MASK (15 << GIC_ICCRPR_PRIO_SHIFT)
|
||||
# define GIC_ICCRPR_PRIO_VALUE(n) ((uint32_t)(n) << GIC_ICCRPR_PRIO_SHIFT)
|
||||
|
||||
/* Bits 8-31: Reserved */
|
||||
|
||||
/* Highest Pending Interrupt Register */
|
||||
|
||||
#define GIC_ICCHPIR_INTID_SHIFT (0) /* Bits 0-9: Interrupt ID */
|
||||
@@ -352,28 +382,39 @@
|
||||
#define GIC_ICCHPIR_CPUSRC_SHIFT (10) /* Bits 10-12: CPU source ID */
|
||||
#define GIC_ICCHPIR_CPUSRC_MASK (7 << GIC_ICCHPIR_CPUSRC_SHIFT)
|
||||
# define GIC_ICCHPIR_CPUSRC(n) ((uint32_t)(n) << GIC_ICCHPIR_CPUSRC_SHIFT)
|
||||
|
||||
/* Bits 13-31: Reserved */
|
||||
|
||||
/* Aliased Interrupt Acknowledge Register */
|
||||
#define GIC_ICCAIAR_
|
||||
|
||||
/* Aliased End of Interrupt Register */
|
||||
#define GIC_ICCAEOIR_
|
||||
|
||||
/* Aliased Highest Priority Pending Interrupt Register */
|
||||
#define GIC_ICCAHPIR_
|
||||
|
||||
/* Active Priorities Register 1 */
|
||||
#define GIC_ICCAPR1_
|
||||
|
||||
/* Active Priorities Register 2 */
|
||||
#define GIC_ICCAPR2_
|
||||
|
||||
/* Active Priorities Register 3 */
|
||||
#define GIC_ICCAPR3_
|
||||
|
||||
/* Active Priorities Register 4 */
|
||||
#define GIC_ICCAPR4_
|
||||
|
||||
/* Non-secure Active Priorities Register 1 */
|
||||
#define GIC_ICCNSAPR1_
|
||||
|
||||
/* Non-secure Active Priorities Register 2 */
|
||||
#define GIC_ICCNSAPR2_
|
||||
|
||||
/* Non-secure Active Priorities Register 3 */
|
||||
#define GIC_ICCNSAPR3_
|
||||
|
||||
/* Non-secure Active Priorities Register 4 */
|
||||
#define GIC_ICCNSAPR4_
|
||||
|
||||
@@ -392,15 +433,18 @@
|
||||
#define GIC_ICCDIR_
|
||||
|
||||
/* Distributor Registers */
|
||||
|
||||
/* Distributor Control Register -- without security extensions */
|
||||
|
||||
#define GIC_ICDDCR_ENABLE (1 << 0) /* Bit 0: Enable forwarding of interrupts */
|
||||
/* Bits 1-31: Reserved */
|
||||
|
||||
/* Distributor Control Register -- with security extensions */
|
||||
|
||||
#define GIC_ICDDCR_ENABLEGRP0 (1 << 0) /* Bit 0: Enable forwarding of Group 0 interrupts */
|
||||
#define GIC_ICDDCR_ENABLEGRP1 (1 << 1) /* Bit 1: Enable forwarding of Group 1 interrupts */
|
||||
/* Bits 2-31: Reserved */
|
||||
|
||||
/* Interrupt Controller Type Register */
|
||||
|
||||
#define GIC_ICDICTR_ITLINES_SHIFT (0) /* Bits 0-4: It lines number */
|
||||
@@ -412,6 +456,7 @@
|
||||
#define GIC_ICDICTR_LSPI_SHIFT (11) /* Bits 11-15: Number of Lockable Shared Peripheral Interrupts */
|
||||
#define GIC_ICDICTR_LSPI_MASK (0x1f << GIC_ICDICTR_LSPI_SHIFT)
|
||||
/* Bits 16-31: Reserved */
|
||||
|
||||
/* Distributor Implementer ID Register */
|
||||
|
||||
#define GIC_ICDIIDR_IMPL_SHIFT (0) /* Bits 0-11: Implementer */
|
||||
@@ -427,7 +472,8 @@
|
||||
|
||||
/* Interrupt Set-Enable.
|
||||
*
|
||||
* NOTE: In the Cortex-A9 MPCore, SGIs are always enabled. The corresponding bits
|
||||
* NOTE:
|
||||
* In the Cortex-A9 MPCore, SGIs are always enabled. The corresponding bits
|
||||
* in the ICDISERn are read as one, write ignored
|
||||
*/
|
||||
|
||||
@@ -435,7 +481,8 @@
|
||||
|
||||
/* Interrupt Clear-Enable.
|
||||
*
|
||||
* NOTE: In the Cortex-A9 MPCore, SGIs are always enabled. The corresponding bits
|
||||
* NOTE:
|
||||
* In the Cortex-A9 MPCore, SGIs are always enabled. The corresponding bits
|
||||
* in the ICDICERn are read as one, write ignored
|
||||
*/
|
||||
|
||||
@@ -488,6 +535,7 @@
|
||||
/* PPI Status Register */
|
||||
|
||||
#define GIC_ICDPPISR_PPI(n) (1 << ((n) + 11)) /* Bits 11-15: PPI(n) status, n=0-4 */
|
||||
|
||||
# define GIC_ICDPPISR_GTM (1 << 11) /* Bit 11: PPI[0], Global Timer */
|
||||
# define GIC_ICDPPISR_NFIQ (1 << 12) /* Bit 12: PPI[1], FIQ, active low */
|
||||
# define GIC_ICDPPISR_PTM (1 << 13) /* Bit 13: PPI[2], Private Timer */
|
||||
@@ -520,10 +568,12 @@
|
||||
|
||||
/* SGI Clear-Pending Registers */
|
||||
#define GIC_ICDSCPR_
|
||||
|
||||
/* SGI Set-Pending Registers */
|
||||
#define GIC_ICDSSPR_
|
||||
|
||||
/* Interrupt IDs ************************************************************/
|
||||
|
||||
/* The Global Interrupt Controller (GIC) collects up to 224 interrupt
|
||||
* requests and provides a memory mapped interface to each of the CPU core.
|
||||
*
|
||||
@@ -539,6 +589,7 @@
|
||||
*/
|
||||
|
||||
/* Private Peripheral Interrupts (PPI) **************************************/
|
||||
|
||||
/* Each Cortex-A9 processor has private interrupts, ID0-ID15, that can only
|
||||
* be triggered by software. These interrupts are aliased so that there is
|
||||
* no requirement for a requesting Cortex-A9 processor to determine its own
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* GTM Register Offsets *****************************************************/
|
||||
|
||||
#define GTM_COUNT0_OFFSET 0x0000 /* Global Timer Counter Register 0 */
|
||||
@@ -81,6 +82,7 @@
|
||||
/* Bits 1-31: Reserved */
|
||||
|
||||
/* Comparator Value Register 0/1 -- 64-bit timer compare value */
|
||||
|
||||
/* Auto-increment Register -- 32-bit auto-increment value */
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* arch/arm/src/armv7-a/l2cc_pl310.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@@ -16,7 +16,7 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* Reference: "CoreLink™ Level 2 Cache Controller L2C-310", Revision r3p2,
|
||||
* Technical Reference Manual, ARM DDI 0246F (ID011711), ARM
|
||||
@@ -25,9 +25,9 @@
|
||||
#ifndef __ARCH_ARM_SRC_ARMV7_A_L2CC_PL310_H
|
||||
#define __ARCH_ARM_SRC_ARMV7_A_L2CC_PL310_H
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
|
||||
#include "chip.h"
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* General Definitions **************************************************************/
|
||||
/* General Definitions ******************************************************/
|
||||
|
||||
#define PL310_CACHE_LINE_SIZE 32
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
# define PL310_NLOCKREGS 1
|
||||
#endif
|
||||
|
||||
/* L2CC Register Offsets ************************************************************/
|
||||
/* L2CC Register Offsets ****************************************************/
|
||||
|
||||
#define L2CC_IDR_OFFSET 0x0000 /* Cache ID Register */
|
||||
#define L2CC_TYPR_OFFSET 0x0004 /* Cache Type Register */
|
||||
@@ -87,9 +87,10 @@
|
||||
#define L2CC_CIWR_OFFSET 0x07fc /* Clean Invalidate Way Register */
|
||||
/* 0x0800-0x08fc Reserved */
|
||||
|
||||
/* Data and Instruction Lockdown registers where n=0-7. The registers for n > 0 are
|
||||
* implemented if the option pl310_LOCKDOWN_BY_MASTER is enabled. Otherwise, they are
|
||||
* unused
|
||||
/* Data and Instruction Lockdown registers where n=0-7.
|
||||
* The registers for n > 0 are implemented if the option
|
||||
* pl310_LOCKDOWN_BY_MASTER is enabled.
|
||||
* Otherwise, they are unused
|
||||
*/
|
||||
|
||||
#define L2CC_DLKR_OFFSET(n) (0x0900 + ((n) << 3)) /* Data Lockdown Register */
|
||||
@@ -109,7 +110,7 @@
|
||||
/* 0x0f64-0x0f7c Reserved */
|
||||
#define L2CC_POWCR_OFFSET 0x0f80 /* Power Control Register */
|
||||
|
||||
/* L2CC Register Addresses **********************************************************/
|
||||
/* L2CC Register Addresses **************************************************/
|
||||
|
||||
#define L2CC_IDR (L2CC_VBASE+L2CC_IDR_OFFSET)
|
||||
#define L2CC_TYPR (L2CC_VBASE+L2CC_TYPR_OFFSET)
|
||||
@@ -149,7 +150,7 @@
|
||||
#define L2CC_PCR (L2CC_VBASE+L2CC_PCR_OFFSET)
|
||||
#define L2CC_POWCR (L2CC_VBASE+L2CC_POWCR_OFFSET)
|
||||
|
||||
/* L2CC Register Bit Definitions ****************************************************/
|
||||
/* L2CC Register Bit Definitions ********************************************/
|
||||
|
||||
/* Cache ID Register (32-bit ID) */
|
||||
|
||||
@@ -299,8 +300,8 @@
|
||||
|
||||
/* Event Counter 0 Value Register (32-bit value) */
|
||||
|
||||
/* Interrupt Mask Register, Masked Interrupt Status Register, Raw Interrupt Status
|
||||
* Register, and Interrupt Clear Register.
|
||||
/* Interrupt Mask Register, Masked Interrupt Status Register,
|
||||
* Raw Interrupt Status Register, and Interrupt Clear Register.
|
||||
*/
|
||||
|
||||
#define L2CC_INT_ECNTR (1 << 0) /* Bit 0: Event Counter 1/0 Overflow Increment */
|
||||
|
||||
+154
-134
File diff suppressed because it is too large
Load Diff
@@ -205,7 +205,7 @@ static inline uintptr_t get_l2_entry(FAR uint32_t *l2table, uintptr_t vaddr)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
* Public Functions Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* arch/arm/src/armv7-a/sctlr.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@@ -16,42 +16,47 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* References:
|
||||
* "Cortex-A5™ MPCore, Technical Reference Manual", Revision: r0p1, Copyright © 2010
|
||||
* ARM. All rights reserved. ARM DDI 0434B (ID101810)
|
||||
* "ARM® Architecture Reference Manual, ARMv7-A and ARMv7-R edition", Copyright ©
|
||||
* 1996-1998, 2000, 2004-2012 ARM. All rights reserved. ARM DDI 0406C.b (ID072512)
|
||||
* "Cortex-A5™ MPCore, Technical Reference Manual",
|
||||
* Revision: r0p1, Copyright © 2010 ARM.
|
||||
* All rights reserved. ARM DDI 0434B (ID101810)
|
||||
* "ARM® Architecture Reference Manual, ARMv7-A and ARMv7-R edition",
|
||||
* Copyright © 1996-1998, 2000, 2004-2012 ARM.
|
||||
* All rights reserved. ARM DDI 0406C.b (ID072512)
|
||||
*/
|
||||
|
||||
#ifndef __ARCH_ARM_SRC_ARMV7_A_SCTLR_H
|
||||
#define __ARCH_ARM_SRC_ARMV7_A_SCTLR_H
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* Reference: Cortex-A5™ MPCore Paragraph 4.2, "Register summary." */
|
||||
|
||||
/* Main ID Register (MIDR) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* Cache Type Register (CTR) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* TCM Type Register
|
||||
*
|
||||
* The Cortex-A5 MPCore processor does not implement instruction or data Tightly
|
||||
* Coupled Memory (TCM), so this register always Reads-As-Zero (RAZ).
|
||||
* The Cortex-A5 MPCore processor does not implement instruction or data
|
||||
* Tightly Coupled Memory (TCM), so this register always Reads-As-Zero (RAZ).
|
||||
*
|
||||
* TLB Type Register
|
||||
*
|
||||
* The Cortex-A5 MPCore processor does not implement instruction or data Tightly
|
||||
* CoupledMemory (TCM), so this register always Reads-As-Zero (RAZ).
|
||||
* The Cortex-A5 MPCore processor does not implement instruction or data
|
||||
* Tightly CoupledMemory (TCM), so this register always Reads-As-Zero (RAZ).
|
||||
*/
|
||||
|
||||
/* Multiprocessor Affinity Register (MPIDR) */
|
||||
@@ -69,42 +74,61 @@
|
||||
#define MPIDR_U (1 << 30) /* Bit 30: Multiprocessing Extensions. */
|
||||
|
||||
/* Processor Feature Register 0 (ID_PFR0) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* Processor Feature Register 1 (ID_PFR1) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* Debug Feature Register 0 (ID_DFR0) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* Auxiliary Feature Register 0 (ID_AFR0) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* Memory Model Features Register 0 (ID_MMFR0) */
|
||||
|
||||
/* Memory Model Features Register 1 (ID_MMFR1) */
|
||||
|
||||
/* Memory Model Features Register 2 (ID_MMFR2) */
|
||||
|
||||
/* Memory Model Features Register 3 (ID_MMFR3) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* Instruction Set Attributes Register 0 (ID_ISAR0) */
|
||||
|
||||
/* Instruction Set Attributes Register 1 (ID_ISAR1) */
|
||||
|
||||
/* Instruction Set Attributes Register 2 (ID_ISAR2) */
|
||||
|
||||
/* Instruction Set Attributes Register 3 (ID_ISAR3) */
|
||||
|
||||
/* Instruction Set Attributes Register 4 (ID_ISAR4) */
|
||||
|
||||
/* Instruction Set Attributes Register 5 (ID_ISAR5) */
|
||||
|
||||
/* Instruction Set Attributes Register 6-7 (ID_ISAR6-7). Reserved. */
|
||||
|
||||
/* TODO: Others to be provided */
|
||||
|
||||
/* Cache Size Identification Register (CCSIDR) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* Cache Level ID Register (CLIDR) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* Auxiliary ID Register (AIDR) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* Cache Size Selection Register (CSSELR) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* System Control Register (SCTLR)
|
||||
@@ -148,6 +172,7 @@
|
||||
/* Bits 10-31: Reserved */
|
||||
|
||||
/* Coprocessor Access Control Register (CPACR) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* Secure Configuration Register (SCR) */
|
||||
@@ -166,6 +191,7 @@
|
||||
/* Bits 10-31: Reserved */
|
||||
|
||||
/* Secure Debug Enable Register (SDER) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* Non-secure Access Control Register (NSACR) */
|
||||
@@ -181,16 +207,24 @@
|
||||
/* Bits 19-31: Reserved */
|
||||
|
||||
/* Virtualization Control Register (VCR) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* Translation Table Base Register 0 (TTBR0). See mmu.h */
|
||||
|
||||
/* Translation Table Base Register 1 (TTBR1). See mmu.h */
|
||||
|
||||
/* Translation Table Base Control Register (TTBCR). See mmu.h */
|
||||
|
||||
/* Domain Access Control Register (DACR). See mmu.h */
|
||||
|
||||
/* Data Fault Status Register (DFSR). See mmu.h */
|
||||
|
||||
/* Instruction Fault Status Register (IFSR). See mmu.h */
|
||||
|
||||
/* Auxiliary Data Fault Status Register (ADFSR). Not used in this implementation. */
|
||||
/* Auxiliary Data Fault Status Register (ADFSR).
|
||||
* Not used in this implementation.
|
||||
*/
|
||||
|
||||
/* Data Fault Address Register(DFAR)
|
||||
*
|
||||
@@ -198,13 +232,13 @@
|
||||
*
|
||||
* Instruction Fault Address Register(IFAR)
|
||||
*
|
||||
* Holds the MVA of the faulting address of the instruction that caused a prefetch
|
||||
* abort.
|
||||
* Holds the MVA of the faulting address of the instruction that caused a
|
||||
* prefetch abort.
|
||||
*
|
||||
* NOP Register
|
||||
*
|
||||
* The use of this register is optional and deprecated. Use the NOP instruction
|
||||
* instead.
|
||||
* The use of this register is optional and deprecated.
|
||||
* Use the NOP instruction instead.
|
||||
*
|
||||
* Physical Address Register (PAR)
|
||||
*
|
||||
@@ -214,11 +248,12 @@
|
||||
*
|
||||
* Instruction Synchronization Barrier
|
||||
*
|
||||
* The use of ISB is optional and deprecated. Use the instruction ISB instead.
|
||||
* The use of ISB is optional and deprecated.
|
||||
* Use the instruction ISB instead.
|
||||
*
|
||||
* Data Memory Barrier
|
||||
* The use of DMB is deprecated and, on Cortex-A5 MPCore, behaves as NOP. Use the
|
||||
* instruction DMB instead.
|
||||
* The use of DMB is deprecated and, on Cortex-A5 MPCore, behaves as NOP.
|
||||
* Use the instruction DMB instead.
|
||||
*/
|
||||
|
||||
/* Vector Base Address Register (VBAR) */
|
||||
@@ -226,12 +261,15 @@
|
||||
#define VBAR_MASK (0xffffffe0)
|
||||
|
||||
/* Monitor Vector Base Address Register (MVBAR) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* Interrupt Status Register (ISR) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* Virtualization Interrupt Register (VIR) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/* Context ID Register (CONTEXTIDR) */
|
||||
@@ -242,28 +280,29 @@
|
||||
#define CONTEXTIDR_PROCID_MASK (0x00ffffff << CONTEXTIDR_PROCID_SHIFT)
|
||||
|
||||
/* Configuration Base Address Register (CBAR) */
|
||||
|
||||
/* TODO: To be provided */
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Assembly Macros
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
|
||||
/* Get the device ID */
|
||||
|
||||
.macro cp15_rdid, id
|
||||
mrc p15, 0, \id, c0, c0, 0
|
||||
mrc p15, 0, \id, c0, c0, 0
|
||||
.endm
|
||||
|
||||
/* Read/write the system control register (SCTLR) */
|
||||
|
||||
.macro cp15_rdsctlr, sctlr
|
||||
mrc p15, 0, \sctlr, c1, c0, 0
|
||||
mrc p15, 0, \sctlr, c1, c0, 0
|
||||
.endm
|
||||
|
||||
.macro cp15_wrsctlr, sctlr
|
||||
mcr p15, 0, \sctlr, c1, c0, 0
|
||||
mcr p15, 0, \sctlr, c1, c0, 0
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
@@ -275,9 +314,9 @@
|
||||
.endm
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Inline Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
#define SCU_SNSAC_GTIM_CPU(n) (1 << ((n)+8)) /* CPUn has non-secure access to global timer */
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
* Public Functions Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* arch/arm/src/armv7-a/svcall.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
@@ -16,14 +16,14 @@
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __ARCH_ARM_SRC_ARMV7_A_SVCALL_H
|
||||
#define __ARCH_ARM_SRC_ARMV7_A_SVCALL_H
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
@@ -33,15 +33,15 @@
|
||||
|
||||
#ifdef CONFIG_LIB_SYSCALL
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* Configuration ********************************************************************/
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
/* This logic uses one system call for the syscall return. So a minimum of one
|
||||
* syscall values must be reserved. If CONFIG_BUILD_KERNEL is defined, then four
|
||||
* more syscall values must be reserved.
|
||||
/* This logic uses one system call for the syscall return. So a minimum of
|
||||
* one syscall values must be reserved. If CONFIG_BUILD_KERNEL is defined,
|
||||
* then four more syscall values must be reserved.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_BUILD_KERNEL
|
||||
@@ -58,7 +58,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Cortex-A system calls ************************************************************/
|
||||
/* Cortex-A system calls ****************************************************/
|
||||
|
||||
/* SYS call 0:
|
||||
*
|
||||
@@ -93,7 +93,8 @@
|
||||
|
||||
/* SYS call 4:
|
||||
*
|
||||
* void signal_handler(_sa_sigaction_t sighand, int signo, FAR siginfo_t *info,
|
||||
* void signal_handler(_sa_sigaction_t sighand,
|
||||
* int signo, FAR siginfo_t *info,
|
||||
* FAR void *ucontext);
|
||||
*/
|
||||
|
||||
@@ -108,9 +109,9 @@
|
||||
|
||||
#endif /* CONFIG_BUILD_KERNEL */
|
||||
|
||||
/************************************************************************************
|
||||
/****************************************************************************
|
||||
* Inline Functions
|
||||
************************************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#endif /* CONFIG_LIB_SYSCALL */
|
||||
#endif /* __ARCH_ARM_SRC_ARMV7_A_SVCALL_H */
|
||||
|
||||
Reference in New Issue
Block a user