diff options
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/crt0-pp.S | 17 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/sansa-e200/ata-e200.c | 3 |
2 files changed, 19 insertions, 1 deletions
diff --git a/firmware/target/arm/crt0-pp.S b/firmware/target/arm/crt0-pp.S index e0d1034f74..bbeace1b60 100644 --- a/firmware/target/arm/crt0-pp.S +++ b/firmware/target/arm/crt0-pp.S @@ -222,6 +222,19 @@ cop_init: strhi r4, [r2], #4 bhi 2b + /* Set up stack for IRQ mode */ + msr cpsr_c, #0xd2 + ldr sp, =cop_irq_stack + /* Set up stack for FIQ mode */ + msr cpsr_c, #0xd1 + ldr sp, =fiq_stack + + /* Let abort and undefined modes use IRQ stack */ + msr cpsr_c, #0xd7 + ldr sp, =cop_irq_stack + msr cpsr_c, #0xdb + ldr sp, =cop_irq_stack + ldr sp, =cop_stackend /* Run cop_main() in apps/main.c */ @@ -307,6 +320,10 @@ UIE: .space 256*4 irq_stack: +/* 256 words of COP IRQ stack */ + .space 256*4 +cop_irq_stack: + /* 256 words of FIQ stack */ .space 256*4 fiq_stack: diff --git a/firmware/target/arm/sandisk/sansa-e200/ata-e200.c b/firmware/target/arm/sandisk/sansa-e200/ata-e200.c index cf05397a78..73a67d1ee6 100644 --- a/firmware/target/arm/sandisk/sansa-e200/ata-e200.c +++ b/firmware/target/arm/sandisk/sansa-e200/ata-e200.c @@ -687,7 +687,8 @@ int ata_init(void) { queue_init(&sd_queue, true); create_thread(sd_thread, sd_stack, - sizeof(sd_stack), sd_thread_name IF_PRIO(, PRIORITY_SYSTEM)); + sizeof(sd_stack), sd_thread_name IF_PRIO(, PRIORITY_SYSTEM) + IF_COP(, CPU, false)); initialized = true; } |