summaryrefslogtreecommitdiffstats
path: root/src/include/usr/hwpf/fapi/fapiCollectFfdc.H
blob: d0a085ff000aa4c164980751c30e2903e9feeca4 (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
//  IBM_PROLOG_BEGIN_TAG
//  This is an automatically generated prolog.
//
//  $Source: src/include/usr/hwpf/fapi/fapiCollectFfdc.H $
//
//  IBM CONFIDENTIAL
//
//  COPYRIGHT International Business Machines Corp. 2011
//
//  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
/**
 *  @file fapiCollectFfdc.H
 *
 *  @brief Defines the fapiCollectFfdc function
 */

/*
 * Change Log ******************************************************************
 * Flag     Defect/Feature  User        Date        Description
 * ------   --------------  ----------  ----------- ----------------------------
 *                          mjjones     08/09/2011  Created.
 */

#ifndef FAPICOLLECTFFDC_H_
#define FAPICOLLECTFFDC_H_

#include <stdint.h>
#include <fapiReturnCode.H>

namespace fapi
{

/**
 * @brief Collect FFDC
 *
 * Collect FFDC. This function should be called by PLAT when it is processing
 * a ReturnCode generated by a HWP and the ErrorInfoRepository contains a record
 * for the error indicating that FFDC should be collected. This function is
 * implemented in the generated fapiCollectFfdc.C file (generated using data
 * from the Error Information XML file)
 *
 * @param[in]  i_token  FFDC HWP token (retrieved from ErrorInfoRepository)
 * @param[in]  i_target Reference to Target to collect FFDC from
 * @param[out] o_pFfdc  Reference to uint8_t pointer. Set to point to a newly
 *                      allocated array containing FFDC data
 * @param[out] o_size   Reference to uint32_t. Set to the size of the FFDC
 *                      data
 *
 * @return ReturnCode
 *
 * @note Caller must delete the data with "delete [] o_pFfdc"
 */
ReturnCode fapiCollectFfdc(const FfdcHwpToken i_token,
                           const Target & i_target,
                           uint8_t * & o_pFfdc,
                           uint32_t & o_size);

}

#endif // FAPICOLLECTFFDC_H_
OpenPOWER on IntegriCloud