1/*
2 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef __DFX_SAL_H__
17#define __DFX_SAL_H__
18#include <hi_ft_nv.h>
19#include <dfx_sys.h>
20
21#define ID_DIAG_CMD_REMOTE              0x7000
22#define ID_DIAG_CMD_DO_FRAME_ERR        0x7007 /* DIAG error report */
23
24#define HI_DIAG_VER_FULL_PRODUCT_NAME_MAX_SIZE    60 /* Version Description */
25#define HI_DIAG_VER_SDK_PRODUCT_NAME_MAX_SIZE     24 /* SDK Version */
26#define HI_DIAG_VER_BOOT_NAME_MAX_SIZE            8
27#define HI_DIAG_VER_FULL_HW_INFO_MAX_SIZE         40 /* Hardware information */
28#define HI_DIAG_VER_FULL_DEV_VER_NAME_MAX_SIZE    40 /* Device information */
29
30typedef struct {
31    hi_char ver[HI_DIAG_VER_FULL_PRODUCT_NAME_MAX_SIZE];
32    hi_char sdk_ver[HI_DIAG_VER_SDK_PRODUCT_NAME_MAX_SIZE];
33    hi_char dev[HI_DIAG_VER_FULL_DEV_VER_NAME_MAX_SIZE];
34    hi_char hw[HI_DIAG_VER_FULL_HW_INFO_MAX_SIZE];
35    hi_char boot_ver[HI_DIAG_VER_BOOT_NAME_MAX_SIZE];
36} diag_cmd_soft_new_ver;
37
38#define HI_SYS_ERR_SIGNATURE     hi_make_identifier('s', 'y', 's', 'E')
39
40typedef struct {
41    hi_u32 id;
42} hi_dbg_stat_q;
43
44#endif /* __DFX_SAL_H__ */
45
46