]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/QemuVideoDxe/UnalignedIoUnsupported.c
OvmfPkg/QemuVideoDxe/VbeShim: handle PAM1 register on Q35 correctly
[mirror_edk2.git] / OvmfPkg / QemuVideoDxe / UnalignedIoUnsupported.c
1 /** @file
2 Unaligned port I/O dummy implementation for platforms which do not support it.
3
4 Copyright (c) 2017, Phil Dennis-Jordan.<BR>
5 This program and the accompanying materials are licensed and made available
6 under the terms and conditions of the BSD License which accompanies this
7 distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
9
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.
12
13 **/
14
15
16 #include <Library/DebugLib.h>
17 #include "UnalignedIoInternal.h"
18
19 /**
20 Performs a 32-bit write to the specified, possibly unaligned I/O-type
21 address.
22
23 Writes the 32-bit I/O port specified by Port with the value specified by
24 Value and returns Value. This function must guarantee that all I/O read and
25 write operations are serialized.
26
27 If 32-bit unaligned I/O port operations are not supported, then ASSERT().
28
29 @param[in] Port I/O port address
30 @param[in] Value 32-bit word to write
31
32 @return The value written to the I/O port.
33
34 **/
35 UINT32
36 UnalignedIoWrite32 (
37 IN UINTN Port,
38 IN UINT32 Value
39 )
40 {
41 ASSERT (FALSE);
42 return Value;
43 }
44
45 /**
46 Reads a 32-bit word from the specified, possibly unaligned I/O-type address.
47
48 Reads the 32-bit I/O port specified by Port. The 32-bit read value is
49 returned. This function must guarantee that all I/O read and write operations
50 are serialized.
51
52 If 32-bit unaligned I/O port operations are not supported, then ASSERT().
53
54 @param[in] Port The I/O port to read.
55
56 @return The value read.
57
58 **/
59 UINT32
60 UnalignedIoRead32 (
61 IN UINTN Port
62 )
63 {
64 ASSERT (FALSE);
65 return 0;
66 }