mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-29 22:45:16 -04:00
Rewrite VSS and VSS2 NVRAM variable parsers in KaitaiStruct
This commit is contained in:
parent
eec2a0bd7c
commit
a027a8edae
11 changed files with 1430 additions and 40 deletions
|
@ -104,6 +104,55 @@ public:
|
|||
public:
|
||||
~vss_variable_t();
|
||||
|
||||
private:
|
||||
bool f_is_auth;
|
||||
bool m_is_auth;
|
||||
|
||||
public:
|
||||
bool is_auth();
|
||||
|
||||
private:
|
||||
bool f_len_standard_header;
|
||||
int8_t m_len_standard_header;
|
||||
|
||||
public:
|
||||
int8_t len_standard_header();
|
||||
|
||||
private:
|
||||
bool f_is_intel_legacy;
|
||||
bool m_is_intel_legacy;
|
||||
|
||||
public:
|
||||
bool is_intel_legacy();
|
||||
|
||||
private:
|
||||
bool f_len_auth_header;
|
||||
int8_t m_len_auth_header;
|
||||
|
||||
public:
|
||||
int8_t len_auth_header();
|
||||
|
||||
private:
|
||||
bool f_len_apple_header;
|
||||
int8_t m_len_apple_header;
|
||||
|
||||
public:
|
||||
int8_t len_apple_header();
|
||||
|
||||
private:
|
||||
bool f_len_intel_legacy_header;
|
||||
int8_t m_len_intel_legacy_header;
|
||||
|
||||
public:
|
||||
int8_t len_intel_legacy_header();
|
||||
|
||||
private:
|
||||
bool f_is_valid;
|
||||
bool m_is_valid;
|
||||
|
||||
public:
|
||||
bool is_valid();
|
||||
|
||||
private:
|
||||
uint8_t m_signature_first;
|
||||
uint8_t m_signature_last;
|
||||
|
@ -133,6 +182,13 @@ public:
|
|||
public:
|
||||
bool _is_null_attributes() { attributes(); return n_attributes; };
|
||||
|
||||
private:
|
||||
uint32_t m_len_total;
|
||||
bool n_len_total;
|
||||
|
||||
public:
|
||||
bool _is_null_len_total() { len_total(); return n_len_total; };
|
||||
|
||||
private:
|
||||
uint32_t m_len_name;
|
||||
bool n_len_name;
|
||||
|
@ -147,6 +203,34 @@ public:
|
|||
public:
|
||||
bool _is_null_len_data() { len_data(); return n_len_data; };
|
||||
|
||||
private:
|
||||
std::string m_timestamp;
|
||||
bool n_timestamp;
|
||||
|
||||
public:
|
||||
bool _is_null_timestamp() { timestamp(); return n_timestamp; };
|
||||
|
||||
private:
|
||||
uint32_t m_pubkey_index;
|
||||
bool n_pubkey_index;
|
||||
|
||||
public:
|
||||
bool _is_null_pubkey_index() { pubkey_index(); return n_pubkey_index; };
|
||||
|
||||
private:
|
||||
uint32_t m_len_name_auth;
|
||||
bool n_len_name_auth;
|
||||
|
||||
public:
|
||||
bool _is_null_len_name_auth() { len_name_auth(); return n_len_name_auth; };
|
||||
|
||||
private:
|
||||
uint32_t m_len_data_auth;
|
||||
bool n_len_data_auth;
|
||||
|
||||
public:
|
||||
bool _is_null_len_data_auth() { len_data_auth(); return n_len_data_auth; };
|
||||
|
||||
private:
|
||||
std::string m_vendor_guid;
|
||||
bool n_vendor_guid;
|
||||
|
@ -154,6 +238,20 @@ public:
|
|||
public:
|
||||
bool _is_null_vendor_guid() { vendor_guid(); return n_vendor_guid; };
|
||||
|
||||
private:
|
||||
std::string m_name_auth;
|
||||
bool n_name_auth;
|
||||
|
||||
public:
|
||||
bool _is_null_name_auth() { name_auth(); return n_name_auth; };
|
||||
|
||||
private:
|
||||
std::string m_data_auth;
|
||||
bool n_data_auth;
|
||||
|
||||
public:
|
||||
bool _is_null_data_auth() { data_auth(); return n_data_auth; };
|
||||
|
||||
private:
|
||||
uint32_t m_apple_data_crc32;
|
||||
bool n_apple_data_crc32;
|
||||
|
@ -161,6 +259,13 @@ public:
|
|||
public:
|
||||
bool _is_null_apple_data_crc32() { apple_data_crc32(); return n_apple_data_crc32; };
|
||||
|
||||
private:
|
||||
std::string m_intel_legacy_data;
|
||||
bool n_intel_legacy_data;
|
||||
|
||||
public:
|
||||
bool _is_null_intel_legacy_data() { intel_legacy_data(); return n_intel_legacy_data; };
|
||||
|
||||
private:
|
||||
std::string m_name;
|
||||
bool n_name;
|
||||
|
@ -185,19 +290,34 @@ public:
|
|||
uint8_t state() const { return m_state; }
|
||||
uint8_t reserved() const { return m_reserved; }
|
||||
vss_variable_attributes_t* attributes() const { return m_attributes.get(); }
|
||||
uint32_t len_total() const { return m_len_total; }
|
||||
uint32_t len_name() const { return m_len_name; }
|
||||
uint32_t len_data() const { return m_len_data; }
|
||||
std::string timestamp() const { return m_timestamp; }
|
||||
uint32_t pubkey_index() const { return m_pubkey_index; }
|
||||
uint32_t len_name_auth() const { return m_len_name_auth; }
|
||||
uint32_t len_data_auth() const { return m_len_data_auth; }
|
||||
std::string vendor_guid() const { return m_vendor_guid; }
|
||||
std::string name_auth() const { return m_name_auth; }
|
||||
std::string data_auth() const { return m_data_auth; }
|
||||
uint32_t apple_data_crc32() const { return m_apple_data_crc32; }
|
||||
std::string intel_legacy_data() const { return m_intel_legacy_data; }
|
||||
std::string name() const { return m_name; }
|
||||
std::string data() const { return m_data; }
|
||||
edk2_vss_t* _root() const { return m__root; }
|
||||
edk2_vss_t::vss_store_body_t* _parent() const { return m__parent; }
|
||||
};
|
||||
|
||||
private:
|
||||
bool f_len_vss_store_header;
|
||||
int8_t m_len_vss_store_header;
|
||||
|
||||
public:
|
||||
int8_t len_vss_store_header();
|
||||
|
||||
private:
|
||||
uint32_t m_signature;
|
||||
uint32_t m_size;
|
||||
uint32_t m_vss_size;
|
||||
uint8_t m_format;
|
||||
uint8_t m_state;
|
||||
uint16_t m_reserved;
|
||||
|
@ -210,7 +330,7 @@ private:
|
|||
|
||||
public:
|
||||
uint32_t signature() const { return m_signature; }
|
||||
uint32_t size() const { return m_size; }
|
||||
uint32_t vss_size() const { return m_vss_size; }
|
||||
uint8_t format() const { return m_format; }
|
||||
uint8_t state() const { return m_state; }
|
||||
uint16_t reserved() const { return m_reserved; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue