190d12524SZane Shelley# RAS Data File definition 290d12524SZane Shelley 390d12524SZane ShelleyWhen hardware reports an error, the analyzer will call the isolator which will 490d12524SZane Shelleyreturn a list of active attentions in the hardware, referred to as `signatures`. 590d12524SZane ShelleyThe analyzer will then filter and sort the list to find the root cause 690d12524SZane Shelleysignature. The RAS Data files are used to define, in a data driven fashion, the 790d12524SZane Shelleyappropriate RAS actions that should be taken for the root cause signature. 890d12524SZane Shelley 990d12524SZane ShelleyThe RAS Data will be defined in the JSON data format. Each file will contain a 1090d12524SZane Shelleysingle JSON object (with nested values) which will define the RAS actions for a 1190d12524SZane Shelleysingle chip model and EC level. 1290d12524SZane Shelley 1390d12524SZane Shelley## 1) `model_ec` keyword (required) 1490d12524SZane Shelley 1590d12524SZane ShelleyThe value of this keyword is a `string` representing a 32-bit hexidecimal number 1690d12524SZane Shelleyin the format `[0-9A-Fa-f]{8}`. This value is used to determine the chip model 1790d12524SZane Shelleyand EC level in which this data is defined. 1890d12524SZane Shelley 1990d12524SZane Shelley## 2) `version` keyword (required) 2090d12524SZane Shelley 2190d12524SZane ShelleyA new version number should be used for each new RAS data file format so that 2290d12524SZane Shelleyuser applications will know how to properly parse the files. The value of this 2393b001c5SZane Shelleykeyword is a positive integer. Version `1` has been deprecated. The current 2493b001c5SZane Shelleyversion is `2`. 2590d12524SZane Shelley 2690d12524SZane Shelley## 3) `units` keyword 2790d12524SZane Shelley 2890d12524SZane ShelleyThe value of this keyword is a JSON object representing all of the guardable 2990d12524SZane Shelleyunit targets on this chip. Each element of this object will have the format: 3090d12524SZane Shelley 31*506db4c8SGeorge Liu```text 3290d12524SZane Shelley"<unit_name>" : "<relative_devtree_path>" 3390d12524SZane Shelley``` 3490d12524SZane Shelley 3590d12524SZane ShelleyWhere `<unit_name>` is simply an alphanumeric label for the unit and 3690d12524SZane Shelley`<relative_devtree_path>` is a string representing the devtree path of the unit 3790d12524SZane Shelleyrelative to the chip defined by the file. When necessary, the user application 3890d12524SZane Shelleyshould be able to concatenate the devtree path of the chip and the relative 3990d12524SZane Shelleydevtree path of the unit to get the full devtree path of the unit. 4090d12524SZane Shelley 4190d12524SZane Shelley## 4) `buses` keyword 4290d12524SZane Shelley 4390d12524SZane ShelleyThe value of this keyword is a JSON object representing all of the buses 4490d12524SZane Shelleyconnected to this chip. Each element of this object will have the format: 4590d12524SZane Shelley 46*506db4c8SGeorge Liu```text 4790d12524SZane Shelley"<bus_name>" : { <bus_details> } 4890d12524SZane Shelley``` 4990d12524SZane Shelley 5090d12524SZane ShelleyWhere `<bus_name>` is simply an alphanumeric label for the bus and 5190d12524SZane Shelley`<bus_details>` is a JSON object containing details of the bus connection. 5290d12524SZane Shelley 5390d12524SZane Shelley### 4.1) `<bus_details>` object 5490d12524SZane Shelley 5590d12524SZane ShelleyThis describes how the bus is connected to this chip. Note that the `unit` 5690d12524SZane Shelleykeyword is optional and the chip is used as the endpoint connection instead. 5790d12524SZane ShelleyThis is usually intended to be used when the chip is the child and we need to 5890d12524SZane Shelleyfind the connected `parent` chip/unit. 5990d12524SZane Shelley 6090d12524SZane Shelley| Keyword | Description | 618b10d699SPatrick Williams| ------- | ----------------------------------------------------------------- | 625d63cefcSZane Shelley| type | The bus connection type. Values (string): `SMP_BUS` and `OMI_BUS` | 6390d12524SZane Shelley| unit | Optional. The `<unit_name>` of the bus endpoint on this chip. | 6490d12524SZane Shelley 6590d12524SZane Shelley## 5) `actions` keyword (required) 6690d12524SZane Shelley 6790d12524SZane ShelleyThe value of this keyword is a JSON object representing all of the defined 6890d12524SZane Shelleyactions available for the file. Each element of this object contains an array of 6990d12524SZane ShelleyRAS actions, to be performed in order, with the format: 7090d12524SZane Shelley 71*506db4c8SGeorge Liu```text 7290d12524SZane Shelley"<action_name>" : [ { <action_element> }, ... ] 7390d12524SZane Shelley``` 7490d12524SZane Shelley 758b10d699SPatrick WilliamsWhere `<action_name>` is simply an alphanumeric label for a set of actions. This 768b10d699SPatrick Williamswill be the keyword referenced by the `signatures` or by a special 7790d12524SZane Shelley`<action_element>` for nested actions (see below). 7890d12524SZane Shelley 7990d12524SZane Shelley### 5.1) `<action_element>` object 8090d12524SZane Shelley 8190d12524SZane ShelleyAll `<action_element>` are JSON objects and they all require the `type` keyword, 8290d12524SZane Shelleywhich is used to determine the action type. The remaining required keywords are 8390d12524SZane Shelleydependent on the action type. 8490d12524SZane Shelley 8590d12524SZane ShelleyActions with a `priority` keyword can only use the following values (string): 8690d12524SZane Shelley 8790d12524SZane Shelley| Priority | Description | 888b10d699SPatrick Williams| -------- | ------------------------------------------------------------------ | 8990d12524SZane Shelley| `HIGH` | Serivce is mandatory. | 9090d12524SZane Shelley| `MED` | Service one at a time, in order, until issue is resolved. | 9190d12524SZane Shelley| `MED_A` | Same as `MED` except all in group A replaced at the same time. | 9290d12524SZane Shelley| `MED_B` | Same as `MED` except all in group B replaced at the same time. | 9390d12524SZane Shelley| `MED_C` | Same as `MED` except all in group C replaced at the same time. | 9490d12524SZane Shelley| `LOW` | Same as `MED*`, but only if higher priority service does not work. | 9590d12524SZane Shelley 96979e2871SZane ShelleyNOTE: If a part is called out more than once, only the highest priority callout 97979e2871SZane Shelleywill be used. 98979e2871SZane Shelley 9990d12524SZane ShelleyActions with a `guard` keyword can only use the following values (boolean): 10090d12524SZane Shelley 10190d12524SZane Shelley| Guard | Description | 1028b10d699SPatrick Williams| ----- | --------------------------------- | 10390d12524SZane Shelley| true | Request guard on associated part. | 10490d12524SZane Shelley| false | No guard request. | 10590d12524SZane Shelley 10690d12524SZane Shelley#### 5.1.1) action type `action` 10790d12524SZane Shelley 10890d12524SZane ShelleyThis is a special action type that allows using an action that has already been 10990d12524SZane Shelleydefined (nested actions). 11090d12524SZane Shelley 11190d12524SZane Shelley| Keyword | Description | 1128b10d699SPatrick Williams| ------- | ------------------------------------------------------ | 11390d12524SZane Shelley| type | value (string): `action` | 11490d12524SZane Shelley| name | The `<action_name>` of a previously predefined action. | 11590d12524SZane Shelley 11690d12524SZane Shelley#### 5.1.2) action type `callout_self` 11790d12524SZane Shelley 11890d12524SZane ShelleyThis will request to callout the chip defined by this file. 11990d12524SZane Shelley 12090d12524SZane Shelley| Keyword | Description | 1218b10d699SPatrick Williams| -------- | ------------------------------ | 12290d12524SZane Shelley| type | value (string): `callout_self` | 12390d12524SZane Shelley| priority | See `priority` table above. | 12490d12524SZane Shelley| guard | See `guard` table above. | 12590d12524SZane Shelley 12690d12524SZane Shelley#### 5.1.3) action type `callout_unit` 12790d12524SZane Shelley 12890d12524SZane ShelleyThis will request to callout a unit of the chip defined by this file. 12990d12524SZane Shelley 13090d12524SZane Shelley| Keyword | Description | 1318b10d699SPatrick Williams| -------- | ---------------------------------------------------- | 13290d12524SZane Shelley| type | value (string): `callout_unit` | 13390d12524SZane Shelley| name | The `<unit_name>` as defined by the `units` keyword. | 13490d12524SZane Shelley| priority | See `priority` table above. | 13590d12524SZane Shelley| guard | See `guard` table above. | 13690d12524SZane Shelley 13790d12524SZane Shelley#### 5.1.4) action type `callout_connected` 13890d12524SZane Shelley 13990d12524SZane ShelleyThis will request to callout a connected chip/unit on the other side of a bus. 14090d12524SZane Shelley 14190d12524SZane Shelley| Keyword | Description | 1428b10d699SPatrick Williams| -------- | --------------------------------------------------- | 14390d12524SZane Shelley| type | value (string): `callout_connected` | 14490d12524SZane Shelley| name | The `<bus_name>` as defined by the `buses` keyword. | 14590d12524SZane Shelley| priority | See `priority` table above. | 14690d12524SZane Shelley| guard | See `guard` table above. | 14790d12524SZane Shelley 14890d12524SZane Shelley#### 5.1.5) action type `callout_bus` 14990d12524SZane Shelley 15090d12524SZane ShelleyThis will request to callout all parts associated with a bus (RX/TX endpoints 1514757a7bcSZane Shelleyand everything else in between the endpoints). All parts will be called out with 1524757a7bcSZane Shelleythe same priority. If a particular part, like the endpoints, need to be called 1534757a7bcSZane Shelleyout at a different priority, they will need to be called out using a different 1544757a7bcSZane Shelleyaction type. For example: 15590d12524SZane Shelley 1564757a7bcSZane Shelley- `callout_self` with priority `MED_A`. (RX endpoint MED_A) 1574757a7bcSZane Shelley- `callout_connected` with priority `MED_A`. (TX endpoint MED_A) 1584757a7bcSZane Shelley- `callout_bus` with priority `LOW`. (everything else LOW) 15990d12524SZane Shelley 16090d12524SZane Shelley| Keyword | Description | 1618b10d699SPatrick Williams| -------- | --------------------------------------------------- | 16290d12524SZane Shelley| type | value (string): `callout_bus` | 16390d12524SZane Shelley| name | The `<bus_name>` as defined by the `buses` keyword. | 1644757a7bcSZane Shelley| priority | See `priority` table above. | 16590d12524SZane Shelley| guard | See `guard` table above. | 16690d12524SZane Shelley 16790d12524SZane Shelley#### 5.1.6) action type `callout_clock` 16890d12524SZane Shelley 16990d12524SZane ShelleyThis will request to callout a clock associated with this chip. 17090d12524SZane Shelley 17190d12524SZane Shelley| Keyword | Description | 1728b10d699SPatrick Williams| -------- | ------------------------------- | 17390d12524SZane Shelley| type | value (string): `callout_clock` | 17484721d90SZane Shelley| name | See `clock type` table below. | 17590d12524SZane Shelley| priority | See `priority` table above. | 17690d12524SZane Shelley| guard | See `guard` table above. | 17790d12524SZane Shelley 17884721d90SZane ShelleySupported clock types: 17984721d90SZane Shelley 18084721d90SZane Shelley| Clock Type | Description | 1818b10d699SPatrick Williams| --------------- | ---------------------------- | 18284721d90SZane Shelley| OSC_REF_CLOCK_0 | Oscillator reference clock 0 | 18384721d90SZane Shelley| OSC_REF_CLOCK_1 | Oscillator reference clock 1 | 184d195b716SZane Shelley| TOD_CLOCK | Time of Day (TOD) clock | 18584721d90SZane Shelley 18690d12524SZane Shelley#### 5.1.7) action type `callout_procedure` 18790d12524SZane Shelley 18890d12524SZane ShelleyThis will request to callout a service procedure. 18990d12524SZane Shelley 19090d12524SZane Shelley| Keyword | Description | 1918b10d699SPatrick Williams| -------- | ----------------------------------- | 19290d12524SZane Shelley| type | value (string): `callout_procedure` | 19384721d90SZane Shelley| name | See `procedures` table below. | 19490d12524SZane Shelley| priority | See `priority` table above. | 19590d12524SZane Shelley 19690d12524SZane ShelleySupported procedures: 19790d12524SZane Shelley 19890d12524SZane Shelley| Procedure | Description | 1998b10d699SPatrick Williams| --------- | ----------------------- | 20090d12524SZane Shelley| LEVEL2 | Request Level 2 support | 20190d12524SZane Shelley 20290d12524SZane Shelley#### 5.1.8) action type `callout_part` 20390d12524SZane Shelley 20490d12524SZane ShelleyThis will request special part callouts that cannot be managed by the other 20590d12524SZane Shelleycallout actions (e.g. the PNOR). 20690d12524SZane Shelley 20790d12524SZane Shelley| Keyword | Description | 2088b10d699SPatrick Williams| -------- | ------------------------------ | 20990d12524SZane Shelley| type | value (string): `callout_part` | 21084721d90SZane Shelley| name | See `parts` table below. | 21190d12524SZane Shelley| priority | See `priority` table above. | 21290d12524SZane Shelley 21390d12524SZane ShelleySupported parts: 21490d12524SZane Shelley 215a4134770SZane Shelley| Part Type | Description | 2168b10d699SPatrick Williams| --------- | ---------------------------- | 217a4134770SZane Shelley| PNOR | The part containing the PNOR | 21890d12524SZane Shelley 21990d12524SZane Shelley#### 5.1.9) action type `plugin` 22090d12524SZane Shelley 22190d12524SZane ShelleySome RAS actions require additional support that cannot be defined easily in 22290d12524SZane Shelleythese data files. User application can defined plugins to perform these 22390d12524SZane Shelleyadditional tasks. Use of this keyword should be avoided if possible. Remember, 22490d12524SZane Shelleythe goal is to make the user applications as data driven as possible to avoid 22590d12524SZane Shelleyplatform specific code. 22690d12524SZane Shelley 22790d12524SZane Shelley| Keyword | Description | 2288b10d699SPatrick Williams| -------- | ----------------------------------------------------------------- | 22990d12524SZane Shelley| type | value (string): `plugin` | 23090d12524SZane Shelley| name | A string representing the plugin name. | 231e13a9f95SZane Shelley| instance | Some plugins may be defined for multiple register/unit instances. | 23290d12524SZane Shelley 23390d12524SZane Shelley### 5.2) `actions` example 23490d12524SZane Shelley 23590d12524SZane Shelley```json 23690d12524SZane Shelley "actions" : { 23790d12524SZane Shelley "self_L" : [ 23890d12524SZane Shelley { 23990d12524SZane Shelley "type" : "callout_self", 24090d12524SZane Shelley "priority" : "LOW", 24190d12524SZane Shelley "guard" : false 24290d12524SZane Shelley }, 24390d12524SZane Shelley ], 24490d12524SZane Shelley "level2_M_self_L" : [ 24590d12524SZane Shelley { 24690d12524SZane Shelley "type" : "callout_procedure", 24790d12524SZane Shelley "name" : "LEVEL2", 24890d12524SZane Shelley "priority" : "MED" 24990d12524SZane Shelley }, 25090d12524SZane Shelley { 25190d12524SZane Shelley "type" : "action", 25290d12524SZane Shelley "name" : "self_L" 25390d12524SZane Shelley } 25490d12524SZane Shelley ] 25590d12524SZane Shelley } 25690d12524SZane Shelley``` 25790d12524SZane Shelley 25890d12524SZane Shelley## 6) `signatures` keyword (required) 25990d12524SZane Shelley 26090d12524SZane ShelleyThe value of this keyword is a JSON object representing all of the signatures 26190d12524SZane Shelleyfrom this chip requiring RAS actions. Each element of this object will have the 26290d12524SZane Shelleyformat: 26390d12524SZane Shelley 264*506db4c8SGeorge Liu```text 26590d12524SZane Shelley"<sig_id>" : { "<sig_bit>" : { "<sig_inst>" : "<action_name>", ... }, ... } 26690d12524SZane Shelley``` 26790d12524SZane Shelley 26890d12524SZane ShelleyWhere `<sig_id>` (16-bit), `<sig_bit>` (8-bit), and `<sig_inst>` (8-bit) are 26990d12524SZane Shelleylower case hexadecimal values with NO preceeding '0x'. See the details of these 27090d12524SZane Shelleyfields in the isolator's `Signature` object. The `<action_name>` is a label 27190d12524SZane Shelleydefined in by the `actions` keyword above. 272