mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-24 02:29:20 +01:00
IPC helpers: remove deprecated static buffer interface
This commit is contained in:
parent
6ebd3f396f
commit
54af348cfc
@ -45,18 +45,6 @@ public:
|
||||
memset(cmdbuf + index, 0, size_in_words * sizeof(u32));
|
||||
index += size_in_words;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Retrieves the address of a static buffer, used when a buffer is needed for output
|
||||
* @param buffer_id The index of the static buffer
|
||||
* @param data_size If non-null, will store the size of the buffer
|
||||
*/
|
||||
VAddr PeekStaticBuffer(u8 buffer_id, size_t* data_size = nullptr) const {
|
||||
u32* static_buffer = cmdbuf + Kernel::kStaticBuffersOffset / sizeof(u32) + buffer_id * 2;
|
||||
if (data_size)
|
||||
*data_size = StaticBufferDescInfo{static_buffer[0]}.size;
|
||||
return static_buffer[1];
|
||||
}
|
||||
};
|
||||
|
||||
class RequestBuilder : public RequestHelperBase {
|
||||
@ -122,7 +110,6 @@ public:
|
||||
template <typename... O>
|
||||
void PushMoveObjects(Kernel::SharedPtr<O>... pointers);
|
||||
|
||||
[[deprecated]] void PushStaticBuffer(VAddr buffer_vaddr, size_t size, u8 buffer_id);
|
||||
void PushStaticBuffer(const std::vector<u8>& buffer, u8 buffer_id);
|
||||
|
||||
/// Pushes an HLE MappedBuffer interface back to unmapped the buffer.
|
||||
@ -204,11 +191,6 @@ inline void RequestBuilder::PushMoveObjects(Kernel::SharedPtr<O>... pointers) {
|
||||
PushMoveHLEHandles(context->AddOutgoingHandle(std::move(pointers))...);
|
||||
}
|
||||
|
||||
inline void RequestBuilder::PushStaticBuffer(VAddr buffer_vaddr, size_t size, u8 buffer_id) {
|
||||
Push(StaticBufferDesc(size, buffer_id));
|
||||
Push(buffer_vaddr);
|
||||
}
|
||||
|
||||
inline void RequestBuilder::PushStaticBuffer(const std::vector<u8>& buffer, u8 buffer_id) {
|
||||
ASSERT_MSG(buffer_id < MAX_STATIC_BUFFERS, "Invalid static buffer id");
|
||||
|
||||
@ -309,18 +291,6 @@ public:
|
||||
|
||||
u32 PopPID();
|
||||
|
||||
/**
|
||||
* @brief Pops the static buffer vaddr
|
||||
* @return The virtual address of the buffer
|
||||
* @param[out] data_size If non-null, the pointed value will be set to the size of the data
|
||||
*
|
||||
* In real services, static buffers must be set up before any IPC request using those is sent.
|
||||
* It is the duty of the process (usually services) to allocate and set up the receiving static
|
||||
* buffer information. Our HLE services do not need to set up the buffers beforehand.
|
||||
* Please note that the setup uses virtual addresses.
|
||||
*/
|
||||
[[deprecated]] VAddr PopStaticBuffer(size_t* data_size);
|
||||
|
||||
/**
|
||||
* @brief Pops a static buffer from the IPC request buffer.
|
||||
* @return The buffer that was copied from the IPC request originator.
|
||||
@ -467,14 +437,6 @@ inline u32 RequestParser::PopPID() {
|
||||
return Pop<u32>();
|
||||
}
|
||||
|
||||
inline VAddr RequestParser::PopStaticBuffer(size_t* data_size) {
|
||||
const u32 sbuffer_descriptor = Pop<u32>();
|
||||
StaticBufferDescInfo bufferInfo{sbuffer_descriptor};
|
||||
if (data_size != nullptr)
|
||||
*data_size = bufferInfo.size;
|
||||
return Pop<VAddr>();
|
||||
}
|
||||
|
||||
inline const std::vector<u8>& RequestParser::PopStaticBuffer() {
|
||||
const u32 sbuffer_descriptor = Pop<u32>();
|
||||
// Pop the address from the incoming request buffer
|
||||
|
Loading…
Reference in New Issue
Block a user