Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
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
ACS
Public
HermitOS
kernel
Commits
067a832f
Commit
067a832f
authored
1 year ago
by
Stefan Lankes
Browse files
Options
Downloads
Patches
Plain Diff
remove obsolete function `detect_from_uhyve`
parent
32510fd5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/arch/x86_64/kernel/apic.rs
+6
-17
6 additions, 17 deletions
src/arch/x86_64/kernel/apic.rs
with
6 additions
and
17 deletions
src/arch/x86_64/kernel/apic.rs
+
6
−
17
View file @
067a832f
...
...
@@ -265,7 +265,7 @@ fn detect_from_acpi() -> Result<PhysAddr, ()> {
#[cfg(feature
=
"acpi"
)]
fn
detect_from_acpi
()
->
Result
<
PhysAddr
,
()
>
{
// Get the Multiple APIC Description Table (MADT) from the ACPI information and its specific table header.
let
madt
=
acpi
::
get_madt
()
.
expect
(
"HermitCore requires a MADT in the ACPI tables"
)
;
let
madt
=
acpi
::
get_madt
()
.
ok_or
(())
?
;
let
madt_header
=
unsafe
{
&*
(
madt
.table_start_address
()
as
*
const
AcpiMadtHeader
)
};
// Jump to the actual table entries (after the table header).
...
...
@@ -429,24 +429,14 @@ fn default_apic() -> PhysAddr {
let
default_address
=
PhysAddr
(
0xFEE0_0000
);
init_ioapic_address
(
default_address
);
// currently, uhyve doesn't support an IO-APIC
if
!
env
::
is_uhyve
()
{
init_ioapic_address
(
default_address
);
}
default_address
}
fn
detect_from_uhyve
()
->
Result
<
PhysAddr
,
()
>
{
if
env
::
is_uhyve
()
{
let
default_address
=
PhysAddr
(
0xFEE0_0000
);
// currently, uhyve doesn't support an IO-APIC
//init_ioapic_address(default_address);
Ok
(
default_address
)
}
else
{
Err
(())
}
}
#[no_mangle]
pub
extern
"C"
fn
eoi
()
{
local_apic_write
(
IA32_X2APIC_EOI
,
APIC_EOI_ACK
);
...
...
@@ -454,8 +444,7 @@ pub extern "C" fn eoi() {
pub
fn
init
()
{
// Detect CPUs and APICs.
let
local_apic_physical_address
=
detect_from_uhyve
()
.or_else
(|
_
|
detect_from_acpi
())
let
local_apic_physical_address
=
detect_from_acpi
()
.or_else
(|
_
|
detect_from_mp
())
.unwrap_or_else
(|
_
|
default_apic
());
...
...
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