数据结构 - Set Feature Event(事件类型 0Bh) (第227页)
Set Feature Event(事件类型 0Bh)
Set Feature Event 记录一个成功执行的 Set Features 命令。该事件的记录条件如下:
- Set Features 命令完成并成功;
- Set Features 命令中的 Feature Identifier 被支持并且该设置更改需要在 Persistent Event Log 中记录。
Set Features 命令中的 Feature Identifier 可以在多个字段中记录,具体的字段在文档的 Figure 25, Figure 30, 和 Figure 34 中列出。通过 Set Feature Event,可以对与命令相关的所有 Dword 和内存缓冲区的数据进行详细记录。
Set Feature Event 数据格式
| 字节范围 | 字段名称 | 描述 |
|---|---|---|
| 03:00 | Set Feature Event Layout | 定义与该事件相关的 Set Features 命令的 Command Dwords 和 Memory Buffer 的数据量。 |
| 31:16 | Memory Buffer Count | 定义从 Memory Buffer 中记录的字节数。若为 0h,则表示 Memory Buffer 字段不记录。 |
| 15:04 | Reserved | 保留字段。 |
| 03 | Logged Command Completion Dword 0 | 如果为 1,则包含 Set Features 命令完成时的 Dword 0。如果为 0,则不包含。 |
| 02:00 | Dword Count | 包含从 Set Features 命令的 Dword 10 开始的连续 Dword 数量。值 0h 和 7h 为保留值。 |
| (Dword Count * 4) + 3 | Command Dwords | 包含从 Set Features 命令的 Dword 10 开始的命令 Dwords 列表。其数量由 Dword Count 字段指定。所有非保留的命令 Dwords 会被记录。 |
| (Dword Count * 4) + 4 | Memory Buffer | 包含 Set Features 命令中的内存缓冲区数据。 |
| (Dword Count * 4) + 8 | Command Completion Dword 0 | 如果 Logged Command Completion Dword 0 位为 1,则此字段包含来自 Set Features 命令完成的 Dword 0。如果为 0,则不记录此字段。 |
字段解析
-
Memory Buffer Count:定义 Set Features 命令中内存缓冲区的字节数。如果为
0h,则该字段不存在。 -
Command Dwords:记录 Set Features 命令中从 Dword 10 开始的所有非保留的 Dword。
-
Memory Buffer:记录 Set Features 命令的内存缓冲区数据。只有当 Memory Buffer Count 不为
0h时,这个字段才会存在。 -
Command Completion Dword 0:如果记录了 Set Features 命令完成的 Dword 0,则此字段会包含它的值。
Telemetry Log Create Event(事件类型 0Ch)
Telemetry Log Create Event 会在以下情况下创建:
- 主机 发起的 Telemetry Log(参考第 5.16.1.8 节)。
- 控制器 发起的 Telemetry Log(参考第 5.16.1.9 节)。
该事件在 Persistent Event Log 中记录并设置如下字段:
- 事件类型(Event Type):设置为
0Ch。 - 事件类型修订版(Event Type Revision):设置为
01h。
总结
在 Set Feature Event 中,记录了 Set Features 命令的执行细节,包括命令的 Dword 及内存缓冲区的内容,允许对 Set Features 命令的结果进行详细追踪。这些事件对系统管理员监控和调试控制器设置变更非常有用。对于 Telemetry Log Create Event,它记录了控制器或主机生成的 Telemetry Log 事件,进一步增强了对系统状态的监控。