dmi_dell_protected_area_2
Synopsis
#include <opendmi/entity/dell/protected-area-2.h>
typedef struct dmi_dell_protected_area_2 {
uint16_t token_id;
uint8_t value_length;
dmi_dell_value_format_t value_format;
uint16_t validation_key;
uint16_t index_port;
uint16_t data_port;
dmi_dell_check_type_t check_type;
uint8_t value_start;
uint8_t check_index;
dmi_dell_check_type_t range_check_type;
uint8_t range_check_start;
uint8_t range_check_end;
uint8_t range_check_index;
} dmi_dell_protected_area_2_t;
Description
The dmi_dell_protected_area_2_t structure holds the decoded Dell protected
area type 2 structure (type 214): where a protected value, such as a password,
is kept in CMOS, how it is encoded, and where its checksum is. Unlike the type
1 structure (dmi_dell_protected_area_1), it also describes the checksum of
a range of CMOS. The CMOS locations are accessed through the indexed I/O ports
the structure gives.
The structure is returned by dmi_entity_info for the structures of type
DMI_TYPE(dell_protected_area_2), declared in <opendmi/module/dell.h>, and
lives as long as the context it has been decoded in.
Fields
token_id-
Identifier of the token of the protected value.
value_length-
Length of the protected value.
value_format-
How the protected value is encoded.
validation_key-
Validation key of the protected value, as the structure carries it.
index_port-
Address of the I/O port written to select a CMOS location.
data_port-
Address of the I/O port through which the selected CMOS location is read and written.
check_type-
How the checksum of the protected value is computed.
value_start-
CMOS index of the protected value.
check_index-
CMOS index of the checksum of the protected value.
range_check_type-
How the checksum of the checked range is computed.
range_check_start-
CMOS index of the first location of the checked range.
range_check_end-
CMOS index of the last location of the checked range.
range_check_index-
CMOS index of the checksum of the checked range.
Examples
dmi_registry_t *registry = dmi_get_registry(context);
dmi_entity_t *entity = dmi_registry_lookup_first(registry,
DMI_TYPE(dell_protected_area_2),
true);
dmi_dell_protected_area_2_t *area = dmi_entity_info(entity,
DMI_TYPE(dell_protected_area_2));
if (area != nullptr) {
printf("Checked range 0x%02x-0x%02x\n", area->range_check_start,
area->range_check_end);
}