]>
git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/PlatformPei/Cmos.c
2 PC/AT CMOS access routines
4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include "Library/IoLib.h"
20 Reads 8-bits of CMOS data.
22 Reads the 8-bits of CMOS data at the location specified by Index.
23 The 8-bit read value is returned.
25 @param Index The CMOS location to read.
27 @return The value read.
36 IoWrite8 (0x70, (UINT8
) Index
);
37 return IoRead8 (0x71);
42 Writes 8-bits of CMOS data.
44 Writes 8-bits of CMOS data to the location specified by Index
45 with the value specified by Value and returns Value.
47 @param Index The CMOS location to write.
48 @param Value The value to write to CMOS.
50 @return The value written to CMOS.
60 IoWrite8 (0x70, (UINT8
) Index
);
61 IoWrite8 (0x71, Value
);