CSR配置字典之PCIeSlot类
更新时间: 2026/04/23
在Gitcode上查看源码📋 文档信息
| 项目 | 内容 |
|---|---|
| 文档标题 | PCIeSlot类配置字典 |
| 版本 | v1.0 |
| 创建日期 | 2026-04-23 |
| 最后更新 | 2026-04-23 |
| 维护状态 | ✅ 活跃维护 |
📋 变更历史记录
文档变更记录
| 版本 | 发布日期 | 变更类型 | 变更内容 | 影响范围 | 维护人员 |
|---|---|---|---|---|---|
| v1.0 | 2026-04-23 | 初始版本 | 创建PCIeSlot类配置字典 | 全新文档 | 系统管理员 |
🎯 类概览
PCIeSlot 类
| 属性 | 值 |
|---|---|
| 类名称 | PCIeSlot |
| 功能描述 | PCIe槽位管理,提供PCIe槽位的电源管理、热插拔管理和能力展示功能 |
| 所属SIG组 | hardware |
| 所属组件 | pcie |
| 责任人 | PCIe设备管理组 |
| 最后更新 | 2026-04-23 |
| 状态 | 🟢 正常运行 |
📊 属性定义详表
必选属性
| 属性名 | 类型 | 默认值 | 取值范围 | 动态关联 | 描述 | 使用场景 | 举例 | 来源 | 分类 |
|---|---|---|---|---|---|---|---|---|---|
SlotId | U8 | - | - | - | 槽位号,在csr中配置 | PCIe槽位管理 | 1 | CSR配置 | 软件 |
SupportedComponentTypes | U8[] | [] | - | - | 槽位支持的组件类型,元素取值范围与资源协作接口bmc.kepler.Systems.Component的Type属性一致 | PCIe槽位能力展示 | [8, 13] | CSR配置 | 软件 |
PowerState | String | "Off" | Off,On | - | 槽位供电状态,Off:不供电,On:供电 | PCIe槽位电源管理 | "On" | CSR配置 | 软件 |
可选属性
| 属性名 | 类型 | 默认值 | 取值范围 | 动态关联 | 描述 | 使用场景 | 举例 | 来源 | 分类 |
|---|---|---|---|---|---|---|---|---|---|
ReadyToRemove | U8 | - | 0,1 | - | 是否准备好移除 | PCIe槽位热插拔管理 | 0 | 组件更新 | 软件 |
PowerOnSwitch | U8 | - | 0,1 | - | 电源开关状态 | PCIe槽位电源管理 | 1 | 组件更新 | 软件 |
📂 分类标准
硬件属性
- 定义:与PCIe槽位硬件特性直接相关的参数
- 特点:通常在CSR配置中定义
- 示例:
SupportedComponentTypes,PowerState
软件属性
- 定义:由系统动态更新和管理的参数
- 特点:通过组件更新机制动态获取和维护
- 示例:
SlotId,ReadyToRemove,PowerOnSwitch
📝 配置示例
标准PCIe槽位配置
json
{
"PCIeSlot": {
"SlotId": 1,
"SupportedComponentTypes": [8, 13],
"PowerState": "On",
"ReadyToRemove": 0,
"PowerOnSwitch": 1
}
}GPU槽位配置
json
{
"PCIeSlot": {
"SlotId": 1,
"SupportedComponentTypes": [3],
"PowerState": "On",
"ReadyToRemove": 0,
"PowerOnSwitch": 1
}
}存储槽位配置
json
{
"PCIeSlot": {
"SlotId": 2,
"SupportedComponentTypes": [4, 20],
"PowerState": "On",
"ReadyToRemove": 0,
"PowerOnSwitch": 1
}
}网卡槽位配置
json
{
"PCIeSlot": {
"SlotId": 3,
"SupportedComponentTypes": [2],
"PowerState": "On",
"ReadyToRemove": 0,
"PowerOnSwitch": 1
}
}扩展槽位配置
json
{
"PCIeSlot": {
"SlotId": 4,
"SupportedComponentTypes": [7],
"PowerState": "On",
"ReadyToRemove": 0,
"PowerOnSwitch": 1
}
}通用PCIe槽位配置
json
{
"PCIeSlot": {
"SlotId": 5,
"SupportedComponentTypes": [8, 13, 25],
"PowerState": "Off",
"ReadyToRemove": 0,
"PowerOnSwitch": 0
}
}🔧 使用指南
配置步骤
- 设置槽位号:配置SlotId标识PCIe槽位
- 配置支持类型:设置SupportedComponentTypes指定槽位支持的组件类型
- 设置电源状态:配置PowerState控制槽位供电
- 监控状态:通过ReadyToRemove和PowerOnSwitch监控热插拔状态
注意事项
- 槽位唯一性:SlotId在同一CSR中必须唯一
- 组件类型:SupportedComponentTypes取值需与Type属性对应
- 电源控制:PowerState为Off时不供电,为On时供电
- 热插拔状态:ReadyToRemove由组件更新机制维护
SupportedComponentTypes取值说明
取值来源:
bmc.kepler.Systems.Component的Type属性
具体的取值需要根据实际硬件和 bmc.kepler.Systems.Component 接口定义来确定。不同产品平台的Type属性定义可能不同,具体数值请参考平台对应的接口文档。
注意:SupportedComponentTypes的具体取值需要从
bmc.kepler.Systems.Component的Type属性获取,常见的硬件分类(如网卡、GPU卡等)仅用于参考,不能作为配置依据。
PowerState说明
| 值 | 状态 |
|---|---|
| Off | 不供电 |
| On | 供电 |
热插拔状态说明
| ReadyToRemove | 状态 |
|---|---|
| 0 | 未准备好移除 |
| 1 | 准备好移除 |