summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/edi_ei_initialization/proc_fab_iovalid/proc_fab_iovalid.H
blob: bcc195a31ba649732f7411f78d0d8e024b1d4a44 (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
/*  IBM_PROLOG_BEGIN_TAG
 *  This is an automatically generated prolog.
 *
 *  $Source: src/usr/hwpf/hwp/edi_ei_initialization/proc_fab_iovalid/proc_fab_iovalid.H $
 *
 *  IBM CONFIDENTIAL
 *
 *  COPYRIGHT International Business Machines Corp. 2012
 *
 *  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_TAG
 */
// $Id: proc_fab_iovalid.H,v 1.8 2012/07/23 14:15:54 jmcgill Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/proc_fab_iovalid.H,v $
//------------------------------------------------------------------------------
// *|
// *! (C) Copyright International Business Machines Corp. 2011
// *! All Rights Reserved -- Property of IBM
// *! *** IBM Confidential ***
// *|
// *! TITLE       : proc_fab_iovalid.H
// *! DESCRIPTION : Manage X/A link iovalid controls (FAPI)
// *!
// *! OWNER NAME  : Joe McGill              Email: jmcgill@us.ibm.com
// *!
// *! ADDITIONAL COMMENTS:
// *!
// *! Manage fabric X/A link iovalid controls, which control the
// *! logical link layer fabric traffic.
// *!
// *! The iovalid controls are intended to be raised in the IPL flow
// *! after the underlying physical link layer is running, to start the
// *! flow of fabric frames.
// *!
// *! The iovalid controls are intended to be lowered prior to stopping
// *! the clocks in the dump process (to provide a clean dump state,
// *! assuming that the logical layer is quiesced).
// *!
//------------------------------------------------------------------------------

#ifndef _PROC_FAB_IOVALID_H_
#define _PROC_FAB_IOVALID_H_

//------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------

#include <fapi.H>


//------------------------------------------------------------------------------
// Structure definitions
//------------------------------------------------------------------------------

// HWP argument structure defining properties of this chip
struct proc_fab_iovalid_proc_chip
{
    // target for this chip
    fapi::Target this_chip;

    // X busses to operate on
    bool x0;
    bool x1;
    bool x2;
    bool x3;

    // A busses to operate on
    bool a0;
    bool a1;
    bool a2;
};

// function pointer typedef definition for HWP call support
typedef fapi::ReturnCode
(*proc_fab_iovalid_FP_t)(std::vector<proc_fab_iovalid_proc_chip>&,
                         bool);

//------------------------------------------------------------------------------
// Constant definitions
//------------------------------------------------------------------------------

// GP0 register bit/field definitions
const uint8_t X_GP0_X0_IOVALID_BIT = 48;
const uint8_t X_GP0_X1_IOVALID_BIT = 49;
const uint8_t X_GP0_X2_IOVALID_BIT = 50;
const uint8_t X_GP0_X3_IOVALID_BIT = 51;

const uint8_t A_GP0_A0_IOVALID_BIT = 48;
const uint8_t A_GP0_A1_IOVALID_BIT = 49;
const uint8_t A_GP0_A2_IOVALID_BIT = 50;


extern "C"
{

//------------------------------------------------------------------------------
// Function prototypes
//------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// function: FAPI proc_fab_iovalid HWP entry point
//           operates on chips passed in i_proc_chips argument to perform
//           desired iovalid manipulation (set or clear) on specified X/A busses
// parameters: i_proc_chips    => vector of proc_fab_iovalid_proc_chip
//                                structures which defines busses to
//                                act on
//             i_set_not_clear => define target iovalid operation (true=set,
//                                false=clear)
// returns: FAPI_RC_SUCCESS if all specified operations complete successfully,
//          else return code for failing operation
//------------------------------------------------------------------------------
fapi::ReturnCode proc_fab_iovalid(
    std::vector<proc_fab_iovalid_proc_chip>& i_proc_chips,
    bool i_set_not_clear);

} // extern "C"

#endif // _PROC_FAB_IOVALID_H_
OpenPOWER on IntegriCloud