Fix some nxstyle complaints in arm addrenv
This commit is contained in:
parent
da71a0d0b3
commit
d4b0590abb
@ -32,6 +32,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Address Environment Interfaces
|
||||
*
|
||||
@ -96,7 +97,8 @@
|
||||
* If CONFIG_ARCH_KERNEL_STACK=y is selected then the platform specific
|
||||
* code must export these additional interfaces:
|
||||
*
|
||||
* up_addrenv_kstackalloc - Create a stack in the kernel address environment
|
||||
* up_addrenv_kstackalloc - Create a stack in the kernel address
|
||||
* environment
|
||||
* up_addrenv_kstackfree - Destroy the kernel stack.
|
||||
*
|
||||
****************************************************************************/
|
||||
@ -128,6 +130,7 @@
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Configuration */
|
||||
|
||||
#if (CONFIG_ARCH_TEXT_VBASE & SECTION_MASK) != 0
|
||||
@ -267,9 +270,9 @@ int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize,
|
||||
|
||||
memset(addrenv, 0, sizeof(group_addrenv_t));
|
||||
|
||||
/* Back the allocation up with physical pages and set up the level 2 mapping
|
||||
* (which of course does nothing until the L2 page table is hooked into
|
||||
* the L1 page table).
|
||||
/* Back the allocation up with physical pages and set up the level 2
|
||||
* mapping (which of course does nothing until the L2 page table is hooked
|
||||
* into the L1 page table).
|
||||
*/
|
||||
|
||||
/* Allocate .text space pages */
|
||||
@ -303,7 +306,8 @@ int up_addrenv_create(size_t textsize, size_t datasize, size_t heapsize,
|
||||
* region.
|
||||
*/
|
||||
|
||||
ret = up_addrenv_initdata((uintptr_t)addrenv->data[0] & PMD_PTE_PADDR_MASK);
|
||||
ret = up_addrenv_initdata((uintptr_t)addrenv->data[0] &
|
||||
PMD_PTE_PADDR_MASK);
|
||||
if (ret < 0)
|
||||
{
|
||||
berr("ERROR: Failed to initialize .bss/.data region: %d\n", ret);
|
||||
@ -484,8 +488,8 @@ ssize_t up_addrenv_heapsize(FAR const group_addrenv_t *addrenv)
|
||||
* After an address environment has been established for a task group (via
|
||||
* up_addrenv_create(). This function may be called to instantiate
|
||||
* that address environment in the virtual address space. this might be
|
||||
* necessary, for example, to load the code for the task group from a file or
|
||||
* to access address environment private data.
|
||||
* necessary, for example, to load the code for the task group from a file
|
||||
* or to access address environment private data.
|
||||
*
|
||||
* Input Parameters:
|
||||
* addrenv - The representation of the task address environment previously
|
||||
|
@ -32,6 +32,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Address Environment Interfaces
|
||||
*
|
||||
@ -96,7 +97,8 @@
|
||||
* If CONFIG_ARCH_KERNEL_STACK=y is selected then the platform specific
|
||||
* code must export these additional interfaces:
|
||||
*
|
||||
* up_addrenv_kstackalloc - Create a stack in the kernel address environment
|
||||
* up_addrenv_kstackalloc - Create a stack in the kernel address
|
||||
* environment
|
||||
* up_addrenv_kstackfree - Destroy the kernel stack.
|
||||
* up_addrenv_vkstack - Return the base address of the kernel stack
|
||||
*
|
||||
|
@ -32,6 +32,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Address Environment Interfaces
|
||||
*
|
||||
@ -110,6 +111,7 @@
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Configuration */
|
||||
|
||||
#if (CONFIG_ARCH_STACK_VBASE & SECTION_MASK) != 0
|
||||
@ -151,9 +153,9 @@ int up_addrenv_ustackalloc(FAR struct tcb_s *tcb, size_t stacksize)
|
||||
|
||||
memset(tcb->xcp.ustack, 0, ARCH_STACK_NSECTS * sizeof(uintptr_t *));
|
||||
|
||||
/* Back the allocation up with physical pages and set up the level 2 mapping
|
||||
* (which of course does nothing until the L2 page table is hooked into
|
||||
* the L1 page table).
|
||||
/* Back the allocation up with physical pages and set up the level 2
|
||||
* mapping (which of course does nothing until the L2 page table is hooked
|
||||
* into the L1 page table).
|
||||
*/
|
||||
|
||||
/* Allocate .text space pages */
|
||||
@ -235,10 +237,10 @@ int up_addrenv_vustack(FAR const struct tcb_s *tcb, FAR void **vstack)
|
||||
*
|
||||
* Description:
|
||||
* After an address environment has been established for a task's stack
|
||||
* (via up_addrenv_ustackalloc(). This function may be called to instantiate
|
||||
* that address environment in the virtual address space. This is a
|
||||
* necessary step before each context switch to the newly created thread
|
||||
* (including the initial thread startup).
|
||||
* (via up_addrenv_ustackalloc(). This function may be called to
|
||||
* instantiate that address environment in the virtual address space.
|
||||
* This is a necessary step before each context switch to the newly created
|
||||
* thread (including the initial thread startup).
|
||||
*
|
||||
* Input Parameters:
|
||||
* tcb - The TCB of the thread with the stack address environment to be
|
||||
|
@ -32,6 +32,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
@ -130,8 +131,10 @@ int arm_addrenv_create_region(FAR uintptr_t **list, unsigned int listlen,
|
||||
/* 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
|
||||
|
||||
/* Initialize the page table */
|
||||
@ -223,8 +226,10 @@ void arm_addrenv_destroy_region(FAR uintptr_t **list, unsigned int listlen,
|
||||
/* 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
|
||||
|
||||
/* Return the allocated pages to the page allocator unless we were
|
||||
|
Loading…
Reference in New Issue
Block a user