kernel: sysctl: add AppInfo2

stub camera and devact ioctls
stub sys_cpuset
reduce log spam

thanks ga2mer for investigation
This commit is contained in:
DH 2024-11-26 15:29:43 +03:00
parent 6257c0f76d
commit 20303c903d
9 changed files with 297 additions and 56 deletions

View file

@ -1,6 +1,7 @@
#pragma once
#include "orbis-config.hpp"
#include <array>
namespace orbis {
struct AppInfo {
@ -18,4 +19,23 @@ struct AppInfo {
slong unk8;
};
static_assert(sizeof(AppInfo) == 72);
struct AppInfo2 {
uint32_t appId;
uint32_t unk0;
uint32_t unk1;
uint32_t appType;
char titleId[10];
uint16_t unk2;
uint32_t unk3;
slong unk4;
slong unk5;
slong unk6;
slong unk7;
slong unk8;
slong unk9;
slong unk10;
};
static_assert(sizeof(AppInfo2) == 88);
} // namespace orbis

View file

@ -1,4 +1,5 @@
#pragma once
#include "AppInfo.hpp"
#include "KernelAllocator.hpp"
#include "evf.hpp"
#include "ipmi.hpp"
@ -54,6 +55,10 @@ enum class FwType : std::uint8_t {
Ps5,
};
struct RcAppInfo : RcBase, AppInfo2 {
orbis::uint32_t appState = 0;
};
class alignas(__STDCPP_DEFAULT_NEW_ALIGNMENT__) KernelContext final {
public:
KernelContext();
@ -195,6 +200,7 @@ public:
uint fwSdkVersion{};
uint safeMode{};
utils::RcIdMap<RcBase, sint, 4097, 1> ipmiMap;
RcIdMap<RcAppInfo> appInfos;
shared_mutex regMgrMtx;
kmap<std::uint32_t, std::uint32_t> regMgrInt;

View file

@ -69,6 +69,7 @@ struct Process final {
uint64_t processParamSize = 0;
const ProcessOps *ops = nullptr;
AppInfo appInfo{};
AppInfo2 appInfo2{};
AuthInfo authInfo{};
kstring cwd;
kstring root = "/";