mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2025-01-03 11:11:14 +00:00
thermosphere: singleton ctors should be private
This commit is contained in:
parent
f6793139c1
commit
77fbbb4c68
5 changed files with 15 additions and 11 deletions
|
@ -26,11 +26,11 @@ namespace ams::hvisor {
|
||||||
bool FindPredicate(const cpu::DebugRegisterPair &pair, uintptr_t addr, size_t, cpu::DebugRegisterPair::LoadStoreControl) const final;
|
bool FindPredicate(const cpu::DebugRegisterPair &pair, uintptr_t addr, size_t, cpu::DebugRegisterPair::LoadStoreControl) const final;
|
||||||
void Reload() const final;
|
void Reload() const final;
|
||||||
|
|
||||||
|
private:
|
||||||
|
constexpr HwBreakpointManager() : HwStopPointManager(MAX_BCR, IrqManager::ReloadHwBreakpointsSgi) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int Add(uintptr_t addr);
|
int Add(uintptr_t addr);
|
||||||
int Remove(uintptr_t addr);
|
int Remove(uintptr_t addr);
|
||||||
|
|
||||||
public:
|
|
||||||
constexpr HwBreakpointManager() : HwStopPointManager(MAX_BCR, IrqManager::ReloadHwBreakpointsSgi) {}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,6 +79,9 @@ namespace ams::hvisor {
|
||||||
void InitializeGic();
|
void InitializeGic();
|
||||||
void DoConfigureInterrupt(u32 id, u8 prio, bool isLevelSensitive);
|
void DoConfigureInterrupt(u32 id, u8 prio, bool isLevelSensitive);
|
||||||
|
|
||||||
|
private:
|
||||||
|
constexpr IrqManager() = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum ThermosphereSgi : u32 {
|
enum ThermosphereSgi : u32 {
|
||||||
VgicUpdateSgi = 0,
|
VgicUpdateSgi = 0,
|
||||||
|
@ -109,9 +112,6 @@ namespace ams::hvisor {
|
||||||
void Initialize();
|
void Initialize();
|
||||||
void Register(IInterruptTask &task, u32 id, bool isLevelSensitive, u8 prio = IrqManager::hostPriority);
|
void Register(IInterruptTask &task, u32 id, bool isLevelSensitive, u8 prio = IrqManager::hostPriority);
|
||||||
void SetInterruptAffinity(u32 id, u8 affinityMask);
|
void SetInterruptAffinity(u32 id, u8 affinityMask);
|
||||||
|
|
||||||
public:
|
|
||||||
constexpr IrqManager() = default;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,9 @@ namespace ams::hvisor {
|
||||||
|
|
||||||
bool ApplyOrRevert(size_t id, bool apply);
|
bool ApplyOrRevert(size_t id, bool apply);
|
||||||
|
|
||||||
|
private:
|
||||||
|
constexpr SwBreakpointManager() = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int Add(uintptr_t addr, bool persistent);
|
int Add(uintptr_t addr, bool persistent);
|
||||||
int Remove(uintptr_t addr, bool keepPersistent);
|
int Remove(uintptr_t addr, bool keepPersistent);
|
||||||
|
@ -60,7 +63,5 @@ namespace ams::hvisor {
|
||||||
{
|
{
|
||||||
IrqManager::GetInstance().Register(*this, IrqManager::ApplyRevertSwBreakpointSgi, false);
|
IrqManager::GetInstance().Register(*this, IrqManager::ApplyRevertSwBreakpointSgi, false);
|
||||||
}
|
}
|
||||||
public:
|
|
||||||
constexpr SwBreakpointManager() = default;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -366,6 +366,9 @@ namespace ams::hvisor {
|
||||||
void PushListRegisters(VirqState *chosen[], size_t num);
|
void PushListRegisters(VirqState *chosen[], size_t num);
|
||||||
bool UpdateListRegister(volatile GicV2VirtualInterfaceController::ListRegister *lr);
|
bool UpdateListRegister(volatile GicV2VirtualInterfaceController::ListRegister *lr);
|
||||||
|
|
||||||
|
private:
|
||||||
|
constexpr VirtualGic() = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static bool ValidateGicdRegisterAccess(size_t offset, size_t sz);
|
static bool ValidateGicdRegisterAccess(size_t offset, size_t sz);
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -26,6 +26,9 @@ namespace ams::hvisor {
|
||||||
bool FindPredicate(const cpu::DebugRegisterPair &pair, uintptr_t addr, size_t size, cpu::DebugRegisterPair::LoadStoreControl direction) const final;
|
bool FindPredicate(const cpu::DebugRegisterPair &pair, uintptr_t addr, size_t size, cpu::DebugRegisterPair::LoadStoreControl direction) const final;
|
||||||
void Reload() const final;
|
void Reload() const final;
|
||||||
|
|
||||||
|
private:
|
||||||
|
constexpr WatchpointManager() : HwStopPointManager(MAX_WCR, IrqManager::ReloadWatchpointsSgi) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void ReloadOnAllCores() const;
|
virtual void ReloadOnAllCores() const;
|
||||||
static void ReloadOnAllCoresSgiHandler();
|
static void ReloadOnAllCoresSgiHandler();
|
||||||
|
@ -33,8 +36,5 @@ namespace ams::hvisor {
|
||||||
cpu::DebugRegisterPair RetrieveWatchpointConfig(uintptr_t addr, cpu::DebugRegisterPair::LoadStoreControl direction) const;
|
cpu::DebugRegisterPair RetrieveWatchpointConfig(uintptr_t addr, cpu::DebugRegisterPair::LoadStoreControl direction) const;
|
||||||
int Add(uintptr_t addr, size_t size, cpu::DebugRegisterPair::LoadStoreControl direction);
|
int Add(uintptr_t addr, size_t size, cpu::DebugRegisterPair::LoadStoreControl direction);
|
||||||
int Remove(uintptr_t addr, size_t size, cpu::DebugRegisterPair::LoadStoreControl direction);
|
int Remove(uintptr_t addr, size_t size, cpu::DebugRegisterPair::LoadStoreControl direction);
|
||||||
|
|
||||||
public:
|
|
||||||
constexpr WatchpointManager() : HwStopPointManager(MAX_WCR, IrqManager::ReloadWatchpointsSgi) {}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue