FreeNOS
Data Structures | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
IntelMP Class Reference

Intel Multi-Processor Specification. More...

#include <IntelMP.h>

Inheritance diagram for IntelMP:
CoreManager

Data Structures

struct  MPConfig
 Multiprocessor Configuration Structure. More...
 
struct  MPEntry
 Multiprocessor Configuration Entry. More...
 
struct  MPFloat
 Multiprocessor Floating Structure. More...
 

Public Member Functions

 IntelMP (IntelAPIC &apic)
 Constructor. More...
 
virtual Result initialize ()
 Perform initialization. More...
 
virtual Result discover ()
 Discover processors. More...
 
virtual Result boot (CoreInfo *info)
 Boot a processor. More...
 
- Public Member Functions inherited from CoreManager
 CoreManager ()
 Constructor. More...
 
List< uint > & getCores ()
 Get list of core identities. More...
 

Private Types

typedef struct IntelMP::MPFloat MPFloat
 Multiprocessor Floating Structure. More...
 
typedef struct IntelMP::MPConfig MPConfig
 Multiprocessor Configuration Structure. More...
 
typedef struct IntelMP::MPEntry MPEntry
 Multiprocessor Configuration Entry. More...
 

Private Member Functions

MPEntryparseEntry (MPEntry *entry)
 Parse Multiprocessor Config entry. More...
 
MPConfigscanMemory (Address addr)
 Scan memory for a Multiprocessor Config structure. More...
 

Private Attributes

IntelIO m_bios
 I/O instance for BIOS memory. More...
 
IntelIO m_lastMemory
 I/O instance for the last 1MB of physical memory. More...
 
IntelAPICm_apic
 APIC instance. More...
 

Static Private Attributes

static const uint MPFloatSignature = 0x5f504d5f
 Multiprocessor Floating Structure Signature. More...
 
static const uint MPEntryProc = 0
 Multiprocessor Configuration Type ID for processors. More...
 
static const Address MPEntryAddr = 0xf000
 Physical memory address at which cores start (bootEntry16). More...
 
static const Address MPInfoAddr = MPINFOADDR
 Physical memory address for the CoreInfo structure. More...
 
static const Address MPAreaAddr = 0x1000
 BIOS memory area to search for MP tables. More...
 
static const Size MPAreaSize = 0x100000-0x1000
 BIOS memory area size to search for MP tables. More...
 

Additional Inherited Members

- Public Types inherited from CoreManager
enum  Result { Success, IOError, NotFound, InvalidArgument }
 Result codes. More...
 
- Protected Attributes inherited from CoreManager
List< uintm_cores
 List of core ids found. More...
 

Detailed Description

Intel Multi-Processor Specification.

Definition at line 70 of file IntelMP.h.

Member Typedef Documentation

◆ MPConfig

typedef struct IntelMP::MPConfig IntelMP::MPConfig
private

Multiprocessor Configuration Structure.

◆ MPEntry

typedef struct IntelMP::MPEntry IntelMP::MPEntry
private

Multiprocessor Configuration Entry.

◆ MPFloat

typedef struct IntelMP::MPFloat IntelMP::MPFloat
private

Multiprocessor Floating Structure.

Constructor & Destructor Documentation

◆ IntelMP()

IntelMP::IntelMP ( IntelAPIC apic)

Constructor.

Definition at line 24 of file IntelMP.cpp.

Member Function Documentation

◆ boot()

IntelMP::Result IntelMP::boot ( CoreInfo info)
virtual

◆ discover()

IntelMP::Result IntelMP::discover ( )
virtual

Discover processors.

Returns
Result code.

Implements CoreManager.

Definition at line 56 of file IntelMP.cpp.

References List< T >::clear(), DEBUG, entry, ERROR, IO::getBase(), m_bios, CoreManager::m_cores, m_lastMemory, CoreManager::NotFound, parseEntry(), scanMemory(), and CoreManager::Success.

Referenced by IntelCoreServer::discoverCores().

◆ initialize()

IntelMP::Result IntelMP::initialize ( )
virtual

Perform initialization.

Returns
Result code.

Implements CoreManager.

Definition at line 30 of file IntelMP.cpp.

References IntelAPIC::getIO(), IntelAPIC::IOBase, m_apic, m_bios, m_lastMemory, IO::map(), MegaByte, SystemInformation::memorySize, MPAreaAddr, MPAreaSize, PAGESIZE, and CoreManager::Success.

Referenced by IntelCoreServer::discoverCores().

◆ parseEntry()

IntelMP::MPEntry * IntelMP::parseEntry ( IntelMP::MPEntry entry)
private

Parse Multiprocessor Config entry.

Returns
MPEntry object pointer of the next entry.

Definition at line 121 of file IntelMP.cpp.

References List< T >::append(), entry, CoreManager::m_cores, and MPEntryProc.

Referenced by discover().

◆ scanMemory()

IntelMP::MPConfig * IntelMP::scanMemory ( Address  addr)
private

Scan memory for a Multiprocessor Config structure.

Returns
MPConfig object pointer on success or ZERO on failure.

Definition at line 41 of file IntelMP.cpp.

References IntelMP::MPFloat::configAddr, MPAreaAddr, MPAreaSize, MPFloatSignature, IntelMP::MPFloat::signature, and ZERO.

Referenced by discover().

Field Documentation

◆ m_apic

IntelAPIC& IntelMP::m_apic
private

APIC instance.

Definition at line 196 of file IntelMP.h.

Referenced by boot(), and initialize().

◆ m_bios

IntelIO IntelMP::m_bios
private

I/O instance for BIOS memory.

Definition at line 190 of file IntelMP.h.

Referenced by discover(), and initialize().

◆ m_lastMemory

IntelIO IntelMP::m_lastMemory
private

I/O instance for the last 1MB of physical memory.

Definition at line 193 of file IntelMP.h.

Referenced by discover(), and initialize().

◆ MPAreaAddr

const Address IntelMP::MPAreaAddr = 0x1000
staticprivate

BIOS memory area to search for MP tables.

Definition at line 87 of file IntelMP.h.

Referenced by initialize(), and scanMemory().

◆ MPAreaSize

const Size IntelMP::MPAreaSize = 0x100000-0x1000
staticprivate

BIOS memory area size to search for MP tables.

Definition at line 90 of file IntelMP.h.

Referenced by initialize(), and scanMemory().

◆ MPEntryAddr

const Address IntelMP::MPEntryAddr = 0xf000
staticprivate

Physical memory address at which cores start (bootEntry16).

Definition at line 81 of file IntelMP.h.

Referenced by boot().

◆ MPEntryProc

const uint IntelMP::MPEntryProc = 0
staticprivate

Multiprocessor Configuration Type ID for processors.

Definition at line 78 of file IntelMP.h.

Referenced by parseEntry().

◆ MPFloatSignature

const uint IntelMP::MPFloatSignature = 0x5f504d5f
staticprivate

Multiprocessor Floating Structure Signature.

Definition at line 75 of file IntelMP.h.

Referenced by scanMemory().

◆ MPInfoAddr

const Address IntelMP::MPInfoAddr = MPINFOADDR
staticprivate

Physical memory address for the CoreInfo structure.

Definition at line 84 of file IntelMP.h.

Referenced by boot().


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