summaryrefslogtreecommitdiffstats
path: root/src/include/usr/targeting/attributestructs.H
blob: 88e35add992ec48f1d2257a12afb43298bd61a10 (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

#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;

} // End namespace TARGETING

#endif // TARG_ATTRIBUTESTRUCTS_H
OpenPOWER on IntegriCloud