nvram_device構造体リファレンス
#include < nvram.h >
データフィールド | |
struct hw_device_t | 一般 |
nvram_result_t (* | get_total_size_in_bytes )(const struct nvram_device * device、uint64_t * total_size) |
nvram_result_t (* | get_available_size_in_bytes )(const struct nvram_device * device、uint64_t * available_size) |
nvram_result_t (* | get_max_space_size_in_bytes )(const struct nvram_device * device、uint64_t * max_space_size) |
nvram_result_t (* | get_max_spaces )(const struct nvram_device * device、uint32_t * num_spaces) |
nvram_result_t (* | get_space_list )(const struct nvram_device * device、uint32_t max_list_size、uint32_t * space_index_list、uint32_t * list_size) |
nvram_result_t (* | get_space_size )(const struct nvram_device * device、uint32_t index、uint64_t * size) |
nvram_result_t (* | get_space_controls )(const struct nvram_device * device、uint32_t index、uint32_t max_list_size、 nvram_control_t * control_list、uint32_t * list_size) |
nvram_result_t (* | is_space_locked )(const struct nvram_device * device、uint32_t index、int * write_lock_enabled、int * read_lock_enabled) |
nvram_result_t (* | create_space )(const struct nvram_device * device、uint32_t index、uint64_t size_in_bytes、const nvram_control_t * control_list、uint32_t list_size、const uint8_t * authentication_value、uint32_t authentication_value_size) |
nvram_result_t (* | delete_space )(const struct nvram_device * device、uint32_t index、const uint8_t * authentication_value、uint32_t authentication_value_size) |
nvram_result_t (* | disable_create )(const struct nvram_device * device) |
nvram_result_t (* | write_space )(const struct nvram_device * device、uint32_t index、const uint8_t * buffer、uint64_t buffer_size、const uint8_t * authentication_value、uint32_t authentication_value_size) |
nvram_result_t (* | read_space )(const struct nvram_device * device、uint32_t index、uint64_t num_bytes_to_read、const uint8_t * authentication_value、uint32_t authentication_value_size、uint8_t * buffer、uint64_t * bytes_read) |
nvram_result_t (* | enable_write_lock )(const struct nvram_device * device、uint32_t index、const uint8_t * authentication_value、uint32_t authentication_value_size) |
nvram_result_t (* | enable_read_lock )(const struct nvram_device * device、uint32_t index、const uint8_t * authentication_value、uint32_t authentication_value_size) |
詳細な説明
フィールドドキュメント
struct hw_device_t common |
nvram_deviceの一般的なメソッド。この構造のユーザーは、 hw_device_tがnvram_deviceを参照していることがわかっているコンテキストで、 hw_device_tをnvram_deviceポインターにキャストするため、これはnvram_deviceの最初のメンバーである必要があります。
nvram_result_t (* create_space)(const struct nvram_device * device、uint32_t index、uint64_t size_in_bytes、const nvram_control_t * control_list、uint32_t list_size、const uint8_t * authentication_value、uint32_t authentication_value_size) |
指定されたインデックス、サイズ、コントロール、および認証値を使用して新しいスペースを作成します。
device- nvram_deviceインスタンス。 index-新しいスペースのインデックス。インデックスは任意の32ビット値にすることができますが、既存のスペースにまだ割り当てられていない必要があります。 size_in_bytes-スペースに割り当てるバイト数。 control_list-スペースに適用するコントロールの配列。 list_size-|control_list|内のアイテムの数。 authentication_value-|control_list|の場合NV_CONTROL_READ_AUTHORIZATIONおよび/またはNV_CONTROL_WRITE_AUTHORIZATIONが含まれている場合、このパラメーターはこれらのポリシーの許可値を提供します(両方のコントロールが設定されている場合、この値は両方に適用されます)。それ以外の場合、この値は無視され、NULLになる可能性があります。 authentication_value_size-|authentication_value|のバイト数。
nvram_result_t (* delete_space)(const struct nvram_device * device、uint32_t index、const uint8_t * authentication_value、uint32_t authentication_value_size) |
スペースを削除します。
device- nvram_deviceインスタンス。 index-スペースインデックス。 authentication_value-スペースにNV_CONTROL_WRITE_AUTHORIZATIONポリシーがある場合、このパラメーターは許可値を提供します。それ以外の場合、この値は無視され、NULLになる可能性があります。 authentication_value_size-|authentication_value|のバイト数。
nvram_result_t (* disable_create)(const struct nvram_device * device) |
次の完全なデバイスリセットまで、スペースのそれ以上の作成を無効にします(工場出荷時のリセットのように、再起動ではありません)。その後のNV_CreateSpaceの呼び出しでは、NV_RESULT_OPERATION_DISABLEDが返されます。
device- nvram_deviceインスタンス。
nvram_result_t (* enable_read_lock)(const struct nvram_device * device、uint32_t index、const uint8_t * authentication_value、uint32_t authentication_value_size) |
ポリシーに従って、指定されたスペースの読み取りロックを有効にします。スペースにNV_CONTROL_BOOT_READ_LOCKが設定されていない場合、この関数は効果がなく、エラーを返す可能性があります。
device- nvram_deviceインスタンス。 index-スペースインデックス。 authentication_value-スペースにNV_CONTROL_READ_AUTHORIZATIONポリシーがある場合、このパラメーターは許可値を提供します。 (読み取りのためにロックするために書き込みアクセスの要件はないことに注意してください。読み取りロックは常に揮発性です。)それ以外の場合、この値は無視され、NULLになる可能性があります。 authentication_value_size-|authentication_value|のバイト数。
nvram_result_t (* enable_write_lock)(const struct nvram_device * device、uint32_t index、const uint8_t * authentication_value、uint32_t authentication_value_size) |
ポリシーに従って、指定されたスペースの書き込みロックを有効にします。スペースにNV_CONTROL_PERSISTENT_WRITE_LOCKまたはNV_CONTROL_BOOT_WRITE_LOCKが設定されていない場合、この関数は効果がなく、エラーを返す可能性があります。
device- nvram_deviceインスタンス。 index-スペースインデックス。 authentication_value-スペースにNV_CONTROL_WRITE_AUTHORIZATIONポリシーがある場合、このパラメーターは許可値を提供します。それ以外の場合、この値は無視され、NULLになる可能性があります。 authentication_value_size-|authentication_value|のバイト数。
nvram_result_t (* get_available_size_in_bytes)(const struct nvram_device * device、uint64_t * available_size) |
NVRAMで使用可能な未割り当てのバイト数を出力します。実装が利用可能なサイズを知らない場合は、見積もりまたは合計サイズを提供する場合があります。
device- nvram_deviceインスタンス。 available_size-出力を受け取ります。 NULLにすることはできません。
nvram_result_t (* get_max_space_size_in_bytes)(const struct nvram_device * device、uint64_t * max_space_size) |
1つのスペースに割り当てることができる最大バイト数を出力します。これは常に少なくとも32になります。実装が最大サイズを制限しない場合は、合計サイズを提供する場合があります。
device- nvram_deviceインスタンス。 max_space_size-出力を受け取ります。 NULLにすることはできません。
nvram_result_t (* get_max_spaces)(const struct nvram_device * device、uint32_t * num_spaces) |
割り当て可能なスペースの最大総数を出力します。これは常に少なくとも8になります。任意の数のスペースがサポートされている場合はNV_UNLIMITED_SPACESを出力します(使用可能なNVRAMバイトのみに制限されます)。
device- nvram_deviceインスタンス。 num_spaces-出力を受け取ります。 NULLにすることはできません。
nvram_result_t (* get_space_controls)(const struct nvram_device * device、uint32_t index、uint32_t max_list_size、 nvram_control_t * control_list、uint32_t * list_size) |
指定されたスペースに関連付けられているコントロールのリストを出力します。
device- nvram_deviceインスタンス。 index-スペースインデックス。 max_list_size-|control_list|内のアイテムの数配列。 control_list-指定された|max_list_size|までのコントロールのリストを受け取ります。 | max_list_size |の場合、NULLになる可能性がありますは0です。list_size-|control_list|に入力されたアイテムの数、または|control_list|の場合は使用可能なアイテムの数を受け取ります。無効です。
nvram_result_t (* get_space_list)(const struct nvram_device * device、uint32_t max_list_size、uint32_t * space_index_list、uint32_t * list_size) |
作成されたスペースインデックスのリストを出力します。 |max_list_size|の場合は0、|list_size|のみが入力されます。
device- nvram_deviceインスタンス。 max_list_size-|space_index_list|内のアイテムの数配列。 space_index_list-指定された|max_list_size|までに作成されたスペースのリストを受け取ります。 | max_list_size |の場合、NULLになる可能性がありますは0です。list_size-|space_index_list|に入力されたアイテムの数、または|space_index_list|の場合は使用可能なアイテムの数を受け取ります。無効です。
nvram_result_t (* get_space_size)(const struct nvram_device * device、uint32_t index、uint64_t * size) |
指定されたスペースのサイズをバイト単位で出力します。
device- nvram_deviceインスタンス。 index-スペースインデックス。 size-出力を受け取ります。 NULLにすることはできません。
nvram_result_t (* get_total_size_in_bytes)(const struct nvram_device * device、uint64_t * total_size) |
NVRAMで使用可能な合計バイト数を出力します。これは常に少なくとも2048になります。実装が合計サイズを知らない場合は、見積もりまたは2048を提供する場合があります。
device- nvram_deviceインスタンス。 total_size-出力を受け取ります。 NULLにすることはできません。
nvram_result_t (* is_space_locked)(const struct nvram_device * device、uint32_t index、int * write_lock_enabled、int * read_lock_enabled) |
指定されたスペースでロックが有効になっているかどうかを出力します。ロックが有効になっている場合、操作は無効になり、その操作を実行しようとすると、NV_RESULT_OPERATION_DISABLEDになります。
device- nvram_deviceインスタンス。 index-スペースインデックス。 write_lock_enabled-書き込み操作が現在無効になっている場合は、ゼロ以外に設定されます。 read_lock_enabled-読み取り操作が現在無効になっている場合は、ゼロ以外に設定されます。
nvram_result_t (* read_space)(const struct nvram_device * device、uint32_t index、uint64_t num_bytes_to_read、const uint8_t * authentication_value、uint32_t authentication_value_size、uint8_t * buffer、uint64_t * bytes_read) |
スペースの内容を読み取ります。スペースが書き込まれたことがない場合、読み取られるすべてのバイトは0x00になります。
device- nvram_deviceインスタンス。 index-スペースインデックス。 num_bytes_to_read-読み取るバイト数。 |バッファ|この数のバイトを保持するのに十分な大きさである必要があります。これがスペースのサイズよりも大きい場合は、スペース全体が読み取られます。これがスペースのサイズよりも小さい場合、スペースの最初のバイトが読み取られます。 authentication_value-スペースにNV_CONTROL_READ_AUTHORIZATIONポリシーがある場合、このパラメーターは許可値を提供します。それ以外の場合、この値は無視され、NULLになる可能性があります。 authentication_value_size-|authentication_value|のバイト数。 buffer-スペースから読み取られたデータを受け取ります。少なくとも|num_bytes_to_read|である必要がありますサイズはバイト。 bytes_read-読み取られたバイト数。 NV_RESULT_SUCCESSが返された場合、これは|num_bytes_to_read|の小さい方に設定されます。またはスペースのサイズ。
nvram_result_t (* write_space)(const struct nvram_device * device、uint32_t index、const uint8_t * buffer、uint64_t buffer_size、const uint8_t * authentication_value、uint32_t authentication_value_size) |
スペースの内容を書き込みます。スペースがNV_CONTROL_WRITE_EXTENDで構成されている場合、入力データは現在のデータを拡張するために使用されます。
device- nvram_deviceインスタンス。 index-スペースインデックス。 buffer-書き込むデータ。 buffer_size-|buffer|のバイト数。これがスペースのサイズよりも小さい場合、残りのバイトは0x00に設定されます。これがスペースのサイズより大きい場合は、NV_RESULT_INVALID_PARAMETERを返します。 authentication_value-スペースにNV_CONTROL_WRITE_AUTHORIZATIONポリシーがある場合、このパラメーターは許可値を提供します。それ以外の場合、この値は無視され、NULLになる可能性があります。 authentication_value_size-|authentication_value|のバイト数。
この構造体のドキュメントは、次のファイルから生成されました。