Merge pull request #3256 from yuriks/move-svc
HLE: Move svc.cpp to kernel/
This commit is contained in:
commit
312281fd61
|
@ -58,6 +58,7 @@ set(SRCS
|
|||
hle/kernel/server_port.cpp
|
||||
hle/kernel/server_session.cpp
|
||||
hle/kernel/shared_memory.cpp
|
||||
hle/kernel/svc.cpp
|
||||
hle/kernel/thread.cpp
|
||||
hle/kernel/timer.cpp
|
||||
hle/kernel/vm_manager.cpp
|
||||
|
@ -170,7 +171,6 @@ set(SRCS
|
|||
hle/service/ssl_c.cpp
|
||||
hle/service/y2r_u.cpp
|
||||
hle/shared_page.cpp
|
||||
hle/svc.cpp
|
||||
hw/aes/arithmetic128.cpp
|
||||
hw/aes/ccm.cpp
|
||||
hw/aes/key.cpp
|
||||
|
@ -263,6 +263,7 @@ set(HEADERS
|
|||
hle/kernel/server_session.h
|
||||
hle/kernel/session.h
|
||||
hle/kernel/shared_memory.h
|
||||
hle/kernel/svc.h
|
||||
hle/kernel/thread.h
|
||||
hle/kernel/timer.h
|
||||
hle/kernel/vm_manager.h
|
||||
|
@ -375,7 +376,6 @@ set(HEADERS
|
|||
hle/service/ssl_c.h
|
||||
hle/service/y2r_u.h
|
||||
hle/shared_page.h
|
||||
hle/svc.h
|
||||
hw/aes/arithmetic128.h
|
||||
hw/aes/ccm.h
|
||||
hw/aes/key.h
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "core/arm/dyncom/arm_dyncom_interpreter.h"
|
||||
#include "core/core.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/hle/svc.h"
|
||||
#include "core/hle/kernel/svc.h"
|
||||
#include "core/memory.h"
|
||||
|
||||
static void InterpreterFallback(u32 pc, Dynarmic::Jit* jit, void* user_arg) {
|
||||
|
@ -54,7 +54,7 @@ static Dynarmic::UserCallbacks GetUserCallbacks(
|
|||
Dynarmic::UserCallbacks user_callbacks{};
|
||||
user_callbacks.InterpreterFallback = &InterpreterFallback;
|
||||
user_callbacks.user_arg = static_cast<void*>(interpreter_state.get());
|
||||
user_callbacks.CallSVC = &SVC::CallSVC;
|
||||
user_callbacks.CallSVC = &Kernel::CallSVC;
|
||||
user_callbacks.memory.IsReadOnlyMemory = &IsReadOnlyMemory;
|
||||
user_callbacks.memory.ReadCode = &Memory::Read32;
|
||||
user_callbacks.memory.Read8 = &Memory::Read8;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "core/arm/skyeye_common/vfp/vfp.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/gdbstub/gdbstub.h"
|
||||
#include "core/hle/svc.h"
|
||||
#include "core/hle/kernel/svc.h"
|
||||
#include "core/memory.h"
|
||||
|
||||
#define RM BITS(sht_oper, 0, 3)
|
||||
|
@ -3863,7 +3863,7 @@ SWI_INST : {
|
|||
cpu->NumInstrsToExecute =
|
||||
num_instrs >= cpu->NumInstrsToExecute ? 0 : cpu->NumInstrsToExecute - num_instrs;
|
||||
num_instrs = 0;
|
||||
SVC::CallSVC(inst_cream->num & 0xFFFF);
|
||||
Kernel::CallSVC(inst_cream->num & 0xFFFF);
|
||||
}
|
||||
|
||||
cpu->Reg[15] += cpu->GetInstructionSize();
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
#include "core/arm/arm_interface.h"
|
||||
#include "core/core.h"
|
||||
#include "core/hle/kernel/kernel.h"
|
||||
#include "core/hle/kernel/svc.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/svc.h"
|
||||
#include "core/memory.h"
|
||||
|
||||
namespace HLE {
|
||||
|
@ -99,10 +99,10 @@ void Wrap() {
|
|||
FuncReturn(retval);
|
||||
}
|
||||
|
||||
template <ResultCode func(MemoryInfo*, PageInfo*, u32)>
|
||||
template <ResultCode func(Kernel::MemoryInfo*, Kernel::PageInfo*, u32)>
|
||||
void Wrap() {
|
||||
MemoryInfo memory_info = {};
|
||||
PageInfo page_info = {};
|
||||
Kernel::MemoryInfo memory_info = {};
|
||||
Kernel::PageInfo page_info = {};
|
||||
u32 retval = func(&memory_info, &page_info, PARAM(2)).raw;
|
||||
Core::CPU().SetReg(1, memory_info.base_address);
|
||||
Core::CPU().SetReg(2, memory_info.size);
|
||||
|
@ -112,10 +112,10 @@ void Wrap() {
|
|||
FuncReturn(retval);
|
||||
}
|
||||
|
||||
template <ResultCode func(MemoryInfo*, PageInfo*, Kernel::Handle, u32)>
|
||||
template <ResultCode func(Kernel::MemoryInfo*, Kernel::PageInfo*, Kernel::Handle, u32)>
|
||||
void Wrap() {
|
||||
MemoryInfo memory_info = {};
|
||||
PageInfo page_info = {};
|
||||
Kernel::MemoryInfo memory_info = {};
|
||||
Kernel::PageInfo page_info = {};
|
||||
u32 retval = func(&memory_info, &page_info, PARAM(2), PARAM(3)).raw;
|
||||
Core::CPU().SetReg(1, memory_info.base_address);
|
||||
Core::CPU().SetReg(2, memory_info.size);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,8 +6,7 @@
|
|||
|
||||
#include "common/common_types.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// SVC types
|
||||
namespace Kernel {
|
||||
|
||||
struct MemoryInfo {
|
||||
u32 base_address;
|
||||
|
@ -20,11 +19,6 @@ struct PageInfo {
|
|||
u32 flags;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace SVC
|
||||
|
||||
namespace SVC {
|
||||
|
||||
/// Values accepted by svcGetSystemInfo's type parameter.
|
||||
enum class SystemInfoType {
|
||||
/**
|
||||
|
@ -56,4 +50,4 @@ enum class SystemInfoMemUsageRegion {
|
|||
|
||||
void CallSVC(u32 immediate);
|
||||
|
||||
} // namespace
|
||||
} // namespace Kernel
|
Reference in New Issue