#Overview Hostboot software is responsible for initializing the hardware on OpenPower systems. ## OpenPOWER Standalone Attribute Override tool The attribute override tool allows users to create their own custom attribute overrides to flash onto their system. See the Targeting Model overview in our [doc](https://github.com/open-power/docs/blob/master/hostboot/HostBoot_PG.md) for more information on this. The override tool has two main components, the input file and the executable that will convert the file into its binary representation. To use the tool, make sure to first compile hostboot in order to generate necessary .H files in obj/genfiles. ###Attribute Override Text file: The general format is a list of targets and the corresponding attributes the user would like to override along with their new values. target= ATTR_ATTRIBUTE_1 ATTR_ATTRIBUTE_2 ATTR_ATTRIBUTE_3 CONST ###Target String Syntax: ** System Target Line Format ** ** Unit Target Line Format ** || [:nz] || : || [.] || : || [:] ** Unit Target Line Alternate Format** || [.] || : || [:nz] || : || [:] *** System Target Line *** kx:sy[:] note: x=0, y=0 note : additional obsolete forms have beeng grandfathered in: blank note: interpreted as k0:s0 kx:nz:sy[:] note: x=0, y=0, z=0 or all *** Unit Target Line *** kx:sy[:] note: x=0, y=0 note : additional obsolete forms have beeng grandfathered in: kx:nz:sy[:] note: x=0, y=0 z may be : - single digit 0-9 - comma separated list of digits 0-9 -- 2 or more items in list -- no ordering dependencies e.g. 0,4 e.g. 5,3,9 - all nz : optional node number term z may be : - single digit 0-9 - comma separated list of digits 0-9 -- 2 or more items in list -- no ordering dependencies e.g. 0,4 e.g. 5,3,9 - all definitions : src/usr/targeting/attroverride/attrTextToBinaryBlob.C AttrOverrideSyncConstants::CHIP_TYPE_TARG_STR_TO_TYPE e.g. p9n, pu, dimm definitions : src/usr/targeting/attroverride/attrTextToBinaryBlob.C AttrOverrideSyncConstants::CHIP_UNIT_TYPE_TARG_STR_TO_TYPE e.g. ex, mca, obus pw note : w may be : - single number 0 - 65,534 - comma separated list of digits 0 - 65,534 -- 2 or more items in list -- no ordering dependencies e.g. 0,4 e.g. 5,3,9 - all cv note : v may be : - single number 0 - 254 - comma separated list of digits 0 - 254 -- 2 or more items in list -- no ordering dependencies e.g. 0,4 e.g. 5,3,9 - all ####Examples ----------------------------------------------------------------- # This is a comment CLEAR target = k0:s0 ATTR_SCRATCH_UINT8_1 0x12 ATTR_SCRATCH_UINT32_1 0x12345678 ATTR_SCRATCH_UINT64_1 0x8000000000000001 CONST target = k0:s0:n0:centaur:p06 ATTR_MSS_CACHE_ENABLE 0x0 CONST target = k0:s0:n0:centaur.mba:p06:c1 ATTR_MSS_FREQ 0x00000640 CONST ATTR_MSS_VOLT_VDDR_MILLIVOLTS 0x00000546 CONST ATTR_EFF_CEN_DRV_IMP_CNTL[0] OHM15 CONST ATTR_EFF_CEN_DRV_IMP_CNTL[1] OHM15 CONST target = k0:s0:n0:centaur.mba:pall:call ATTR_MSS_DIMM_MFG_ID_CODE[0][0] 0x12345678 ATTR_MSS_DIMM_MFG_ID_CODE[0][1] 0x12345678 ATTR_MSS_DIMM_MFG_ID_CODE[1][0] 0x12345678 ATTR_MSS_DIMM_MFG_ID_CODE[1][1] 0x12345678 ----------------------------------------------------------------- #####Other target examples: - System Target: - target = k0:s0 - target = k0:s0: - DIMM Target - target = k0:s0:n0:dimm:p06 - Multiple DIMM Targets - target = k0:s0:n0:dimm:p2,4 - All p9 chips - target = k0:s0:n0:p9:pall - All MCS chiplets: - target = k0:s0:n0:p9.mcs:pall:call - Node number specified - target = k0:s0:n1:dimm:p06 - target = k0:s0:nall:dimm:p06 ###Rules: - Lines starting with "CLEAR" are an instruction to clear all current overrides - All overrides can be cleared with a file just containing "CLEAR" - You may want to have CLEAR as the first line of an overrides file to clear all overrides before applying the new set. - Lines starting with "target = k0:s0" specify the target for all following attributes until the next target line. - Lines starting with "ATTR_" specify attribute overrides - There are 2 or 3 columns, they must be separated by one or more spaces - Column 1 is the attribute name from the attribute XML file - If the attribute is an array attribute then all elements in the array must be overridden - Column 2 is the override value, if it is not "0x" then it is interpreted as an enumerator from the field of the attribute XML file - Column 3, if it exists is "CONST" to specify a constant override. Most overrides will be const. - A const override is one which is always returned when a HWP gets the attribute, even if the attribute is set to a different value by HWP. - A non-const override is one which is cancelled when the attribute is set (effectively, a non-const override is just like setting the attribute to a value) - Other lines are ignored, so lines starting with "#" are ignored and can be used as comments. ###Attribute Override Compiler The tool is located in op-build/output/build/hostboot-/obj/genfiles/attributeOverride Running the tool is done like so: ./attributeOverride [options] After the tool runs, the file attrOverride.bin will be created in obj/genfiles/. Make sure to add a unique extension so that you do not overwrite your binary sections each time you run the tool. i.e. attrOverride.bin.testFeatureAlpha ####The available options are as follows: - '-d' - display debug logs when running tool - '-h' - display help text describing options and input file syntax - '-f' - generate binary with no ECC protection bits - '-t' - generate binary with ECC protection bits - no options - same as -t ###Installing Attribute Overrides on a system In order to apply the overrides onto a system, you must first flash a working PNOR image and then you may flash your overrides. #####pflash command for overrides: pflash -e -f -p [your generated attribute override binary] -P ATTR_TMP