Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bootloader
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
bootloader
Commits
b53bcfd7
Verified
Commit
b53bcfd7
authored
3 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Reduce prints from UEFI bootloader
parent
45c3770d
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/os/uefi/arch/x86_64/mod.rs
+7
-5
7 additions, 5 deletions
src/os/uefi/arch/x86_64/mod.rs
with
7 additions
and
5 deletions
src/os/uefi/arch/x86_64/mod.rs
+
7
−
5
View file @
b53bcfd7
...
@@ -60,7 +60,7 @@ fn validate_rsdp(address: usize, v2: bool) -> core::result::Result<usize, Invali
...
@@ -60,7 +60,7 @@ fn validate_rsdp(address: usize, v2: bool) -> core::result::Result<usize, Invali
let
rsdp_bytes
=
unsafe
{
core
::
slice
::
from_raw_parts
(
address
as
*
const
u8
,
core
::
mem
::
size_of
::
<
Rsdp
>
())
};
let
rsdp_bytes
=
unsafe
{
core
::
slice
::
from_raw_parts
(
address
as
*
const
u8
,
core
::
mem
::
size_of
::
<
Rsdp
>
())
};
let
rsdp
=
unsafe
{
(
rsdp_bytes
.as_ptr
()
as
*
const
Rsdp
)
.as_ref
::
<
'static
>
()
.unwrap
()
};
let
rsdp
=
unsafe
{
(
rsdp_bytes
.as_ptr
()
as
*
const
Rsdp
)
.as_ref
::
<
'static
>
()
.unwrap
()
};
println
!
(
"RSDP: {:?}"
,
rsdp
);
log
::
debug
!
(
"RSDP: {:?}"
,
rsdp
);
if
rsdp
.signature
!=
*
b"RSD PTR "
{
if
rsdp
.signature
!=
*
b"RSD PTR "
{
return
Err
(
Invalid
);
return
Err
(
Invalid
);
...
@@ -114,7 +114,7 @@ fn find_acpi_table_pointers() {
...
@@ -114,7 +114,7 @@ fn find_acpi_table_pointers() {
rsdps_area
.extend
(
unsafe
{
core
::
slice
::
from_raw_parts
(
address
as
*
const
u8
,
length
)
});
rsdps_area
.extend
(
unsafe
{
core
::
slice
::
from_raw_parts
(
address
as
*
const
u8
,
length
)
});
rsdps_area
.resize
(((
rsdps_area
.len
()
+
(
align
-
1
))
/
align
)
*
align
,
0u8
);
rsdps_area
.resize
(((
rsdps_area
.len
()
+
(
align
-
1
))
/
align
)
*
align
,
0u8
);
}
}
Err
(
_
)
=>
printl
n!
(
"Found RSDP that was
n'
t valid at {:p}"
,
address
as
*
const
u8
),
Err
(
_
)
=>
log
::
war
n!
(
"Found RSDP that was
no
t valid at {:p}"
,
address
as
*
const
u8
),
}
}
}
}
}
}
...
@@ -171,8 +171,11 @@ impl Os<
...
@@ -171,8 +171,11 @@ impl Os<
match
redoxfs
::
FileSystem
::
open
(
block_io
,
Some
(
0
))
{
match
redoxfs
::
FileSystem
::
open
(
block_io
,
Some
(
0
))
{
Ok
(
ok
)
=>
return
ok
,
Ok
(
ok
)
=>
return
ok
,
Err
(
err
)
=>
{
Err
(
err
)
=>
match
err
.errno
{
log
::
warn!
(
"Failed to open RedoxFS on block I/O {}: {}"
,
i
,
err
);
// Ignore header not found error
syscall
::
ENOENT
=>
(),
// Print any other errors
_
=>
log
::
error!
(
"Failed to open RedoxFS on block I/O {}: {}"
,
i
,
err
),
}
}
}
}
}
}
...
@@ -278,7 +281,6 @@ pub fn main() -> Result<()> {
...
@@ -278,7 +281,6 @@ pub fn main() -> Result<()> {
st
:
std
::
system_table
(),
st
:
std
::
system_table
(),
};
};
println!
(
"Parsing and writing ACPI RSDP structures."
);
find_acpi_table_pointers
();
find_acpi_table_pointers
();
let
(
page_phys
,
mut
args
)
=
crate
::
main
(
&
mut
os
);
let
(
page_phys
,
mut
args
)
=
crate
::
main
(
&
mut
os
);
...
...
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