arch/arm/samv7: add ARCH_RAMVECTORS support
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
parent
e28e4fd320
commit
cc0ee12092
@ -34,7 +34,9 @@
|
|||||||
#include <arch/armv7-m/nvicpri.h>
|
#include <arch/armv7-m/nvicpri.h>
|
||||||
|
|
||||||
#include "nvic.h"
|
#include "nvic.h"
|
||||||
#include "ram_vectors.h"
|
#ifdef CONFIG_ARCH_RAMVECTORS
|
||||||
|
# include "ram_vectors.h"
|
||||||
|
#endif
|
||||||
#include "arm_internal.h"
|
#include "arm_internal.h"
|
||||||
|
|
||||||
#ifdef CONFIG_SAMV7_GPIO_IRQ
|
#ifdef CONFIG_SAMV7_GPIO_IRQ
|
||||||
@ -81,7 +83,7 @@ static void sam_dumpnvic(const char *msg, int irq)
|
|||||||
|
|
||||||
irqinfo("NVIC (%s, irq=%d):\n", msg, irq);
|
irqinfo("NVIC (%s, irq=%d):\n", msg, irq);
|
||||||
irqinfo(" INTCTRL: %08x VECTAB: %08x\n",
|
irqinfo(" INTCTRL: %08x VECTAB: %08x\n",
|
||||||
getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB));
|
getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB));
|
||||||
#if 0
|
#if 0
|
||||||
irqinfo(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x "
|
irqinfo(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x "
|
||||||
"SYSTICK: %08x\n",
|
"SYSTICK: %08x\n",
|
||||||
@ -359,6 +361,13 @@ void up_irqinitialize(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
arm_ramvec_initialize();
|
arm_ramvec_initialize();
|
||||||
|
|
||||||
|
/* At this moment both I- and D-Caches have been already enabled in
|
||||||
|
* __start so we need to flush RAM vectors table to memory.
|
||||||
|
*/
|
||||||
|
|
||||||
|
up_clean_dcache((uintptr_t)g_ram_vectors,
|
||||||
|
(uintptr_t)g_ram_vectors + sizeof(g_ram_vectors));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Set all interrupts (and exceptions) to the default priority */
|
/* Set all interrupts (and exceptions) to the default priority */
|
||||||
|
@ -88,6 +88,12 @@ SECTIONS
|
|||||||
|
|
||||||
_eronly = ABSOLUTE(.);
|
_eronly = ABSOLUTE(.);
|
||||||
|
|
||||||
|
/* The RAM vector table (if present) should lie at the beginning of SRAM */
|
||||||
|
|
||||||
|
.ram_vectors : {
|
||||||
|
*(.ram_vectors)
|
||||||
|
} > sram
|
||||||
|
|
||||||
.data : {
|
.data : {
|
||||||
_sdata = ABSOLUTE(.);
|
_sdata = ABSOLUTE(.);
|
||||||
*(.data .data.*)
|
*(.data .data.*)
|
||||||
@ -97,7 +103,7 @@ SECTIONS
|
|||||||
_edata = ABSOLUTE(.);
|
_edata = ABSOLUTE(.);
|
||||||
} > sram AT > flash
|
} > sram AT > flash
|
||||||
|
|
||||||
.ramfunc ALIGN(4): {
|
.ramfunc : ALIGN(4) {
|
||||||
_sramfuncs = ABSOLUTE(.);
|
_sramfuncs = ABSOLUTE(.);
|
||||||
*(.ramfunc .ramfunc.*)
|
*(.ramfunc .ramfunc.*)
|
||||||
_eramfuncs = ABSOLUTE(.);
|
_eramfuncs = ABSOLUTE(.);
|
||||||
|
@ -63,6 +63,12 @@ SECTIONS
|
|||||||
|
|
||||||
_eronly = ABSOLUTE(.);
|
_eronly = ABSOLUTE(.);
|
||||||
|
|
||||||
|
/* The RAM vector table (if present) should lie at the beginning of SRAM */
|
||||||
|
|
||||||
|
.ram_vectors : {
|
||||||
|
*(.ram_vectors)
|
||||||
|
} > ksram
|
||||||
|
|
||||||
.data : {
|
.data : {
|
||||||
_sdata = ABSOLUTE(.);
|
_sdata = ABSOLUTE(.);
|
||||||
*(.data .data.*)
|
*(.data .data.*)
|
||||||
@ -72,7 +78,7 @@ SECTIONS
|
|||||||
_edata = ABSOLUTE(.);
|
_edata = ABSOLUTE(.);
|
||||||
} > ksram AT > kflash
|
} > ksram AT > kflash
|
||||||
|
|
||||||
.ramfunc ALIGN(4): {
|
.ramfunc : ALIGN(4) {
|
||||||
_sramfuncs = ABSOLUTE(.);
|
_sramfuncs = ABSOLUTE(.);
|
||||||
*(.ramfunc .ramfunc.*)
|
*(.ramfunc .ramfunc.*)
|
||||||
_eramfuncs = ABSOLUTE(.);
|
_eramfuncs = ABSOLUTE(.);
|
||||||
|
Loading…
Reference in New Issue
Block a user