|
The Pedigree Project 0.1
|
#include <gdt.h>
Collaboration diagram for X64GdtManager:Classes | |
| struct | segment_descriptor |
| struct | tss_descriptor |
Public Member Functions | |
| void | initialise (size_t processorCount) INITIALISATION_ONLY |
Static Public Member Functions | |
| static X64GdtManager & | instance () |
| static void | initialiseProcessor () INITIALISATION_ONLY |
Private Member Functions | |
| X64GdtManager () INITIALISATION_ONLY | |
| X64GdtManager (const X64GdtManager &) | |
| X64GdtManager & | operator= (const X64GdtManager &) |
| ~X64GdtManager () | |
| void | setSegmentDescriptor (size_t index, uint64_t base, uint32_t limit, uint8_t flags, uint8_t flags2) |
| void | setTssDescriptor (size_t index, uint64_t base) INITIALISATION_ONLY |
| void | initialiseTss (X64TaskStateSegment *pTss) INITIALISATION_ONLY |
| void | initialiseDoubleFaultTss (X64TaskStateSegment *pTss) INITIALISATION_ONLY |
Static Private Member Functions | |
| static void | loadSegmentRegisters () |
Private Attributes | |
| struct X64GdtManager::segment_descriptor | PACKED |
| segment_descriptor * | m_Gdt |
| size_t | m_DescriptorCount |
Static Private Attributes | |
| static X64GdtManager | m_Instance |
|
private |
Copy constructor
| void X64GdtManager::initialise | ( | size_t | processorCount | ) |
Initialise the GDT
| [in] | processorCount | the number of processors |
Definition at line 41 of file gdt.cc.
References Dec, Vector< T >::end(), Hex, ProcessorBase::information(), initialiseTss(), m_DescriptorCount, m_Gdt, ProcessorBase::m_ProcessorInformation, setSegmentDescriptor(), and setTssDescriptor().
|
private |
|
static |
Initialises this processors GDTR
Definition at line 86 of file gdt.cc.
References ProcessorBase::information(), X64InterruptManager::initialiseProcessorIst(), loadSegmentRegisters(), m_DescriptorCount, m_Gdt, and m_Instance.
|
private |
Readies a TSS for use.
| [in] | pTss | the TSS to ready. |
Definition at line 120 of file gdt.cc.
Referenced by initialise().
Here is the caller graph for this function:
|
inlinestatic |
Get the gdt manager instance
Definition at line 37 of file gdt.h.
References m_Instance.
|
staticprivate |
Load the new segment registers
Referenced by initialiseProcessor().
Here is the caller graph for this function:
|
private |
Assignment operator
|
private |
Set up a segment descriptor
| [in] | index | the descriptor index |
| [in] | base | the base address |
| [in] | limit | the size of the segment (either in bytes or in 4kb units) |
| [in] | flags | the flags |
| [in] | flags2 | additional flags |
Definition at line 105 of file gdt.cc.
References X64GdtManager::segment_descriptor::base0, X64GdtManager::segment_descriptor::base1, X64GdtManager::segment_descriptor::base2, X64GdtManager::segment_descriptor::flags, X64GdtManager::segment_descriptor::flags_limit1, X64GdtManager::segment_descriptor::limit0, and m_Gdt.
Referenced by initialise(), and setTssDescriptor().
Here is the caller graph for this function:
|
private |
Set up a task-state-segment descriptor
| [in] | index | the descriptor index |
| [in] | base | the base address |
Definition at line 114 of file gdt.cc.
References X64GdtManager::tss_descriptor::base3, m_Gdt, X64GdtManager::tss_descriptor::res, and setSegmentDescriptor().
Referenced by initialise().
Here is the caller graph for this function:
|
private |
The number of descriptors in the Gdt
Definition at line 111 of file gdt.h.
Referenced by initialise(), and initialiseProcessor().
|
private |
The Gdt
Definition at line 109 of file gdt.h.
Referenced by initialise(), initialiseProcessor(), setSegmentDescriptor(), and setTssDescriptor().
|
staticprivate |
The instance of the gdt manager
Definition at line 114 of file gdt.h.
Referenced by initialiseProcessor(), and instance().