VirtualBox

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

最後變更 在這個檔案是 99404,由 vboxsync 提交於 23 月 前

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.0 KB
 
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#include "Cmos.h"
12#include "Library/IoLib.h"
13
14/**
15 Reads 8-bits of CMOS data.
16
17 Reads the 8-bits of CMOS data at the location specified by Index.
18 The 8-bit read value is returned.
19
20 @param Index The CMOS location to read.
21
22 @return The value read.
23
24**/
25UINT8
26EFIAPI
27CmosRead8 (
28 IN UINTN Index
29 )
30{
31 IoWrite8 (0x70, (UINT8)Index);
32 return IoRead8 (0x71);
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}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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