summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCaptureData.H
blob: 51a0dfe2b09097823ebf3cb71b41b397b2758fd6 (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
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCaptureData.H $ */
/*                                                                        */
/* OpenPOWER HostBoot Project                                             */
/*                                                                        */
/* Contributors Listed Below - COPYRIGHT 2013,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 PRDF_CEN_MBA_CAPTURE_DATA_H
#define PRDF_CEN_MBA_CAPTURE_DATA_H

/**
 *  @file  prdfCenfMbaCaptureData.H
 *  @brief Header File for utility functions to capture MBA related data.
 */

#include <targeting/common/targetservice.H>
#include <iipCaptureData.h>
#include <errlentry.H>
#include <prdfMemoryMru.H>

namespace PRDF
{

class ExtensibleChip;
struct STEP_CODE_DATA_STRUCT;

namespace CenMbaCaptureData
{

/**
 * @brief Adds Memory ECC FFDC to an error log.
 * @note  This is intended to be used in non-normal analysis paths that do not
 *        have an SDC (i.e. Restore DRAM Repairs, IPL MNFG CE Isolation).
 * @note  The data will be limited and include things like the DRAM Repairs data
 *        but will not include stuff like the CE/UE tables, because that
 *        information is not relevant during its intended uses.
 * @param i_mbaTrgt An MBA target
 * @param o_errl    Error log.
 */
void addEccData( TARGETING::TargetHandle_t i_mbaTrgt, errlHndl_t io_errl );

/**
 * @brief Queries hardware for all DRAM repairs data (chip/symbol marks, DRAM
 *        spare, etc.) for the given MBA and added it to the capture data.
 * @param i_mbaTrgt An MBA target.
 * @param io_cd     Capture data struct.
 * @note  This function will be used to capture DRAM repair data into
 *        capture data struct. Other functions can call this function and
 *        update error log.
 */
void captureDramRepairsData( TARGETING::TargetHandle_t i_mbaTrgt,
                             CaptureData & io_cd );

/**
 * @brief Queries the Bad DQ attributes for the content of the DRAM repairs VPD
 *        and add it to the capture data.
 * @param i_mbaTrgt An MBA target.
 * @param io_cd     Capture data struct.
 * @note  This function will be used to capture DRAM repair data into
 *        capture data struct. Other functions can call this function and
 *        update error log.
 */
void captureDramRepairsVpd( TARGETING::TargetHandle_t i_mbaTrgt,
                            CaptureData & io_cd );

/**
 * @brief Adds a new user data section to the error log containing a MemoryMru
 *        plus extended data for extra FFDC.
 * @param i_mbaTrgt An MBA target
 * @param io_errl   Target error log.
 */
void addExtMemMruData( const MemoryMru & i_memMru, errlHndl_t io_errl );

} // end namespace MbaCaptureData

} // end namespace PRDF

#endif // PRDF_CEN_MBA_CAPTURE_DATA_H

OpenPOWER on IntegriCloud