Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
redox-os
bootloader
Commits
b53bcfd7
Verified
Commit
b53bcfd7
authored
Feb 10, 2022
by
Jeremy Soller
Browse files
Reduce prints from UEFI bootloader
parent
45c3770d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/os/uefi/arch/x86_64/mod.rs
View file @
b53bcfd7
...
...
@@ -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
=
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 "
{
return
Err
(
Invalid
);
...
...
@@ -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
.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<
match
redoxfs
::
FileSystem
::
open
(
block_io
,
Some
(
0
))
{
Ok
(
ok
)
=>
return
ok
,
Err
(
err
)
=>
{
log
::
warn!
(
"Failed to open RedoxFS on block I/O {}: {}"
,
i
,
err
);
Err
(
err
)
=>
match
err
.errno
{
// 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<()> {
st
:
std
::
system_table
(),
};
println!
(
"Parsing and writing ACPI RSDP structures."
);
find_acpi_table_pointers
();
let
(
page_phys
,
mut
args
)
=
crate
::
main
(
&
mut
os
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment