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
|
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/include/usr/pnor/pnorif.H $ */
/* */
/* IBM CONFIDENTIAL */
/* */
/* COPYRIGHT International Business Machines Corp. 2011,2012 */
/* */
/* 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 otherwise */
/* divested of its trade secrets, irrespective of what has been */
/* deposited with the U.S. Copyright Office. */
/* */
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
#ifndef __PNOR_PNORIF_H
#define __PNOR_PNORIF_H
#include <stdint.h>
#include <builtins.h>
#include <errl/errlentry.H>
namespace PNOR
{
/**
* PNOR Sections
*/
enum SectionId
{
TOC, /**< Table of Contents */
// Value of HB_EXT_CODE must be 1 for debug framework.
HB_EXT_CODE, /**< Hostboot Extended Image */
GLOBAL_DATA, /**< Global Data */
HB_BASE_CODE, /**< Hostboot Base Image */
CENTAUR_SBE, /**< Centaur Self-Boot Engine image */
SBE_IPL, /**< Self-Boot Engine IPL image */
WINK, /**< Sleep Winkle Reference image */
PAYLOAD, /**< HAL/OPAL */
HB_DATA, /**< Hostboot Data */
GUARD_DATA, /**< Guard Data */
HB_ERRLOGS, /**< Hostboot Error log Repository */
DIMM_JEDEC_VPD, /**< DIMM JEDEC VPD */
MODULE_VPD, /**< Module VPD */
CENTAUR_VPD, /**< Centaur VPD */
TEST, /**< Scratch space for PNOR test cases */
NUM_SECTIONS, /**< Number of defined sections */
FIRST_SECTION = TOC, /**< First section (for looping) */
LAST_SECTION = TEST, /**< Last section (for looping) */
INVALID_SECTION = NUM_SECTIONS, /**< Used for error cases, initialization */
};
/**
* Select a side of flash to access
*/
enum SideSelect
{
SIDE_A, /**< A-side of flash */
SIDE_B, /**< B-side of flash */
CURRENT_SIDE, /**< Use the currently selected side */
};
/**
* Information about a section of PNOR
*/
// Size and layout of this structure must be maintained for debug framework.
struct SectionInfo_t
{
SectionId id; /**< Identifier for this section */
SideSelect side; /**< Identifier for the side of flash */
const char* name; /**< Name of the section */
uint64_t vaddr; /**< Virtual address for the start of the section */
uint64_t size; /**< Actual size of content in bytes */
bool eccProtected; /**< Section is ECC protected */
};
/**
* @brief Return the size and address of a given section of PNOR data
*
* @param[in] i_section PNOR section
* @param[in] i_side Side select
* @param[out] o_info Location and size information
*
* @return errlHndl_t Error log if request was invalid
*/
errlHndl_t getSectionInfo( SectionId i_section,
SideSelect i_side,
SectionInfo_t& o_info );
}
#endif
|