blob: 0bc08670ab75d5bdd860fea91a6d9c5bef30d0f9 (
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
98
99
100
101
102
103
104
105
106
|
/** @file
CmosAccessLib header file.
Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _CMOS_ACCESS_LIB_H_
#define _CMOS_ACCESS_LIB_H_
/**
Read a byte value from a CMOS address.
@param [in] Address Location to read from CMOS
@return The byte value read from the CMOS address.
**/
UINT8
EFIAPI
CmosRead8 (
IN UINT8 Address
);
/**
Write a byte value to a CMOS address.
@param [in] Address Location to write to CMOS.
@param [in] Data The byte value write to the CMOS address.
**/
VOID
EFIAPI
CmosWrite8 (
IN UINT8 Address,
IN UINT8 Data
);
/**
Read a word value from a CMOS address.
@param [in] Address Location to read from CMOS
@return The word value read from the CMOS address.
**/
UINT16
EFIAPI
CmosRead16 (
IN UINT8 Address
);
/**
Write a word value to a CMOS address.
@param [in] Address Location to write to CMOS.
@param [in] Data The word value write to the CMOS address.
**/
VOID
EFIAPI
CmosWrite16 (
IN UINT8 Address,
IN UINT16 Data
);
/**
Read a dword value from a CMOS address.
@param [in] Address Location to read from CMOS
@return The dword value read from the CMOS address.
**/
UINT32
EFIAPI
CmosRead32 (
IN UINT8 Address
);
/**
Write a dword value to a CMOS address.
@param [in] Address Location to write to CMOS.
@param [in] Data The dword value write to the CMOS address.
**/
VOID
EFIAPI
CmosWrite32 (
IN UINT8 Address,
IN UINT32 Data
);
/**
Initialize the CMOS.
It initialize the CMOS area when Force is TRUE or the checksum is incorrect.
@param[in] Force TRUE indicating initializing the CMOS area without checking the checksum.
@retval TRUE The CMOS is initialized to default value.
@retval FALSE The CMOS isn't initialized to default value.
**/
BOOLEAN
EFIAPI
CmosInit (
IN BOOLEAN Force
);
#endif // _CMOS_ACCESS_LIB_H_
|