Implement ArReadFSDualWord() routine
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
parent
75c519a70c
commit
a32e18b237
@ -57,6 +57,10 @@ XTCDECL
|
||||
ULONG_PTR
|
||||
ArReadControlRegister(IN USHORT ControlRegister);
|
||||
|
||||
XTCDECL
|
||||
ULONG
|
||||
ArReadFSDualWord(ULONG Offset);
|
||||
|
||||
XTCDECL
|
||||
ULONGLONG
|
||||
ArReadModelSpecificRegister(IN ULONG Register);
|
||||
|
@ -270,6 +270,27 @@ ArReadControlRegister(IN USHORT ControlRegister)
|
||||
return Value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads dualword from a memory location specified by an offset relative to the beginning of the FS segment.
|
||||
*
|
||||
* @param Offset
|
||||
* Specifies the offset from the beginning of FS segment.
|
||||
*
|
||||
* @return Returns the value read from the specified memory location relative to FS segment.
|
||||
*
|
||||
* @since XT 1.0
|
||||
*/
|
||||
XTCDECL
|
||||
ULONG
|
||||
ArReadFSDualWord(ULONG Offset)
|
||||
{
|
||||
ULONG Value;
|
||||
asm volatile("movl %%fs:%a[Offset], %k[Value]"
|
||||
: [Value] "=r" (Value)
|
||||
: [Offset] "ir" (Offset));
|
||||
return Value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a 64-bit value from the requested Model Specific Register (MSR).
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user