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
92305f99
Verified
Commit
92305f99
authored
3 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Use EDID active protocol instead
parent
426fc818
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/os/uefi/arch/x86_64/mod.rs
+3
-3
3 additions, 3 deletions
src/os/uefi/arch/x86_64/mod.rs
src/os/uefi/display.rs
+9
-8
9 additions, 8 deletions
src/os/uefi/display.rs
with
12 additions
and
11 deletions
src/os/uefi/arch/x86_64/mod.rs
+
3
−
3
View file @
92305f99
...
...
@@ -17,7 +17,7 @@ use crate::{
use
super
::
super
::{
disk
::
DiskEfi
,
display
::{
Edid
Discovered
,
Output
},
display
::{
Edid
Active
,
Output
},
};
use
self
::
memory_map
::{
MemoryMapIter
,
memory_map
};
...
...
@@ -138,7 +138,7 @@ impl Os<
fn
name
(
&
self
)
->
&
str
{
"x86_64/UEFI"
}
fn
alloc_zeroed_page_aligned
(
&
self
,
size
:
usize
)
->
*
mut
u8
{
assert!
(
size
!=
0
);
...
...
@@ -206,7 +206,7 @@ impl Os<
fn
best_resolution
(
&
self
)
->
Option
<
(
u32
,
u32
)
>
{
//TODO: get this per output
match
Edid
Discovered
::
one
()
{
match
Edid
Active
::
one
()
{
Ok
(
efi_edid
)
=>
{
let
edid
=
unsafe
{
slice
::
from_raw_parts
(
efi_edid
.0
.Edid
,
efi_edid
.0
.SizeOfEdid
as
usize
)
...
...
This diff is collapsed.
Click to expand it.
src/os/uefi/display.rs
+
9
−
8
View file @
92305f99
...
...
@@ -14,24 +14,25 @@ impl Protocol<GraphicsOutput> for Output {
}
}
const
EDID_
DISCOVERED
_PROTOCOL_GUID
:
Guid
=
Guid
(
0x
1c0c34f
6
,
0x
d380
,
0x4
1fa
,
[
0x
a0
,
0x
49
,
0x
8
a
,
0x
d0
,
0x
6c
,
0x1
a
,
0x
66
,
0x
aa
]
const
EDID_
ACTIVE
_PROTOCOL_GUID
:
Guid
=
Guid
(
0x
bd8c105
6
,
0x
9f36
,
0x4
4ec
,
[
0x
92
,
0x
a8
,
0xa
6
,
0x
33
,
0x
7f
,
0x
8
1
,
0x
79
,
0x
86
]
);
#[allow(non_snake_case)]
#[repr(C)]
pub
struct
Edid
Discovered
Protocol
{
pub
struct
Edid
Active
Protocol
{
pub
SizeOfEdid
:
u32
,
pub
Edid
:
*
const
u8
,
}
pub
struct
Edid
Discovered
(
pub
&
'static
mut
Edid
Discovered
Protocol
);
pub
struct
Edid
Active
(
pub
&
'static
mut
Edid
Active
Protocol
);
impl
Protocol
<
Edid
Discovered
Protocol
>
for
Edid
Discovered
{
impl
Protocol
<
Edid
Active
Protocol
>
for
Edid
Active
{
fn
guid
()
->
Guid
{
EDID_
DISCOVERED
_PROTOCOL_GUID
EDID_
ACTIVE
_PROTOCOL_GUID
}
fn
new
(
inner
:
&
'static
mut
Edid
Discovered
Protocol
)
->
Self
{
Edid
Discovered
(
inner
)
fn
new
(
inner
:
&
'static
mut
Edid
Active
Protocol
)
->
Self
{
Edid
Active
(
inner
)
}
}
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