ホーム › System.Ioctl › SCM_BUS_RUNTIME_FW_ACTIVATION_INFO
SCM_BUS_RUNTIME_FW_ACTIVATION_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Version | DWORD | 4 | +0 | +0 | この構造体のバージョン番号。 |
| Size | DWORD | 4 | +4 | +4 | この構造体のバイト単位のサイズ。 |
| RuntimeFwActivationSupported | BOOLEAN | 1 | +8 | +8 | 実行時ファームウェア有効化がサポートされるかを示す真偽値。 |
| FirmwareActivationState | SCM_BUS_FIRMWARE_ACTIVATION_STATE | 4 | +12 | +12 | 現在のファームウェア有効化状態を示す列挙値。 |
| FirmwareActivationCapability | _FirmwareActivationCapability_e__Struct | 4 | +16 | +16 | ファームウェア有効化機能の詳細を示すビットフィールド構造体。 |
| EstimatedFirmwareActivationTimeInUSecs | ULONGLONG | 8 | +24 | +24 | ファームウェア有効化に要する推定時間。マイクロ秒単位。 |
| EstimatedProcessorAccessQuiesceTimeInUSecs | ULONGLONG | 8 | +32 | +32 | プロセッサアクセス静止の推定時間。マイクロ秒単位。 |
| EstimatedIOAccessQuiesceTimeInUSecs | ULONGLONG | 8 | +40 | +40 | I/Oアクセス静止の推定時間。マイクロ秒単位。 |
| PlatformSupportedMaxIOAccessQuiesceTimeInUSecs | ULONGLONG | 8 | +48 | +48 | プラットフォームが許容するI/Oアクセス静止の最大時間。マイクロ秒単位。 |
構造体: _FirmwareActivationCapability_e__Struct x64 4B / x86 4B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| _bitfield | DWORD | 4 | +0 | +0 |
各言語での定義
#include <windows.h>
// SCM_BUS_RUNTIME_FW_ACTIVATION_INFO (x64 56 / x86 56 バイト)
typedef struct SCM_BUS_RUNTIME_FW_ACTIVATION_INFO {
DWORD Version;
DWORD Size;
BOOLEAN RuntimeFwActivationSupported;
SCM_BUS_FIRMWARE_ACTIVATION_STATE FirmwareActivationState;
_FirmwareActivationCapability_e__Struct FirmwareActivationCapability;
ULONGLONG EstimatedFirmwareActivationTimeInUSecs;
ULONGLONG EstimatedProcessorAccessQuiesceTimeInUSecs;
ULONGLONG EstimatedIOAccessQuiesceTimeInUSecs;
ULONGLONG PlatformSupportedMaxIOAccessQuiesceTimeInUSecs;
} SCM_BUS_RUNTIME_FW_ACTIVATION_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SCM_BUS_RUNTIME_FW_ACTIVATION_INFO
{
public uint Version;
public uint Size;
[MarshalAs(UnmanagedType.U1)] public bool RuntimeFwActivationSupported;
public int FirmwareActivationState;
public _FirmwareActivationCapability_e__Struct FirmwareActivationCapability;
public ulong EstimatedFirmwareActivationTimeInUSecs;
public ulong EstimatedProcessorAccessQuiesceTimeInUSecs;
public ulong EstimatedIOAccessQuiesceTimeInUSecs;
public ulong PlatformSupportedMaxIOAccessQuiesceTimeInUSecs;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SCM_BUS_RUNTIME_FW_ACTIVATION_INFO
Public Version As UInteger
Public Size As UInteger
<MarshalAs(UnmanagedType.U1)> Public RuntimeFwActivationSupported As Boolean
Public FirmwareActivationState As Integer
Public FirmwareActivationCapability As _FirmwareActivationCapability_e__Struct
Public EstimatedFirmwareActivationTimeInUSecs As ULong
Public EstimatedProcessorAccessQuiesceTimeInUSecs As ULong
Public EstimatedIOAccessQuiesceTimeInUSecs As ULong
Public PlatformSupportedMaxIOAccessQuiesceTimeInUSecs As ULong
End Structureimport ctypes
from ctypes import wintypes
class SCM_BUS_RUNTIME_FW_ACTIVATION_INFO(ctypes.Structure):
_fields_ = [
("Version", wintypes.DWORD),
("Size", wintypes.DWORD),
("RuntimeFwActivationSupported", ctypes.c_byte),
("FirmwareActivationState", ctypes.c_int),
("FirmwareActivationCapability", _FirmwareActivationCapability_e__Struct),
("EstimatedFirmwareActivationTimeInUSecs", ctypes.c_ulonglong),
("EstimatedProcessorAccessQuiesceTimeInUSecs", ctypes.c_ulonglong),
("EstimatedIOAccessQuiesceTimeInUSecs", ctypes.c_ulonglong),
("PlatformSupportedMaxIOAccessQuiesceTimeInUSecs", ctypes.c_ulonglong),
]#[repr(C)]
pub struct SCM_BUS_RUNTIME_FW_ACTIVATION_INFO {
pub Version: u32,
pub Size: u32,
pub RuntimeFwActivationSupported: u8,
pub FirmwareActivationState: i32,
pub FirmwareActivationCapability: _FirmwareActivationCapability_e__Struct,
pub EstimatedFirmwareActivationTimeInUSecs: u64,
pub EstimatedProcessorAccessQuiesceTimeInUSecs: u64,
pub EstimatedIOAccessQuiesceTimeInUSecs: u64,
pub PlatformSupportedMaxIOAccessQuiesceTimeInUSecs: u64,
}import "golang.org/x/sys/windows"
type SCM_BUS_RUNTIME_FW_ACTIVATION_INFO struct {
Version uint32
Size uint32
RuntimeFwActivationSupported byte
FirmwareActivationState int32
FirmwareActivationCapability _FirmwareActivationCapability_e__Struct
EstimatedFirmwareActivationTimeInUSecs uint64
EstimatedProcessorAccessQuiesceTimeInUSecs uint64
EstimatedIOAccessQuiesceTimeInUSecs uint64
PlatformSupportedMaxIOAccessQuiesceTimeInUSecs uint64
}type
SCM_BUS_RUNTIME_FW_ACTIVATION_INFO = record
Version: DWORD;
Size: DWORD;
RuntimeFwActivationSupported: ByteBool;
FirmwareActivationState: Integer;
FirmwareActivationCapability: _FirmwareActivationCapability_e__Struct;
EstimatedFirmwareActivationTimeInUSecs: UInt64;
EstimatedProcessorAccessQuiesceTimeInUSecs: UInt64;
EstimatedIOAccessQuiesceTimeInUSecs: UInt64;
PlatformSupportedMaxIOAccessQuiesceTimeInUSecs: UInt64;
end;const SCM_BUS_RUNTIME_FW_ACTIVATION_INFO = extern struct {
Version: u32,
Size: u32,
RuntimeFwActivationSupported: u8,
FirmwareActivationState: i32,
FirmwareActivationCapability: _FirmwareActivationCapability_e__Struct,
EstimatedFirmwareActivationTimeInUSecs: u64,
EstimatedProcessorAccessQuiesceTimeInUSecs: u64,
EstimatedIOAccessQuiesceTimeInUSecs: u64,
PlatformSupportedMaxIOAccessQuiesceTimeInUSecs: u64,
};type
SCM_BUS_RUNTIME_FW_ACTIVATION_INFO {.bycopy.} = object
Version: uint32
Size: uint32
RuntimeFwActivationSupported: uint8
FirmwareActivationState: int32
FirmwareActivationCapability: _FirmwareActivationCapability_e__Struct
EstimatedFirmwareActivationTimeInUSecs: uint64
EstimatedProcessorAccessQuiesceTimeInUSecs: uint64
EstimatedIOAccessQuiesceTimeInUSecs: uint64
PlatformSupportedMaxIOAccessQuiesceTimeInUSecs: uint64struct SCM_BUS_RUNTIME_FW_ACTIVATION_INFO
{
uint Version;
uint Size;
ubyte RuntimeFwActivationSupported;
int FirmwareActivationState;
_FirmwareActivationCapability_e__Struct FirmwareActivationCapability;
ulong EstimatedFirmwareActivationTimeInUSecs;
ulong EstimatedProcessorAccessQuiesceTimeInUSecs;
ulong EstimatedIOAccessQuiesceTimeInUSecs;
ulong PlatformSupportedMaxIOAccessQuiesceTimeInUSecs;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SCM_BUS_RUNTIME_FW_ACTIVATION_INFO サイズ: 56 バイト(x64)
dim st, 14 ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; Version : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Size : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; RuntimeFwActivationSupported : BOOLEAN (+8, 1byte) poke st,8,値 / 値 = peek(st,8)
; FirmwareActivationState : SCM_BUS_FIRMWARE_ACTIVATION_STATE (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; FirmwareActivationCapability : _FirmwareActivationCapability_e__Struct (+16, 4byte) varptr(st)+16 を基点に操作(4byte:入れ子/配列)
; EstimatedFirmwareActivationTimeInUSecs : ULONGLONG (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; EstimatedProcessorAccessQuiesceTimeInUSecs : ULONGLONG (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; EstimatedIOAccessQuiesceTimeInUSecs : ULONGLONG (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; PlatformSupportedMaxIOAccessQuiesceTimeInUSecs : ULONGLONG (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global SCM_BUS_RUNTIME_FW_ACTIVATION_INFO
#field int Version
#field int Size
#field bool1 RuntimeFwActivationSupported
#field int FirmwareActivationState
#field _FirmwareActivationCapability_e__Struct FirmwareActivationCapability
#field int64 EstimatedFirmwareActivationTimeInUSecs
#field int64 EstimatedProcessorAccessQuiesceTimeInUSecs
#field int64 EstimatedIOAccessQuiesceTimeInUSecs
#field int64 PlatformSupportedMaxIOAccessQuiesceTimeInUSecs
#endstruct
stdim st, SCM_BUS_RUNTIME_FW_ACTIVATION_INFO ; NSTRUCT 変数を確保
st->Version = 100
mes "Version=" + st->Version