FreeNOS
|
Allwinner sunxi CPU configuration module support. More...
#include <SunxiCpuConfig.h>
Public Member Functions | |
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 | |
enum | Registers { CpusRstCtrl = 0x0000, Cpu0RstCtrl = 0x0040, Cpu0Ctrl = 0x0044, Cpu0Status = 0x0048, Cpu1RstCtrl = 0x0080, Cpu1Ctrl = 0x0084, Cpu1Status = 0x0088, Cpu2RstCtrl = 0x00C0, Cpu2Ctrl = 0x00C4, Cpu2Status = 0x00C8, Cpu3RstCtrl = 0x0100, Cpu3Ctrl = 0x0104, Cpu3Status = 0x0108, Cpu0PwrClamp = 0x0120, Cpu1PwrClamp = 0x0124, Cpu2PwrClamp = 0x0128, Cpu3PwrClamp = 0x012C, CpuSysRst = 0x0140, ClkGating = 0x0144, GenCtrl = 0x0184, SuperStandby = 0x01A0, EntryAddr = 0x01A4, DbgExtern = 0x01E4, Cnt64Ctrl = 0x0280, Cnt64Low = 0x0284, Cnt64High = 0x0288 } |
Hardware registers. More... | |
enum | CpuRstCtrlFlags { CpuCoreReset = (1 << 1) } |
CPU::X Reset Control flags. More... | |
Private Attributes | |
Arch::IO | m_io |
Memory I/O object. More... | |
SunxiPowerManagement | m_power |
Power Management module. More... | |
Static Private Attributes | |
static const Size | NumberOfCores = 4 |
Number of CPU processor cores is fixed. More... | |
static const Address | IOBase = 0x01F01C00 |
Physical base memory address of CPU Configuration Module. More... | |
Additional Inherited Members | |
Public Types inherited from CoreManager | |
enum | Result { Success, IOError, NotFound, InvalidArgument } |
Result codes. More... | |
Protected Attributes inherited from CoreManager | |
List< uint > | m_cores |
List of core ids found. More... | |
Allwinner sunxi CPU configuration module support.
Definition at line 39 of file SunxiCpuConfig.h.
|
private |
|
private |
Hardware registers.
Definition at line 52 of file SunxiCpuConfig.h.
|
virtual |
Boot a processor.
info | CoreInfo object pointer. |
Implements CoreManager.
Definition at line 52 of file SunxiCpuConfig.cpp.
References CoreInfo::coreId, Cpu0RstCtrl, Cpu1RstCtrl, Cpu2RstCtrl, Cpu3RstCtrl, DbgExtern, DEBUG, EntryAddr, ERROR, GenCtrl, CoreManager::InvalidArgument, CoreInfo::kernelEntry, m_io, m_power, SunxiPowerManagement::powerOnCore(), ARMIO::set(), CoreManager::Success, ARMIO::unset(), and ARMIO::write().
Referenced by SunxiCoreServer::bootCore().
|
virtual |
Discover processors.
Implements CoreManager.
Definition at line 44 of file SunxiCpuConfig.cpp.
References List< T >::append(), CoreManager::m_cores, NumberOfCores, and CoreManager::Success.
Referenced by SunxiCoreServer::discoverCores().
|
virtual |
Perform initialization.
Implements CoreManager.
Definition at line 21 of file SunxiCpuConfig.cpp.
References Memory::Device, ERROR, IO::getBase(), SunxiPowerManagement::initialize(), IOBase, CoreManager::IOError, m_io, m_power, IO::map(), PAGESIZE, Memory::Readable, IO::setBase(), IO::Success, CoreManager::Success, SunxiPowerManagement::Success, Memory::User, and Memory::Writable.
Referenced by SunxiCoreServer::initialize().
|
staticprivate |
Physical base memory address of CPU Configuration Module.
Definition at line 47 of file SunxiCpuConfig.h.
Referenced by initialize().
|
private |
Memory I/O object.
Definition at line 118 of file SunxiCpuConfig.h.
Referenced by boot(), and initialize().
|
private |
Power Management module.
Definition at line 121 of file SunxiCpuConfig.h.
Referenced by boot(), and initialize().
|
staticprivate |
Number of CPU processor cores is fixed.
Definition at line 44 of file SunxiCpuConfig.h.
Referenced by discover().