Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kernel
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
Container Registry
Model registry
Operate
Environments
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
redox-os
kernel
Commits
5490de9f
Commit
5490de9f
authored
4 years ago
by
Jacob Lorentzon
Browse files
Options
Downloads
Patches
Plain Diff
Fix a page fault.
parent
de4b6615
No related branches found
No related tags found
1 merge request
!117
Support the I/O APIC alongside the 8259 PIC
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/arch/x86_64/start.rs
+5
-3
5 additions, 3 deletions
src/arch/x86_64/start.rs
with
5 additions
and
3 deletions
src/arch/x86_64/start.rs
+
5
−
3
View file @
5490de9f
...
@@ -70,6 +70,8 @@ pub unsafe extern fn kstart(args_ptr: *const KernelArgs) -> ! {
...
@@ -70,6 +70,8 @@ pub unsafe extern fn kstart(args_ptr: *const KernelArgs) -> ! {
let
stack_size
=
args
.stack_size
as
usize
;
let
stack_size
=
args
.stack_size
as
usize
;
let
env_base
=
args
.env_base
as
usize
;
let
env_base
=
args
.env_base
as
usize
;
let
env_size
=
args
.env_size
as
usize
;
let
env_size
=
args
.env_size
as
usize
;
let
acpi_rsdps_base
=
args
.acpi_rsdps_base
;
let
acpi_rsdps_size
=
args
.acpi_rsdps_size
;
// BSS should already be zero
// BSS should already be zero
{
{
...
@@ -83,10 +85,10 @@ pub unsafe extern fn kstart(args_ptr: *const KernelArgs) -> ! {
...
@@ -83,10 +85,10 @@ pub unsafe extern fn kstart(args_ptr: *const KernelArgs) -> ! {
println!
(
"Kernel: {:X}:{:X}"
,
kernel_base
,
kernel_base
+
kernel_size
);
println!
(
"Kernel: {:X}:{:X}"
,
kernel_base
,
kernel_base
+
kernel_size
);
println!
(
"Stack: {:X}:{:X}"
,
stack_base
,
stack_base
+
stack_size
);
println!
(
"Stack: {:X}:{:X}"
,
stack_base
,
stack_base
+
stack_size
);
println!
(
"Env: {:X}:{:X}"
,
env_base
,
env_base
+
env_size
);
println!
(
"Env: {:X}:{:X}"
,
env_base
,
env_base
+
env_size
);
println!
(
"RSDPs: {:X}:{:X}"
,
args
.
acpi_rsdps_base
,
args
.
acpi_rsdps_base
+
args
.
acpi_rsdps_size
);
println!
(
"RSDPs: {:X}:{:X}"
,
acpi_rsdps_base
,
acpi_rsdps_base
+
acpi_rsdps_size
);
let
ext_mem_ranges
=
if
args
.acpi_rsdps_base
!=
0
&&
args
.acpi_rsdps_size
>
0
{
let
ext_mem_ranges
=
if
args
.acpi_rsdps_base
!=
0
&&
args
.acpi_rsdps_size
>
0
{
Some
([(
args
.
acpi_rsdps_base
as
usize
,
args
.
acpi_rsdps_size
as
usize
)])
Some
([(
acpi_rsdps_base
as
usize
,
acpi_rsdps_size
as
usize
)])
}
else
{
}
else
{
None
None
};
};
...
@@ -143,7 +145,7 @@ pub unsafe extern fn kstart(args_ptr: *const KernelArgs) -> ! {
...
@@ -143,7 +145,7 @@ pub unsafe extern fn kstart(args_ptr: *const KernelArgs) -> ! {
// Read ACPI tables, starts APs
// Read ACPI tables, starts APs
#[cfg(feature
=
"acpi"
)]
#[cfg(feature
=
"acpi"
)]
{
{
acpi
::
init
(
&
mut
active_table
,
if
args
.
acpi_rsdps_base
!=
0
&&
args
.
acpi_rsdps_size
>
0
{
Some
((
args
.
acpi_rsdps_base
,
args
.
acpi_rsdps_size
))
}
else
{
None
});
acpi
::
init
(
&
mut
active_table
,
if
acpi_rsdps_base
!=
0
&&
acpi_rsdps_size
>
0
{
Some
((
acpi_rsdps_base
,
acpi_rsdps_size
))
}
else
{
None
});
device
::
init_after_acpi
(
&
mut
active_table
);
device
::
init_after_acpi
(
&
mut
active_table
);
}
}
...
...
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