summaryrefslogtreecommitdiff
path: root/src/core/hle/mrc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/mrc.cpp')
-rw-r--r--src/core/hle/mrc.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/core/hle/mrc.cpp b/src/core/hle/mrc.cpp
new file mode 100644
index 000000000..04d6cb5a5
--- /dev/null
+++ b/src/core/hle/mrc.cpp
@@ -0,0 +1,32 @@
1#include "mrc.h"
2#include "hle.h"
3
4namespace HLE {
5
6/// Returns the coprocessor (in this case, syscore) command buffer pointer
7Addr CallGetThreadCommandBuffer() {
8 // Called on insruction: mrc p15, 0, r0, c13, c0, 3
9 // Returns an address in OSHLE memory for the CPU to read/write to
10 RETURN(CMD_BUFFER_ADDR);
11 return CMD_BUFFER_ADDR;
12}
13
14/// Call an MRC operation in HLE
15u32 CallMRC(ARM11_MRC_OPERATION operation) {
16 switch (operation) {
17
18 case DATA_SYNCHRONIZATION_BARRIER:
19 ERROR_LOG(OSHLE, "Unimplemented MRC operation DATA_SYNCHRONIZATION_BARRIER");
20 break;
21
22 case CALL_GET_THREAD_COMMAND_BUFFER:
23 return CallGetThreadCommandBuffer();
24
25 default:
26 ERROR_LOG(OSHLE, "Unimplemented MRC operation 0x%02X", operation);
27 break;
28 }
29 return -1;
30}
31
32} // namespace