- removed HLE mem "hack" and replaced with kernel mem region
- added a helper function for getting command buffer for services - fixed bug where GSP DMA was incorrectly being done in DataSynchronizationBarrier (instead of gsp_TriggerCmdReqQueue)
This commit is contained in:
parent
f23e99bb85
commit
72622a1b5a
8 changed files with 100 additions and 116 deletions
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "common/common.h"
|
||||
#include "common/common_types.h"
|
||||
#include "core/mem_map.h"
|
||||
#include "core/hle/syscall.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -22,6 +23,15 @@ typedef s32 NativeUID; ///< Native handle for a service
|
|||
static const int kMaxPortSize = 0x08; ///< Maximum size of a port name (8 characters)
|
||||
static const int kCommandHeaderOffset = 0x80; ///< Offset into command buffer of header
|
||||
|
||||
/**
|
||||
* Returns a pointer to the command buffer in kernel memory
|
||||
* @param offset Optional offset into command buffer
|
||||
* @return Pointer to command buffer
|
||||
*/
|
||||
inline static u32* GetCommandBuffer(const int offset=0) {
|
||||
return (u32*)Memory::GetPointer(Memory::KERNEL_MEMORY_VADDR + kCommandHeaderOffset + offset);
|
||||
}
|
||||
|
||||
class Manager;
|
||||
|
||||
/// Interface to a CTROS service
|
||||
|
@ -81,7 +91,7 @@ public:
|
|||
* @return Return result of svcSendSyncRequest passed back to user app
|
||||
*/
|
||||
Syscall::Result Sync() {
|
||||
u32* cmd_buff = (u32*)HLE::GetPointer(HLE::CMD_BUFFER_ADDR + kCommandHeaderOffset);
|
||||
u32* cmd_buff = GetCommandBuffer();
|
||||
auto itr = m_functions.find(cmd_buff[0]);
|
||||
|
||||
if (itr == m_functions.end()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue