Commit 4e886e8c authored by Brendan Shanks's avatar Brendan Shanks Committed by Alexandre Julliard

wbemprox: Add embedded controller and system BIOS release numbers to Win32_BIOS.

parent 6c0c191a
...@@ -254,6 +254,10 @@ static const WCHAR prop_driverversionW[] = ...@@ -254,6 +254,10 @@ static const WCHAR prop_driverversionW[] =
{'D','r','i','v','e','r','V','e','r','s','i','o','n',0}; {'D','r','i','v','e','r','V','e','r','s','i','o','n',0};
static const WCHAR prop_drivetypeW[] = static const WCHAR prop_drivetypeW[] =
{'D','r','i','v','e','T','y','p','e',0}; {'D','r','i','v','e','T','y','p','e',0};
static const WCHAR prop_embeddedcontrollermajorversionW[] =
{'E','m','b','e','d','d','e','d','C','o','n','t','r','o','l','l','e','r','M','a','j','o','r','V','e','r','s','i','o','n',0};
static const WCHAR prop_embeddedcontrollerminorversionW[] =
{'E','m','b','e','d','d','e','d','C','o','n','t','r','o','l','l','e','r','M','i','n','o','r','V','e','r','s','i','o','n',0};
static const WCHAR prop_familyW[] = static const WCHAR prop_familyW[] =
{'F','a','m','i','l','y',0}; {'F','a','m','i','l','y',0};
static const WCHAR prop_filesystemW[] = static const WCHAR prop_filesystemW[] =
...@@ -424,6 +428,10 @@ static const WCHAR prop_strvalueW[] = ...@@ -424,6 +428,10 @@ static const WCHAR prop_strvalueW[] =
{'S','t','r','i','n','g','V','a','l','u','e',0}; {'S','t','r','i','n','g','V','a','l','u','e',0};
static const WCHAR prop_suitemaskW[] = static const WCHAR prop_suitemaskW[] =
{'S','u','i','t','e','M','a','s','k',0}; {'S','u','i','t','e','M','a','s','k',0};
static const WCHAR prop_systembiosmajorversionW[] =
{'S','y','s','t','e','m','B','i','o','s','M','a','j','o','r','V','e','r','s','i','o','n',0};
static const WCHAR prop_systembiosminorversionW[] =
{'S','y','s','t','e','m','B','i','o','s','M','i','n','o','r','V','e','r','s','i','o','n',0};
static const WCHAR prop_systemdirectoryW[] = static const WCHAR prop_systemdirectoryW[] =
{'S','y','s','t','e','m','D','i','r','e','c','t','o','r','y',0}; {'S','y','s','t','e','m','D','i','r','e','c','t','o','r','y',0};
static const WCHAR prop_systemdriveW[] = static const WCHAR prop_systemdriveW[] =
...@@ -496,6 +504,8 @@ static const struct column col_bios[] = ...@@ -496,6 +504,8 @@ static const struct column col_bios[] =
{ {
{ prop_currentlanguageW, CIM_STRING }, { prop_currentlanguageW, CIM_STRING },
{ prop_descriptionW, CIM_STRING }, { prop_descriptionW, CIM_STRING },
{ prop_embeddedcontrollermajorversionW, CIM_UINT8 },
{ prop_embeddedcontrollerminorversionW, CIM_UINT8 },
{ prop_identificationcodeW, CIM_STRING }, { prop_identificationcodeW, CIM_STRING },
{ prop_manufacturerW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_manufacturerW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_nameW, CIM_STRING }, { prop_nameW, CIM_STRING },
...@@ -504,6 +514,8 @@ static const struct column col_bios[] = ...@@ -504,6 +514,8 @@ static const struct column col_bios[] =
{ prop_smbiosbiosversionW, CIM_STRING|COL_FLAG_DYNAMIC }, { prop_smbiosbiosversionW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_smbiosmajorversionW, CIM_UINT16 }, { prop_smbiosmajorversionW, CIM_UINT16 },
{ prop_smbiosminorversionW, CIM_UINT16 }, { prop_smbiosminorversionW, CIM_UINT16 },
{ prop_systembiosmajorversionW, CIM_UINT8 },
{ prop_systembiosminorversionW, CIM_UINT8 },
{ prop_versionW, CIM_STRING|COL_FLAG_KEY } { prop_versionW, CIM_STRING|COL_FLAG_KEY }
}; };
static const struct column col_cdromdrive[] = static const struct column col_cdromdrive[] =
...@@ -975,6 +987,8 @@ struct record_bios ...@@ -975,6 +987,8 @@ struct record_bios
{ {
const WCHAR *currentlanguage; const WCHAR *currentlanguage;
const WCHAR *description; const WCHAR *description;
UINT8 ecmajorversion;
UINT8 ecminorversion;
const WCHAR *identificationcode; const WCHAR *identificationcode;
const WCHAR *manufacturer; const WCHAR *manufacturer;
const WCHAR *name; const WCHAR *name;
...@@ -983,6 +997,8 @@ struct record_bios ...@@ -983,6 +997,8 @@ struct record_bios
const WCHAR *smbiosbiosversion; const WCHAR *smbiosbiosversion;
UINT16 smbiosmajorversion; UINT16 smbiosmajorversion;
UINT16 smbiosminorversion; UINT16 smbiosminorversion;
UINT8 systembiosmajorversion;
UINT8 systembiosminorversion;
const WCHAR *version; const WCHAR *version;
}; };
struct record_cdromdrive struct record_cdromdrive
...@@ -1495,6 +1511,11 @@ struct smbios_bios ...@@ -1495,6 +1511,11 @@ struct smbios_bios
BYTE date; BYTE date;
BYTE size; BYTE size;
UINT64 characteristics; UINT64 characteristics;
BYTE characteristics_ext[2];
BYTE system_bios_major_release;
BYTE system_bios_minor_release;
BYTE ec_firmware_major_release;
BYTE ec_firmware_minor_release;
}; };
struct smbios_chassis struct smbios_chassis
...@@ -1729,6 +1750,54 @@ static WCHAR *get_bios_smbiosbiosversion( const char *buf, UINT len ) ...@@ -1729,6 +1750,54 @@ static WCHAR *get_bios_smbiosbiosversion( const char *buf, UINT len )
return ret; return ret;
} }
static BYTE get_bios_ec_firmware_major_release( const char *buf, UINT len )
{
const struct smbios_header *hdr;
const struct smbios_bios *bios;
if (!(hdr = find_smbios_entry( SMBIOS_TYPE_BIOS, buf, len ))) return 0xFF;
bios = (const struct smbios_bios *)hdr;
if (bios->hdr.length >= 0x18) return bios->ec_firmware_major_release;
else return 0xFF;
}
static BYTE get_bios_ec_firmware_minor_release( const char *buf, UINT len )
{
const struct smbios_header *hdr;
const struct smbios_bios *bios;
if (!(hdr = find_smbios_entry( SMBIOS_TYPE_BIOS, buf, len ))) return 0xFF;
bios = (const struct smbios_bios *)hdr;
if (bios->hdr.length >= 0x18) return bios->ec_firmware_minor_release;
else return 0xFF;
}
static BYTE get_bios_system_bios_major_release( const char *buf, UINT len )
{
const struct smbios_header *hdr;
const struct smbios_bios *bios;
if (!(hdr = find_smbios_entry( SMBIOS_TYPE_BIOS, buf, len ))) return 0xFF;
bios = (const struct smbios_bios *)hdr;
if (bios->hdr.length >= 0x18) return bios->system_bios_major_release;
else return 0xFF;
}
static BYTE get_bios_system_bios_minor_release( const char *buf, UINT len )
{
const struct smbios_header *hdr;
const struct smbios_bios *bios;
if (!(hdr = find_smbios_entry( SMBIOS_TYPE_BIOS, buf, len ))) return 0xFF;
bios = (const struct smbios_bios *)hdr;
if (bios->hdr.length >= 0x18) return bios->system_bios_minor_release;
else return 0xFF;
}
static enum fill_status fill_bios( struct table *table, const struct expr *cond ) static enum fill_status fill_bios( struct table *table, const struct expr *cond )
{ {
struct record_bios *rec; struct record_bios *rec;
...@@ -1745,6 +1814,8 @@ static enum fill_status fill_bios( struct table *table, const struct expr *cond ...@@ -1745,6 +1814,8 @@ static enum fill_status fill_bios( struct table *table, const struct expr *cond
rec = (struct record_bios *)table->data; rec = (struct record_bios *)table->data;
rec->currentlanguage = NULL; rec->currentlanguage = NULL;
rec->description = bios_descriptionW; rec->description = bios_descriptionW;
rec->ecmajorversion = get_bios_ec_firmware_major_release( buf, len );
rec->ecminorversion = get_bios_ec_firmware_minor_release( buf, len );
rec->identificationcode = NULL; rec->identificationcode = NULL;
rec->manufacturer = get_bios_manufacturer( buf, len ); rec->manufacturer = get_bios_manufacturer( buf, len );
rec->name = bios_descriptionW; rec->name = bios_descriptionW;
...@@ -1753,6 +1824,8 @@ static enum fill_status fill_bios( struct table *table, const struct expr *cond ...@@ -1753,6 +1824,8 @@ static enum fill_status fill_bios( struct table *table, const struct expr *cond
rec->smbiosbiosversion = get_bios_smbiosbiosversion( buf, len ); rec->smbiosbiosversion = get_bios_smbiosbiosversion( buf, len );
rec->smbiosmajorversion = get_bios_smbiosmajorversion( buf, len ); rec->smbiosmajorversion = get_bios_smbiosmajorversion( buf, len );
rec->smbiosminorversion = get_bios_smbiosminorversion( buf, len ); rec->smbiosminorversion = get_bios_smbiosminorversion( buf, len );
rec->systembiosmajorversion = get_bios_system_bios_major_release( buf, len );
rec->systembiosminorversion = get_bios_system_bios_minor_release( buf, len );
rec->version = bios_versionW; rec->version = bios_versionW;
if (!match_row( table, row, cond, &status )) free_row_values( table, row ); if (!match_row( table, row, cond, &status )) free_row_values( table, row );
else row++; else row++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment