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 __SOC_RANDOM_H__ 17d6aed566Sopenharmony_ci#define __SOC_RANDOM_H__ 18d6aed566Sopenharmony_ci 19d6aed566Sopenharmony_ci/* 20d6aed566Sopenharmony_ci * When kernel decoupled with specific devices, 21d6aed566Sopenharmony_ci * these code can be removed. 22d6aed566Sopenharmony_ci */ 23d6aed566Sopenharmony_ciVOID HiRandomHwInit(VOID); 24d6aed566Sopenharmony_ciVOID HiRandomHwDeinit(VOID); 25d6aed566Sopenharmony_ciINT32 HiRandomHwGetInteger(UINT32 *result); 26d6aed566Sopenharmony_ciINT32 HiRandomHwGetNumber(CHAR *buffer, size_t bufLen); 27d6aed566Sopenharmony_ci 28d6aed566Sopenharmony_ci#ifdef LOSCFG_HW_RANDOM_ENABLE 29d6aed566Sopenharmony_civoid VirtrngInit(void); 30d6aed566Sopenharmony_ci#endif 31d6aed566Sopenharmony_ci 32d6aed566Sopenharmony_ci#endif 33