summaryrefslogtreecommitdiffstats
path: root/src/usr/targeting/attroverride/README.attr_override
blob: b87e5fddc486091c624f5fc144d6ab7f98f1a08a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
#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=<target string>
    ATTR_ATTRIBUTE_1 <datatype> <value in hex>
    ATTR_ATTRIBUTE_2 <datatype> <value in hex>
    ATTR_ATTRIBUTE_3 <datatype> <value in hex> CONST

###Target String Syntax:

    <target string>
            ** System Target Line Format **
       <system string>

            ** Unit Target Line Format **
       <system string> || [:nz] ||
                       :<chip type> || [.<chip unit type>] ||
                       :<chip position> || [:<unit position>]

            ** Unit Target Line Alternate Format**
       <chip type> || [.<chip unit type>] ||
                   : <system string> || [:nz] ||
                   :<chip position> || [:<unit position>]


         <system string>
               *** 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

         <chip type>
            definitions :
              src/usr/targeting/attroverride/attrTextToBinaryBlob.C
              AttrOverrideSyncConstants::CHIP_TYPE_TARG_STR_TO_TYPE
              e.g.  p9n, pu, dimm

         <chip unit type>
            definitions :
              src/usr/targeting/attroverride/attrTextToBinaryBlob.C
              AttrOverrideSyncConstants::CHIP_UNIT_TYPE_TARG_STR_TO_TYPE
              e.g.  ex, mca, obus

         <chip position>
            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

         <unit position>
            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<hexval>" then it
             is interpreted as an enumerator from the <enum> 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-<hostboot version>/obj/genfiles/attributeOverride
Running the tool is done like so:

./attributeOverride <input attribute override file\> [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


OpenPOWER on IntegriCloud