mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #7331 from TomoYamanaka/improve_bootloader
Improve the process for Cortex-A9 in mbed_applicationpull/7411/head
commit
7e0f75e831
|
@ -23,11 +23,33 @@
|
|||
|
||||
#if defined(__CORTEX_A9)
|
||||
|
||||
static void powerdown_gic(void);
|
||||
|
||||
void mbed_start_application(uintptr_t address)
|
||||
{
|
||||
__disable_irq();
|
||||
powerdown_gic();
|
||||
__enable_irq();
|
||||
((void(*)())address)();
|
||||
}
|
||||
|
||||
static void powerdown_gic()
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
|
||||
for (i = 0; i < 32; i++) {
|
||||
GICDistributor->ICENABLER[i] = 0xFFFFFFFF;
|
||||
GICDistributor->ICPENDR[i] = 0xFFFFFFFF;
|
||||
if (i < 4) {
|
||||
GICDistributor->CPENDSGIR[i] = 0xFFFFFFFF;
|
||||
}
|
||||
for (j = 0; j < 8; j++) {
|
||||
GICDistributor->IPRIORITYR[i*8+j] = 0x00000000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static void powerdown_nvic(void);
|
||||
|
|
Loading…
Reference in New Issue