1@/* 2@ * Copyright (c) 2009-2022 Huawei Technologies Co., Ltd. All rights reserved. 3@ * 4@ * UniProton is licensed under Mulan PSL v2. 5@ * You can use this software according to the terms and conditions of the Mulan PSL v2. 6@ * You may obtain a copy of Mulan PSL v2 at: 7@ * http://license.coscl.org.cn/MulanPSL2 8@ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, 9@ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, 10@ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. 11@ * See the Mulan PSL v2 for more details. 12@ * Create: 2009-12-22 13@ * Description: thread scheduler 14@ */ 15 .align 8 16 .section .text, "ax" 17 .thumb 18 .syntax unified 19 20 .global OsAsmIll 21 .global OsGetSp 22 .global OsFpuInit 23 24 .type OsAsmIll, function 25 .type OsGetSp, function 26 .type OsFpuInit,function 27 28OS_EXC_CAUSE_FATAL_ERR = 18 29 30OsAsmIll: 31 SVC OS_EXC_CAUSE_FATAL_ERR 32LOOP: 33 B LOOP 34 35OsGetSp: 36 MRS R0, PSP @ 读取PSP 37 BX LR 38 39OsFpuInit: 40 LDR R0, = 0xE000ED88 @ Enable CP10, CP11 41 LDR R1, [R0] 42 ORR R1, R1, #(0xF << 20) 43 STR R1, [R0] 44 45 LDR R0, = 0xE000EF34 @ FPU is automatic save or store mode 46 LDR R1, [R0] 47 AND R1, R1, #0XBFFFFFFF 48 ORR R1, R1, #0X80000000 49 STR R1, [R0] 50 BX LR 51 52 .align 53 54 .end 55