edkiiglueiolib.h
来自「EFI BIOS是Intel提出的下一代的BIOS标准。这里上传的Edk源代码是」· C头文件 代码 · 共 1,846 行 · 第 1/5 页
H
1,846 行
@param Port The I/O port to read.
@param StartBit The ordinal of the least significant bit in the bit field.
Range 0..31.
@param EndBit The ordinal of the most significant bit in the bit field.
Range 0..31.
@return The value read.
**/
UINT32
EFIAPI
IoBitFieldRead32 (
IN UINTN Port,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
Writes a bit field to an I/O register.
Writes Value to the bit field of the I/O register. The bit field is specified
by the StartBit and the EndBit. All other bits in the destination I/O
register are preserved. The value written to the I/O port is returned. Extra
left bits in Value are stripped.
If 32-bit I/O port operations are not supported, then ASSERT().
If StartBit is greater than 31, then ASSERT().
If EndBit is greater than 31, then ASSERT().
If EndBit is less than StartBit, then ASSERT().
@param Port The I/O port to write.
@param StartBit The ordinal of the least significant bit in the bit field.
Range 0..31.
@param EndBit The ordinal of the most significant bit in the bit field.
Range 0..31.
@param Value New value of the bit field.
@return The value written back to the I/O port.
**/
UINT32
EFIAPI
IoBitFieldWrite32 (
IN UINTN Port,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 Value
);
/**
Reads a bit field in a 32-bit port, performs a bitwise OR, and writes the
result back to the bit field in the 32-bit port.
Reads the 32-bit I/O port specified by Port, performs a bitwise inclusive OR
between the read result and the value specified by OrData, and writes the
result to the 32-bit I/O port specified by Port. The value written to the I/O
port is returned. This function must guarantee that all I/O read and write
operations are serialized. Extra left bits in OrData are stripped.
If 32-bit I/O port operations are not supported, then ASSERT().
If StartBit is greater than 31, then ASSERT().
If EndBit is greater than 31, then ASSERT().
If EndBit is less than StartBit, then ASSERT().
@param Port The I/O port to write.
@param StartBit The ordinal of the least significant bit in the bit field.
Range 0..31.
@param EndBit The ordinal of the most significant bit in the bit field.
Range 0..31.
@param OrData The value to OR with the read value from the I/O port.
@return The value written back to the I/O port.
**/
UINT32
EFIAPI
IoBitFieldOr32 (
IN UINTN Port,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 OrData
);
/**
Reads a bit field in a 32-bit port, performs a bitwise AND, and writes the
result back to the bit field in the 32-bit port.
Reads the 32-bit I/O port specified by Port, performs a bitwise AND between
the read result and the value specified by AndData, and writes the result to
the 32-bit I/O port specified by Port. The value written to the I/O port is
returned. This function must guarantee that all I/O read and write operations
are serialized. Extra left bits in AndData are stripped.
If 32-bit I/O port operations are not supported, then ASSERT().
If StartBit is greater than 31, then ASSERT().
If EndBit is greater than 31, then ASSERT().
If EndBit is less than StartBit, then ASSERT().
@param Port The I/O port to write.
@param StartBit The ordinal of the least significant bit in the bit field.
Range 0..31.
@param EndBit The ordinal of the most significant bit in the bit field.
Range 0..31.
@param AndData The value to AND with the read value from the I/O port.
@return The value written back to the I/O port.
**/
UINT32
EFIAPI
IoBitFieldAnd32 (
IN UINTN Port,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData
);
/**
Reads a bit field in a 32-bit port, performs a bitwise AND followed by a
bitwise inclusive OR, and writes the result back to the bit field in the
32-bit port.
Reads the 32-bit I/O port specified by Port, performs a bitwise AND followed
by a bitwise inclusive OR between the read result and the value specified by
AndData, and writes the result to the 32-bit I/O port specified by Port. The
value written to the I/O port is returned. This function must guarantee that
all I/O read and write operations are serialized. Extra left bits in both
AndData and OrData are stripped.
If 32-bit I/O port operations are not supported, then ASSERT().
If StartBit is greater than 31, then ASSERT().
If EndBit is greater than 31, then ASSERT().
If EndBit is less than StartBit, then ASSERT().
@param Port The I/O port to write.
@param StartBit The ordinal of the least significant bit in the bit field.
Range 0..31.
@param EndBit The ordinal of the most significant bit in the bit field.
Range 0..31.
@param AndData The value to AND with the read value from the I/O port.
@param OrData The value to OR with the result of the AND operation.
@return The value written back to the I/O port.
**/
UINT32
EFIAPI
IoBitFieldAndThenOr32 (
IN UINTN Port,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT32 AndData,
IN UINT32 OrData
);
/**
Reads a 64-bit I/O port.
Reads the 64-bit I/O port specified by Port. The 64-bit read value is returned.
This function must guarantee that all I/O read and write operations are
serialized.
If 64-bit I/O port operations are not supported, then ASSERT().
@param Port The I/O port to read.
@return The value read.
**/
UINT64
EFIAPI
IoRead64 (
IN UINTN Port
);
/**
Writes a 64-bit I/O port.
Writes the 64-bit I/O port specified by Port with the value specified by Value
and returns Value. This function must guarantee that all I/O read and write
operations are serialized.
If 64-bit I/O port operations are not supported, then ASSERT().
@param Port The I/O port to write.
@param Value The value to write to the I/O port.
@return The value written the I/O port.
**/
UINT64
EFIAPI
IoWrite64 (
IN UINTN Port,
IN UINT64 Value
);
/**
Reads a 64-bit I/O port, performs a bitwise inclusive OR, and writes the
result back to the 64-bit I/O port.
Reads the 64-bit I/O port specified by Port, performs a bitwise inclusive OR
between the read result and the value specified by OrData, and writes the
result to the 64-bit I/O port specified by Port. The value written to the I/O
port is returned. This function must guarantee that all I/O read and write
operations are serialized.
If 64-bit I/O port operations are not supported, then ASSERT().
@param Port The I/O port to write.
@param OrData The value to OR with the read value from the I/O port.
@return The value written back to the I/O port.
**/
UINT64
EFIAPI
IoOr64 (
IN UINTN Port,
IN UINT64 OrData
);
/**
Reads a 64-bit I/O port, performs a bitwise AND, and writes the result back
to the 64-bit I/O port.
Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
the read result and the value specified by AndData, and writes the result to
the 64-bit I/O port specified by Port. The value written to the I/O port is
returned. This function must guarantee that all I/O read and write operations
are serialized.
If 64-bit I/O port operations are not supported, then ASSERT().
@param Port The I/O port to write.
@param AndData The value to AND with the read value from the I/O port.
@return The value written back to the I/O port.
**/
UINT64
EFIAPI
IoAnd64 (
IN UINTN Port,
IN UINT64 AndData
);
/**
Reads a 64-bit I/O port, performs a bitwise AND followed by a bitwise
inclusive OR, and writes the result back to the 64-bit I/O port.
Reads the 64-bit I/O port specified by Port, performs a bitwise AND between
the read result and the value specified by AndData, performs a bitwise OR
between the result of the AND operation and the value specified by OrData,
and writes the result to the 64-bit I/O port specified by Port. The value
written to the I/O port is returned. This function must guarantee that all
I/O read and write operations are serialized.
If 64-bit I/O port operations are not supported, then ASSERT().
@param Port The I/O port to write.
@param AndData The value to AND with the read value from the I/O port.
@param OrData The value to OR with the result of the AND operation.
@return The value written back to the I/O port.
**/
UINT64
EFIAPI
IoAndThenOr64 (
IN UINTN Port,
IN UINT64 AndData,
IN UINT64 OrData
);
/**
Reads a bit field of an I/O register.
Reads the bit field in a 64-bit I/O register. The bit field is specified by
the StartBit and the EndBit. The value of the bit field is returned.
If 64-bit I/O port operations are not supported, then ASSERT().
If StartBit is greater than 63, then ASSERT().
If EndBit is greater than 63, then ASSERT().
If EndBit is less than StartBit, then ASSERT().
@param Port The I/O port to read.
@param StartBit The ordinal of the least significant bit in the bit field.
Range 0..63.
@param EndBit The ordinal of the most significant bit in the bit field.
Range 0..63.
@return The value read.
**/
UINT64
EFIAPI
IoBitFieldRead64 (
IN UINTN Port,
IN UINTN StartBit,
IN UINTN EndBit
);
/**
Writes a bit field to an I/O register.
Writes Value to the bit field of the I/O register. The bit field is specified
by the StartBit and the EndBit. All other bits in the destination I/O
register are preserved. The value written to the I/O port is returned. Extra
left bits in Value are stripped.
If 64-bit I/O port operations are not supported, then ASSERT().
If StartBit is greater than 63, then ASSERT().
If EndBit is greater than 63, then ASSERT().
If EndBit is less than StartBit, then ASSERT().
@param Port The I/O port to write.
@param StartBit The ordinal of the least significant bit in the bit field.
Range 0..63.
@param EndBit The ordinal of the most significant bit in the bit field.
Range 0..63.
@param Value New value of the bit field.
@return The value written back to the I/O port.
**/
UINT64
EFIAPI
IoBitFieldWrite64 (
IN UINTN Port,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT64 Value
);
/**
Reads a bit field in a 64-bit port, performs a bitwise OR, and writes the
result back to the bit field in the 64-bit port.
Reads the 64-bit I/O port specified by Port, performs a bitwise inclusive OR
between the read result and the value specified by OrData, and writes the
result to the 64-bit I/O port specified by Port. The value written to the I/O
port is returned. This function must guarantee that all I/O read and write
operations are serialized. Extra left bits in OrData are stripped.
If 64-bit I/O port operations are not supported, then ASSERT().
If StartBit is greater than 63, then ASSERT().
If EndBit is greater than 63, then ASSERT().
If EndBit is less than StartBit, then ASSERT().
@param Port The I/O port to write.
@param StartBit The ordinal of the least significant bit in the bit field.
Range 0..63.
@param EndBit The ordinal of the most significant bit in the bit field.
Range 0..63.
@param OrData The value to OR with the read value from the I/O port.
@return The value written back to the I/O port.
**/
UINT64
EFIAPI
IoBitFieldOr64 (
IN UINTN Port,
IN UINTN StartBit,
IN UINTN EndBit,
IN UINT64 OrData
);
/**
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?