Merge remote-tracking branch 'upstream/master' into moar-gpu

This commit is contained in:
wheremyfoodat 2023-08-12 14:54:17 +03:00
commit e9bff39a7f
7 changed files with 99 additions and 2 deletions

View file

@ -30,6 +30,7 @@
#include "services/nim.hpp"
#include "services/ptm.hpp"
#include "services/soc.hpp"
#include "services/ssl.hpp"
#include "services/y2r.hpp"
// More circular dependencies!!
@ -68,6 +69,7 @@ class ServiceManager {
NDMService ndm;
PTMService ptm;
SOCService soc;
SSLService ssl;
Y2RService y2r;
// "srv:" commands

25
include/services/ssl.hpp Normal file
View file

@ -0,0 +1,25 @@
#pragma once
#include "helpers.hpp"
#include "kernel_types.hpp"
#include "logger.hpp"
#include "memory.hpp"
#include <random>
class SSLService {
Handle handle = KernelHandles::SSL;
Memory& mem;
MAKE_LOG_FUNCTION(log, sslLogger)
std::mt19937 rng; // Use a Mersenne Twister for RNG since this service is supposed to have better rng than just rand()
bool initialized;
// Service commands
void initialize(u32 messagePointer);
void generateRandomData(u32 messagePointer);
public:
SSLService(Memory& mem) : mem(mem) {}
void reset();
void handleSyncRequest(u32 messagePointer);
};