The Pedigree Project 0.1
arm64/ProcessorInformation.h
1#ifndef KERNEL_PROCESSOR_ARM64_PROCESSORINFORMATION_H
2#define KERNEL_PROCESSOR_ARM64_PROCESSORINFORMATION_H
3
4#define _PROCESSOR_INFORMATION_ONLY_WANT_PROCESSORID
5#include "pedigree/kernel/processor/ProcessorInformation.h"
6#undef _PROCESSOR_INFORMATION_ONLY_WANT_PROCESSORID
7
8#include "pedigree/kernel/process/RcuReadState.h"
9#include "pedigree/kernel/processor/types.h"
10
13class Thread;
16
18 friend class ProcessorBase;
19 friend class DeviceHardIrqContext;
20 friend class SuspendDeviceHardIrqContext;
21
22 public:
23 VirtualAddressSpace& getVirtualAddressSpace() const;
24 void setVirtualAddressSpace(VirtualAddressSpace& space);
25 uintptr_t getKernelStack() const {
26 return m_KernelStack;
27 }
28 void setKernelStack(uintptr_t stack) {
29 m_KernelStack = stack;
30 }
31 Thread* getCurrentThread() const {
32 return m_Thread;
33 }
34 void setCurrentThread(Thread* thread);
35 PerProcessorScheduler& getScheduler();
36 RcuReadState& rcuState() {
37 return m_RcuState;
38 }
39 ProcessorId processorId() const {
40 return m_ProcessorId;
41 }
42
43 protected:
46
47 private:
48 ProcessorId m_ProcessorId;
49 VirtualAddressSpace* m_AddressSpace;
50 Thread* m_Thread;
51 PerProcessorScheduler* m_Scheduler;
52 uintptr_t m_KernelStack;
53 size_t m_DeviceHardIrqDepth;
54 RcuReadState m_RcuState;
55};
56
57#endif
size_t ProcessorId