Memmap: Re-organize memory function in two files

memory.cpp/h contains definitions related to acessing memory and
configuring the address space
mem_map.cpp/h contains higher-level definitions related to configuring
the address space accoording to the kernel and allocating memory.
This commit is contained in:
Yuri Kunde Schlesner 2015-05-12 22:38:29 -03:00
parent a251721bf3
commit 7ada357b2d
34 changed files with 254 additions and 266 deletions

View file

@ -9,7 +9,7 @@
#include "common/common_funcs.h"
#include "core/core.h"
#include "core/mem_map.h"
#include "core/memory.h"
#include "core/hle/config_mem.h"
////////////////////////////////////////////////////////////////////////////////////////////////////

View file

@ -7,7 +7,7 @@
#include "common/common_types.h"
#include "core/arm/arm_interface.h"
#include "core/mem_map.h"
#include "core/memory.h"
#include "core/hle/hle.h"
namespace HLE {
@ -109,7 +109,7 @@ template<ResultCode func(s64*, u32, void*, s32)> void Wrap(){
template<ResultCode func(u32*, const char*)> void Wrap() {
u32 param_1 = 0;
u32 retval = func(&param_1, Memory::GetCharPointer(PARAM(1))).raw;
u32 retval = func(&param_1, (char*)Memory::GetPointer(PARAM(1))).raw;
Core::g_app_core->SetReg(1, param_1);
FuncReturn(retval);
}
@ -163,7 +163,7 @@ template<void func(s64)> void Wrap() {
}
template<void func(const char*)> void Wrap() {
func(Memory::GetCharPointer(PARAM(0)));
func((char*)Memory::GetPointer(PARAM(0)));
}
#undef PARAM

View file

@ -5,7 +5,7 @@
#include "common/common_types.h"
#include "common/logging/log.h"
#include "core/mem_map.h"
#include "core/memory.h"
#include "core/hle/hle.h"
#include "core/hle/kernel/address_arbiter.h"

View file

@ -8,7 +8,7 @@
#include "core/hle/kernel/process.h"
#include "core/hle/kernel/thread.h"
#include "core/mem_map.h"
#include "core/memory.h"
namespace Kernel {

View file

@ -6,7 +6,7 @@
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/thread.h"
#include "core/mem_map.h"
#include "core/memory.h"
namespace Kernel {

View file

@ -6,7 +6,7 @@
#include "common/logging/log.h"
#include "core/mem_map.h"
#include "core/memory.h"
#include "core/hle/kernel/shared_memory.h"
namespace Kernel {

View file

@ -21,7 +21,7 @@
#include "core/hle/kernel/thread.h"
#include "core/hle/kernel/mutex.h"
#include "core/hle/result.h"
#include "core/mem_map.h"
#include "core/memory.h"
namespace Kernel {

View file

@ -12,7 +12,6 @@
#include "common/common_types.h"
#include "core/core.h"
#include "core/mem_map.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/result.h"

View file

@ -5,6 +5,7 @@
#include "common/bit_field.h"
#include "core/mem_map.h"
#include "core/memory.h"
#include "core/hle/kernel/event.h"
#include "core/hle/kernel/shared_memory.h"
#include "core/hle/result.h"

View file

@ -8,7 +8,7 @@
#include "common/common_funcs.h"
#include "core/core.h"
#include "core/mem_map.h"
#include "core/memory.h"
#include "core/hle/config_mem.h"
#include "core/hle/shared_page.h"

View file

@ -315,7 +315,7 @@ static ResultCode GetResourceLimitCurrentValues(s64* values, Handle resource_lim
s32 name_count) {
LOG_ERROR(Kernel_SVC, "(UNIMPLEMENTED) called resource_limit=%08X, names=%p, name_count=%d",
resource_limit, names, name_count);
Memory::Write32(Core::g_app_core->GetReg(0), 0); // Normmatt: Set used memory to 0 for now
values[0] = 0; // Normmatt: Set used memory to 0 for now
return RESULT_SUCCESS;
}