OpenBIC
OpenSource Bridge-IC
plat_class.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef PLAT_CLASS_H
18#define PLAT_CLASS_H
19
20#include <stdbool.h>
21#include <stdint.h>
22
23#define SYS_CLASS_1 1
24#define SYS_CLASS_2 2
25
26#define CPLD_ADDR 0x21 // 7-bit address
27#define CPLD_CLASS_TYPE_REG 0x0D
28#define CPLD_1OU_VPP_POWER_STATUS 0x11
29#define CPLD_2OU_EXPANSION_CARD_REG 0x13
30
31#define MAX_1OU_M2_COUNT 4
32
33typedef struct _CARD_STATUS_ {
34 bool present;
35 uint8_t card_type;
37
47};
48
52 TYPE_2OU_HSM = 0x6, //Hardware Security Module
55};
56
63};
64
68};
69
70uint8_t get_system_class();
73uint8_t get_hsc_module();
74void init_hsc_module();
76
77#endif
uint8_t get_hsc_module()
Definition: plat_class.c:30
HSC_MODULE
Definition: plat_class.h:23
@ HSC_MODULE_UNKNOWN
Definition: plat_class.h:26
int init_platform_config()
Definition: expansion_board.c:43
Definition: plat_class.h:33
uint8_t card_type
Definition: plat_class.h:35
bool present
Definition: plat_class.h:34
uint8_t get_system_class()
Definition: util_sys.c:146
struct _CARD_STATUS_ CARD_STATUS
void init_hsc_module()
Definition: plat_class.c:152
CARD_STATUS get_1ou_status()
Definition: plat_class.c:137
BIC_CARD_PRESENT
Definition: plat_class.h:65
@ CARD_PRESENT
Definition: plat_class.h:67
@ CARD_UNPRESENT
Definition: plat_class.h:66
CARD_STATUS get_2ou_status()
Definition: plat_class.c:142
_1OU_CARD_TYPE_
Definition: plat_class.h:38
@ TYPE_1OU_EXP_WITH_6_M2
Definition: plat_class.h:40
@ TYPE_1OU_RAINBOW_FALLS
Definition: plat_class.h:41
@ TYPE_1OU_EXP_WITH_NIC
Definition: plat_class.h:44
@ TYPE_1OU_VERNAL_FALLS_WITH_AST
Definition: plat_class.h:43
@ TYPE_1OU_SI_TEST_CARD
Definition: plat_class.h:39
@ TYPE_1OU_ABSENT
Definition: plat_class.h:45
@ TYPE_1OU_VERNAL_FALLS_WITH_TI
Definition: plat_class.h:42
@ TYPE_1OU_UNKNOWN
Definition: plat_class.h:46
@ HSC_MODULE_ADM1276
Definition: plat_class.h:61
@ HSC_MODULE_ADM1278
Definition: plat_class.h:58
@ HSC_MODULE_LTC4282
Definition: plat_class.h:59
@ HSC_MODULE_MP5990
Definition: plat_class.h:60
_2OU_CARD_TYPE_
Definition: plat_class.h:49
@ TYPE_2OU_EXP
Definition: plat_class.h:50
@ TYPE_2OU_ABSENT
Definition: plat_class.h:53
@ TYPE_2OU_EXP_E1S
Definition: plat_class.h:51
@ TYPE_2OU_UNKNOWN
Definition: plat_class.h:54
@ TYPE_2OU_HSM
Definition: plat_class.h:52