# Attribute XML Tags This document lists the supported tags for the attribute xml files. ```xml ATTR_MRW_EXAMPLE TARGET_TYPE_TYPE1,TARGET_TYPE_TYPE2 This is a useful description for an attribute that should come from the MRW. It is nice to describe different values and also the format of anything non-obvious. uint8 VAL0 = 0, VAL2 = 2, VAL3 = 0xFF 0 ATTR_HWP_EXAMPLE TARGET_TYPE_TYPE1,TARGET_TYPE_TYPE2 This is a useful description for an attribute that is set by a HWP directly. uint32 0 ATTR_PLAT_DEFAULT TARGET_TYPE_TYPE1,TARGET_TYPE_TYPE2 This is a useful description for an attribute that is supplied by the platform but the value is controlled within the xml. uint16 0x1234 ATTR_LAB_OVERRIDE TARGET_TYPE_TYPE1,TARGET_TYPE_TYPE2 This is a useful description for an attribute that is supplied by the platform but it is only non-zero if we're doing a lab override. uint16 0x1234 ``` ## Required Tags All attributes must contain exactly one instance of each of these tags. ### attribute Defines the scope of a single attribute. ` ... ` ### description Provides a useful description of both the purpose and the layout of the attribute. Useful information might include bounds on the value, bit/byte layout, array indices, etc. `A useful description` ### id Defines the name of the attribute. This must be universally unique. It must start with "ATTR_". `ATTR_THENAME` ### targetType Specifies which targets include this attribute. Can be a single or multiple values separated by commas. Must match a valid type from hwpf/fapi2/include/target_types.H. `TARGET_TYPE_PROC` `TARGET_TYPE_MEMBUF_CHIP, TARGET_TYPE_CORE` ### valueType Specifies the data type for this attribute, the options are: - uint8 - uint16 - uint32 - uint64 - int8 - int16 - int32 - int64 `uint8` ## Optional Tags These tags are optional for an attribute definition. Note that an attribute must include at least one of: platInit, writeable. ### array Specifies that this attribute is an array of 'valueType' numbers. The array can be multi-dimensional. Note : You should provide information on the meaning of the indices inside of the description. `8` `2 2` `2 4 6` ### default Specifies a default value for this attribute. The default serves different purposes depending on what other tags are used. * Without mrwHide : Provides an initial value that is shown to the MRW owner. Once any value is saved into the MRW, the default is no longer used. * With mrwHide : Determines the final value of this attribute `42` ### enum Specifies a set of enumerations/constants that should be used to read/write the attribute. You are not required to use the enum for access but it is strongly encouraged. The constant will have a value of : fapi2::ENUM_ATTR__. `FIRSTVALUE = 0, ANOTHERONE = 1, SKIPPEDSOME = 10` ### initToZero Indicates that this attribute has a default value of zero. Note : This has a positive memory usage effect in firmware compared to using an explicit default value of zero. `` ### mrwHide Indicates that this attribute should not be shown as configurable parameter in the MRW. Instead the attribute value is entirely controlled by the default value specified in the xml. Note : must have a default tag. `` ### overrideOnly Indicates that this attribute is only ever modified from its default value using lab override tools. Using this tag will result in memory savings for the platform and also hide it from the MRW tooling. `` ### platInit Indicates that the platform is responsible for providing the value of this attribute. This could be algorithmically, sourced from VPD, defined as part of the MRW, or blank space allocated for lab overrides. `` ### writeable Indicates that the attribute can be written to a new value by a Hardware Procedure (HWP). By default, attributes are read-only. Note : It is unusual, though not unheard of, for an attribute to be both platInit and writeable. If this is the case, the written value will persist across boots. `` ## Ignored/Deprecated Tags The following tags may exist in legacy xml files but they are not consumed by any code. `odmChangeable` `odmVisible` `persistent` `persistRuntime`