kern: stubs for Svc39, 3A, 46, 47

This commit is contained in:
Michael Scire 2020-12-01 16:23:09 -08:00
parent 4c8dad3ea2
commit 3886c8707f
2 changed files with 84 additions and 1 deletions

View file

@ -0,0 +1,79 @@
/*
* Copyright (c) 2018-2020 Atmosphère-NX
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <mesosphere.hpp>
namespace ams::kern::svc {
/* ============================= Common ============================= */
namespace {
Result Unknown39() {
return svc::ResultNotImplemented();
}
Result Unknown3A() {
return svc::ResultNotImplemented();
}
Result Unknown46() {
return svc::ResultNotImplemented();
}
Result Unknown47() {
return svc::ResultNotImplemented();
}
}
/* ============================= 64 ABI ============================= */
Result Unknown3964() {
return Unknown39();
}
Result Unknown3A64() {
/* NOTE: From official stubs, true API to this is something like Unknown3A(u64 *, u32_or_u64, u64, u64, u64_or_u32, u64_or_u32); */
return Unknown3A();
}
Result Unknown4664() {
return Unknown46();
}
Result Unknown4764() {
return Unknown47();
}
/* ============================= 64From32 ABI ============================= */
Result Unknown3964From32() {
return Unknown39();
}
Result Unknown3A64From32() {
return Unknown3A();
}
Result Unknown4664From32() {
return Unknown46();
}
Result Unknown4764From32() {
return Unknown47();
}
}

View file

@ -85,6 +85,9 @@
HANDLER(0x36, void, SynchronizePreemptionState) \
HANDLER(0x37, Result, GetResourceLimitPeakValue, OUTPUT(int64_t, out_peak_value), INPUT(::ams::svc::Handle, resource_limit_handle), INPUT(::ams::svc::LimitableResource, which)) \
\
HANDLER(0x39, Result, Unknown39) \
HANDLER(0x3A, Result, Unknown3A) \
\
HANDLER(0x3C, void, KernelDebug, INPUT(::ams::svc::KernelDebugType, kern_debug_type), INPUT(uint64_t, arg0), INPUT(uint64_t, arg1), INPUT(uint64_t, arg2)) \
HANDLER(0x3D, void, ChangeKernelTraceState, INPUT(::ams::svc::KernelTraceState, kern_trace_state)) \
\
@ -94,7 +97,8 @@
HANDLER(0x43, Result, ReplyAndReceive, OUTPUT(int32_t, out_index), INPTR(::ams::svc::Handle, handles), INPUT(int32_t, num_handles), INPUT(::ams::svc::Handle, reply_target), INPUT(int64_t, timeout_ns)) \
HANDLER(0x44, Result, ReplyAndReceiveWithUserBuffer, OUTPUT(int32_t, out_index), INPUT(::ams::svc::Address, message_buffer), INPUT(::ams::svc::Size, message_buffer_size), INPTR(::ams::svc::Handle, handles), INPUT(int32_t, num_handles), INPUT(::ams::svc::Handle, reply_target), INPUT(int64_t, timeout_ns)) \
HANDLER(0x45, Result, CreateEvent, OUTPUT(::ams::svc::Handle, out_write_handle), OUTPUT(::ams::svc::Handle, out_read_handle)) \
\
HANDLER(0x46, Result, Unknown46) \
HANDLER(0x47, Result, Unknown47) \
HANDLER(0x48, Result, MapPhysicalMemoryUnsafe, INPUT(::ams::svc::Address, address), INPUT(::ams::svc::Size, size)) \
HANDLER(0x49, Result, UnmapPhysicalMemoryUnsafe, INPUT(::ams::svc::Address, address), INPUT(::ams::svc::Size, size)) \
HANDLER(0x4A, Result, SetUnsafeLimit, INPUT(::ams::svc::Size, limit)) \