summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/logging/backend.cpp1
-rw-r--r--src/common/logging/log.h1
-rw-r--r--src/core/CMakeLists.txt6
-rw-r--r--src/core/hle/service/fatal/fatal.cpp38
-rw-r--r--src/core/hle/service/fatal/fatal.h29
-rw-r--r--src/core/hle/service/fatal/fatal_p.cpp14
-rw-r--r--src/core/hle/service/fatal/fatal_p.h18
-rw-r--r--src/core/hle/service/fatal/fatal_u.cpp19
-rw-r--r--src/core/hle/service/fatal/fatal_u.h18
-rw-r--r--src/core/hle/service/service.cpp2
10 files changed, 146 insertions, 0 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index 7f3ae1a4e..9f3ba19db 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -37,6 +37,7 @@ namespace Log {
37 SUB(Service, AM) \ 37 SUB(Service, AM) \
38 SUB(Service, AOC) \ 38 SUB(Service, AOC) \
39 SUB(Service, APM) \ 39 SUB(Service, APM) \
40 SUB(Service, Fatal) \
40 SUB(Service, Friend) \ 41 SUB(Service, Friend) \
41 SUB(Service, FS) \ 42 SUB(Service, FS) \
42 SUB(Service, HID) \ 43 SUB(Service, HID) \
diff --git a/src/common/logging/log.h b/src/common/logging/log.h
index 3cf13fcb0..3573e6dc4 100644
--- a/src/common/logging/log.h
+++ b/src/common/logging/log.h
@@ -54,6 +54,7 @@ enum class Class : ClassType {
54 Service_AOC, ///< The AOC (AddOn Content) service 54 Service_AOC, ///< The AOC (AddOn Content) service
55 Service_APM, ///< The APM (Performance) service 55 Service_APM, ///< The APM (Performance) service
56 Service_Audio, ///< The Audio (Audio control) service 56 Service_Audio, ///< The Audio (Audio control) service
57 Service_Fatal, ///< The Fatal service
57 Service_Friend, ///< The friend service 58 Service_Friend, ///< The friend service
58 Service_FS, ///< The FS (Filesystem) service 59 Service_FS, ///< The FS (Filesystem) service
59 Service_HID, ///< The HID (Human interface device) service 60 Service_HID, ///< The HID (Human interface device) service
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index faaa50e4d..456b63ac2 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -114,6 +114,12 @@ add_library(core STATIC
114 hle/service/audio/audren_u.h 114 hle/service/audio/audren_u.h
115 hle/service/audio/codecctl.cpp 115 hle/service/audio/codecctl.cpp
116 hle/service/audio/codecctl.h 116 hle/service/audio/codecctl.h
117 hle/service/fatal/fatal.cpp
118 hle/service/fatal/fatal.h
119 hle/service/fatal/fatal_p.cpp
120 hle/service/fatal/fatal_p.h
121 hle/service/fatal/fatal_u.cpp
122 hle/service/fatal/fatal_u.h
117 hle/service/filesystem/filesystem.cpp 123 hle/service/filesystem/filesystem.cpp
118 hle/service/filesystem/filesystem.h 124 hle/service/filesystem/filesystem.h
119 hle/service/filesystem/fsp_srv.cpp 125 hle/service/filesystem/fsp_srv.cpp
diff --git a/src/core/hle/service/fatal/fatal.cpp b/src/core/hle/service/fatal/fatal.cpp
new file mode 100644
index 000000000..1a18e0051
--- /dev/null
+++ b/src/core/hle/service/fatal/fatal.cpp
@@ -0,0 +1,38 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "common/logging/log.h"
6#include "core/hle/ipc_helpers.h"
7#include "core/hle/service/fatal/fatal.h"
8#include "core/hle/service/fatal/fatal_p.h"
9#include "core/hle/service/fatal/fatal_u.h"
10
11namespace Service {
12namespace Fatal {
13
14Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)
15 : ServiceFramework(name), module(std::move(module)) {}
16
17void Module::Interface::FatalSimple(Kernel::HLERequestContext& ctx) {
18 IPC::RequestParser rp(ctx);
19 u32 error_code = rp.Pop<u32>();
20 LOG_WARNING(Service_Fatal, "(STUBBED) called, error_code=0x%X", error_code);
21 IPC::ResponseBuilder rb{ctx, 2};
22 rb.Push(RESULT_SUCCESS);
23}
24
25void Module::Interface::TransitionToFatalError(Kernel::HLERequestContext& ctx) {
26 LOG_WARNING(Service_Fatal, "(STUBBED) called");
27 IPC::ResponseBuilder rb{ctx, 2};
28 rb.Push(RESULT_SUCCESS);
29}
30
31void InstallInterfaces(SM::ServiceManager& service_manager) {
32 auto module = std::make_shared<Module>();
33 std::make_shared<Fatal_P>(module)->InstallAsService(service_manager);
34 std::make_shared<Fatal_U>(module)->InstallAsService(service_manager);
35}
36
37} // namespace Fatal
38} // namespace Service
diff --git a/src/core/hle/service/fatal/fatal.h b/src/core/hle/service/fatal/fatal.h
new file mode 100644
index 000000000..85272b4be
--- /dev/null
+++ b/src/core/hle/service/fatal/fatal.h
@@ -0,0 +1,29 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/service.h"
8
9namespace Service {
10namespace Fatal {
11
12class Module final {
13public:
14 class Interface : public ServiceFramework<Interface> {
15 public:
16 Interface(std::shared_ptr<Module> module, const char* name);
17
18 void FatalSimple(Kernel::HLERequestContext& ctx);
19 void TransitionToFatalError(Kernel::HLERequestContext& ctx);
20
21 protected:
22 std::shared_ptr<Module> module;
23 };
24};
25
26void InstallInterfaces(SM::ServiceManager& service_manager);
27
28} // namespace Fatal
29} // namespace Service
diff --git a/src/core/hle/service/fatal/fatal_p.cpp b/src/core/hle/service/fatal/fatal_p.cpp
new file mode 100644
index 000000000..ba194e340
--- /dev/null
+++ b/src/core/hle/service/fatal/fatal_p.cpp
@@ -0,0 +1,14 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "core/hle/service/fatal/fatal_p.h"
6
7namespace Service {
8namespace Fatal {
9
10Fatal_P::Fatal_P(std::shared_ptr<Module> module)
11 : Module::Interface(std::move(module), "fatal:p") {}
12
13} // namespace Fatal
14} // namespace Service
diff --git a/src/core/hle/service/fatal/fatal_p.h b/src/core/hle/service/fatal/fatal_p.h
new file mode 100644
index 000000000..d77b24bc4
--- /dev/null
+++ b/src/core/hle/service/fatal/fatal_p.h
@@ -0,0 +1,18 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/fatal/fatal.h"
8
9namespace Service {
10namespace Fatal {
11
12class Fatal_P final : public Module::Interface {
13public:
14 explicit Fatal_P(std::shared_ptr<Module> module);
15};
16
17} // namespace Fatal
18} // namespace Service
diff --git a/src/core/hle/service/fatal/fatal_u.cpp b/src/core/hle/service/fatal/fatal_u.cpp
new file mode 100644
index 000000000..065cc868d
--- /dev/null
+++ b/src/core/hle/service/fatal/fatal_u.cpp
@@ -0,0 +1,19 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "core/hle/service/fatal/fatal_u.h"
6
7namespace Service {
8namespace Fatal {
9
10Fatal_U::Fatal_U(std::shared_ptr<Module> module) : Module::Interface(std::move(module), "fatal:u") {
11 static const FunctionInfo functions[] = {
12 {1, &Fatal_U::FatalSimple, "FatalSimple"},
13 {2, &Fatal_U::TransitionToFatalError, "TransitionToFatalError"},
14 };
15 RegisterHandlers(functions);
16}
17
18} // namespace Fatal
19} // namespace Service
diff --git a/src/core/hle/service/fatal/fatal_u.h b/src/core/hle/service/fatal/fatal_u.h
new file mode 100644
index 000000000..22374755e
--- /dev/null
+++ b/src/core/hle/service/fatal/fatal_u.h
@@ -0,0 +1,18 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/fatal/fatal.h"
8
9namespace Service {
10namespace Fatal {
11
12class Fatal_U final : public Module::Interface {
13public:
14 explicit Fatal_U(std::shared_ptr<Module> module);
15};
16
17} // namespace Fatal
18} // namespace Service
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index d4b08aadf..4846fe092 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -20,6 +20,7 @@
20#include "core/hle/service/aoc/aoc_u.h" 20#include "core/hle/service/aoc/aoc_u.h"
21#include "core/hle/service/apm/apm.h" 21#include "core/hle/service/apm/apm.h"
22#include "core/hle/service/audio/audio.h" 22#include "core/hle/service/audio/audio.h"
23#include "core/hle/service/fatal/fatal.h"
23#include "core/hle/service/filesystem/filesystem.h" 24#include "core/hle/service/filesystem/filesystem.h"
24#include "core/hle/service/friend/friend.h" 25#include "core/hle/service/friend/friend.h"
25#include "core/hle/service/hid/hid.h" 26#include "core/hle/service/hid/hid.h"
@@ -179,6 +180,7 @@ void Init() {
179 AOC::InstallInterfaces(*SM::g_service_manager); 180 AOC::InstallInterfaces(*SM::g_service_manager);
180 APM::InstallInterfaces(*SM::g_service_manager); 181 APM::InstallInterfaces(*SM::g_service_manager);
181 Audio::InstallInterfaces(*SM::g_service_manager); 182 Audio::InstallInterfaces(*SM::g_service_manager);
183 Fatal::InstallInterfaces(*SM::g_service_manager);
182 FileSystem::InstallInterfaces(*SM::g_service_manager); 184 FileSystem::InstallInterfaces(*SM::g_service_manager);
183 Friend::InstallInterfaces(*SM::g_service_manager); 185 Friend::InstallInterfaces(*SM::g_service_manager);
184 HID::InstallInterfaces(*SM::g_service_manager); 186 HID::InstallInterfaces(*SM::g_service_manager);