forked from xt-sys/exectos
Implement HlLoadTaskRegister() for loading TSS segment selector into task register
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
@@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user