Implement HlLoadGlobalDescriptorTable() intrinsic

这个提交包含在:
Rafal Kupiec 2023-01-23 20:13:51 +01:00
父节点 adc6677c9d
当前提交 d3d8d144a0
签署人:: belliash
GPG 密钥 ID: 4E829243E0CFE6B4
共有 4 个文件被更改,包括 48 次插入0 次删除

查看文件

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

查看文件

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

查看文件

@ -236,6 +236,26 @@ HlIoPortOutLong(IN USHORT 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.
*

查看文件

@ -236,6 +236,26 @@ HlIoPortOutLong(IN USHORT 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.
*