Implement ArLoadLocalDescriptorTable() routine
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Rafal Kupiec 2023-03-02 23:04:36 +01:00
parent dfae0b4727
commit c5a9253ea8
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
4 changed files with 50 additions and 4 deletions

View File

@ -44,6 +44,10 @@ XTCDECL
VOID
ArLoadInterruptDescriptorTable(IN PVOID Source);
XTCDECL
VOID
ArLoadLocalDescriptorTable(IN USHORT Source);
XTCDECL
VOID
ArLoadMxcsrRegister(IN ULONG Source);

View File

@ -44,6 +44,10 @@ XTCDECL
VOID
ArLoadInterruptDescriptorTable(IN PVOID Source);
XTCDECL
VOID
ArLoadLocalDescriptorTable(IN USHORT Source);
XTCDECL
VOID
ArLoadSegment(IN USHORT Segment,

View File

@ -102,7 +102,7 @@ ArInvalidateTlbEntry(IN PVOID Address)
}
/**
* Loads the values in the source operand into the global descriptor table register (GDTR).
* Loads the value in the source operand into the global descriptor table register (GDTR).
*
* @param Source
* Specifies a memory location that contains the base address of GDT.
@ -122,7 +122,7 @@ ArLoadGlobalDescriptorTable(IN PVOID Source)
}
/**
* Loads the values in the source operand into the interrupt descriptor table register (IDTR).
* Loads the value in the source operand into the interrupt descriptor table register (IDTR).
*
* @param Source
* Specifies a memory location that contains the base address of IDT.
@ -141,6 +141,25 @@ ArLoadInterruptDescriptorTable(IN PVOID Source)
: "memory");
}
/**
* Loads the value in the source operand into the local descriptor table register (LDTR).
*
* @param Source
* Specifies a selector value.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
ArLoadLocalDescriptorTable(IN USHORT Source)
{
asm volatile("lldtw %0"
:
: "g" (Source));
}
/**
* Loads the value in the source operand into the MXCSR register
*

View File

@ -102,7 +102,7 @@ ArInvalidateTlbEntry(PVOID Address)
}
/**
* Loads the values in the source operand into the global descriptor table register (GDTR).
* Loads the value in the source operand into the global descriptor table register (GDTR).
*
* @param Source
* Specifies a memory location that contains the base address of GDT.
@ -122,7 +122,7 @@ ArLoadGlobalDescriptorTable(IN PVOID Source)
}
/**
* Loads the values in the source operand into the interrupt descriptor table register (IDTR).
* Loads the value in the source operand into the interrupt descriptor table register (IDTR).
*
* @param Source
* Specifies a memory location that contains the base address of IDT.
@ -141,6 +141,25 @@ ArLoadInterruptDescriptorTable(IN PVOID Source)
: "memory");
}
/**
* Loads the value in the source operand into the local descriptor table register (LDTR).
*
* @param Source
* Specifies a selector value.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
ArLoadLocalDescriptorTable(IN USHORT Source)
{
asm volatile("lldtw %0"
:
: "g" (Source));
}
/**
* Loads source data into specified segment.
*