VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/XenPlatformPei/Cmos.c@ 94264

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