~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/skiboot/external/gard/gard.h

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright 2013-2014 IBM Corp.
 
2
 *
 
3
 * Licensed under the Apache License, Version 2.0 (the "License");
 
4
 * you may not use this file except in compliance with the License.
 
5
 * You may obtain a copy of the License at
 
6
 *
 
7
 *      http://www.apache.org/licenses/LICENSE-2.0
 
8
 *
 
9
 * Unless required by applicable law or agreed to in writing, software
 
10
 * distributed under the License is distributed on an "AS IS" BASIS,
 
11
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 
12
 * implied.
 
13
 * See the License for the specific language governing permissions and
 
14
 * limitations under the License.
 
15
 */
 
16
 
 
17
#include <stdint.h>
 
18
 
 
19
#define MAX_PATH_ELEMENTS 10
 
20
#define PATH_TYPE_SHIFT 4
 
21
#define PATH_ELEMENTS_MASK (0x0F)
 
22
 
 
23
 
 
24
enum target_type {
 
25
        TYPE_NA                 = 0x00000000,
 
26
        TYPE_SYS                = 0x00000001,
 
27
        TYPE_NODE               = 0x00000002,
 
28
        TYPE_DIMM               = 0x00000003,
 
29
        TYPE_MEMBUF             = 0x00000004,
 
30
        TYPE_PROC               = 0x00000005,
 
31
        TYPE_EX                 = 0x00000006,
 
32
        TYPE_CORE               = 0x00000007,
 
33
        TYPE_L2                 = 0x00000008,
 
34
        TYPE_L3                 = 0x00000009,
 
35
        TYPE_L4                 = 0x0000000A,
 
36
        TYPE_MCS                = 0x0000000B,
 
37
        TYPE_MBA                = 0x0000000D,
 
38
        TYPE_XBUS               = 0x0000000E,
 
39
        TYPE_ABUS               = 0x0000000F,
 
40
        TYPE_PCI                = 0x00000010,
 
41
        TYPE_DPSS               = 0x00000011,
 
42
        TYPE_APSS               = 0x00000012,
 
43
        TYPE_OCC                = 0x00000013,
 
44
        TYPE_PSI                = 0x00000014,
 
45
        TYPE_FSP                = 0x00000015,
 
46
        TYPE_PNOR               = 0x00000016,
 
47
        TYPE_OSC                = 0x00000017,
 
48
        TYPE_TODCLK             = 0x00000018,
 
49
        TYPE_CONTROL_NODE       = 0x00000019,
 
50
        TYPE_OSCREFCLK          = 0x0000001A,
 
51
        TYPE_OSCPCICLK          = 0x0000001B,
 
52
        TYPE_REFCLKENDPT        = 0x0000001C,
 
53
        TYPE_PCICLKENDPT        = 0x0000001D,
 
54
        TYPE_NX                 = 0x0000001E,
 
55
        TYPE_PORE               = 0x0000001F,
 
56
        TYPE_PCIESWITCH         = 0x00000020,
 
57
        TYPE_CAPP               = 0x00000021,
 
58
        TYPE_FSI                = 0x00000022,
 
59
        TYPE_TEST_FAIL          = 0x00000023,
 
60
        TYPE_LAST_IN_RANGE      = 0x00000024,
 
61
};
 
62
 
 
63
enum path_type {
 
64
        PATH_NA                 = 0x00,
 
65
        PATH_AFFINITY           = 0x01,
 
66
        PATH_PHYSICAL           = 0x02,
 
67
        PATH_DEVICE             = 0x03,
 
68
        PATH_POWER              = 0x04,
 
69
};
 
70
 
 
71
struct path_element {
 
72
        uint8_t         target_type;
 
73
        uint8_t         instance;
 
74
} __attribute__((packed));
 
75
 
 
76
struct entity_path {
 
77
        /* First 4 bits are a path_type enum */
 
78
        /* Second 4 bits are the amount of path_elements */
 
79
        uint8_t                 type_size;
 
80
        struct path_element     path_elements[MAX_PATH_ELEMENTS];
 
81
 
 
82
} __attribute__((packed));
 
83
 
 
84
 
 
85
/* defined by hostboot */
 
86
struct gard_record {
 
87
        uint32_t                record_id;
 
88
        struct entity_path      target_id;
 
89
        uint8_t                 pad0[3];
 
90
        uint32_t                errlog_eid;
 
91
        uint8_t                 error_type;
 
92
        uint8_t                 resource_recovery;
 
93
        uint8_t                 pad1[6];
 
94
} __attribute__((packed));
 
95