summaryrefslogtreecommitdiffstats
path: root/src/include/usr/targeting/attributestructs.H
blob: c34c045e43853be689ba2ab8536dbe85be4730d8 (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
//  IBM_PROLOG_BEGIN_TAG
//  This is an automatically generated prolog.
//
//  $Source: src/include/usr/targeting/attributestructs.H $
//
//  IBM CONFIDENTIAL
//
//  COPYRIGHT International Business Machines Corp. 2011
//
//  p1
//
//  Object Code Only (OCO) source materials
//  Licensed Internal Code Source Materials
//  IBM HostBoot Licensed Internal Code
//
//  The source code for this program is not published or other-
//  wise divested of its trade secrets, irrespective of what has
//  been deposited with the U.S. Copyright Office.
//
//  Origin: 30
//
//  IBM_PROLOG_END

#ifndef TARG_ATTRIBUTESTRUCTS_H
#define TARG_ATTRIBUTESTRUCTS_H

/**
 *  @file attributestructs.H
 *
 *  @brief Complex attribute types
 *
 *  This header file contains definitions for complex attribute types.  Note:
 *  in the future this file may be autogenerated
 */

//******************************************************************************
// Includes
//******************************************************************************

// STD
#include <stdint.h>
#include <stdlib.h>

// This component
#include <targeting/entitypath.H>

//******************************************************************************
// Complex Types
//******************************************************************************

namespace TARGETING
{

/**
 *  @brief Structure which defines a target's primary capabilities
 *
 *  Structure which defines a target's primary capabilities.  A target can only
 *  support at most FSI SCOM and one of the other two SCOM types.  Applicable
 *  for all targets.  Structure is read-only.
 */
struct PrimaryCapabilities
{
    uint8_t supportsFsiScom    : 1; ///< 0b0: Target does not support FSI SCOM
                                    ///< 0b1: Target supports FSI SCOM
    uint8_t supportsXscom      : 1; ///< 0b0: Target does not support XSCOM
                                    ///< 0b1: Target supports FSI XSCOM
    uint8_t supportsInbandScom : 1; ///< 0b0: Target does not support inband
                                    ///<     SCOM
                                    ///< 0b1: Target supports inband SCOM
    uint8_t reserved           : 5;

} PACKED;

/**
 *  @brief Structure which defines which SCOM method to use at a point in time
 *
 *  Structure which defines which SCOM to use at a point in time.  Only
 *  applicable if target supports one or more SCOM types.  Only one bit (of the
 *  first three) can ever be set at any one time.  Structure is read-writeable.
 */
struct ScomSwitches
{
    uint8_t useFsiScom    : 1; ///< 0b0: Do not use FSI SCOM at this time
                               ///< 0b1: Use FSI SCOM at this time
    uint8_t useXscom      : 1; ///< 0b0: Do not use XSCOM at this time
                               ///< 0b1: Use XSCOM at this time
    uint8_t useInbandScom : 1; ///< 0b0: Do not use inband SCOM at this time
                               ///< 0b1: Use inband SCOM at this time
    uint8_t reserved      : 5; ///< Reserved bits

} PACKED;

/**
 *  @brief Structure which defines chip info necessary for XSCOM
 *
 *  Structure which defines chip info necessary for XSCOM.  Only
 *  applicable for chip targets which support XSCOM.  Structure is read-only.
 */
struct XscomChipInfo
{
    uint8_t nodeId; // Unique ID of node containing the chip
    uint8_t chipId; // Unique ID of chip, relative to node

} PACKED;

/**
 * @brief Structure which defines chip info necessary for I2C operations
 *
 * Structure which defines info necessary for I2C.  Only applicable for
 * chip targets which support I2C.  Structure is read-only.
 */
struct I2cChipInfo
{
    uint32_t busSpeed;          // Slave Device bus speed
    uint16_t deviceAddr;        // Slave Device address
    uint8_t devicePort;         // Slave Device Port location
    uint8_t deviceMasterEng;    // Master I2C engine slave is hung off of
} PACKED;

//@todo - NOT READY YET
/**
 * @brief Structure which defines info necessary to setup a FSI master
 *
 * Structure which defines info necessary for a FSI master.  Only applicable
 * for chip targets which include MFSI of CMFSI logic.  Structure is read-only.
 */
struct FsiMasterInfo
{
    uint64_t modebits;      ///< TBD
    uint16_t clockRatio0;   ///< Clock Ratio 0
    uint16_t clockRatio1;   ///< Clock Ratio 1

    uint8_t numPorts;       ///< Number of possible FSI-slave ports
} PACKED;

} // End namespace TARGETING

#endif // TARG_ATTRIBUTESTRUCTS_H
OpenPOWER on IntegriCloud