Implement HlLoadTaskRegister() for loading TSS segment selector into task register

Tento commit je obsažen v:
Rafal Kupiec 2023-01-20 20:24:05 +01:00
rodič 9cbe2d458c
revize f20ab3e52e
Podepsáno: belliash
ID GPG klíče: 4E829243E0CFE6B4
4 změnil soubory, kde provedl 46 přidání a 0 odebrání

Zobrazit soubor

@ -59,6 +59,10 @@ VOID
HlIoPortOutLong(IN USHORT Port,
IN ULONG Value);
XTCDECL
VOID
HlLoadTaskRegister(USHORT Source);
XTCDECL
ULONG_PTR
HlReadControlRegister(IN USHORT ControlRegister);

Zobrazit soubor

@ -59,6 +59,10 @@ VOID
HlIoPortOutLong(IN USHORT Port,
IN ULONG Value);
XTCDECL
VOID
HlLoadTaskRegister(USHORT Source);
XTCDECL
ULONG_PTR
HlReadControlRegister(IN USHORT ControlRegister);

Zobrazit soubor

@ -236,6 +236,25 @@ HlIoPortOutLong(IN USHORT Port,
"Nd" (Port));
}
/**
* Loads Task Register (TR) with a segment selector that points to TSS.
*
* @param Source
* Supplies the segment selector in the GDT describing the TSS.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
HlLoadTaskRegister(USHORT Source)
{
asm volatile("ltr %0"
:
: "rm" (Source));
}
/**
* Reads the specified CPU control register and returns its value.
*

Zobrazit soubor

@ -236,6 +236,25 @@ HlIoPortOutLong(IN USHORT Port,
"Nd" (Port));
}
/**
* Loads Task Register (TR) with a segment selector that points to TSS.
*
* @param Source
* Supplies the segment selector in the GDT describing the TSS.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
HlLoadTaskRegister(USHORT Source)
{
asm volatile("ltr %0"
:
: "rm" (Source));
}
/**
* Reads the specified CPU control register and returns its value.
*