This commit is contained in:
parent
4073b1589d
commit
358b20f1a1
@ -20,27 +20,27 @@ XTCDECL
|
|||||||
UCHAR
|
UCHAR
|
||||||
HlIoPortInByte(IN USHORT Port);
|
HlIoPortInByte(IN USHORT Port);
|
||||||
|
|
||||||
XTCDECL
|
|
||||||
USHORT
|
|
||||||
HlIoPortInShort(IN USHORT Port);
|
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
ULONG
|
ULONG
|
||||||
HlIoPortInLong(IN USHORT Port);
|
HlIoPortInLong(IN USHORT Port);
|
||||||
|
|
||||||
|
XTCDECL
|
||||||
|
USHORT
|
||||||
|
HlIoPortInShort(IN USHORT Port);
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
VOID
|
VOID
|
||||||
HlIoPortOutByte(IN USHORT Port,
|
HlIoPortOutByte(IN USHORT Port,
|
||||||
IN UCHAR Data);
|
IN UCHAR Data);
|
||||||
|
|
||||||
XTCDECL
|
|
||||||
VOID
|
|
||||||
HlIoPortOutShort(IN USHORT Port,
|
|
||||||
IN USHORT Value);
|
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
VOID
|
VOID
|
||||||
HlIoPortOutLong(IN USHORT Port,
|
HlIoPortOutLong(IN USHORT Port,
|
||||||
IN ULONG Value);
|
IN ULONG Value);
|
||||||
|
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlIoPortOutShort(IN USHORT Port,
|
||||||
|
IN USHORT Value);
|
||||||
|
|
||||||
#endif /* __XTDK_AMD64_HLFUNCS_H */
|
#endif /* __XTDK_AMD64_HLFUNCS_H */
|
||||||
|
@ -20,27 +20,27 @@ XTCDECL
|
|||||||
UCHAR
|
UCHAR
|
||||||
HlIoPortInByte(IN USHORT Port);
|
HlIoPortInByte(IN USHORT Port);
|
||||||
|
|
||||||
XTCDECL
|
|
||||||
USHORT
|
|
||||||
HlIoPortInShort(IN USHORT Port);
|
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
ULONG
|
ULONG
|
||||||
HlIoPortInLong(IN USHORT Port);
|
HlIoPortInLong(IN USHORT Port);
|
||||||
|
|
||||||
|
XTCDECL
|
||||||
|
USHORT
|
||||||
|
HlIoPortInShort(IN USHORT Port);
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
VOID
|
VOID
|
||||||
HlIoPortOutByte(IN USHORT Port,
|
HlIoPortOutByte(IN USHORT Port,
|
||||||
IN UCHAR Data);
|
IN UCHAR Data);
|
||||||
|
|
||||||
XTCDECL
|
|
||||||
VOID
|
|
||||||
HlIoPortOutShort(IN USHORT Port,
|
|
||||||
IN USHORT Value);
|
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
VOID
|
VOID
|
||||||
HlIoPortOutLong(IN USHORT Port,
|
HlIoPortOutLong(IN USHORT Port,
|
||||||
IN ULONG Value);
|
IN ULONG Value);
|
||||||
|
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlIoPortOutShort(IN USHORT Port,
|
||||||
|
IN USHORT Value);
|
||||||
|
|
||||||
#endif /* __XTDK_I686_HLFUNCS_H */
|
#endif /* __XTDK_I686_HLFUNCS_H */
|
||||||
|
@ -30,27 +30,6 @@ HlIoPortInByte(IN USHORT Port)
|
|||||||
return Value;
|
return Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Reads the 16-bit data from the specified I/O port.
|
|
||||||
*
|
|
||||||
* @param Port
|
|
||||||
* Specifies the address to read from, in the range of 0-0xFFFF.
|
|
||||||
*
|
|
||||||
* @return The value read from the port.
|
|
||||||
*
|
|
||||||
* @since XT 1.0
|
|
||||||
*/
|
|
||||||
XTCDECL
|
|
||||||
USHORT
|
|
||||||
HlIoPortInShort(IN USHORT Port)
|
|
||||||
{
|
|
||||||
USHORT Value;
|
|
||||||
asm volatile("inw %1, %0"
|
|
||||||
: "=a" (Value)
|
|
||||||
: "Nd" (Port));
|
|
||||||
return Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads the 32-bit data from the specified I/O port.
|
* Reads the 32-bit data from the specified I/O port.
|
||||||
*
|
*
|
||||||
@ -72,6 +51,27 @@ HlIoPortInLong(IN USHORT Port)
|
|||||||
return Value;
|
return Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads the 16-bit data from the specified I/O port.
|
||||||
|
*
|
||||||
|
* @param Port
|
||||||
|
* Specifies the address to read from, in the range of 0-0xFFFF.
|
||||||
|
*
|
||||||
|
* @return The value read from the port.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTCDECL
|
||||||
|
USHORT
|
||||||
|
HlIoPortInShort(IN USHORT Port)
|
||||||
|
{
|
||||||
|
USHORT Value;
|
||||||
|
asm volatile("inw %1, %0"
|
||||||
|
: "=a" (Value)
|
||||||
|
: "Nd" (Port));
|
||||||
|
return Value;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes the 8-bit data to the specified I/O port.
|
* Writes the 8-bit data to the specified I/O port.
|
||||||
*
|
*
|
||||||
@ -96,30 +96,6 @@ HlIoPortOutByte(IN USHORT Port,
|
|||||||
"Nd" (Port));
|
"Nd" (Port));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Writes the 16-bit data to the specified I/O port.
|
|
||||||
*
|
|
||||||
* @param Port
|
|
||||||
* Specifies the address to write to, in the range of 0-0xFFFF.
|
|
||||||
*
|
|
||||||
* @param Value
|
|
||||||
* Supplies the value to write.
|
|
||||||
*
|
|
||||||
* @return This routine does not return any value.
|
|
||||||
*
|
|
||||||
* @since XT 1.0
|
|
||||||
*/
|
|
||||||
XTCDECL
|
|
||||||
VOID
|
|
||||||
HlIoPortOutShort(IN USHORT Port,
|
|
||||||
IN USHORT Value)
|
|
||||||
{
|
|
||||||
asm volatile("outw %0, %1"
|
|
||||||
:
|
|
||||||
: "a" (Value),
|
|
||||||
"Nd" (Port));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes the 32-bit data to the specified I/O port.
|
* Writes the 32-bit data to the specified I/O port.
|
||||||
*
|
*
|
||||||
@ -143,3 +119,27 @@ HlIoPortOutLong(IN USHORT Port,
|
|||||||
: "a" (Value),
|
: "a" (Value),
|
||||||
"Nd" (Port));
|
"Nd" (Port));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes the 16-bit data to the specified I/O port.
|
||||||
|
*
|
||||||
|
* @param Port
|
||||||
|
* Specifies the address to write to, in the range of 0-0xFFFF.
|
||||||
|
*
|
||||||
|
* @param Value
|
||||||
|
* Supplies the value to write.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlIoPortOutShort(IN USHORT Port,
|
||||||
|
IN USHORT Value)
|
||||||
|
{
|
||||||
|
asm volatile("outw %0, %1"
|
||||||
|
:
|
||||||
|
: "a" (Value),
|
||||||
|
"Nd" (Port));
|
||||||
|
}
|
||||||
|
@ -30,27 +30,6 @@ HlIoPortInByte(IN USHORT Port)
|
|||||||
return Value;
|
return Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Reads the 16-bit data from the specified I/O port.
|
|
||||||
*
|
|
||||||
* @param Port
|
|
||||||
* Specifies the address to read from, in the range of 0-0xFFFF.
|
|
||||||
*
|
|
||||||
* @return The value read from the port.
|
|
||||||
*
|
|
||||||
* @since XT 1.0
|
|
||||||
*/
|
|
||||||
XTCDECL
|
|
||||||
USHORT
|
|
||||||
HlIoPortInShort(IN USHORT Port)
|
|
||||||
{
|
|
||||||
USHORT Value;
|
|
||||||
asm volatile("inw %1, %0"
|
|
||||||
: "=a" (Value)
|
|
||||||
: "Nd" (Port));
|
|
||||||
return Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reads the 32-bit data from the specified I/O port.
|
* Reads the 32-bit data from the specified I/O port.
|
||||||
*
|
*
|
||||||
@ -72,6 +51,27 @@ HlIoPortInLong(IN USHORT Port)
|
|||||||
return Value;
|
return Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reads the 16-bit data from the specified I/O port.
|
||||||
|
*
|
||||||
|
* @param Port
|
||||||
|
* Specifies the address to read from, in the range of 0-0xFFFF.
|
||||||
|
*
|
||||||
|
* @return The value read from the port.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTCDECL
|
||||||
|
USHORT
|
||||||
|
HlIoPortInShort(IN USHORT Port)
|
||||||
|
{
|
||||||
|
USHORT Value;
|
||||||
|
asm volatile("inw %1, %0"
|
||||||
|
: "=a" (Value)
|
||||||
|
: "Nd" (Port));
|
||||||
|
return Value;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes the 8-bit data to the specified I/O port.
|
* Writes the 8-bit data to the specified I/O port.
|
||||||
*
|
*
|
||||||
@ -96,30 +96,6 @@ HlIoPortOutByte(IN USHORT Port,
|
|||||||
"Nd" (Port));
|
"Nd" (Port));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Writes the 16-bit data to the specified I/O port.
|
|
||||||
*
|
|
||||||
* @param Port
|
|
||||||
* Specifies the address to write to, in the range of 0-0xFFFF.
|
|
||||||
*
|
|
||||||
* @param Value
|
|
||||||
* Supplies the value to write.
|
|
||||||
*
|
|
||||||
* @return This routine does not return any value.
|
|
||||||
*
|
|
||||||
* @since XT 1.0
|
|
||||||
*/
|
|
||||||
XTCDECL
|
|
||||||
VOID
|
|
||||||
HlIoPortOutShort(IN USHORT Port,
|
|
||||||
IN USHORT Value)
|
|
||||||
{
|
|
||||||
asm volatile("outw %0, %1"
|
|
||||||
:
|
|
||||||
: "a" (Value),
|
|
||||||
"Nd" (Port));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes the 32-bit data to the specified I/O port.
|
* Writes the 32-bit data to the specified I/O port.
|
||||||
*
|
*
|
||||||
@ -143,3 +119,27 @@ HlIoPortOutLong(IN USHORT Port,
|
|||||||
: "a" (Value),
|
: "a" (Value),
|
||||||
"Nd" (Port));
|
"Nd" (Port));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes the 16-bit data to the specified I/O port.
|
||||||
|
*
|
||||||
|
* @param Port
|
||||||
|
* Specifies the address to write to, in the range of 0-0xFFFF.
|
||||||
|
*
|
||||||
|
* @param Value
|
||||||
|
* Supplies the value to write.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlIoPortOutShort(IN USHORT Port,
|
||||||
|
IN USHORT Value)
|
||||||
|
{
|
||||||
|
asm volatile("outw %0, %1"
|
||||||
|
:
|
||||||
|
: "a" (Value),
|
||||||
|
"Nd" (Port));
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user