Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osv
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
Service Desk
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
Verlässliche Systemsoftware
projects
osv
Commits
5f8652e9
Commit
5f8652e9
authored
11 years ago
by
Avi Kivity
Browse files
Options
Downloads
Patches
Plain Diff
apic: add read() method
parent
f496f7a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arch/x64/apic.cc
+6
-0
6 additions, 0 deletions
arch/x64/apic.cc
arch/x64/apic.hh
+1
-0
1 addition, 0 deletions
arch/x64/apic.hh
with
7 additions
and
0 deletions
arch/x64/apic.cc
+
6
−
0
View file @
5f8652e9
...
@@ -7,6 +7,7 @@ class x2apic : public apic_driver {
...
@@ -7,6 +7,7 @@ class x2apic : public apic_driver {
public:
public:
explicit
x2apic
();
explicit
x2apic
();
virtual
void
init_on_ap
();
virtual
void
init_on_ap
();
virtual
u32
read
(
apicreg
reg
);
virtual
void
write
(
apicreg
reg
,
u32
value
);
virtual
void
write
(
apicreg
reg
,
u32
value
);
virtual
void
self_ipi
(
unsigned
vector
);
virtual
void
self_ipi
(
unsigned
vector
);
virtual
void
ipi
(
unsigned
apic_id
,
unsigned
vector
);
virtual
void
ipi
(
unsigned
apic_id
,
unsigned
vector
);
...
@@ -75,6 +76,11 @@ void x2apic::eoi()
...
@@ -75,6 +76,11 @@ void x2apic::eoi()
wrmsr
(
msr
::
X2APIC_EOI
,
0
);
wrmsr
(
msr
::
X2APIC_EOI
,
0
);
}
}
u32
x2apic
::
read
(
apicreg
reg
)
{
return
processor
::
rdmsr
(
0x800
+
unsigned
(
reg
)
/
0x10
);
}
void
x2apic
::
write
(
apicreg
reg
,
u32
value
)
void
x2apic
::
write
(
apicreg
reg
,
u32
value
)
{
{
processor
::
wrmsr
(
0x800
+
unsigned
(
reg
)
/
0x10
,
value
);
processor
::
wrmsr
(
0x800
+
unsigned
(
reg
)
/
0x10
,
value
);
...
...
This diff is collapsed.
Click to expand it.
arch/x64/apic.hh
+
1
−
0
View file @
5f8652e9
...
@@ -83,6 +83,7 @@ public:
...
@@ -83,6 +83,7 @@ public:
virtual
void
ipi_allbutself
(
unsigned
vector
)
=
0
;
virtual
void
ipi_allbutself
(
unsigned
vector
)
=
0
;
virtual
void
nmi_allbutself
()
=
0
;
virtual
void
nmi_allbutself
()
=
0
;
virtual
void
eoi
()
=
0
;
virtual
void
eoi
()
=
0
;
virtual
u32
read
(
apicreg
reg
)
=
0
;
virtual
void
write
(
apicreg
reg
,
u32
value
)
=
0
;
virtual
void
write
(
apicreg
reg
,
u32
value
)
=
0
;
virtual
u32
id
()
=
0
;
virtual
u32
id
()
=
0
;
void
set_lvt
(
apiclvt
reg
,
unsigned
vector
);
void
set_lvt
(
apiclvt
reg
,
unsigned
vector
);
...
...
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