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