summaryrefslogtreecommitdiffstats
path: root/src/include/kernel/hbterminatetypes.H
blob: 593919ca318b884bfe10ec9e4e06a57942f3a8a3 (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
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/include/kernel/hbterminatetypes.H $                       */
/*                                                                        */
/* OpenPOWER HostBoot Project                                             */
/*                                                                        */
/* Contributors Listed Below - COPYRIGHT 2012,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                                                     */
/** @file terminate.H
 *  @brief Defines kernel information about the TI data area
 */
#ifndef __KERNEL_HBTERMINATETYPES_H
#define __KERNEL_HBTERMINATETYPES_H
#include <stdint.h>

/** @struct HB_T_SRC_DataArea
 *  @brief Defines the data space recreating an SRC needed for a TI from kernel
 *  space
 */
struct HB_T_SRC_DataArea
{

    union{
        struct {
            uint32_t ID:8;          /**< B1 or what we are using now*/
            uint32_t subsystem:8;   /**< Caller of the TI  */
            uint32_t reasoncode:16; /**< reasoncode */
        };
        uint32_t SRCword0;          /**< Full SRC word0 */
    };
     /**< Full SRC word1: Reserved by FSP SRCI comp */
    union{
        struct {
            uint32_t bpCCIN:16;     /**< BP CCIN*/
            uint32_t moduleID:8;    /**< Module ID  */
            uint32_t FSP:8;         /**< subsystem */
        };
        uint32_t SRCword2;          /**< Full SRC word2 */
    };

    uint32_t SRCword3;              /**< Full SRC word3 */
    uint32_t SRCword4;              /**< Full SRC word4 */
    /* Word 5-8 - user data */
    union{
        struct {
            uint32_t iType:16;     /**< SRC of PLID failure*/
            uint32_t iSource:16;   /**< Source of the src */
        };
        uint32_t SRCword5;         /**< Full Dword5 */
    };
    uint32_t word6;                /**< Full Dword6 */

    uint32_t word7;                /**< Full Dword7 */
    uint32_t word8;                /**< Full Dword8 */

};


/** @struct TI_DataArea
 *  @brief Defines the data space used to store the src or PLID regarding a
 *     Terminate Immediate request
 */
struct HB_TI_DataArea
{
    union{
        struct {
            uint64_t type:16;       /**< indicates either plid or src  */
            uint64_t source:16;     /**< Caller of the TI  */
            uint64_t hbDumpFlag:1;  /**< get HB dump flag */
            uint64_t reserved2:15;  /**< Reserved space */
            uint64_t reserved3:16;  /**< Reserved space  */
        };
        uint64_t flag;              /**< Full word - flag */
    };

    union{
        uint32_t error_data;        /**< Error Data */
        uint32_t reserved0;
    };
    uint32_t plid;                  /**< Plid  */
    HB_T_SRC_DataArea src;          /**< SRC  */
};

// Enum indicating whether a SRC or PLID is stored
enum hb_terminate_type
{
    TI_WITH_PLID = 0x0001,
    TI_WITH_SRC =  0x0002,
};

// Enum used in the flag indicating who initiated the TI
enum hb_terminate_source
{
    NO_TI_ERROR =      0x0000,
    TI_KERNEL_ASSERT = 0x0001,
    TI_CRIT_ASSERT =   0x0002,
    TI_SHUTDOWN =      0x0003,
    TI_UNHANDLED_EX =  0x0004,
    TI_BOOTLOADER =    0x0005,
};


#endif
OpenPOWER on IntegriCloud