Implement HlLoadInterruptDescriptorTable() intrinsics for loading IDT
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Rafal Kupiec 2023-01-26 20:08:57 +01:00
parent 6613fdd32c
commit e94e50b5d9
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
4 changed files with 48 additions and 0 deletions

View File

@ -63,6 +63,10 @@ XTCDECL
VOID
HlLoadGlobalDescriptorTable(IN PVOID Source);
XTCDECL
VOID
HlLoadInterruptDescriptorTable(IN PVOID Source);
XTCDECL
VOID
HlLoadSegment(IN USHORT Segment,

View File

@ -63,6 +63,10 @@ XTCDECL
VOID
HlLoadGlobalDescriptorTable(IN PVOID Source);
XTCDECL
VOID
HlLoadInterruptDescriptorTable(IN PVOID Source);
XTCDECL
VOID
HlLoadSegment(IN USHORT Segment,

View File

@ -256,6 +256,26 @@ HlLoadGlobalDescriptorTable(IN PVOID Source)
: "memory");
}
/**
* Loads the values in the source operand into the interrupt descriptor table register (IDTR).
*
* @param Source
* Specifies a memory location that contains the base address of IDT.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
HlLoadInterruptDescriptorTable(IN PVOID Source)
{
asm volatile("lidt %0"
:
: "m" (*(PSHORT)Source)
: "memory");
}
/**
* Loads source data into specified segment.
*

View File

@ -256,6 +256,26 @@ HlLoadGlobalDescriptorTable(IN PVOID Source)
: "memory");
}
/**
* Loads the values in the source operand into the interrupt descriptor table register (IDTR).
*
* @param Source
* Specifies a memory location that contains the base address of IDT.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
HlLoadInterruptDescriptorTable(IN PVOID Source)
{
asm volatile("lidt %0"
:
: "m" (*(PSHORT)Source)
: "memory");
}
/**
* Loads source data into specified segment.
*