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
|
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/usr/hwpf/hwp/occ/occ_procedures/p8_pm_firinit.H $ */
/* */
/* IBM CONFIDENTIAL */
/* */
/* COPYRIGHT International Business Machines Corp. 2013 */
/* */
/* 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 otherwise */
/* divested of its trade secrets, irrespective of what has been */
/* deposited with the U.S. Copyright Office. */
/* */
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
// $Id: p8_pm_firinit.H,v 1.11 2013/08/26 12:42:40 stillgs Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/p8_pm_firinit.H,v $
//------------------------------------------------------------------------------
// *|
// *! (C) Copyright International Business Machines Corp. 2011
// *! All Rights Reserved -- Property of IBM
// *! *** IBM Confidential ***
// *|
// *! TITLE : p8_pm_firinit.H
// *! DESCRIPTION : common .H file for all FIRINITS
// *!
// *! OWNER NAME : Greg Still Email: stillgs@us.ibm.com
// *! BACKUP NAME : Pradeep CN Email: padeepcn@in.ibm.com
// *!
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// MACRO structure definitions
//------------------------------------------------------------------------------
#ifndef _P8_PM_FIRINIT_H_
#define _P8_PM_FIRINIT_H_
#include "p8_pm.H"
#define SET_FIR_ACTION(b, x, y){ \
if (x) { \
e_rc |= action_0.setBit(b); \
} \
else \
{ \
e_rc |= action_0.clearBit(b); \
} \
if (y) { \
e_rc |= action_1.setBit(b); \
} \
else \
{ \
e_rc |= action_1.clearBit(b); \
}\
}
#define SET_FIR_MASK(b,y){ \
if (y) { \
e_rc |= mask.setBit(b); \
} \
else \
{ \
e_rc |= mask.clearBit(b); \
} \
}
#define SET_CHECK_STOP(b){SET_FIR_ACTION(b, 0, 0);}
#define SET_RECOV_ATTN(b){SET_FIR_ACTION(b, 0, 1);}
#define SET_RECOV_INTR(b){SET_FIR_ACTION(b, 1, 0);}
#define SET_MALF_ALERT(b){SET_FIR_ACTION(b, 1, 1);}
#define SET_FIR_MASKED(b){SET_FIR_MASK(b,1);}
#define CLEAR_FIR_MASK(b){SET_FIR_MASK(b,0);}
// function pointer typedef definition for HWP call support
typedef fapi::ReturnCode (*p8_pm_firinit_FP_t) (const fapi::Target& , uint32_t);
extern "C" {
/// \brief Calls each PM unit firinit procedures to configure the FIRs of the chip to predefined types :
/// \calls p8_pm_pmc_firinit
/// \calls p8_pm_pba_firinit
/// \calls p8_pm_pcbs_firinit
/// \calls p8_pm_oha_firinit
/// \calls p8_pm_occ_firinit
//const uint32_t PCB_FIR_REGISTER_LENGTH = 43 ;
//const uint32_t PMC_FIR_REGISTER_LENGTH = 49 ;
//const uint32_t PBA_FIR_REGISTER_LENGTH = 46 ;
//const uint32_t OHA_FIR_REGISTER_LENGTH = 6 ;
//const uint32_t OCC_FIR_REGISTER_LENGTH = 64 ;
//------------------------------------------------------------------------------
/**
* p8_pm_firinit Call underlying FIR procedures to deal with the FIRs based on
* the mode
*
* @param[in] i_target Chip target which will be passed to all the procedures
*
* @param[in] i_mode Control mode for the procedure
* PM_INIT, PM_CONFIG, PM_RESET, PM_RESET_SOFT
*
* @retval ECMD_SUCCESS
* @retval ERROR defined in xml
*/
fapi::ReturnCode p8_pm_firinit(const fapi::Target& i_target , uint32_t i_mode);
} // extern "C"
#endif
|