forked from xt-sys/exectos
Implement HlLoadGlobalDescriptorTable() intrinsic
This commit is contained in:
parent
adc6677c9d
commit
d3d8d144a0
@ -59,6 +59,10 @@ VOID
|
|||||||
HlIoPortOutLong(IN USHORT Port,
|
HlIoPortOutLong(IN USHORT Port,
|
||||||
IN ULONG Value);
|
IN ULONG Value);
|
||||||
|
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlLoadGlobalDescriptorTable(IN PVOID Source);
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
VOID
|
VOID
|
||||||
HlLoadTaskRegister(USHORT Source);
|
HlLoadTaskRegister(USHORT Source);
|
||||||
|
@ -59,6 +59,10 @@ VOID
|
|||||||
HlIoPortOutLong(IN USHORT Port,
|
HlIoPortOutLong(IN USHORT Port,
|
||||||
IN ULONG Value);
|
IN ULONG Value);
|
||||||
|
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlLoadGlobalDescriptorTable(IN PVOID Source);
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
VOID
|
VOID
|
||||||
HlLoadTaskRegister(USHORT Source);
|
HlLoadTaskRegister(USHORT Source);
|
||||||
|
@ -236,6 +236,26 @@ HlIoPortOutLong(IN USHORT Port,
|
|||||||
"Nd" (Port));
|
"Nd" (Port));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads the values in the source operand into the global descriptor table register (GDTR).
|
||||||
|
*
|
||||||
|
* @param Source
|
||||||
|
* Specifies a memory location that contains the base address of GDT.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlLoadGlobalDescriptorTable(IN PVOID Source)
|
||||||
|
{
|
||||||
|
asm volatile("lgdt %0"
|
||||||
|
:
|
||||||
|
: "m" (*(PSHORT)Source)
|
||||||
|
: "memory");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads Task Register (TR) with a segment selector that points to TSS.
|
* Loads Task Register (TR) with a segment selector that points to TSS.
|
||||||
*
|
*
|
||||||
|
@ -236,6 +236,26 @@ HlIoPortOutLong(IN USHORT Port,
|
|||||||
"Nd" (Port));
|
"Nd" (Port));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads the values in the source operand into the global descriptor table register (GDTR).
|
||||||
|
*
|
||||||
|
* @param Source
|
||||||
|
* Specifies a memory location that contains the base address of GDT.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
HlLoadGlobalDescriptorTable(IN PVOID Source)
|
||||||
|
{
|
||||||
|
asm volatile("lgdt %0"
|
||||||
|
:
|
||||||
|
: "m" (*(PSHORT)Source)
|
||||||
|
: "memory");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads Task Register (TR) with a segment selector that points to TSS.
|
* Loads Task Register (TR) with a segment selector that points to TSS.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user