Heesub Shin
bda7d9ee4d
ARMv7-R: fix to restore the Thumb flag in CPSR
...
Thumb flag in CPSR is not restored back when the context switch occurs
while executing thumb instruction.
Reported-by: Eunbong Song <eunb.song@samsung.com>
Signed-off-by: Byoungtae Cho <bt.cho@samsung.com>
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
2016-11-06 21:48:02 +09:00
Heesub Shin
343243c7c0
ARMv7-R: fix CPSR corruption after exception handling
...
A sporadic hang with consequent crash is observed when booting:
arm_prefetchabort: Prefetch abort. PC: 04d34a00 IFAR: 04d34a00 IFSR: 00000008
up_assert: Assertion failed at file:armv7-r/arm_prefetchabort.c line: 87 task: init
up_dumpstate: Current sp: 004c3df0
up_dumpstate: Interrupt stack:
up_dumpstate: base: 004c05fc
up_dumpstate: size: 00000800
up_dumpstate: User stack:
up_dumpstate: base: 004c3f58
up_dumpstate: size: 00000fec
up_dumpstate: User Stack
up_stackdump: 004c3de0: 004a0d14 004c3df0 004c3f58 004a0d20 00000057 004c2c58 09000000 004a42a4
up_stackdump: 004c3e00: 00000003 004c3e10 004a0f1c 004bbcef 33c44b00 004a0f28 04d34a00 00000008
up_stackdump: 004c3e20: 00000008 004a01bc 004bfd38 00000001 00007fff 00000001 34134a00 d83e4c00
up_stackdump: 004c3e40: 09000000 00000000 33c44b00 d83e4c00 0c3f4c00 00000000 00000000 00000003
up_stackdump: 004c3e60: 004c3e70 004a1494 04d34a00 200b0253 004c3ed8 004a5298 004c3ed8 6d00006d
up_stackdump: 004c3e80: 0000006d 004bc3f4 00000009 004a4f64 00000009 b9e0784f 333f3ed0 69d4227d
up_stackdump: 004c3ea0: d81f09bd 0f867344 5a7e2c12 8acefd34 5d00dc1b 004bc432 004c3f08 004c0e08
up_stackdump: 004c3ec0: 00000000 00000000 00000000 00000000 00000000 004a4210 004a5258 004a5300
up_stackdump: 004c3ee0: 00000000 00000001 ffffffff 004c3f80 000002b0 004a4234 00000007 004c3f08
up_stackdump: 004c3f00: 004a58b4 004bc432 004bc3f4 004c3f80 000002b0 0000029c 00000000 0000029c
up_stackdump: 004c3f20: 00000000 004a5900 0000ff01 00000000 00000000 004a61f4 00000000 004a5fa4
up_stackdump: 004c3f40: 00000000 004a5f6c 00000000 004a2668 00000000 00000000 b7509f04 004c3f64
up_registerdump: R0: 00000001 00007fff 00000001 34134a00 d83e4c00 09000000 00000000 33c44b00
up_registerdump: R8: d83e4c00 0c3f4c00 00000000 00000000 00000003 004c3e70 004a1494 04d34a00
up_registerdump: CPSR: 200b0253
It seems to be caused by the corrupted or wrong CPSR restored on return
from exception. NuttX restores the context using code like this:
msr spsr, r1
GCC translates this to:
msr spsr_fc, r1
As a result, not all SPSR fields are updated on exception return. This
should be:
msr spsr_fsxc, r1
On some evaluation boards, spsr_svc may have totally invalid value at
power-on-reset. As it is not initialized at boot, the code above may
result in the corruption of cpsr and thus unexpected behavior.
Reported-by: Eunbong Song <eunb.song@samsung.com>
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
2016-11-06 20:48:09 +09:00
Heesub Shin
6bfc6b4d23
ARMv7-R: fix typo in mpu support
...
s/ARMV7M/ARMV7R/g
Reported-by: Eunbong Song <eunb.song@samsung.com>
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
2016-11-06 20:48:09 +09:00
Heesub Shin
003511d198
ARMv7-R: add cache handling functions
...
This commit adds functions for enabling and disabling d/i-caches which
were missing for ARMv7-R.
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
2016-11-06 20:48:01 +09:00
Heesub Shin
6a1a846011
ARMv7-R: add new Kconfig entries for d/i-cache
...
Unlike in ARMv7-A/M, Kconfig entries for data and instruction caches
are currently missing in ARMv7-R. This commit adds those missing Kconfig
entries. Actual implmenetation for those functions will be added in the
subsequent patches.
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
2016-11-06 16:07:46 +09:00
Heesub Shin
2b922fcdbd
ARMv7-R: remove the redundant update on SCTLR
...
mpu_control() is invoking cp15_wrsctlr() around SCTLR update
redundantly.
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
2016-11-06 16:07:45 +09:00
Heesub Shin
05d477661b
ARMv7-R: fix invalid drbar handling
...
In ARMv7-R, [31:5] bits of DRBAR is physical base address and other bits
are reserved and SBZ. Thus, there is no point in passing other than the
base address.
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
2016-11-06 16:07:41 +09:00
Heesub Shin
af6e4f59c6
ARMv7-R: fix compilation error
...
This commit fixes compilation errors on MPU support for ARMv7-R.
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
2016-11-06 16:07:38 +09:00
Heesub Shin
96a200a71c
ARMv7-R: fix typo
...
fix trivial typo: s/ARMv7-A/ARMv7-R/
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
2016-11-06 16:07:36 +09:00
Gregory Nutt
796969f6b6
Update TODO. Provide do-nothing stubs for mutex attribute interfaces if features not enabled. pthread_cond includes a signaling semaphore and should call sem_setprotocol.
2016-11-05 11:06:52 -06:00
Gregory Nutt
b0dffdc2ca
Fix a number of header files with mismatched 'extern C {' and '}'
2016-11-05 07:25:05 -06:00
Gregory Nutt
8bd8ab1a45
configs/nucleo_f303re: Various fixes to get the adc configuration building again after PR. Refresh all configurations.
2016-11-04 06:59:28 -06:00
Gregory Nutt
1d0d2fb8e1
Fix typo introduced with big set of sem_setprotocol() changes.
2016-11-03 21:08:17 -06:00
Gregory Nutt
5cfb83ec81
ESP32: File repeated in Make.defs
2016-11-03 17:47:09 -06:00
Gregory Nutt
0a5b4f684a
arch: Disable priority inheritance on all semaphores used for signaling in the rest of the MCU drivers
2016-11-03 17:38:26 -06:00
Gregory Nutt
d8fecba333
arch: Disable priority inheritance on all semaphores used for signaling in all RNG drivers
2016-11-03 17:19:51 -06:00
Gregory Nutt
d28181da10
arch: Disable priority inheritance on all semaphores used for signaling in all USB host drivers
2016-11-03 17:05:53 -06:00
Gregory Nutt
bb6bfa633e
arch: Disable priority inheritance on all semaphores used for signaling in all SD card drivers
2016-11-03 15:13:27 -06:00
Gregory Nutt
8b07aa6f7c
arch: Disable priority inheritance on all semaphores used for signaling in all SPI drivers
2016-11-03 14:51:44 -06:00
Gregory Nutt
e1cd9febbf
arch: Disable priority inheritance on all semaphores used for signaling in all I2C/TWI drivers
2016-11-03 14:23:42 -06:00
Spahlinger, Michael
77caf4180f
SAMV7: Fix to SPI-Master driver. Without this the chip select decoding feature will not work properly
2016-11-03 09:22:33 -06:00
Gregory Nutt
8190e08948
Back out part of previous commit
2016-11-03 08:57:55 -06:00
Alan Carvalho de Assis
1e754402b8
Add C++ support linking with GNU toolchain newlib/stdlibc++
2016-11-03 08:50:58 -06:00
Gregory Nutt
54d7656f18
Update some comments
2016-11-03 07:04:03 -06:00
Paul A. Patience
93e9387689
STM32 ADC: Fix compilation error when DMA isn't enabled
2016-11-02 12:52:19 -04:00
David Sidrane
d870f4ab29
I think, that Size is (highest address+1 - Base address)
...
Base address has been removed and if address+count >= size we are outside of the Flash
2016-11-01 22:27:35 +00:00
Aleksandr Vyhovanec
2bb15fe789
Minor changes
2016-11-01 23:48:44 +03:00
Aleksandr Vyhovanec
20a1642552
To write the last page
2016-11-01 23:34:30 +03:00
Gregory Nutt
cfcc7edded
Xtensa/ESP32: Add window spill logic; Add C++ support to linker script
2016-10-31 17:51:48 -06:00
Gregory Nutt
4d0b0e44f1
Xtensa/ESP32: Add up_cpu_idlestack() and fix some compile issues.
2016-10-31 14:56:48 -06:00
Gregory Nutt
28d1478480
Xtensa/ESP32: Add CPU1 startup logic
2016-10-31 13:15:15 -06:00
Gregory Nutt
a8e3f79494
Xtensa/ESP32: Add User Exception handler
2016-10-31 12:04:52 -06:00
Gregory Nutt
a787a99071
ESP32: Add inter-cpu interrupts
2016-10-31 08:29:28 -06:00
Gregory Nutt
63d5ab5b67
Add logic to attach inter-CPU interrupts. Fix some compilation errors.
2016-10-30 16:15:04 -06:00
Gregory Nutt
6ff833e56e
Forgot to add a file in the last commit
2016-10-30 15:40:42 -06:00
Gregory Nutt
85ed3dae9a
Update some compilation issues
2016-10-30 15:38:51 -06:00
Gregory Nutt
a4c3fef0b7
Xtensa: Add more exception vectors. All just cause a PANIC now.
2016-10-30 12:20:11 -06:00
Gregory Nutt
fdede8099b
Xtensa/ESP32: Add Level1 handler, panic handler, remove EXECHOOKS.
2016-10-30 10:57:57 -06:00
Gregory Nutt
eaa5968a22
Xtensa: Convert some CALL0 C calls to be compatible with Window ABI
2016-10-30 08:46:35 -06:00
Gregory Nutt
261e0edc61
Xtensa: Adapt co-processor state save/restore functions so that they are call-able from C with Windows ABI.
2016-10-30 08:35:09 -06:00
Gregory Nutt
c0da94fc3e
Xtensa: Remove xtensa_macros.h; duplicates xtensa_abi.h
2016-10-30 07:45:28 -06:00
Gregory Nutt
8c96221093
Xtensa: Replace CONFIG_XTENSA_CALL0_ABI with compiler defined __XTENSA_CALL0_ABI__
2016-10-30 07:37:51 -06:00
Gregory Nutt
dc82fa81b8
Xtensa: Remove XTENSA_EXTRA_SA_SIZE. It is not used.
2016-10-30 07:09:24 -06:00
Gregory Nutt
4997ec7a1e
ESP32 Core V2: Add an SMP configuration to support development (not yet usable).
2016-10-29 14:56:07 -06:00
Gregory Nutt
c993a0267c
Xtensa: Add Window vector
2016-10-29 12:30:24 -06:00
Gregory Nutt
804f9c5de7
Xtensa: Rename some files.
2016-10-29 11:24:02 -06:00
Gregory Nutt
d346f25aae
Xtensa/ESP32: Fix some compile issues related to new co-processor logic
2016-10-29 10:27:46 -06:00
Gregory Nutt
365e753774
Merge branch 'master' of bitbucket.org:nuttx/nuttx
2016-10-29 09:52:43 -06:00
Gregory Nutt
4943b09ffa
Xtensa: Remove co-processor ownership array. I think that this is not needed (but I might be wrong).
2016-10-29 09:50:51 -06:00
Gregory Nutt
ccf5b4e357
Xtensa: Cleanup of co-processor logic; remove some unnecessary things.
2016-10-29 09:36:33 -06:00