The Pedigree Project 0.1
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
X86CommonProcessorInformation Class Reference

#include <ProcessorInformation.h>

+ Collaboration diagram for X86CommonProcessorInformation:

Classes

struct  KernelGsAnchor
 

Public Types

typedef struct X64TaskStateSegment TaskStateSegment
 

Public Member Functions

KernelGsAnchor * kernelGsAnchor ()
 
void activateKernelGsAnchor (size_t processorIndex)
 
VirtualAddressSpace & getVirtualAddressSpace () const
 
void setVirtualAddressSpace (VirtualAddressSpace &virtualAddressSpace)
 
void setTssSelector (uint16_t TssSelector)
 
void setTss (void *Tss)
 
uint16_t getTssSelector () const
 
void * getTss () const
 
uint16_t getTlsSelector ()
 
void setTlsSelector (uint16_t tls)
 
uintptr_t getKernelStack () const
 
void setKernelStack (uintptr_t stack)
 
Thread * getCurrentThread () const
 
void setCurrentThread (Thread *pThread)
 
PerProcessorScheduler & getScheduler ()
 
RcuReadState & rcuState ()
 
ProcessorId processorId () const
 
uint8_t localApicId () const
 
void initialiseTscClockAnchor (uint64_t tsc, uint64_t nanoseconds)
 
ALWAYS_INLINE bool getTscClockAnchor (uint64_t &tsc, uint64_t &nanoseconds) const
 

Protected Member Functions

 X86CommonProcessorInformation (ProcessorId processorId, uint8_t apicId=0)
 
virtual ~X86CommonProcessorInformation ()
 
void setIds (ProcessorId processorId, uint8_t apicId=0)
 

Private Member Functions

 X86CommonProcessorInformation ()
 
 X86CommonProcessorInformation (const X86CommonProcessorInformation &)
 
X86CommonProcessorInformation & operator= (const X86CommonProcessorInformation &)
 

Private Attributes

ProcessorId m_ProcessorId
 
uint16_t m_TssSelector
 
TaskStateSegment * m_Tss
 
VirtualAddressSpace * m_VirtualAddressSpace
 
uint8_t m_LocalApicId
 
Thread * m_pCurrentThread
 
PerProcessorScheduler * m_Scheduler
 
uint16_t m_TlsSelector
 
size_t m_DeviceHardIrqDepth
 
uint64_t m_TscClockAnchor
 
uint64_t m_TscClockAnchorNanoseconds
 
bool m_TscClockAnchorInitialised
 
RcuReadState m_RcuState
 
KernelGsAnchor m_KernelGsAnchor {0, 0, this, 0, nullptr}
 

Friends

class ProcessorBase
 
class Multiprocessor
 
class DeviceHardIrqContext
 
class SuspendDeviceHardIrqContext
 

Detailed Description

Common x86 processor information structure

Definition at line 41 of file x86_common/ProcessorInformation.h.

Member Typedef Documentation

◆ TaskStateSegment

Definition at line 46 of file x86_common/ProcessorInformation.h.

Constructor & Destructor Documentation

◆ X86CommonProcessorInformation() [1/3]

X86CommonProcessorInformation::X86CommonProcessorInformation ( ProcessorId  processorId,
uint8_t  apicId = 0 
)
protected

Construct a X86CommonProcessor object

Parameters
[in]processorIdIdentifier of the processor

Definition at line 129 of file x86_common/ProcessorInformation.cc.

◆ ~X86CommonProcessorInformation()

X86CommonProcessorInformation::~X86CommonProcessorInformation ( )
protectedvirtual

The destructor does nothing

Definition at line 144 of file x86_common/ProcessorInformation.cc.

References m_Scheduler.

◆ X86CommonProcessorInformation() [2/3]

X86CommonProcessorInformation::X86CommonProcessorInformation ( )
private

Default constructor

Note
NOT implemented

◆ X86CommonProcessorInformation() [3/3]

X86CommonProcessorInformation::X86CommonProcessorInformation ( const X86CommonProcessorInformation &  )
private

Copy-constructor

Note
NOT implemented

Member Function Documentation

◆ activateKernelGsAnchor()

void X86CommonProcessorInformation::activateKernelGsAnchor ( size_t  processorIndex)

Definition at line 91 of file x86_common/ProcessorInformation.cc.

◆ getCurrentThread()

Thread * X86CommonProcessorInformation::getCurrentThread ( ) const
inline

Definition at line 103 of file x86_common/ProcessorInformation.h.

◆ getKernelStack()

uintptr_t X86CommonProcessorInformation::getKernelStack ( ) const

Definition at line 76 of file x86_common/ProcessorInformation.cc.

◆ getScheduler()

PerProcessorScheduler & X86CommonProcessorInformation::getScheduler ( )

Definition at line 115 of file x86_common/ProcessorInformation.cc.

◆ getTlsSelector()

uint16_t X86CommonProcessorInformation::getTlsSelector ( )

Gets the processor's TLS base segment

Definition at line 68 of file x86_common/ProcessorInformation.cc.

References m_TlsSelector.

◆ getTscClockAnchor()

ALWAYS_INLINE bool X86CommonProcessorInformation::getTscClockAnchor ( uint64_t &  tsc,
uint64_t &  nanoseconds 
) const
inline

Reads this processor's clock anchor after its release publication.

Definition at line 125 of file x86_common/ProcessorInformation.h.

◆ getTss()

void * X86CommonProcessorInformation::getTss ( ) const

Get the processor's TSS

Returns
the Tss of the processor

Definition at line 64 of file x86_common/ProcessorInformation.cc.

References m_Tss.

◆ getTssSelector()

uint16_t X86CommonProcessorInformation::getTssSelector ( ) const

Get the processor's TSS selector

Returns
the TSS selector of the processor

Definition at line 59 of file x86_common/ProcessorInformation.cc.

References m_TssSelector.

◆ getVirtualAddressSpace()

VirtualAddressSpace & X86CommonProcessorInformation::getVirtualAddressSpace ( ) const

Get the current processor's VirtualAddressSpace

Returns
reference to the current processor's VirtualAddressSpace

Definition at line 34 of file x86_common/ProcessorInformation.cc.

References VirtualAddressSpace::getKernelAddressSpace(), and m_VirtualAddressSpace.

◆ initialiseTscClockAnchor()

void X86CommonProcessorInformation::initialiseTscClockAnchor ( uint64_t  tsc,
uint64_t  nanoseconds 
)

Installs this processor's immutable high-resolution clock anchor.

Definition at line 123 of file x86_common/ProcessorInformation.cc.

References m_TscClockAnchor, m_TscClockAnchorInitialised, and m_TscClockAnchorNanoseconds.

◆ kernelGsAnchor()

KernelGsAnchor * X86CommonProcessorInformation::kernelGsAnchor ( )
inline

Definition at line 71 of file x86_common/ProcessorInformation.h.

◆ localApicId()

uint8_t X86CommonProcessorInformation::localApicId ( ) const
inline

Definition at line 117 of file x86_common/ProcessorInformation.h.

◆ operator=()

X86CommonProcessorInformation & X86CommonProcessorInformation::operator= ( const X86CommonProcessorInformation &  )
private

Assignment operator

Note
NOT implemented

◆ processorId()

ProcessorId X86CommonProcessorInformation::processorId ( ) const
inline

Definition at line 114 of file x86_common/ProcessorInformation.h.

◆ rcuState()

RcuReadState & X86CommonProcessorInformation::rcuState ( )
inline

Definition at line 110 of file x86_common/ProcessorInformation.h.

◆ setCurrentThread()

void X86CommonProcessorInformation::setCurrentThread ( Thread *  pThread)

Definition at line 100 of file x86_common/ProcessorInformation.cc.

◆ setIds()

void X86CommonProcessorInformation::setIds ( ProcessorId  processorId,
uint8_t  apicId = 0 
)
protected

Definition at line 148 of file x86_common/ProcessorInformation.cc.

◆ setKernelStack()

void X86CommonProcessorInformation::setKernelStack ( uintptr_t  stack)

Definition at line 79 of file x86_common/ProcessorInformation.cc.

◆ setTlsSelector()

void X86CommonProcessorInformation::setTlsSelector ( uint16_t  tls)

Sets the processor's TLS base segment

Definition at line 72 of file x86_common/ProcessorInformation.cc.

References m_TlsSelector.

◆ setTss()

void X86CommonProcessorInformation::setTss ( void *  Tss)

Set the processor's TSS

Parameters
[in]Tsspointer to the new TSS

Definition at line 54 of file x86_common/ProcessorInformation.cc.

References m_Tss.

◆ setTssSelector()

void X86CommonProcessorInformation::setTssSelector ( uint16_t  TssSelector)

Set the processor's TSS selector

Parameters
[in]TssSelectorthe new TSS selector

Definition at line 49 of file x86_common/ProcessorInformation.cc.

References m_TssSelector.

◆ setVirtualAddressSpace()

void X86CommonProcessorInformation::setVirtualAddressSpace ( VirtualAddressSpace &  virtualAddressSpace)

Set the current processor's VirtualAddressSpace

Parameters
[in]virtualAddressSpacereference to the new VirtualAddressSpace

Definition at line 42 of file x86_common/ProcessorInformation.cc.

References m_VirtualAddressSpace.

Friends And Related Symbol Documentation

◆ DeviceHardIrqContext

friend class DeviceHardIrqContext
friend

Definition at line 145 of file x86_common/ProcessorInformation.h.

◆ Multiprocessor

friend class Multiprocessor
friend

Definition at line 43 of file x86_common/ProcessorInformation.h.

◆ ProcessorBase

friend class ProcessorBase
friend

Definition at line 42 of file x86_common/ProcessorInformation.h.

◆ SuspendDeviceHardIrqContext

friend class SuspendDeviceHardIrqContext
friend

Definition at line 146 of file x86_common/ProcessorInformation.h.

Member Data Documentation

◆ m_DeviceHardIrqDepth

size_t X86CommonProcessorInformation::m_DeviceHardIrqDepth
private

Device hard-IRQ callbacks currently active on this processor.

Definition at line 175 of file x86_common/ProcessorInformation.h.

◆ m_KernelGsAnchor

KernelGsAnchor X86CommonProcessorInformation::m_KernelGsAnchor {0, 0, this, 0, nullptr}
private

Definition at line 185 of file x86_common/ProcessorInformation.h.

◆ m_LocalApicId

uint8_t X86CommonProcessorInformation::m_LocalApicId
private

Local APIC Id

Definition at line 167 of file x86_common/ProcessorInformation.h.

◆ m_pCurrentThread

Thread* X86CommonProcessorInformation::m_pCurrentThread
private

The current thread

Definition at line 169 of file x86_common/ProcessorInformation.h.

◆ m_ProcessorId

ProcessorId X86CommonProcessorInformation::m_ProcessorId
private

Identifier of that processor

Definition at line 159 of file x86_common/ProcessorInformation.h.

◆ m_RcuState

RcuReadState X86CommonProcessorInformation::m_RcuState
private

Definition at line 182 of file x86_common/ProcessorInformation.h.

◆ m_Scheduler

PerProcessorScheduler* X86CommonProcessorInformation::m_Scheduler
private

The processor's scheduler.

Definition at line 171 of file x86_common/ProcessorInformation.h.

Referenced by ~X86CommonProcessorInformation().

◆ m_TlsSelector

uint16_t X86CommonProcessorInformation::m_TlsSelector
private

The processor's TLS segment

Definition at line 173 of file x86_common/ProcessorInformation.h.

Referenced by getTlsSelector(), and setTlsSelector().

◆ m_TscClockAnchor

uint64_t X86CommonProcessorInformation::m_TscClockAnchor
private

This processor's local TSC at its monotonic-clock anchor.

Definition at line 177 of file x86_common/ProcessorInformation.h.

Referenced by initialiseTscClockAnchor().

◆ m_TscClockAnchorInitialised

bool X86CommonProcessorInformation::m_TscClockAnchorInitialised
private

Release-published after both anchor values have been installed.

Definition at line 181 of file x86_common/ProcessorInformation.h.

Referenced by initialiseTscClockAnchor().

◆ m_TscClockAnchorNanoseconds

uint64_t X86CommonProcessorInformation::m_TscClockAnchorNanoseconds
private

Global monotonic time represented by m_TscClockAnchor.

Definition at line 179 of file x86_common/ProcessorInformation.h.

Referenced by initialiseTscClockAnchor().

◆ m_Tss

TaskStateSegment* X86CommonProcessorInformation::m_Tss
private

Pointer to this processor's Task-State-Segment

Definition at line 163 of file x86_common/ProcessorInformation.h.

Referenced by getTss(), and setTss().

◆ m_TssSelector

uint16_t X86CommonProcessorInformation::m_TssSelector
private

The Task-State-Segment selector of that Processor

Definition at line 161 of file x86_common/ProcessorInformation.h.

Referenced by getTssSelector(), and setTssSelector().

◆ m_VirtualAddressSpace

VirtualAddressSpace* X86CommonProcessorInformation::m_VirtualAddressSpace
private

The documentation for this class was generated from the following files: