add cortex-v7a support
How To Run: see TencentOS-tiny\board\ALPHA_I.MX_emmc_256ddr\README.md TODO Next: 1. VFP support 2. fault diagnosis support 3. qemu vexpress ca9 support 4. raspberry pi support 5. SMP support
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* within TencentOS.
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#include <tos_k.h>
|
||||
#include "tos_k.h"
|
||||
|
||||
__API__ uint32_t tos_cpu_clz(uint32_t val)
|
||||
{
|
||||
|
@@ -58,7 +58,7 @@ port_sched_start:
|
||||
|
||||
LDR R1, =NVIC_PENDSV_PRI
|
||||
|
||||
|
||||
|
||||
STR R1, [R0]
|
||||
|
||||
MOVS R0, #0
|
||||
@@ -102,7 +102,7 @@ PendSV_Handler:
|
||||
|
||||
SUBS R0, R0, #0x20
|
||||
STMIA R0!, {R4 - R7}
|
||||
MOV R4, R8
|
||||
MOV R4, R8
|
||||
MOV R5, R9
|
||||
MOV R6, R10
|
||||
MOV R7, R11
|
||||
@@ -123,11 +123,11 @@ PendSVHandler_nosave:
|
||||
|
||||
LDMIA R0!, {R4 - R7}
|
||||
LDMIA R0!, {R2 - R3}
|
||||
MOV R8, R2
|
||||
MOV R8, R2
|
||||
MOV R9, R3
|
||||
LDMIA R0!, {R2 - R3}
|
||||
MOV R10, R2
|
||||
MOV R11, R3
|
||||
LDMIA R0!, {R2 - R3}
|
||||
MOV R10, R2
|
||||
MOV R11, R3
|
||||
MSR PSP, R0
|
||||
|
||||
MOV R0, R14
|
||||
|
@@ -1,4 +1,4 @@
|
||||
EXPORT port_int_disable
|
||||
EXPORT port_int_disable
|
||||
EXPORT port_int_enable
|
||||
|
||||
EXPORT port_cpsr_save
|
||||
@@ -28,7 +28,7 @@ NVIC_PENDSVSET EQU 0x10000000
|
||||
PRESERVE8
|
||||
|
||||
|
||||
GLOBAL port_int_disable
|
||||
GLOBAL port_int_disable
|
||||
port_int_disable
|
||||
CPSID I
|
||||
BX LR
|
||||
|
@@ -59,7 +59,7 @@ port_clz
|
||||
BX LR
|
||||
|
||||
|
||||
GLOBAL port_sched_start
|
||||
GLOBAL port_sched_start
|
||||
port_sched_start
|
||||
CPSID I
|
||||
|
||||
|
@@ -112,7 +112,7 @@ port_sched_start:
|
||||
@ restore r0, r3
|
||||
LDMFD SP!, {R0 - R3}
|
||||
@ load R12 and LR
|
||||
LDMFD SP!, {R12, LR}
|
||||
LDMFD SP!, {R12, LR}
|
||||
@ load PC and discard xPSR
|
||||
LDMFD SP!, {R1, R2}
|
||||
|
||||
@@ -191,7 +191,7 @@ _context_restore:
|
||||
|
||||
@ Load PSP with new process SP
|
||||
MSR PSP, R0
|
||||
|
||||
|
||||
CPSIE I
|
||||
|
||||
@ R0-R3, R12, LR, PC, xPSR restored automatically here
|
||||
|
Reference in New Issue
Block a user