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
|
/** @file
Power state and boot mode save and restore data functions.
@copyright
Copyright (c) 2011 - 2012 Intel Corporation. All rights reserved.
This software and associated documentation (if any) is furnished
under a license and may only be used or copied in accordance
with the terms of the license. Except as permitted by such
license, no part of this software or documentation may be
reproduced, stored in a retrieval system, or transmitted in any
form or by any means without the express written consent of
Intel Corporation.
This file contains an 'Intel Peripheral Driver' and uniquely
identified as "Intel Reference Module" and is
licensed for Intel CPUs and chipsets under the terms of your
license agreement with Intel or your vendor. This file may
be modified by the user, subject to additional terms of the
license agreement
**/
#ifndef _MrcSaveRestore_h_
#define _MrcSaveRestore_h_
#pragma pack(push, 1)
#include "MrcTypes.h"
#include "MrcGlobal.h"
typedef struct {
U16 StartMchbarOffset;
U16 EndMchbarOffset;
} SaveDataControl;
/**
This function verifies that neither CPU fuses or DIMMs have changed.
@param[in] MrcData - Include all MRC global data.
@retval mrcSuccess if fast boot is allowed, otherwise mrcColdBootRequired.
**/
extern
MrcStatus
MrcFastBootPermitted (
IN MrcParameters *const MrcData
);
/**
This function saves any values that need to be used during non-cold boots.
@param[in, out] MrcData - Include all the MRC global data.
@retval mrcSuccess if the save occurred with no errors, otherwise returns an error code.
**/
extern
MrcStatus
MrcSaveMCValues (
IN OUT MrcParameters *const MrcData
);
/**
@brief
This function saves any remaining values that need to be used during non-cold boots.
@param[in, out] MrcData - Include all the MRC global data.
@retval mrcSuccess if the save occurred with no errors, otherwise returns an error code.
**/
extern
MrcStatus
MrcSaveMCValuesFinal (
IN OUT MrcParameters *const MrcData
);
/**
This function copies the non-training information that needs to be restored
from the 'save' data structure to the 'Output' data structure.
@param[in, out] MrcData - include all the MRC global data.
@retval mrcSuccess if the copy completed with no errors, otherwise returns an error code.
**/
extern
MrcStatus
MrcRestoreNonTrainingValues (
IN OUT MrcParameters *const MrcData
);
/**
This function writes the previously determined training values back to the memory controller.
@param[in] MrcData - Include all the MRC global data.
@retval mrcSuccess if the memory controller write back completed with no errors, otherwise returns an error code.
**/
extern
MrcStatus
MrcRestoreTrainingValues (
IN MrcParameters *const MrcData
);
/**
Calculates a CRC-32 of the specified data buffer.
@param[in] Data - Pointer to the data buffer.
@param[in] DataSize - Size of the data buffer, in bytes.
@retval The CRC-32 value.
**/
extern
U32
MrcCalculateCrc32 (
IN const U8 *const Data,
IN const U32 DataSize
);
#pragma pack(pop)
#endif
|