SetThreadCoreMask stub, acc:u0, fatal:u, nvdrv:a->nvdrv, DuplicateSessionEx

This commit is contained in:
David Marcec
2018-01-16 03:00:24 -08:00
parent 957883de73
commit 34aac48e02
10 changed files with 142 additions and 19 deletions

View File

@@ -724,6 +724,11 @@ static ResultCode MapPhysicalMemory(VAddr addr, u64 size) {
return RESULT_SUCCESS;
}
static ResultCode SetThreadCoreMask(u32 in0, u64 in1) {
LOG_WARNING(Kernel_SVC, "(STUBBED) called in0 0x%llx in1 0x%llx", in0, in1);
return RESULT_SUCCESS;
}
namespace {
struct FunctionDef {
using Func = void();
@@ -750,7 +755,7 @@ static const FunctionDef SVC_Table[] = {
{0x0C, SvcWrap<GetThreadPriority>, "GetThreadPriority"},
{0x0D, SvcWrap<SetThreadPriority>, "SetThreadPriority"},
{0x0E, nullptr, "GetThreadCoreMask"},
{0x0F, nullptr, "SetThreadCoreMask"},
{0x0F, SvcWrap<SetThreadCoreMask>, "SetThreadCoreMask"},
{0x10, SvcWrap<GetCurrentProcessorNumber>, "GetCurrentProcessorNumber"},
{0x11, nullptr, "SignalEvent"},
{0x12, nullptr, "ClearEvent"},

View File

@@ -174,6 +174,11 @@ void SvcWrap() {
func(PARAM(0), PARAM(1));
}
template <ResultCode func(u32, u64)>
void SvcWrap() {
func(PARAM(0), PARAM(1));
}
template <void func(s64)>
void SvcWrap() {
func((s64)PARAM(0));

View File

@@ -0,0 +1,31 @@
// Copyright 2018 yuzu emulator team
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "common/logging/log.h"
#include "core/hle/ipc_helpers.h"
#include "core/hle/service/acc/acc.h"
namespace Service {
namespace Account {
void InstallInterfaces(SM::ServiceManager& service_manager) {
std::make_shared<Acc_U0>()->InstallAsService(service_manager);
}
Acc_U0::Acc_U0() : ServiceFramework("acc:u0") {
static const FunctionInfo functions[] = {
{100, &Acc_U0::InitializeApplicationInfo, "InitializeApplicationInfo" },
};
RegisterHandlers(functions);
}
void Acc_U0::InitializeApplicationInfo(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called");
IPC::RequestBuilder rb{ ctx, 2 };
rb.Push(RESULT_SUCCESS);
}
}
}

View File

@@ -0,0 +1,23 @@
// Copyright 2018 yuzu emulator team
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "core/hle/kernel/hle_ipc.h"
#include "core/hle/service/service.h"
namespace Service {
namespace Account {
void InstallInterfaces(SM::ServiceManager& service_manager);
class Acc_U0 final : public ServiceFramework<Acc_U0> {
public:
Acc_U0();
~Acc_U0() = default;
private:
void InitializeApplicationInfo(Kernel::HLERequestContext& ctx);
};
}
}

View File

@@ -0,0 +1,31 @@
// Copyright 2018 yuzu emulator team
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "common/logging/log.h"
#include "core/hle/ipc_helpers.h"
#include "core/hle/service/fatal/fatal.h"
namespace Service {
namespace Fatal {
void InstallInterfaces(SM::ServiceManager& service_manager) {
std::make_shared<Fatal_U>()->InstallAsService(service_manager);
}
Fatal_U::Fatal_U() : ServiceFramework("fatal:u") {
static const FunctionInfo functions[] = {
{ 2, &Fatal_U::TransitionToFatalError, "TransitionToFatalError" },
};
RegisterHandlers(functions);
}
void Fatal_U::TransitionToFatalError(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called");
IPC::RequestBuilder rb{ ctx, 2 };
rb.Push(RESULT_SUCCESS);
}
}
}

View File

@@ -0,0 +1,23 @@
// Copyright 2018 yuzu emulator team
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "core/hle/kernel/hle_ipc.h"
#include "core/hle/service/service.h"
namespace Service {
namespace Fatal {
void InstallInterfaces(SM::ServiceManager& service_manager);
class Fatal_U final : public ServiceFramework<Fatal_U> {
public:
Fatal_U();
~Fatal_U() = default;
private:
void TransitionToFatalError(Kernel::HLERequestContext& ctx);
};
}
}

View File

@@ -30,6 +30,7 @@ void NVDRV_A::Open(Kernel::HLERequestContext& ctx) {
rb.Push(RESULT_SUCCESS);
rb.Push<u32>(fd);
rb.Push<u32>(0);
LOG_WARNING(Service, "Opened!!!");
}
void NVDRV_A::Ioctl(Kernel::HLERequestContext& ctx) {
@@ -66,7 +67,7 @@ void NVDRV_A::Initialize(Kernel::HLERequestContext& ctx) {
rb.Push<u32>(0);
}
NVDRV_A::NVDRV_A() : ServiceFramework("nvdrv:a") {
NVDRV_A::NVDRV_A() : ServiceFramework("nvdrv") {
static const FunctionInfo functions[] = {
{0, &NVDRV_A::Open, "Open"},
{1, &NVDRV_A::Ioctl, "Ioctl"},

View File

@@ -14,10 +14,12 @@
#include "core/hle/kernel/process.h"
#include "core/hle/kernel/server_port.h"
#include "core/hle/kernel/thread.h"
#include "core/hle/service/acc/acc.h"
#include "core/hle/service/am/am.h"
#include "core/hle/service/aoc/aoc_u.h"
#include "core/hle/service/apm/apm.h"
#include "core/hle/service/audio/audio.h"
#include "core/hle/service/fatal/fatal.h"
#include "core/hle/service/hid/hid.h"
#include "core/hle/service/lm/lm.h"
#include "core/hle/service/nvdrv/nvdrv.h"
@@ -164,10 +166,12 @@ void Init() {
SM::g_service_manager = std::make_shared<SM::ServiceManager>();
SM::ServiceManager::InstallInterfaces(SM::g_service_manager);
Account::InstallInterfaces(*SM::g_service_manager);
AM::InstallInterfaces(*SM::g_service_manager);
AOC::InstallInterfaces(*SM::g_service_manager);
APM::InstallInterfaces(*SM::g_service_manager);
Audio::InstallInterfaces(*SM::g_service_manager);
Fatal::InstallInterfaces(*SM::g_service_manager);
HID::InstallInterfaces(*SM::g_service_manager);
LM::InstallInterfaces(*SM::g_service_manager);
NVDRV::InstallInterfaces(*SM::g_service_manager);

View File

@@ -46,7 +46,7 @@ Controller::Controller() : ServiceFramework("IpcController") {
{0x00000001, nullptr, "ConvertDomainToSession"},
{0x00000002, &Controller::DuplicateSession, "DuplicateSession"},
{0x00000003, &Controller::QueryPointerBufferSize, "QueryPointerBufferSize"},
{0x00000004, nullptr, "DuplicateSessionEx"},
{0x00000004, &Controller::DuplicateSession, "DuplicateSessionEx"},
};
RegisterHandlers(functions);
}

View File

@@ -8,23 +8,23 @@
#include "core/hle/service/vi/vi_m.h"
namespace Service {
namespace VI {
namespace VI {
void VI_M::GetDisplayService(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called");
void VI_M::GetDisplayService(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service, "(STUBBED) called");
IPC::RequestBuilder rb{ctx, 2, 0, 0, 1};
rb.PushIpcInterface<IApplicationDisplayService>(nv_flinger);
}
IPC::RequestBuilder rb{ ctx, 2, 0, 0, 1 };
rb.PushIpcInterface<IApplicationDisplayService>(nv_flinger);
}
VI_M::VI_M() : ServiceFramework("vi:m") {
static const FunctionInfo functions[] = {
{2, &VI_M::GetDisplayService, "GetDisplayService"},
{3, nullptr, "GetDisplayServiceWithProxyNameExchange"},
};
RegisterHandlers(functions);
nv_flinger = std::make_shared<NVFlinger>();
}
VI_M::VI_M() : ServiceFramework("vi:m") {
static const FunctionInfo functions[] = {
{ 2, &VI_M::GetDisplayService, "GetDisplayService" },
{ 3, nullptr, "GetDisplayServiceWithProxyNameExchange" },
};
RegisterHandlers(functions);
nv_flinger = std::make_shared<NVFlinger>();
}
} // namespace VI
} // namespace Service
} // namespace VI
} // namespace Service