| The Pedigree Project
    0.1
    | 
#include <gdt.h>
 Collaboration diagram for X86GdtManager:
 Collaboration diagram for X86GdtManager:| Classes | |
| struct | segment_descriptor | 
| Public Member Functions | |
| void | initialise (size_t processorCount) INITIALISATION_ONLY | 
| void | setTlsBase (uintptr_t base) | 
| Static Public Member Functions | |
| static X86GdtManager & | instance () | 
| static void | initialiseProcessor () INITIALISATION_ONLY | 
| Private Member Functions | |
| X86GdtManager () INITIALISATION_ONLY | |
| X86GdtManager (const X86GdtManager &) | |
| X86GdtManager & | operator= (const X86GdtManager &) | 
| ~X86GdtManager () | |
| void | setSegmentDescriptor (size_t index, uint32_t base, uint32_t limit, uint8_t flags, uint8_t flags2) | 
| void | setTssDescriptor (size_t index, uint32_t base) INITIALISATION_ONLY | 
| void | initialiseTss (struct X86TaskStateSegment *pTss) INITIALISATION_ONLY | 
| void | initialiseDoubleFaultTss (X86TaskStateSegment *pTss) INITIALISATION_ONLY | 
| Private Attributes | |
| struct X86GdtManager::segment_descriptor | PACKED | 
| segment_descriptor * | m_Gdt | 
| size_t | m_DescriptorCount | 
| Static Private Attributes | |
| static X86GdtManager | m_Instance | 
| 
 | private | 
The constructor
Definition at line 112 of file x86/gdt.cc.
Referenced by instance().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Copy constructor
| 
 | private | 
The destructor
Definition at line 115 of file x86/gdt.cc.
Referenced by instance().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| void X86GdtManager::initialise | ( | size_t | processorCount | ) | 
Initialise the GDT
| [in] | processorCount | the number of processors | 
Definition at line 30 of file x86/gdt.cc.
References Dec, Hex, Processor::information(), initialiseDoubleFaultTss(), initialiseTss(), m_DescriptorCount, m_Gdt, Processor::m_ProcessorInformation, NOTICE, setSegmentDescriptor(), and setTssDescriptor().
Referenced by instance().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Definition at line 158 of file x86/gdt.cc.
References VirtualAddressSpace::clone(), VirtualAddressSpace::getKernelAddressSpace(), NOTICE, and Processor::switchAddressSpace().
Referenced by initialise(), and instance().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | static | 
Initialises this processors GDTR
Definition at line 86 of file x86/gdt.cc.
References Processor::information(), m_DescriptorCount, m_Gdt, and m_Instance.
Referenced by instance().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Write default values into a task-state-segment descriptor.
| [in] | pTss | The TSS descriptor. | 
Definition at line 145 of file x86/gdt.cc.
Referenced by initialise(), and instance().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inlinestatic | 
Get the gdt manager instance
Definition at line 35 of file x86/gdt.h.
References INITIALISATION_ONLY, initialise(), initialiseDoubleFaultTss(), initialiseProcessor(), initialiseTss(), m_Instance, operator=(), setSegmentDescriptor(), setTlsBase(), setTssDescriptor(), X86GdtManager(), and ~X86GdtManager().
| 
 | private | 
Assignment operator
Referenced by instance().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | 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 131 of file x86/gdt.cc.
References X86GdtManager::segment_descriptor::base0, X86GdtManager::segment_descriptor::base1, X86GdtManager::segment_descriptor::base2, X86GdtManager::segment_descriptor::flags, X86GdtManager::segment_descriptor::flags_limit1, X86GdtManager::segment_descriptor::limit0, and m_Gdt.
Referenced by initialise(), instance(), setTlsBase(), and setTssDescriptor().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| void X86GdtManager::setTlsBase | ( | uintptr_t | base | ) | 
Sets up the TLS base for the current CPU to point to the given base.
Definition at line 119 of file x86/gdt.cc.
References Processor::information(), and setSegmentDescriptor().
Referenced by instance().
 Here is the caller graph for this function:
 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 141 of file x86/gdt.cc.
References setSegmentDescriptor().
Referenced by initialise(), and instance().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
The number of descriptors in the Gdt
Definition at line 104 of file x86/gdt.h.
Referenced by initialise(), and initialiseProcessor().
| 
 | private | 
The Gdt
Definition at line 102 of file x86/gdt.h.
Referenced by initialise(), initialiseProcessor(), and setSegmentDescriptor().
| 
 | staticprivate | 
The instance of the gdt manager
Definition at line 107 of file x86/gdt.h.
Referenced by initialiseProcessor(), and instance().
 1.8.11
 1.8.11