Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kernel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
10
Merge Requests
10
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
redox-os
kernel
Commits
257e4a6e
Verified
Commit
257e4a6e
authored
Jan 01, 2019
by
Jeremy Soller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: improve speed of Grant::map_inactive
Use recursive page table address to calculate p4 entry
parent
8fcbf152
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
src/arch/x86_64/paging/table.rs
src/arch/x86_64/paging/table.rs
+1
-1
src/context/memory.rs
src/context/memory.rs
+2
-1
No files found.
src/arch/x86_64/paging/table.rs
View file @
257e4a6e
...
...
@@ -9,7 +9,7 @@ use memory::allocate_frames;
use
super
::
entry
::{
EntryFlags
,
Entry
};
use
super
::
ENTRY_COUNT
;
pub
const
P4
:
*
mut
Table
<
Level4
>
=
0xffff_ffff_ffff_f000
as
*
mut
_
;
pub
const
P4
:
*
mut
Table
<
Level4
>
=
(::
RECURSIVE_PAGE_OFFSET
|
0x7ffffff000
)
as
*
mut
_
;
pub
trait
TableLevel
{}
...
...
src/context/memory.rs
View file @
257e4a6e
...
...
@@ -3,6 +3,7 @@ use alloc::collections::VecDeque;
use
core
::
intrinsics
;
use
spin
::
Mutex
;
use
arch
::
paging
::
PAGE_SIZE
;
use
ipi
::{
ipi
,
IpiKind
,
IpiTarget
};
use
memory
::
Frame
;
use
paging
::{
ActivePageTable
,
InactivePageTable
,
Page
,
PageIter
,
PhysicalAddress
,
VirtualAddress
};
...
...
@@ -67,7 +68,7 @@ impl Grant {
pub
fn
map_inactive
(
from
:
VirtualAddress
,
to
:
VirtualAddress
,
size
:
usize
,
flags
:
EntryFlags
,
new_table
:
&
mut
InactivePageTable
,
temporary_page
:
&
mut
TemporaryPage
)
->
Grant
{
let
mut
active_table
=
unsafe
{
ActivePageTable
::
new
()
};
let
mut
frames
=
VecDeque
::
new
(
);
let
mut
frames
=
VecDeque
::
with_capacity
(
size
/
PAGE_SIZE
);
let
start_page
=
Page
::
containing_address
(
from
);
let
end_page
=
Page
::
containing_address
(
VirtualAddress
::
new
(
from
.get
()
+
size
-
1
));
...
...
Write
Preview
Markdown
is supported
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