]> git.proxmox.com Git - mirror_edk2.git/blame - OvmfPkg/Bhyve/PlatformPei/Cmos.c
OvmfPkg: Apply uncrustify changes
[mirror_edk2.git] / OvmfPkg / Bhyve / PlatformPei / Cmos.c
CommitLineData
656419f9
RC
1/** @file\r
2 PC/AT CMOS access routines\r
3\r
4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
656419f9
RC
9#include "Cmos.h"\r
10#include "Library/IoLib.h"\r
11\r
12/**\r
13 Reads 8-bits of CMOS data.\r
14\r
15 Reads the 8-bits of CMOS data at the location specified by Index.\r
16 The 8-bit read value is returned.\r
17\r
18 @param Index The CMOS location to read.\r
19\r
20 @return The value read.\r
21\r
22**/\r
23UINT8\r
24EFIAPI\r
25CmosRead8 (\r
ac0a286f 26 IN UINTN Index\r
656419f9
RC
27 )\r
28{\r
ac0a286f 29 IoWrite8 (0x70, (UINT8)Index);\r
656419f9
RC
30 return IoRead8 (0x71);\r
31}\r
32\r
656419f9
RC
33/**\r
34 Writes 8-bits of CMOS data.\r
35\r
36 Writes 8-bits of CMOS data to the location specified by Index\r
37 with the value specified by Value and returns Value.\r
38\r
39 @param Index The CMOS location to write.\r
40 @param Value The value to write to CMOS.\r
41\r
42 @return The value written to CMOS.\r
43\r
44**/\r
45UINT8\r
46EFIAPI\r
47CmosWrite8 (\r
ac0a286f
MK
48 IN UINTN Index,\r
49 IN UINT8 Value\r
656419f9
RC
50 )\r
51{\r
ac0a286f 52 IoWrite8 (0x70, (UINT8)Index);\r
656419f9
RC
53 IoWrite8 (0x71, Value);\r
54 return Value;\r
55}\r