+++ /dev/null
-/** @file\r
- Unaligned port I/O. This file has compiler specifics for Microsoft C as there\r
- is no ANSI C standard for doing IO.\r
-\r
- Based on IoLibMsc.c\r
-\r
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
- This program and the accompanying materials are licensed and made available\r
- under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php.\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-\r
-#include "UnalignedIoInternal.h"\r
-\r
-unsigned long _inpd (unsigned short port);\r
-unsigned long _outpd (unsigned short port, unsigned long dataword );\r
-void _ReadWriteBarrier (void);\r
-\r
-/**\r
- Performs a 32-bit write to the specified, possibly unaligned I/O-type\r
- address.\r
-\r
- Writes the 32-bit I/O port specified by Port with the value specified by\r
- Value and returns Value. This function must guarantee that all I/O read and\r
- write operations are serialized.\r
-\r
- If 32-bit unaligned I/O port operations are not supported, then ASSERT().\r
-\r
- @param[in] Port I/O port address\r
- @param[in] Value 32-bit word to write\r
-\r
- @return The value written to the I/O port.\r
-\r
-**/\r
-UINT32\r
-UnalignedIoWrite32 (\r
- IN UINTN Port,\r
- IN UINT32 Value\r
- )\r
-{\r
- _ReadWriteBarrier ();\r
- _outpd ((UINT16)Port, Value);\r
- _ReadWriteBarrier ();\r
- return Value;\r
-}\r
-\r
-/**\r
- Reads a 32-bit word from the specified, possibly unaligned I/O-type address.\r
-\r
- Reads the 32-bit I/O port specified by Port. The 32-bit read value is\r
- returned. This function must guarantee that all I/O read and write operations\r
- are serialized.\r
-\r
- If 32-bit unaligned I/O port operations are not supported, then ASSERT().\r
-\r
- @param[in] Port The I/O port to read.\r
-\r
- @return The value read.\r
-\r
-**/\r
-UINT32\r
-UnalignedIoRead32 (\r
- IN UINTN Port\r
- )\r
-{\r
- UINT32 Value;\r
-\r
- _ReadWriteBarrier ();\r
- Value = _inpd ((UINT16)Port);\r
- _ReadWriteBarrier ();\r
- return Value;\r
-}\r