1d6aed566Sopenharmony_ci/* 2d6aed566Sopenharmony_ci * Copyright (c) 2020-2021 Huawei Device Co., Ltd. 3d6aed566Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4d6aed566Sopenharmony_ci * you may not use this file except in compliance with the License. 5d6aed566Sopenharmony_ci * You may obtain a copy of the License at 6d6aed566Sopenharmony_ci * 7d6aed566Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8d6aed566Sopenharmony_ci * 9d6aed566Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10d6aed566Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11d6aed566Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12d6aed566Sopenharmony_ci * See the License for the specific language governing permissions and 13d6aed566Sopenharmony_ci * limitations under the License. 14d6aed566Sopenharmony_ci */ 15d6aed566Sopenharmony_ci 16d6aed566Sopenharmony_ci#ifndef _RISCV_HAL_H 17d6aed566Sopenharmony_ci#define _RISCV_HAL_H 18d6aed566Sopenharmony_ci 19d6aed566Sopenharmony_ci#include "los_compiler.h" 20d6aed566Sopenharmony_ci#include "los_timer.h" 21d6aed566Sopenharmony_ci 22d6aed566Sopenharmony_ci#ifdef __cplusplus 23d6aed566Sopenharmony_ci#if __cplusplus 24d6aed566Sopenharmony_ciextern "C" { 25d6aed566Sopenharmony_ci#endif 26d6aed566Sopenharmony_ci#endif 27d6aed566Sopenharmony_ci 28d6aed566Sopenharmony_ci/* 29d6aed566Sopenharmony_ci * backtrace 30d6aed566Sopenharmony_ci */ 31d6aed566Sopenharmony_ciextern CHAR *__except_stack_top; 32d6aed566Sopenharmony_ciextern CHAR *__start_and_irq_stack_top; 33d6aed566Sopenharmony_ciextern CHAR *__text_start; 34d6aed566Sopenharmony_ciextern CHAR *__text_end; 35d6aed566Sopenharmony_ciextern CHAR *__bss_end; 36d6aed566Sopenharmony_ci 37d6aed566Sopenharmony_ciextern VOID HalIrqDisable(UINT32 vector); 38d6aed566Sopenharmony_ciextern VOID HalIrqEnable(UINT32 vector); 39d6aed566Sopenharmony_ciextern VOID HalSetLocalInterPri(UINT32 vector, UINT16 prior); 40d6aed566Sopenharmony_ci 41d6aed566Sopenharmony_ciextern VOID HalGetSysCpuCycle(UINT32 *cntHi, UINT32 *cntLo); 42d6aed566Sopenharmony_ciextern VOID HalPlicInit(VOID); 43d6aed566Sopenharmony_ci 44d6aed566Sopenharmony_ci#ifdef __cplusplus 45d6aed566Sopenharmony_ci#if __cplusplus 46d6aed566Sopenharmony_ci} 47d6aed566Sopenharmony_ci#endif 48d6aed566Sopenharmony_ci#endif 49d6aed566Sopenharmony_ci 50d6aed566Sopenharmony_ci#endif /* _RISCV_HAL_H */ 51