diff options
| author | Liam <byteslice@airmail.cc> | 2023-02-05 14:22:02 -0500 |
|---|---|---|
| committer | Liam <byteslice@airmail.cc> | 2023-02-06 23:57:44 -0500 |
| commit | 2415d37ea296e8856267375989a8b95cebe2575a (patch) | |
| tree | 376baf5952a8ccc15b445702d38c056ffa71dd1b /src/core/hle/kernel/svc/svc_info.cpp | |
| parent | 037300014385d7dd25029d7aac188f325f1e5bc3 (diff) | |
kernel/svc: switch to generated wrappers
Diffstat (limited to 'src/core/hle/kernel/svc/svc_info.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc/svc_info.cpp | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/src/core/hle/kernel/svc/svc_info.cpp b/src/core/hle/kernel/svc/svc_info.cpp index df5dd85a4..75097c7f9 100644 --- a/src/core/hle/kernel/svc/svc_info.cpp +++ b/src/core/hle/kernel/svc/svc_info.cpp @@ -10,11 +10,12 @@ namespace Kernel::Svc { /// Gets system/memory information for the current process -Result GetInfo(Core::System& system, u64* result, u64 info_id, Handle handle, u64 info_sub_id) { +Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle handle, + u64 info_sub_id) { LOG_TRACE(Kernel_SVC, "called info_id=0x{:X}, info_sub_id=0x{:X}, handle=0x{:08X}", info_id, info_sub_id, handle); - const auto info_id_type = static_cast<InfoType>(info_id); + u32 info_id = static_cast<u32>(info_id_type); switch (info_id_type) { case InfoType::CoreMask: @@ -267,16 +268,30 @@ Result GetInfo(Core::System& system, u64* result, u64 info_id, Handle handle, u6 } } -Result GetInfo32(Core::System& system, u32* result_low, u32* result_high, u32 sub_id_low, - u32 info_id, u32 handle, u32 sub_id_high) { - const u64 sub_id{u64{sub_id_low} | (u64{sub_id_high} << 32)}; - u64 res_value{}; +Result GetSystemInfo(Core::System& system, uint64_t* out, SystemInfoType info_type, Handle handle, + uint64_t info_subtype) { + UNIMPLEMENTED(); + R_THROW(ResultNotImplemented); +} + +Result GetInfo64(Core::System& system, uint64_t* out, InfoType info_type, Handle handle, + uint64_t info_subtype) { + R_RETURN(GetInfo(system, out, info_type, handle, info_subtype)); +} - const Result result{GetInfo(system, &res_value, info_id, handle, sub_id)}; - *result_high = static_cast<u32>(res_value >> 32); - *result_low = static_cast<u32>(res_value & std::numeric_limits<u32>::max()); +Result GetSystemInfo64(Core::System& system, uint64_t* out, SystemInfoType info_type, Handle handle, + uint64_t info_subtype) { + R_RETURN(GetSystemInfo(system, out, info_type, handle, info_subtype)); +} + +Result GetInfo64From32(Core::System& system, uint64_t* out, InfoType info_type, Handle handle, + uint64_t info_subtype) { + R_RETURN(GetInfo(system, out, info_type, handle, info_subtype)); +} - return result; +Result GetSystemInfo64From32(Core::System& system, uint64_t* out, SystemInfoType info_type, + Handle handle, uint64_t info_subtype) { + R_RETURN(GetSystemInfo(system, out, info_type, handle, info_subtype)); } } // namespace Kernel::Svc |
