2017-10-02 02:56:43 +00:00
|
|
|
// Copyright 2017 Citra Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-11-08 19:05:54 +00:00
|
|
|
#include <memory>
|
2018-11-08 18:53:20 +00:00
|
|
|
#include <vector>
|
2017-10-02 02:56:43 +00:00
|
|
|
#include "common/common_types.h"
|
2018-11-08 18:53:20 +00:00
|
|
|
#include "core/hle/ipc.h"
|
2017-10-02 02:56:43 +00:00
|
|
|
#include "core/hle/kernel/thread.h"
|
|
|
|
|
2019-02-01 17:32:49 +00:00
|
|
|
namespace Memory {
|
|
|
|
class MemorySystem;
|
|
|
|
}
|
|
|
|
|
2017-10-02 02:56:43 +00:00
|
|
|
namespace Kernel {
|
2018-11-08 18:53:20 +00:00
|
|
|
|
|
|
|
struct MappedBufferContext {
|
|
|
|
IPC::MappedBufferPermissions permissions;
|
|
|
|
u32 size;
|
|
|
|
VAddr source_address;
|
|
|
|
VAddr target_address;
|
2018-11-08 19:05:54 +00:00
|
|
|
|
|
|
|
std::unique_ptr<u8[]> buffer;
|
|
|
|
std::unique_ptr<u8[]> reserve_buffer;
|
2018-11-08 18:53:20 +00:00
|
|
|
};
|
|
|
|
|
2017-10-02 02:56:43 +00:00
|
|
|
/// Performs IPC command buffer translation from one process to another.
|
2019-03-23 20:04:19 +00:00
|
|
|
ResultCode TranslateCommandBuffer(Memory::MemorySystem& memory, std::shared_ptr<Thread> src_thread,
|
|
|
|
std::shared_ptr<Thread> dst_thread, VAddr src_address,
|
2019-02-01 17:32:49 +00:00
|
|
|
VAddr dst_address,
|
2018-11-08 18:53:20 +00:00
|
|
|
std::vector<MappedBufferContext>& mapped_buffer_context,
|
|
|
|
bool reply);
|
2017-10-02 02:56:43 +00:00
|
|
|
} // namespace Kernel
|