summaryrefslogtreecommitdiffstats
path: root/import/chips/p9/common/pmlib/include/wof_sgpe_pgpe_api.h
blob: 84721f0c936b0f49afb0070230474e3a317fb2a7 (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
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: import/chips/p9/common/pmlib/include/wof_sgpe_pgpe_api.h $    */
/*                                                                        */
/* OpenPOWER HCODE Project                                                */
/*                                                                        */
/* COPYRIGHT 2016,2018                                                    */
/* [+] International Business Machines Corp.                              */
/*                                                                        */
/*                                                                        */
/* Licensed under the Apache License, Version 2.0 (the "License");        */
/* you may not use this file except in compliance with the License.       */
/* You may obtain a copy of the License at                                */
/*                                                                        */
/*     http://www.apache.org/licenses/LICENSE-2.0                         */
/*                                                                        */
/* Unless required by applicable law or agreed to in writing, software    */
/* distributed under the License is distributed on an "AS IS" BASIS,      */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or        */
/* implied. See the License for the specific language governing           */
/* permissions and limitations under the License.                         */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */

#ifndef __IPC_MESSAGES_H__
#define __IPC_MESSAGES_H__

enum CTRL_STOP_UPDATES_ACTIONS
{
    CTRL_STOP_UPDT_ENABLE_CORE                  = 0x1,
};


enum UPDATE_ACTIVE_TYPES
{
    UPDATE_ACTIVE_CORES_TYPE_ENTRY              = 0x0,
    UPDATE_ACTIVE_CORES_TYPE_EXIT               = 0x1,
    UPDATE_ACTIVE_QUADS_TYPE_ENTRY              = 0x0,
    UPDATE_ACTIVE_QUADS_TYPE_EXIT               = 0x1,
    UPDATE_ACTIVE_QUADS_EXIT_TYPE_DONE          = 0x0,
    UPDATE_ACTIVE_QUADS_EXIT_TYPE_NOTIFY        = 0x1,
    UPDATE_ACTIVE_QUADS_ENTRY_TYPE_DONE         = 0x0,
    UPDATE_ACTIVE_QUADS_ENTRY_TYPE_NOTIFY       = 0x1
};

enum SUSPEND_STOP_COMMANDS
{
    SUSPEND_STOP_UNSUSPEND_ENTRY                = 0x1,
    SUSPEND_STOP_UNSUSPEND_EXIT                 = 0x2,
    SUSPEND_STOP_UNSUSPEND_ENTRY_EXIT           = 0x3,
    SUSPEND_STOP_SUSPEND_ENTRY                  = 0x5,
    SUSPEND_STOP_SUSPEND_EXIT                   = 0x6,
    SUSPEND_STOP_SUSPEND_ENTRY_EXIT             = 0x7
};

//
// Return Codes
//
#define SGPE_PGPE_IPC_RC_SUCCESS                0x01
#define SGPE_PGPE_RC_REQ_WHILE_PENDING_ACK      0x10
#define SGPE_PGPE_RC_PM_COMPLEX_SUSPEND         0x11
#define SGPE_PGPE_RC_WOF_DISABLED               0x12

enum IPC_SGPE_PGPE_RETURN_CODES
{
    IPC_SGPE_PGPE_RC_NULL                  = 0x00,
    IPC_SGPE_PGPE_RC_SUCCESS               = 0x01,
    IPC_SGPE_PGPE_RC_REQ_WHILE_PENDING_ACK = 0x10
};

// Sgpe to Pgpe IPC message format
typedef union
{
    uint64_t value;
    struct
    {
        uint64_t msg_num                : 4;
        uint64_t update_type            : 1;
        uint64_t reserved               : 3;
        uint64_t return_code            : 8;
        uint64_t active_cores           : 24;
        uint64_t return_active_cores    : 24;
    } fields;
} ipcmsg_s2p_update_active_cores_t;

typedef union
{
    uint64_t value;
    struct
    {
        uint64_t msg_num                : 4;
        uint64_t update_type            : 1;
        uint64_t entry_type             : 1;
        uint64_t exit_type              : 1;
        uint64_t reserved               : 1;
        uint64_t return_code            : 8;
        uint64_t requested_quads        : 6;
        uint64_t reserved0              : 2;
        uint64_t return_active_quads    : 6;
        uint64_t reserved1              : 2;
        uint64_t pad                    : 32;
    } fields;
} ipcmsg_s2p_update_active_quads_t;

// Pgpe to Sgpe IPC message format
typedef union
{
    uint64_t value;
    struct
    {
        uint32_t msg_num                : 8;
        uint32_t return_code            : 8;
        uint32_t action                 : 8;
        uint32_t pad                    : 8;
        uint32_t active_quads           : 6;
        uint32_t reserved               : 2;
        uint32_t active_cores           : 24;
    } fields;
} ipcmsg_p2s_ctrl_stop_updates_t;


typedef union
{
    uint64_t value;
    struct
    {
        uint32_t msg_num                : 8;
        uint32_t return_code            : 8;
        uint32_t command                : 8;
        uint32_t reserved0              : 8;
        uint32_t reserved1              : 32;
    } fields;
} ipcmsg_p2s_suspend_stop_t;


#endif // __IPC_MESSAGES_H__
OpenPOWER on IntegriCloud