summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ro/ro_nro_utils.h
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-12-09 03:10:42 +0100
committerLiam <byteslice@airmail.cc>2023-12-09 21:50:34 +0100
commit7ba4a8f4a305a8f5136cd745b73c30becdf7c975 (patch)
tree88298437cb75a1c383393bbda37fd605c30c1db6 /src/core/hle/service/ro/ro_nro_utils.h
parentservice: populate pid and handle table from client (diff)
downloadyuzu-7ba4a8f4a305a8f5136cd745b73c30becdf7c975.tar
yuzu-7ba4a8f4a305a8f5136cd745b73c30becdf7c975.tar.gz
yuzu-7ba4a8f4a305a8f5136cd745b73c30becdf7c975.tar.bz2
yuzu-7ba4a8f4a305a8f5136cd745b73c30becdf7c975.tar.lz
yuzu-7ba4a8f4a305a8f5136cd745b73c30becdf7c975.tar.xz
yuzu-7ba4a8f4a305a8f5136cd745b73c30becdf7c975.tar.zst
yuzu-7ba4a8f4a305a8f5136cd745b73c30becdf7c975.zip
Diffstat (limited to 'src/core/hle/service/ro/ro_nro_utils.h')
-rw-r--r--src/core/hle/service/ro/ro_nro_utils.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/core/hle/service/ro/ro_nro_utils.h b/src/core/hle/service/ro/ro_nro_utils.h
new file mode 100644
index 000000000..f7083a1ba
--- /dev/null
+++ b/src/core/hle/service/ro/ro_nro_utils.h
@@ -0,0 +1,26 @@
+// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <random>
+
+#include "common/common_types.h"
+
+namespace Kernel {
+class KProcess;
+}
+
+union Result;
+
+namespace Service::RO {
+
+Result MapNro(u64* out_base_address, Kernel::KProcess* process, u64 nro_heap_address,
+ u64 nro_heap_size, u64 bss_heap_address, u64 bss_heap_size,
+ std::mt19937_64& generate_random);
+Result SetNroPerms(Kernel::KProcess* process, u64 base_address, u64 rx_size, u64 ro_size,
+ u64 rw_size);
+Result UnmapNro(Kernel::KProcess* process, u64 base_address, u64 nro_heap_address,
+ u64 nro_heap_size, u64 bss_heap_address, u64 bss_heap_size);
+
+} // namespace Service::RO