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
bbc4a4ae
Verified
Commit
bbc4a4ae
authored
3 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
workaround for crash on graphical debug finish
parent
3f2a9f7f
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/arch/x86_64/graphical_debug/mod.rs
+6
-4
6 additions, 4 deletions
src/arch/x86_64/graphical_debug/mod.rs
with
6 additions
and
4 deletions
src/arch/x86_64/graphical_debug/mod.rs
+
6
−
4
View file @
bbc4a4ae
...
@@ -62,14 +62,16 @@ pub fn init(active_table: &mut ActivePageTable) {
...
@@ -62,14 +62,16 @@ pub fn init(active_table: &mut ActivePageTable) {
}
}
pub
fn
fini
(
active_table
:
&
mut
ActivePageTable
)
{
pub
fn
fini
(
active_table
:
&
mut
ActivePageTable
)
{
if
let
Some
(
debug_display
)
=
DEBUG_DISPLAY
.lock
()
.take
()
{
let
debug_display_opt
=
DEBUG_DISPLAY
.lock
()
.take
();
if
let
Some
(
debug_display
)
=
debug_display_opt
{
let
display
=
debug_display
.into_display
();
let
display
=
debug_display
.into_display
();
let
onscreen
=
display
.onscreen
.as_mut_ptr
()
as
usize
;
let
onscreen
=
display
.onscreen
.as_mut_ptr
()
as
usize
;
let
size
=
display
.width
*
display
.height
;
let
size
=
display
.onscreen
.len
()
*
4
;
{
//TODO: fix crash if we unmap this memory
if
false
{
let
flush_all
=
PageFlushAll
::
new
();
let
flush_all
=
PageFlushAll
::
new
();
let
start_page
=
Page
::
containing_address
(
VirtualAddress
::
new
(
onscreen
));
let
start_page
=
Page
::
containing_address
(
VirtualAddress
::
new
(
onscreen
));
let
end_page
=
Page
::
containing_address
(
VirtualAddress
::
new
(
onscreen
+
size
*
4
));
let
end_page
=
Page
::
containing_address
(
VirtualAddress
::
new
(
onscreen
+
size
));
for
page
in
Page
::
range_inclusive
(
start_page
,
end_page
)
{
for
page
in
Page
::
range_inclusive
(
start_page
,
end_page
)
{
let
(
result
,
_frame
)
=
active_table
.unmap_return
(
page
,
false
);
let
(
result
,
_frame
)
=
active_table
.unmap_return
(
page
,
false
);
flush_all
.consume
(
result
);
flush_all
.consume
(
result
);
...
...
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