You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/02/22 04:08:10 UTC

[GitHub] [incubator-nuttx] btashton opened a new pull request #2889: pic32mx7 cannot perform context switch

btashton opened a new pull request #2889:
URL: https://github.com/apache/incubator-nuttx/pull/2889


   ## Summary
   There was a bug with the pic32mx irq registration logic for CS0 where it would not get priority set correctly a never trigger `up_swint0` on the context switch system call.
   
   ## Impact
   pic32mx7 should not be able to make context switches and actually function.
   
   ## Testing
   This was debugged an verified on with the qemu simulator (with some additional patches to the simulator).
   Prior to this patch:
   ```
   nx_start: Entry
   uart_register: Registering /dev/console
   uart_register: Registering /dev/ttyS0
   uart_register: Registering /dev/ttyS1
   nx_start_application: Starting init thread
   nx_start: Entry
   uart_register: Registering /dev/console
   uart_register: Registering /dev/ttyS0
   uart_register: Registering /dev/ttyS1
   nx_start_application: Starting init thread
   nx_start: Entry
   uart_register: Registering /dev/console
   uart_register: Registering /dev/ttyS0
   uart_register: Registering /dev/ttyS1
   nx_start_application: Starting init thread
   nx_start: Entry
   uart_register: Registering /dev/console
   uart_register: Registering /dev/ttyS0
   uart_register: Registering /dev/ttyS1
   nx_start_application: Starting init thread
   nx_start: Entry
   uart_register: Registering /dev/console
   uart_register: Registering /dev/ttyS0
   uart_register: Registering /dev/ttyS1
   group_setupidlefiles: ERROR: Failed to open /dev/console: -24
   up_assert: Assertion failed at file:init/nx_start.c line: 752
   up_dumpstate: sp:         a0001c14
   up_dumpstate: stack base: a0001cac
   up_dumpstate: stack size: 00001000
   up_stackdump: a0001c00: 9d03ab8c a0001c24 9d03a7b8 a0001c00 a0001c00 a0001c1c 9d00ccbc a0001c14
   up_stackdump: a0001c20: a0001cac 9d03abec 00001000 a00003fc a0001c14 a0001cac 00001000 a0001c44
   up_stackdump: a0001c40: 9d00b780 00000000 9d03a7b8 9d03a7e4 9d03985c 000002f0 9d001ba4 a0001c64
   up_stackdump: a0001c60: 9d006260 9d03985c 000002f0 a0001ff0 ffffffe8 a0001c7c 9d000500 9d03985c
   up_stackdump: a0001c80: 000002f0 ffffffff 00000000 00000010 00000000 00000000 a000038c a0001cac
   up_stackdump: a0001ca0: 0001e354 00000000 00000000 00000000 00000008 80000000 00000020 80000008
   ```
   After this patch:
   ```
   ❯ ./mipsel-softmmu/qemu-system-mipsel   -machine pic32mx7-explorer16
   -nographic -monitor none   -serial stdio   -kernel
   ~/nuttx/wrk/nuttx/nuttx.hex
   Board: Microchip Explorer16
   Processor: M4K
   RAM size: 128 kbytes
   Load file: '/home/bashton/nuttx/wrk/nuttx/nuttx.hex', 250312 bytes
   nx_start: Entry
   uart_register: Registering /dev/console
   uart_register: Registering /dev/ttyS0
   uart_register: Registering /dev/ttyS1
   nx_start_application: Starting init thread
   
   NuttShell (NSH) NutnxtX_s-1tart0: .0.1
   nsh> CPU0: Beginning Idle Loop
   
   nsh> uname -a
   NuttX 10.0.1 198649273f-dirty Feb 21 2021 18:53:48 mips pic32mx-starterkit
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #2889: pic32mx7 cannot perform context switch

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #2889:
URL: https://github.com/apache/incubator-nuttx/pull/2889


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org