FreeNOS
IntelProcess.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009 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 __INTEL_PROCESS_H
19 #define __INTEL_PROCESS_H
20 
21 #include <FreeNOS/Process.h>
22 #include <Types.h>
23 
38 class IntelProcess : public Process
39 {
40  private:
41 
43  static const Size KernelStackSize = PAGESIZE;
44 
45  public:
46 
55  IntelProcess(ProcessID id, Address entry, bool privileged, const MemoryMap &map);
56 
60  virtual ~IntelProcess();
61 
70  virtual Result initialize();
71 
77  virtual void reset(const Address entry);
78 
84  virtual void execute(Process *previous);
85 
86  private:
87 
90 
93 
94 };
95 
96 namespace Arch
97 {
98  typedef IntelProcess Process;
99 };
100 
106 #endif /* __INTEL_PROCESS_H */
Types.h
Process
Represents a process which may run on the host.
Definition: Process.h:44
IntelProcess::IntelProcess
IntelProcess(ProcessID id, Address entry, bool privileged, const MemoryMap &map)
Constructor function.
Definition: IntelProcess.cpp:25
Arch::Process
ARMProcess Process
Definition: ARMProcess.h:105
PAGESIZE
#define PAGESIZE
ARM uses 4K pages.
Definition: ARMConstant.h:97
Arch
Definition: ARMCacheV6.h:103
ProcessID
u32 ProcessID
Process Identification Number.
Definition: Types.h:140
Address
unsigned long Address
A memory address.
Definition: Types.h:131
IntelProcess::reset
virtual void reset(const Address entry)
Restart execution at the given entry point.
Definition: IntelProcess.cpp:99
IntelProcess::initialize
virtual Result initialize()
Initialize the Process.
Definition: IntelProcess.cpp:30
Process::Result
Result
Result codes.
Definition: Process.h:54
IntelProcess::~IntelProcess
virtual ~IntelProcess()
Destructor function.
Definition: IntelProcess.cpp:92
IntelProcess
Process which may execute on an Intel CPU.
Definition: IntelProcess.h:38
IntelProcess::execute
virtual void execute(Process *previous)
Execute the process.
Definition: IntelProcess.cpp:142
MemoryMap
Describes virtual memory map layout.
Definition: MemoryMap.h:38
Size
unsigned int Size
Any sane size indicator cannot go negative.
Definition: Types.h:128
IntelProcess::m_kernelStackBase
Address m_kernelStackBase
Base kernel stack (fixed)
Definition: IntelProcess.h:92
entry
u32 entry[]
Definition: IntelACPI.h:64
IntelProcess::m_kernelStack
Address m_kernelStack
Current kernel stack address (changes during execution).
Definition: IntelProcess.h:89
IntelProcess::KernelStackSize
static const Size KernelStackSize
Size of the kernel stack.
Definition: IntelProcess.h:43