1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-18 08:22:04 +00:00

thermosphere: singleton ctors should be private

This commit is contained in:
TuxSH 2020-02-21 00:20:50 +00:00
parent f6793139c1
commit 77fbbb4c68
5 changed files with 15 additions and 11 deletions

View file

@ -26,11 +26,11 @@ namespace ams::hvisor {
bool FindPredicate(const cpu::DebugRegisterPair &pair, uintptr_t addr, size_t, cpu::DebugRegisterPair::LoadStoreControl) const final;
void Reload() const final;
private:
constexpr HwBreakpointManager() : HwStopPointManager(MAX_BCR, IrqManager::ReloadHwBreakpointsSgi) {}
public:
int Add(uintptr_t addr);
int Remove(uintptr_t addr);
public:
constexpr HwBreakpointManager() : HwStopPointManager(MAX_BCR, IrqManager::ReloadHwBreakpointsSgi) {}
};
}

View file

@ -79,6 +79,9 @@ namespace ams::hvisor {
void InitializeGic();
void DoConfigureInterrupt(u32 id, u8 prio, bool isLevelSensitive);
private:
constexpr IrqManager() = default;
public:
enum ThermosphereSgi : u32 {
VgicUpdateSgi = 0,
@ -109,9 +112,6 @@ namespace ams::hvisor {
void Initialize();
void Register(IInterruptTask &task, u32 id, bool isLevelSensitive, u8 prio = IrqManager::hostPriority);
void SetInterruptAffinity(u32 id, u8 affinityMask);
public:
constexpr IrqManager() = default;
};
}

View file

@ -50,6 +50,9 @@ namespace ams::hvisor {
bool ApplyOrRevert(size_t id, bool apply);
private:
constexpr SwBreakpointManager() = default;
public:
int Add(uintptr_t addr, bool persistent);
int Remove(uintptr_t addr, bool keepPersistent);
@ -60,7 +63,5 @@ namespace ams::hvisor {
{
IrqManager::GetInstance().Register(*this, IrqManager::ApplyRevertSwBreakpointSgi, false);
}
public:
constexpr SwBreakpointManager() = default;
};
}

View file

@ -366,6 +366,9 @@ namespace ams::hvisor {
void PushListRegisters(VirqState *chosen[], size_t num);
bool UpdateListRegister(volatile GicV2VirtualInterfaceController::ListRegister *lr);
private:
constexpr VirtualGic() = default;
public:
static bool ValidateGicdRegisterAccess(size_t offset, size_t sz);
public:

View file

@ -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;
void Reload() const final;
private:
constexpr WatchpointManager() : HwStopPointManager(MAX_WCR, IrqManager::ReloadWatchpointsSgi) {}
public:
virtual void ReloadOnAllCores() const;
static void ReloadOnAllCoresSgiHandler();
@ -33,8 +36,5 @@ namespace ams::hvisor {
cpu::DebugRegisterPair RetrieveWatchpointConfig(uintptr_t addr, cpu::DebugRegisterPair::LoadStoreControl direction) const;
int Add(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) {}
};
}