Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
a272803d
There was an error fetching the commit references. Please try again later.
Commit
a272803d
authored
10 years ago
by
bunnei
Browse files
Options
Downloads
Patches
Plain Diff
added preliminary DataSynchronizationBarrier support with simple DMA copy
parent
25d595d8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/hle/mrc.cpp
+39
-7
39 additions, 7 deletions
src/core/hle/mrc.cpp
with
39 additions
and
7 deletions
src/core/hle/mrc.cpp
+
39
−
7
View file @
a272803d
#include
"mrc.h"
#include
"hle.h"
// Copyright 2014 Citra Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
#include
"core/hle/mrc.h"
#include
"core/hle/hle.h"
#include
"core/mem_map.h"
#include
"core/core.h"
namespace
HLE
{
enum
{
CMD_GX_REQUEST_DMA
=
0x00000000
,
};
/// Data synchronization barrier
u32
DataSynchronizationBarrier
(
u32
*
command_buffer
)
{
u32
command
=
command_buffer
[
0
];
switch
(
command
)
{
case
CMD_GX_REQUEST_DMA
:
{
u32
*
src
=
(
u32
*
)
Memory
::
GetPointer
(
command_buffer
[
1
]);
u32
*
dst
=
(
u32
*
)
Memory
::
GetPointer
(
command_buffer
[
2
]);
u32
size
=
command_buffer
[
3
];
memcpy
(
dst
,
src
,
size
);
}
break
;
default
:
ERROR_LOG
(
OSHLE
,
"MRC::DataSynchronizationBarrier unknown command 0x%08X"
,
command
);
return
-
1
;
}
return
0
;
}
/// Returns the coprocessor (in this case, syscore) command buffer pointer
Addr
Call
GetThreadCommandBuffer
()
{
Addr
GetThreadCommandBuffer
()
{
// Called on insruction: mrc p15, 0, r0, c13, c0, 3
// Returns an address in OSHLE memory for the CPU to read/write to
RETURN
(
CMD_BUFFER_ADDR
);
...
...
@@ -16,14 +49,13 @@ u32 CallMRC(ARM11_MRC_OPERATION operation) {
switch
(
operation
)
{
case
DATA_SYNCHRONIZATION_BARRIER
:
ERROR_LOG
(
OSHLE
,
"Unimplemented MRC operation DATA_SYNCHRONIZATION_BARRIER"
);
break
;
return
DataSynchronizationBarrier
((
u32
*
)
Memory
::
GetPointer
(
PARAM
(
0
)));
case
CALL_GET_THREAD_COMMAND_BUFFER
:
return
Call
GetThreadCommandBuffer
();
return
GetThreadCommandBuffer
();
default:
ERROR_LOG
(
OSHLE
,
"
U
nimplemented MRC operation 0x%02X"
,
operation
);
ERROR_LOG
(
OSHLE
,
"
u
nimplemented MRC operation 0x%02X"
,
operation
);
break
;
}
return
-
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment