VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/PlatformPei/Cmos.c@ 80820

Last change on this file since 80820 was 80721, checked in by vboxsync, 5 years ago

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • Property svn:eol-style set to native
File size: 1.0 KB
Line 
1/** @file
2 PC/AT CMOS access routines
3
4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9
10#include "Cmos.h"
11#include "Library/IoLib.h"
12
13/**
14 Reads 8-bits of CMOS data.
15
16 Reads the 8-bits of CMOS data at the location specified by Index.
17 The 8-bit read value is returned.
18
19 @param Index The CMOS location to read.
20
21 @return The value read.
22
23**/
24UINT8
25EFIAPI
26CmosRead8 (
27 IN UINTN Index
28 )
29{
30 IoWrite8 (0x70, (UINT8) Index);
31 return IoRead8 (0x71);
32}
33
34
35/**
36 Writes 8-bits of CMOS data.
37
38 Writes 8-bits of CMOS data to the location specified by Index
39 with the value specified by Value and returns Value.
40
41 @param Index The CMOS location to write.
42 @param Value The value to write to CMOS.
43
44 @return The value written to CMOS.
45
46**/
47UINT8
48EFIAPI
49CmosWrite8 (
50 IN UINTN Index,
51 IN UINT8 Value
52 )
53{
54 IoWrite8 (0x70, (UINT8) Index);
55 IoWrite8 (0x71, Value);
56 return Value;
57}
58
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette