Run all .c and .h files modified by this PR through nxstyle.

This commit is contained in:
Gregory Nutt
2020-04-30 16:17:09 -06:00
committed by Abdelatif Guettouche
parent c6c712b2fc
commit ee05672434
19 changed files with 249 additions and 404 deletions
+15 -30
View File
@@ -3,35 +3,20 @@
* Check if the current task's fault address has been mapped into the virtual * Check if the current task's fault address has been mapped into the virtual
* address space. * address space.
* *
* Copyright (C) 2010 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@@ -80,9 +65,9 @@
* tcb - A reference to the task control block of the task that we believe * tcb - A reference to the task control block of the task that we believe
* needs to have a page fill. Architecture-specific logic can * needs to have a page fill. Architecture-specific logic can
* retrieve page fault information from the architecture-specific * retrieve page fault information from the architecture-specific
* context information in this TCB and can consult processor resources * context information in this TCB and can consult processor
* (page tables or TLBs or ???) to determine if the fill still needs * resources (page tables or TLBs or ???) to determine if the fill
* to be performed or not. * still needs to be performed or not.
* *
* Returned Value: * Returned Value:
* This function will return true if the mapping is in place and false * This function will return true if the mapping is in place and false
+18 -32
View File
@@ -1,35 +1,20 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/arm/arm_dataabort.c * arch/arm/src/arm/arm_dataabort.c
* *
* Copyright (C) 2007-2011, 2013, 2016 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@@ -85,8 +70,8 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr)
#ifdef CONFIG_PAGING #ifdef CONFIG_PAGING
uint32_t *savestate; uint32_t *savestate;
/* Save the saved processor context in CURRENT_REGS where it can be accessed /* Save the saved processor context in CURRENT_REGS where it can be
* for register dumps and possibly context switching. * accessed for register dumps and possibly context switching.
*/ */
savestate = (uint32_t *)CURRENT_REGS; savestate = (uint32_t *)CURRENT_REGS;
@@ -156,7 +141,8 @@ void up_dataabort(uint32_t *regs, uint32_t far, uint32_t fsr)
segfault: segfault:
#endif #endif
_alert("Data abort. PC: %08x FAR: %08x FSR: %08x\n", regs[REG_PC], far, fsr); _alert("Data abort. PC: %08x FAR: %08x FSR: %08x\n",
regs[REG_PC], far, fsr);
PANIC(); PANIC();
} }
@@ -164,8 +150,8 @@ segfault:
void up_dataabort(uint32_t *regs) void up_dataabort(uint32_t *regs)
{ {
/* Save the saved processor context in CURRENT_REGS where it can be accessed /* Save the saved processor context in CURRENT_REGS where it can be
* for register dumps and possibly context switching. * accessed for register dumps and possibly context switching.
*/ */
CURRENT_REGS = regs; CURRENT_REGS = regs;
+12 -27
View File
@@ -1,35 +1,20 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/arm/arm_doirq.c * arch/arm/src/arm/arm_doirq.c
* *
* Copyright (C) 2007-2009, 2011, 2013-2015 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
+14 -29
View File
@@ -2,35 +2,20 @@
* arch/arm/src/arm/arm_pginitialize.c * arch/arm/src/arm/arm_pginitialize.c
* Initialize the MMU for on-demand paging support. * Initialize the MMU for on-demand paging support.
* *
* Copyright (C) 2010 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@@ -79,8 +64,8 @@
* initialization * initialization
* *
* Assumptions: * Assumptions:
* - Called early in the platform initialization sequence so that no special * - Called early in the platform initialization sequence so that no
* concurrency protection is required. * special concurrency protection is required.
* *
****************************************************************************/ ****************************************************************************/
+25 -40
View File
@@ -1,35 +1,20 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/arm/arm_prefetchabort.c * arch/arm/src/arm/arm_prefetchabort.c
* *
* Copyright (C) 2007-2011, 2013, 2016 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@@ -81,8 +66,8 @@ void up_prefetchabort(uint32_t *regs)
#ifdef CONFIG_PAGING #ifdef CONFIG_PAGING
uint32_t *savestate; uint32_t *savestate;
/* Save the saved processor context in CURRENT_REGS where it can be accessed /* Save the saved processor context in CURRENT_REGS where it can be
* for register dumps and possibly context switching. * accessed for register dumps and possibly context switching.
*/ */
savestate = (uint32_t *)CURRENT_REGS; savestate = (uint32_t *)CURRENT_REGS;
@@ -90,10 +75,10 @@ void up_prefetchabort(uint32_t *regs)
CURRENT_REGS = regs; CURRENT_REGS = regs;
#ifdef CONFIG_PAGING #ifdef CONFIG_PAGING
/* Get the (virtual) address of instruction that caused the prefetch abort. /* Get the (virtual) address of instruction that caused the prefetch
* When the exception occurred, this address was provided in the lr register * abort. When the exception occurred, this address was provided in the
* and this value was saved in the context save area as the PC at the * lr register and this value was saved in the context save area as the PC
* REG_R15 index. * at the REG_R15 index.
* *
* Check to see if this miss address is within the configured range of * Check to see if this miss address is within the configured range of
* virtual addresses. * virtual addresses.
@@ -104,10 +89,10 @@ void up_prefetchabort(uint32_t *regs)
if (regs[REG_R15] >= PG_PAGED_VBASE && regs[REG_R15] < PG_PAGED_VEND) 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 /* Save the offending PC as the fault address in the TCB of the
* executing task. This value is, of course, already known in regs[REG_R15], * currently executing task. This value is, of course, already known
* but saving it in this location will allow common paging logic for both * in regs[REG_R15], but saving it in this location will allow common
* prefetch and data aborts. * paging logic for both prefetch and data aborts.
*/ */
struct tcb_s *tcb = this_task(); struct tcb_s *tcb = this_task();
@@ -127,9 +112,9 @@ void up_prefetchabort(uint32_t *regs)
pg_miss(); pg_miss();
/* Restore the previous value of CURRENT_REGS. NULL would indicate that /* Restore the previous value of CURRENT_REGS. NULL would indicate
* we are no longer in an interrupt handler. It will be non-NULL if we * that we are no longer in an interrupt handler. It will be non-NULL
* are returning from a nested interrupt. * if we are returning from a nested interrupt.
*/ */
CURRENT_REGS = savestate; CURRENT_REGS = savestate;
+15 -30
View File
@@ -1,35 +1,20 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/armv6-m/arm_doirq.c * arch/arm/src/armv6-m/arm_doirq.c
* *
* Copyright (C) 2013-2015 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@@ -78,9 +63,9 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
#else #else
uint32_t *savestate; uint32_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want /* Nested interrupts are not supported in this implementation. If you
* to implement nested interrupts, you would have to (1) change the way that * want to implement nested interrupts, you would have to (1) change the
* CURRENT_REGS is handled and (2) the design associated with * way that CURRENT_REGS is handled and (2) the design associated with
* CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not work for * CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not work for
* that purpose as implemented here because only the outermost nested * that purpose as implemented here because only the outermost nested
* interrupt can result in a context switch (it can probably be deleted). * interrupt can result in a context switch (it can probably be deleted).
+15 -30
View File
@@ -1,36 +1,20 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/armv6-m/arm_systemreset.c * arch/arm/src/armv6-m/arm_systemreset.c
* *
* Copyright (C) 2013, 2019 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* Darcy Gong * this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@@ -49,7 +33,7 @@
#include "nvic.h" #include "nvic.h"
/**************************************************************************** /****************************************************************************
* Public functions * Public Functions
****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
@@ -68,7 +52,8 @@ void up_systemreset(void)
* the AIRCR register. * the AIRCR register.
*/ */
regval = ((0x5fa << SYSCON_AIRCR_VECTKEY_SHIFT) | SYSCON_AIRCR_SYSRESETREQ); regval = ((0x5fa << SYSCON_AIRCR_VECTKEY_SHIFT) |
SYSCON_AIRCR_SYSRESETREQ);
putreg32(regval, ARMV6M_SYSCON_AIRCR); putreg32(regval, ARMV6M_SYSCON_AIRCR);
/* Ensure completion of memory accesses */ /* Ensure completion of memory accesses */
+8 -8
View File
@@ -46,9 +46,9 @@
#include "chip.h" #include "chip.h"
#include "up_internal.h" #include "up_internal.h"
/************************************************************************************ /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
************************************************************************************/ ****************************************************************************/
#define IDLE_STACK ((unsigned)&_ebss+CONFIG_IDLETHREAD_STACKSIZE-4) #define IDLE_STACK ((unsigned)&_ebss+CONFIG_IDLETHREAD_STACKSIZE-4)
@@ -68,15 +68,15 @@ extern void __start(void);
extern void exception_common(void); extern void exception_common(void);
/************************************************************************************ /****************************************************************************
* Public data * Public data
************************************************************************************/ ****************************************************************************/
/* The v7m vector table consists of an array of function pointers, with the first /* The v6m vector table consists of an array of function pointers, with the
* slot (vector zero) used to hold the initial stack pointer. * first slot (vector zero) used to hold the initial stack pointer.
* *
* As all exceptions (interrupts) are routed via exception_common, we just need to * As all exceptions (interrupts) are routed via exception_common, we just
* fill this array with pointers to it. * need to fill this array with pointers to it.
* *
* Note that the [ ... ] desginated initialiser is a GCC extension. * Note that the [ ... ] desginated initialiser is a GCC extension.
*/ */
+15 -13
View File
@@ -5,7 +5,9 @@
* *
* All rights reserved. * All rights reserved.
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are
* met:
*
* - Redistributions of source code must retain the above copyright * - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer. * notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright * - Redistributions in binary form must reproduce the above copyright
@@ -14,18 +16,18 @@
* - Neither the name of ARM nor the names of its contributors may be used * - Neither the name of ARM nor the names of its contributors may be used
* to endorse or promote products derived from this software without * to endorse or promote products derived from this software without
* specific prior written permission. * specific prior written permission.
* * *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
* Copyright (C) 2014 Pierre-noel Bouteville . All rights reserved. * Copyright (C) 2014 Pierre-noel Bouteville . All rights reserved.
* Copyright (C) 2014 Gregory Nutt. All rights reserved. * Copyright (C) 2014 Gregory Nutt. All rights reserved.
+7 -3
View File
@@ -55,9 +55,12 @@
* Private Functions * Private Functions
****************************************************************************/ ****************************************************************************/
void __cyg_profile_func_enter(void *func, void *caller) __attribute__((naked, no_instrument_function)); void __cyg_profile_func_enter(void *func, void *caller)
void __cyg_profile_func_exit(void *func, void *caller) __attribute__((naked, no_instrument_function)); __attribute__((naked, no_instrument_function));
void __stack_overflow_trap(void) __attribute__((naked, no_instrument_function)); void __cyg_profile_func_exit(void *func, void *caller)
__attribute__((naked, no_instrument_function));
void _stack_overflow_trap(void)
__attribute__((naked, no_instrument_function));
/**************************************************************************** /****************************************************************************
* Name: __stack_overflow_trap * Name: __stack_overflow_trap
@@ -70,6 +73,7 @@ void __stack_overflow_trap(void)
uint32_t regval; uint32_t regval;
/* force hard fault */ /* force hard fault */
regval = getreg32(NVIC_INTCTRL); regval = getreg32(NVIC_INTCTRL);
regval |= NVIC_INTCTRL_NMIPENDSET; regval |= NVIC_INTCTRL_NMIPENDSET;
putreg32(regval, NVIC_INTCTRL); putreg32(regval, NVIC_INTCTRL);
+4 -2
View File
@@ -280,7 +280,8 @@ static int systick_interrupt(int irq, FAR void *context, FAR void *arg)
struct timer_lowerhalf_s *systick_initialize(bool coreclk, struct timer_lowerhalf_s *systick_initialize(bool coreclk,
unsigned int freq, int minor) unsigned int freq, int minor)
{ {
struct systick_lowerhalf_s *lower = (struct systick_lowerhalf_s *)&g_systick_lower; struct systick_lowerhalf_s *lower =
(struct systick_lowerhalf_s *)&g_systick_lower;
/* Calculate the working clock frequency if need */ /* Calculate the working clock frequency if need */
@@ -299,7 +300,8 @@ struct timer_lowerhalf_s *systick_initialize(bool coreclk,
if (coreclk) if (coreclk)
{ {
putreg32(NVIC_SYSTICK_CTRL_CLKSOURCE | NVIC_SYSTICK_CTRL_TICKINT, NVIC_SYSTICK_CTRL); putreg32(NVIC_SYSTICK_CTRL_CLKSOURCE | NVIC_SYSTICK_CTRL_TICKINT,
NVIC_SYSTICK_CTRL);
} }
else else
{ {
+9 -9
View File
@@ -41,9 +41,9 @@
#include "chip.h" #include "chip.h"
#include "up_internal.h" #include "up_internal.h"
/************************************************************************************ /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
************************************************************************************/ ****************************************************************************/
#define IDLE_STACK ((unsigned)&_ebss+CONFIG_IDLETHREAD_STACKSIZE-4) #define IDLE_STACK ((unsigned)&_ebss+CONFIG_IDLETHREAD_STACKSIZE-4)
@@ -63,17 +63,17 @@ extern void __start(void);
extern void exception_common(void); extern void exception_common(void);
/************************************************************************************ /****************************************************************************
* Public data * Public data
************************************************************************************/ ****************************************************************************/
/* The v7m vector table consists of an array of function pointers, with the first /* The v7m vector table consists of an array of function pointers, with the
* slot (vector zero) used to hold the initial stack pointer. * first slot (vector zero) used to hold the initial stack pointer.
* *
* As all exceptions (interrupts) are routed via exception_common, we just need to * As all exceptions (interrupts) are routed via exception_common, we just
* fill this array with pointers to it. * need to fill this array with pointers to it.
* *
* Note that the [ ... ] designated initialiser is a GCC extension. * Note that the [ ... ] designated initializer is a GCC extension.
*/ */
unsigned _vectors[] __attribute__((section(".vectors"))) = unsigned _vectors[] __attribute__((section(".vectors"))) =
+20 -38
View File
@@ -1,35 +1,20 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/common/arm_allocateheap.c * arch/arm/src/common/arm_allocateheap.c
* *
* Copyright (C) 2007, 2008, 2014-2015 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@@ -56,7 +41,9 @@
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
****************************************************************************/ ****************************************************************************/
/* Configuration ************************************************************/ /* Configuration ************************************************************/
/* Terminology. In the flat build (CONFIG_BUILD_FLAT=y), there is only a /* Terminology. In the flat build (CONFIG_BUILD_FLAT=y), there is only a
* single heap access with the standard allocations (malloc/free). This * single heap access with the standard allocations (malloc/free). This
* heap is referred to as the user heap. In the protected build * heap is referred to as the user heap. In the protected build
@@ -73,14 +60,6 @@
* kernel heap here. * kernel heap here.
*/ */
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
@@ -114,7 +93,8 @@
* *
* Kernel .data region. Size determined at link time. * Kernel .data region. Size determined at link time.
* Kernel .bss region Size determined at link time. * Kernel .bss region Size determined at link time.
* Kernel IDLE thread stack. Size determined by CONFIG_IDLETHREAD_STACKSIZE. * Kernel IDLE thread stack. Size determined by
* CONFIG_IDLETHREAD_STACKSIZE.
* Padding for alignment * Padding for alignment
* User .data region. Size determined at link time. * User .data region. Size determined at link time.
* User .bss region Size determined at link time. * User .bss region Size determined at link time.
@@ -135,7 +115,8 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
* of CONFIG_MM_KERNEL_HEAPSIZE (subject to alignment). * of CONFIG_MM_KERNEL_HEAPSIZE (subject to alignment).
*/ */
uintptr_t ubase = (uintptr_t)USERSPACE->us_bssend + CONFIG_MM_KERNEL_HEAPSIZE; uintptr_t ubase = (uintptr_t)USERSPACE->us_bssend +
CONFIG_MM_KERNEL_HEAPSIZE;
size_t usize = CONFIG_RAM_END - ubase; size_t usize = CONFIG_RAM_END - ubase;
DEBUGASSERT(ubase < (uintptr_t)CONFIG_RAM_END); DEBUGASSERT(ubase < (uintptr_t)CONFIG_RAM_END);
@@ -174,7 +155,8 @@ void up_allocate_kheap(FAR void **heap_start, size_t *heap_size)
* of CONFIG_MM_KERNEL_HEAPSIZE (subject to alignment). * of CONFIG_MM_KERNEL_HEAPSIZE (subject to alignment).
*/ */
uintptr_t ubase = (uintptr_t)USERSPACE->us_bssend + CONFIG_MM_KERNEL_HEAPSIZE; uintptr_t ubase = (uintptr_t)USERSPACE->us_bssend +
CONFIG_MM_KERNEL_HEAPSIZE;
DEBUGASSERT(ubase < (uintptr_t)CONFIG_RAM_END); DEBUGASSERT(ubase < (uintptr_t)CONFIG_RAM_END);
/* Return the kernel heap settings (i.e., the part of the heap region /* Return the kernel heap settings (i.e., the part of the heap region
+17 -29
View File
@@ -1,35 +1,20 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/common/arm_createstack.c * arch/arm/src/common/arm_createstack.c
* *
* Copyright (C) 2007-2014, 2016 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@@ -58,6 +43,7 @@
/**************************************************************************** /****************************************************************************
* Pre-processor Macros * Pre-processor Macros
****************************************************************************/ ****************************************************************************/
/* Configuration */ /* Configuration */
#undef HAVE_KERNEL_HEAP #undef HAVE_KERNEL_HEAP
@@ -253,8 +239,10 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
* water marks. * water marks.
*/ */
stack_base = (uintptr_t)tcb->stack_alloc_ptr + sizeof(struct tls_info_s); stack_base = (uintptr_t)tcb->stack_alloc_ptr +
stack_size = tcb->adj_stack_size - sizeof(struct tls_info_s); sizeof(struct tls_info_s);
stack_size = tcb->adj_stack_size -
sizeof(struct tls_info_s);
up_stack_color((FAR void *)stack_base, stack_size); up_stack_color((FAR void *)stack_base, stack_size);
#endif /* CONFIG_STACK_COLORATION */ #endif /* CONFIG_STACK_COLORATION */
+14 -29
View File
@@ -1,35 +1,20 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/common/arm_usestack.c * arch/arm/src/common/arm_usestack.c
* *
* Copyright (C) 2007-2009, 2013, 2016 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@@ -164,8 +149,8 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
*/ */
#ifdef CONFIG_TLS #ifdef CONFIG_TLS
up_stack_color( up_stack_color((FAR void *)((uintptr_t)tcb->stack_alloc_ptr +
(FAR void *)((uintptr_t)tcb->stack_alloc_ptr + sizeof(struct tls_info_s)), sizeof(struct tls_info_s)),
tcb->adj_stack_size - sizeof(struct tls_info_s)); tcb->adj_stack_size - sizeof(struct tls_info_s));
#else #else
up_stack_color(tcb->stack_alloc_ptr, tcb->adj_stack_size); up_stack_color(tcb->stack_alloc_ptr, tcb->adj_stack_size);
+16 -30
View File
@@ -1,35 +1,20 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/common/arm_vfork.c * arch/arm/src/common/arm_vfork.c
* *
* Copyright (C) 2013 Gregory Nutt. All rights reserved. * Licensed to the Apache Software Foundation (ASF) under one or more
* Author: Gregory Nutt <gnutt@nuttx.org> * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
* *
* Redistribution and use in source and binary forms, with or without * http://www.apache.org/licenses/LICENSE-2.0
* modification, are permitted provided that the following conditions
* are met:
* *
* 1. Redistributions of source code must retain the above copyright * Unless required by applicable law or agreed to in writing, software
* notice, this list of conditions and the following disclaimer. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* 2. Redistributions in binary form must reproduce the above copyright * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* notice, this list of conditions and the following disclaimer in * License for the specific language governing permissions and limitations
* the documentation and/or other materials provided with the * under the License.
* distribution.
* 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* *
****************************************************************************/ ****************************************************************************/
@@ -82,8 +67,8 @@
* 1) User code calls vfork(). vfork() collects context information and * 1) User code calls vfork(). vfork() collects context information and
* transfers control up up_vfork(). * transfers control up up_vfork().
* 2) up_vfork()and calls nxtask_vforksetup(). * 2) up_vfork()and calls nxtask_vforksetup().
* 3) nxtask_vforksetup() allocates and configures the child task's TCB. This * 3) nxtask_vforksetup() allocates and configures the child task's TCB.
* consists of: * This consists of:
* - Allocation of the child task's TCB. * - Allocation of the child task's TCB.
* - Initialization of file descriptors and streams * - Initialization of file descriptors and streams
* - Configuration of environment variables * - Configuration of environment variables
@@ -96,7 +81,8 @@
* 5) up_vfork() then calls nxtask_vforkstart() * 5) up_vfork() then calls nxtask_vforkstart()
* 6) nxtask_vforkstart() then executes the child thread. * 6) nxtask_vforkstart() then executes the child thread.
* *
* nxtask_vforkabort() may be called if an error occurs between steps 3 and 6. * nxtask_vforkabort() may be called if an error occurs between steps 3 and
* 6.
* *
* Input Parameters: * Input Parameters:
* context - Caller context information saved by vfork() * context - Caller context information saved by vfork()
+3 -3
View File
@@ -467,9 +467,9 @@ void up_wdtinit(void);
* implementations, or common/arm_etherstub.c for a corner case where the * implementations, or common/arm_etherstub.c for a corner case where the
* network is enabled yet there is no Ethernet driver to be initialized. * network is enabled yet there is no Ethernet driver to be initialized.
* *
* Use of common/arm_etherstub.c is deprecated. The preferred mechanism is to * Use of common/arm_etherstub.c is deprecated. The preferred mechanism is
* use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in * to use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize()
* up_initialize(). Then this stub would not be needed. * in up_initialize(). Then this stub would not be needed.
*/ */
#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) #if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT)
+6 -6
View File
@@ -34,9 +34,9 @@
/* For each chip supported in chip.h, the following are provided to customize the /* For each chip supported in chip.h, the following are provided to customize the
* environment for the specific LPC43XX chip: * environment for the specific LPC43XX chip:
* *
* Define ARMV7M_PERIPHERAL_INTERRUPTS - This is needed by common/arm_vectors.c. This * Define ARMV7M_PERIPHERAL_INTERRUPTS - This is needed by common/arm_vectors.c.
* definition provides the number of "external" interrupt vectors supported by * This definition provides the number of "external" interrupt vectors supported
* the specific LPC43 chip. * by the specific LPC43 chip.
* *
* For the Cortex-M3 core, this should always be equal to the value * For the Cortex-M3 core, this should always be equal to the value
* LPC43M4_IRQ_NEXTINT defined in include/lpc43xx/irq.h. For the Cortex-M0 * LPC43M4_IRQ_NEXTINT defined in include/lpc43xx/irq.h. For the Cortex-M0
@@ -46,8 +46,8 @@
* Include the chip-specific memory map header file, and * Include the chip-specific memory map header file, and
* Include the chip-specific pin configuration. * Include the chip-specific pin configuration.
* *
* These header files may or may not be shared between different chips. That decisions * These header files may or may not be shared between different chips. That
* depends on the similarity of the chip peripheral. * decision depends on the similarity of the chip peripheral.
*/ */
#if defined(CONFIG_ARCH_CHIP_LPC4310FBD144) #if defined(CONFIG_ARCH_CHIP_LPC4310FBD144)
@@ -151,7 +151,7 @@
************************************************************************************/ ************************************************************************************/
/************************************************************************************ /************************************************************************************
* Public Functions * Public Function Prototypes
************************************************************************************/ ************************************************************************************/
#endif /* __ARCH_ARM_SRC_LPC43XX_CHIP_H */ #endif /* __ARCH_ARM_SRC_LPC43XX_CHIP_H */