//---------------------------------------------------------------------------- // // Copyright (C) 2006 Intel Corporation // // File: SetupFileDefinitions.h // // Contents: General definitions for a configuration setup file format // // Notes: This file contains type definitions used to read data from a // configuration setup file. // //---------------------------------------------------------------------------- #ifndef _SETUP_DEFINITIONS_H #define _SETUP_DEFINITIONS_H // Supported Version: #define MAX_MAJOR_VERSION 4 // Record Identifiers #define RECORD_IDENTIFIER_INVALID 0 #define RECORD_IDENTIFIER_DATA_RECORD 1 // Module Identifiers #define MODULE_IDENTIFIER_INVALID 0 #define MODULE_IDENTIFIER_ME_KERNEL 1 #define MODULE_IDENTIFIER_AMT_CM 2 // ME kernel Variable identifiers #define ME_VARIABLE_IDENTIFIER_INVALID 0 #define ME_VARIABLE_IDENTIFIER_CURRENT_MEBX_PWD 1 #define ME_VARIABLE_IDENTIFIER_NEW_MEBX_PWD 2 #define ME_VARIABLE_IDENTIFIER_MANAGEABILITY_FEATURE_SELECTION 3 #define ME_VARIABLE_IDENTIFIER_FW_LOCAL_UPDATE 4 #define ME_VARIABLE_IDENTIFIER_FW_UPDATE_QUALIFIER 5 #define ME_VARIABLE_IDENTIFIER_PP 6 // ME_VARIABLE_IDENTIFIER_FW_LOCAL_UPDATE byte length #define ME_VARIABLE_IDENTIFIER_FW_LOCAL_UPDATE_LEN 1 // ME_VARIABLE_IDENTIFIER_PP byte length #define ME_VARIABLE_IDENTIFIER_PP_LEN GUID_LENGTH // ME_VARIABLE_IDENTIFIER_FW_UPDATE_QUALIFIER byte length #define ME_VARIABLE_IDENTIFIER_FW_UPDATE_QUALIFIER_LEN 1 // ME_VARIABLE_IDENTIFIER_FW_LOCAL_UPDATE values #define ME_VARIABLE_IDENTIFIER_FW_LOCAL_UPDATE_DISABLE 0 #define ME_VARIABLE_IDENTIFIER_FW_LOCAL_UPDATE_ENABLE 1 #define ME_VARIABLE_IDENTIFIER_FW_LOCAL_UPDATE_PASSWORD_PROTECTED 2 //ME_VARIABLE_IDENTIFIER_FW_UPDATE_QUALIFIER values #define ME_VARIABLE_IDENTIFIER_FW_UPDATE_QUALIFIER_ALWAYS 0 #define ME_VARIABLE_IDENTIFIER_FW_UPDATE_QUALIFIER_NEVER 1 #define ME_VARIABLE_IDENTIFIER_FW_UPDATE_QUALIFIER_RESTRICTED 2 // Intel(R) AMT CM variable identifiers #define CM_VARIABLE_IDENTIFIER_INVALID 0 #define CM_VARIABLE_IDENTIFIER_PID 1 #define CM_VARIABLE_IDENTIFIER_PPS 2 #define CM_VARIABLE_IDENTIFIER_PKI_DNS_SUFFIX 3 #define CM_VARIABLE_IDENTIFIER_CONFIG_SERVER_FQDN 4 #define CM_VARIABLE_IDENTIFIER_RCFG_ENABLED 5 #define CM_VARIABLE_IDENTIFIER_PREINSTALLED_CERT_ENABLE 6 #define CM_VARIABLE_IDENTIFIER_USER_DEFINED_CERTS_CONFIG 7 #define CM_VARIABLE_IDENTIFIER_USER_DEFINED_CERT_ADD 8 #define CM_VARIABLE_IDENTIFIER_SOL_IDE_REDIRECTION_CONFIG 10 #define CM_VARIABLE_IDENTIFIER_HOST_NAME 11 #define CM_VARIABLE_IDENTIFIER_DOMAIN_NAME 12 #define CM_VARIABLE_IDENTIFIER_DHCP 13 #define CM_VARIABLE_IDENTIFIER_SFWU 14 #define CM_VARIABLE_IDENTIFIER_ITO 15 #define CM_VARIABLE_IDENTIFIER_PM 16 #define CM_VARIABLE_IDENTIFIER_PSADDR 17 #define CM_VARIABLE_IDENTIFIER_PSPO 18 #define CM_VARIABLE_IDENTIFIER_STATIC_PV4_PARAMS 19 #define CM_VARIABLE_IDENTIFIER_VLAN 20 #define CM_VARIABLE_IDENTIFIER_PASS_POLICY_FLAG 21 #define CM_VARIABLE_IDENTIFIER_IPV6 22 #define CM_VARIABLE_IDENTIFIER_SHARED_DEDICATED_FQDN 23 #define CM_VARIABLE_IDENTIFIER_DYNAMIC_DNS_UPDATE 24 #define CM_VARIABLE_IDENTIFIER_KVM_STATE 25 #define CM_VARIABLE_IDENTIFIER_OPT_IN_USER_CONSENT_OPTION 26 #define CM_VARIABLE_IDENTIFIER_OPT_IN_REMOTE_IT_CONSENT_POLICY 27 #define CM_VARIABLE_IDENTIFIER_ME_PROVISION_HALT_ACTIVE 28 #define CM_VARIABLE_IDENTIFIER_MANUAL_SETUP_AND_CONFIGURATION 29 #define CM_VARIABLE_IDENTIFIER_SUPPORT_CHANNEL_IDENTIFIER 30 #define CM_VARIABLE_IDENTIFIER_SUPPORT_CHANNEL_DESCRIPTION 31 #define CM_VARIABLE_IDENTIFIER_SERVICE_ACCOUNT_NUMBER 32 #define CM_VARIABLE_IDENTIFIER_ENROLLMENT_PASSCODE 33 #define CM_VARIABLE_IDENTIFIER_SERVICE_TYPE 34 #define CM_VARIABLE_IDENTIFIER_SERVICE_PROVIDER_IDENTIFIER 35 // ME_VARIABLE_IDENTIFIER_MANAGEABILITY_FEATURE_SELECTION byte length #define ME_VARIABLE_IDENTIFIER_MANAGEABILITY_FEATURE_LEN 1 #define CM_VARIABLE_IDENTIFIER_HOSTNAME_MAX_LENGTH 63 // ME_VARIABLE_IDENTIFIER_MANAGEABILITY_FEATURE_SELECTION values #define ME_VARIABLE_IDENTIFIER_MANAGEABILITY_FEATURE_AMT 1 // CM_VARIABLE_IDENTIFIER_PKI_DNS_SUFFIX byte length #define CM_VARIABLE_IDENTIFIER_PKI_DNS_SUFFIX_MAXLEN 255 // CM_VARIABLE_IDENTIFIER_CONFIG_SERVER_FQDN byte length #define CM_VARIABLE_IDENTIFIER_CONFIG_SERVER_FQDN_MAXLEN 255 // CM_VARIABLE_IDENTIFIER_RCFG_ENABLED byte length #define CM_VARIABLE_IDENTIFIER_RCFG_ENABLED_LEN 1 // CM_VARIABLE_IDENTIFIER_RCFG_ENABLED values #define CM_VARIABLE_IDENTIFIER_RCFG_ENABLED_OFF 0 #define CM_VARIABLE_IDENTIFIER_RCFG_ENABLED_ON 1 // CM_VARIABLE_IDENTIFIER_PREINSTALLED_CERT_ENABLE byte length #define CM_VARIABLE_IDENTIFIER_PREINSTALLED_CERT_ENABLE_LEN 1 // CM_VARIABLE_IDENTIFIER_PREINSTALLED_CERT_ENABLE values #define CM_VARIABLE_IDENTIFIER_PREINSTALLED_CERT_ENABLE_OFF 0 #define CM_VARIABLE_IDENTIFIER_PREINSTALLED_CERT_ENABLE_ON 1 // CM_VARIABLE_IDENTIFIER_USER_DEFINED_CERTS_CONFIG byte length #define CM_VARIABLE_IDENTIFIER_USER_DEFINED_CERTS_CONFIG_LEN 1 // CM_VARIABLE_IDENTIFIER_USER_DEFINED_CERTS_CONFIG values #define CM_VARIABLE_IDENTIFIER_USER_DEFINED_CERTS_CONFIG_DISABLE 0 #define CM_VARIABLE_IDENTIFIER_USER_DEFINED_CERTS_CONFIG_ENABLE 1 #define CM_VARIABLE_IDENTIFIER_USER_DEFINED_CERTS_CONFIG_DELETE 2 // CM_VARIABLE_IDENTIFIER_PM values #define CM_VARIABLE_IDENTIFIER_PM_ENTERPRISE 1 #define CM_VARIABLE_IDENTIFIER_PM_SMB 2 // CM_VARIABLE_IDENTIFIER_IPV6 byte length #define CM_VARIABLE_IDENTIFIER_IPV6_LEN 204 // CM_VARIABLE_IDENTIFIER_IPV6 byte length new format #define CM_VARIABLE_IDENTIFIER_IPV6_LEN_NEW_FORMAT 84 // CM_VARIABLE_IDENTIFIER_SHARED_DEDICATED_FQDN values #define CM_VARIABLE_IDENTIFIER_SHARED_DEDICATED_FQDN_SHARED 1 #define CM_VARIABLE_IDENTIFIER_SHARED_DEDICATED_FQDN_DEDICATED 0 // CM_VARIABLE_IDENTIFIER_SHARED_DEDICATED_FQDN byte length #define CM_VARIABLE_IDENTIFIER_SHARED_DEDICATED_FQDN_LEN 1 // CM_VARIABLE_IDENTIFIER_DYNAMIC_DNS_UPDATE values #define CM_VARIABLE_IDENTIFIER_DYNAMIC_DNS_UPDATE_DISABLE 0 #define CM_VARIABLE_IDENTIFIER_DYNAMIC_DNS_UPDATE_ENABLE 1 // CM_VARIABLE_IDENTIFIER_DYNAMIC_DNS_UPDATE byte length #define CM_VARIABLE_IDENTIFIER_DYNAMIC_DNS_UPDATE_LEN 1 // CM_VARIABLE_IDENTIFIER_KVM_STATE values #define CM_VARIABLE_IDENTIFIER_KVM_STATE_DISABLE 0 #define CM_VARIABLE_IDENTIFIER_KVM_STATE_ENABLE 1 // CM_VARIABLE_IDENTIFIER_KVM_STATE byte length #define CM_VARIABLE_IDENTIFIER_KVM_STATE_LEN 1 // CM_VARIABLE_IDENTIFIER_OPT_IN_USER_CONSENT_OPTION values #define CM_VARIABLE_IDENTIFIER_OPT_IN_USER_CONSENT_DISABLE 0 #define CM_VARIABLE_IDENTIFIER_OPT_IN_USER_CONSENT_ENABLE_KVM 1 #define CM_VARIABLE_IDENTIFIER_OPT_IN_USER_CONSENT_ENABLE_ALL 0xFF // CM_VARIABLE_IDENTIFIER_OPT_IN_USER_CONSENT_OPTION byte length #define CM_VARIABLE_IDENTIFIER_OPT_IN_USER_CONSENT_OPTION_LEN 1 // CM_VARIABLE_IDENTIFIER_OPT_IN_REMOTE_IT_CONSENT_POLICY values #define CM_VARIABLE_IDENTIFIER_OPT_IN_REMOTE_IT_CONSENT_DISABLE 0 #define CM_VARIABLE_IDENTIFIER_OPT_IN_REMOTE_IT_CONSENT_ENABLE 1 // CM_VARIABLE_IDENTIFIER_OPT_IN_REMOTE_IT_CONSENT_POLICY byte length #define CM_VARIABLE_IDENTIFIER_OPT_IN_REMOTE_IT_CONSENT_POLICY_LEN 1 // CM_VARIABLE_IDENTIFIER_ME_PROVISION_HALT_ACTIVE values #define CM_VARIABLE_IDENTIFIER_ME_PROVISION_HALT_ACTIVE_STOP 0 #define CM_VARIABLE_IDENTIFIER_ME_PROVISION_HALT_ACTIVE_START 1 // CM_VARIABLE_IDENTIFIER_ME_PROVISION_HALT_ACTIVE byte length #define CM_VARIABLE_IDENTIFIER_ME_PROVISION_HALT_ACTIVE_LEN 1 // CM_VARIABLE_IDENTIFIER_MANUAL_SETUP_AND_CONFIGURATION values #define CM_VARIABLE_IDENTIFIER_MANUAL_SETUP_AND_CONFIGURATION_AUTOMATED 0 // CM_VARIABLE_IDENTIFIER_MANUAL_SETUP_AND_CONFIGURATION byte length #define CM_VARIABLE_IDENTIFIER_MANUAL_SETUP_AND_CONFIGURATION_LEN 1 // CM_VARIABLE_IDENTIFIER_SUPPORT_CHANNEL_IDENTIFIER byte length #define CM_VARIABLE_IDENTIFIER_SUPPORT_CHANNEL_IDENTIFIER_LEN 4 // CM_VARIABLE_IDENTIFIER_SERVICE_TYPE values #define CM_VARIABLE_IDENTIFIER_SERVICE_TYPE_REACTIVE 1 #define CM_VARIABLE_IDENTIFIER_SERVICE_TYPE_PROACTIVE 2 #define CM_VARIABLE_IDENTIFIER_SERVICE_TYPE_ONE_TIME_SESSION 4 // CM_VARIABLE_IDENTIFIER_SERVICE_TYPE byte length #define CM_VARIABLE_IDENTIFIER_SERVICE_TYPE_LEN 4 // CM_VARIABLE_IDENTIFIER_SERVICE_PROVIDER_IDENTIFIER byte length #define CM_VARIABLE_IDENTIFIER_SERVICE_PROVIDER_IDENTIFIER_LEN GUID_LENGTH /* hash entry Byte: Hash Algorithm 1 Byte[20-48]: Cert SHA-1(20)\256(32)\384(48) hash 48 Byte: friendly name length 1 Byte[friendly name length]: ASCII Cert Friendly name 32 (up to) */ #define MAX_FRIENDLY_NAME_LENGTH 32 #define CM_VARIABLE_IDENTIFIER_USER_DEFINED_CERT_ADD_MAXLEN 82 #define CM_VARIABLE_IDENTIFIER_SOL_IDE_REDIRECTION_CONFIG_LEN 1 // chunk size in bytes #define CHUNK_SIZE 512 // The following UUID uniquely identifies the file type. This identifier will // remain valid and constant across all versions of the file type. #define SETUP_GUID {0xb5,0x16,0xfb,0x71,0x87,0xcb,0xf9,0x4a,0xb4,0x41,0xca,0x7b,0x38,0x35,0x78,0xf9} #define SETUP_GUID_2 {0x96,0xB2,0x81,0x58,0xCF,0x6B,0x72,0x4C,0x8B,0x91,0xA1,0x5E,0x51,0x2E,0x99,0xC4} #define SETUP_GUID_3 {0xA7,0xF7,0xF6,0xC6,0x89,0xC4,0xF6,0x47,0x93,0xED,0xE2,0xE5,0x02,0x0D,0xA5,0x1D} #define SETUP_GUID_4 {0xAA,0xA9,0x34,0x52,0xE1,0x29,0xA9,0x44,0x8D,0x4D,0x08,0x1C,0x07,0xB9,0x63,0x53} #define GUID_SIZE 16 //defines the value used for scrambling - by what to increase each byte in the scrambled data. #define SCRAMBLE_SHIFTING_VALUE 17 #pragma pack(1) // Every data record contains a set of bit flags that characterize a record: // DontConsumeRecords - Is used to indicate if a file contains unique records per machine or // re-usable records. If 1, the record is re-usable and will not be deleted (consumed). typedef struct { UINT16 DontConsumeRecords:1; UINT16 Reserved:15; } FILE_FLAGS_T; // Format of the setup file header: // FileTypeUUID - uniquely identifies the file type. This identifier will // remain valid and constant across all versions of the file type. // RecordChunkCount - indicates the number of 512-byte chunks occupied by // this record, including all header, body, and reserved fields. // RecordHeaderBytes - indicates the length of the record header in bytes. // RecordNumber - uniquely identifies the record among all records in the // file. The field contains a non-negative ordinal value. The value of // this field is always zero in the Local Provisioning File Header Record. // MajorVersion - identifies the major version of the file format // specification. This is a positive integer that is greater than or equal // to 1. The Major Version number is incremented to indicate that changes // have been introduced that will cause code written against a lower Major // Version number to fail. // MinorVersion - identifies the minor version of the file format // specification. This is an integer that is greater than or equal to 0. // The Minor Version number is incremented to indicate that changes have // been introduced that will not cause code written against the same Major // Version and a lower Minor Version number to fail. The purpose of this // behavior is to allow a single local provisioning file to be used for // multiple generations of Intel� AMT platform. // DataRecordCount - indicates the total number of data records written // in the file when it was created. // DataRecordsConsumed - is a counter value that begins at 0 and is // incremented by 1 by each platform BIOS when it consumes a data record // from the file. This value is used to determine the offset of the next // data record in the file. // DataRecordChunkCount - contains the number of 512-byte chunks in each // data record. All data records are the same length. // ModuleList - contains a list of module identifiers. A module�s identifier // appears in the list if and only if the data records contain entries // for that module. Each module identifier is two bytes in length. The // list is terminated by an identifier value of 0. typedef struct { UINT8 FileTypeUuid[GUID_SIZE]; UINT16 RecordChunkCount; UINT16 RecordHeaderByteCount; UINT32 RecordNumber; UINT8 MajorVersion; UINT8 MinorVersion; FILE_FLAGS_T FileFlags; UINT32 DataRecordCount; UINT32 DataRecordsConsumed; UINT16 DataRecordChunkCount; UINT16 Reserved2; UINT16 ModuleList; //place holder } SETUP_HEADER_T; // Every data record contains a set of bit flags that characterize a record: // Valid - (the least significant bit) is 1 if the record is valid. // If Valid is 1, the record is used once, and then Valid is set to 0. // Scrambled - is 1 if the recored is scrambled (each byte from the data recored not including // the record header is increased by 17 then computed by modulo 256 to keep the range of 0..255). // The scrambling is supported starting with version 4.0. typedef struct { UINT32 Valid:1; UINT32 Scrambled:1; UINT32 Reserved:30; } RECORD_FLAGS_T; // Format of a data record header: // RecordTypeIdentifier - identifies the type of record (in this case a data // record). Record Identifiers: Invalid - 0, Data Record - 1 // RecordFlags - contains a set of bit flags that characterize the record. // RecordChunkCount - contains the number of 512-byte chunks occupied by the // record including all header, body, and reserved fields. // RecordHeaderByteCount - indicates the length of the record header in bytes. // RecordNumber - uniquely identifies the record among all records in the // file, including invalid as well as valid records. The identifier is a // non-negative integer. typedef struct { UINT32 RecordTypeIdentifier; RECORD_FLAGS_T RecordFlags; UINT32 Reserved1[2]; UINT16 RecordChunkCount; UINT16 RecordHeaderByteCount; UINT32 RecordNumber; } DATA_RECORD_HEADER_T; // Format of a data record entry: // ModuleIdentifier - identifies the target ME module for the entry. // VariableIdentifier - an enumeration value that identifies the variable. // Variable identifiers are unique to each ModuleIdentifier. // VariableLength - is the length of the variable value in bytes. // VariableValue - is the value to be assigned to the variable. typedef struct { UINT16 ModuleIdentifier; UINT16 VariableIdentifier; UINT16 VariableLength; UINT16 Reserved; UINT8 VariableValue; //place holder } DATA_RECORD_ENTRY_T; #pragma pack() #endif