FreeNOS
ARMProcess.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Niek Linnenbank
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef __KERNEL_ARM_ARMPROCESS_H
19 #define __KERNEL_ARM_ARMPROCESS_H
20 
21 #include <FreeNOS/Process.h>
22 
34 class ARMProcess : public Process
35 {
36  public:
37 
46  ARMProcess(ProcessID id, Address entry, bool privileged, const MemoryMap &map);
47 
51  virtual ~ARMProcess();
52 
58  void setCpuState(const CPUState *cpuState);
59 
65  const CPUState * cpuState() const;
66 
72  virtual Result join(const uint result);
73 
82  virtual Result initialize();
83 
89  virtual void reset(const Address entry);
90 
94  virtual void execute(Process *previous);
95 
96  private:
97 
100 };
101 
102 
103 namespace Arch
104 {
106 };
107 
113 #endif /* __KERNEL_ARM_ARMPROCESS_H */
Process
Represents a process which may run on the host.
Definition: Process.h:44
ARMProcess::~ARMProcess
virtual ~ARMProcess()
Destructor function.
Definition: ARMProcess.cpp:82
Arch::Process
ARMProcess Process
Definition: ARMProcess.h:105
Arch
Definition: ARMCacheV6.h:103
ARMProcess::m_cpuState
CPUState m_cpuState
Contains all the CPU registers for this task.
Definition: ARMProcess.h:99
ProcessID
u32 ProcessID
Process Identification Number.
Definition: Types.h:140
Address
unsigned long Address
A memory address.
Definition: Types.h:131
uint
unsigned int uint
Unsigned integer number.
Definition: Types.h:44
ARMProcess::execute
virtual void execute(Process *previous)
Allow the Process to run on the CPU.
Definition: ARMProcess.cpp:117
Process::Result
Result
Result codes.
Definition: Process.h:54
MemoryMap
Describes virtual memory map layout.
Definition: MemoryMap.h:38
ARMProcess::join
virtual Result join(const uint result)
Complete waiting for another Process.
Definition: ARMProcess.cpp:96
ARMProcess
ARM specific process implementation.
Definition: ARMProcess.h:34
CPUState
Contains all the CPU registers.
Definition: ARMCore.h:243
ARMProcess::ARMProcess
ARMProcess(ProcessID id, Address entry, bool privileged, const MemoryMap &map)
Constructor function.
Definition: ARMProcess.cpp:28
ARMProcess::initialize
virtual Result initialize()
Initialize the Process.
Definition: ARMProcess.cpp:33
ARMProcess::reset
virtual void reset(const Address entry)
Restart execution at the given entry point.
Definition: ARMProcess.cpp:107
entry
u32 entry[]
Definition: IntelACPI.h:64
ARMProcess::setCpuState
void setCpuState(const CPUState *cpuState)
Overwrite the saved CPU registers for this task.
Definition: ARMProcess.cpp:91
ARMProcess::cpuState
const CPUState * cpuState() const
Retrieve saved CPU state.
Definition: ARMProcess.cpp:86