Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libtcg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container 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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anton
libtcg
Commits
626c7a17
Commit
626c7a17
authored
12 years ago
by
Alexander Graf
Browse files
Options
Downloads
Patches
Plain Diff
xen_platform: convert PIO to new memory api read/write
Signed-off-by:
Alexander Graf
<
agraf@suse.de
>
parent
360d613e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hw/xen_platform.c
+38
-10
38 additions, 10 deletions
hw/xen_platform.c
with
38 additions
and
10 deletions
hw/xen_platform.c
+
38
−
10
View file @
626c7a17
...
...
@@ -228,18 +228,46 @@ static void platform_fixed_ioport_reset(void *opaque)
platform_fixed_ioport_writeb
(
s
,
0
,
0
);
}
const
MemoryRegionPortio
xen_platform_ioport
[]
=
{
{
0
,
16
,
4
,
.
write
=
platform_fixed_ioport_writel
,
},
{
0
,
16
,
2
,
.
write
=
platform_fixed_ioport_writew
,
},
{
0
,
16
,
1
,
.
write
=
platform_fixed_ioport_writeb
,
},
{
0
,
16
,
2
,
.
read
=
platform_fixed_ioport_readw
,
},
{
0
,
16
,
1
,
.
read
=
platform_fixed_ioport_readb
,
},
PORTIO_END_OF_LIST
()
};
static
uint64_t
platform_fixed_ioport_read
(
void
*
opaque
,
hwaddr
addr
,
unsigned
size
)
{
switch
(
size
)
{
case
1
:
return
platform_fixed_ioport_readb
(
opaque
,
addr
);
case
2
:
return
platform_fixed_ioport_readw
(
opaque
,
addr
);
default:
return
-
1
;
}
}
static
void
platform_fixed_ioport_write
(
void
*
opaque
,
hwaddr
addr
,
uint64_t
val
,
unsigned
size
)
{
switch
(
size
)
{
case
1
:
platform_fixed_ioport_writeb
(
opaque
,
addr
,
val
);
break
;
case
2
:
platform_fixed_ioport_writew
(
opaque
,
addr
,
val
);
break
;
case
4
:
platform_fixed_ioport_writel
(
opaque
,
addr
,
val
);
break
;
}
}
static
const
MemoryRegionOps
platform_fixed_io_ops
=
{
.
old_portio
=
xen_platform_ioport
,
.
endianness
=
DEVICE_NATIVE_ENDIAN
,
.
read
=
platform_fixed_ioport_read
,
.
write
=
platform_fixed_ioport_write
,
.
impl
=
{
.
min_access_size
=
1
,
.
max_access_size
=
4
,
},
.
endianness
=
DEVICE_LITTLE_ENDIAN
,
};
static
void
platform_fixed_ioport_init
(
PCIXenPlatformState
*
s
)
...
...
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