summaryrefslogtreecommitdiffstats
path: root/src/include/usr/hwpf/fapi/fapiCollectFfdc.H
blob: ccee96a936db832659015818e6cb6424d487534b (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
/**
 *  @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