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