Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
57be9f38
Commit
57be9f38
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 2.1.48pre2
parent
1c7c1c52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
arch/i386/mm/init.c
arch/i386/mm/init.c
+5
-5
No files found.
arch/i386/mm/init.c
View file @
57be9f38
...
...
@@ -209,7 +209,7 @@ __initfunc(unsigned long paging_init(unsigned long start_mem, unsigned long end_
pgd_val
(
pg_dir
[
0
])
=
0
;
/* Map whole memory from 0xC0000000 */
pg_dir
+=
768
;
while
(
address
<
end_mem
)
{
/*
* If we're running on a Pentium CPU, we can use the 4MB
...
...
@@ -224,13 +224,13 @@ __initfunc(unsigned long paging_init(unsigned long start_mem, unsigned long end_
set_in_cr4
(
X86_CR4_PSE
);
wp_works_ok
=
1
;
__pe
=
_
PAGE
_TABLE
+
_PAGE_4M
+
__pa
(
address
);
__pe
=
_
KERNPG
_TABLE
+
_PAGE_4M
+
__pa
(
address
);
/* Make it "global" too if supported */
if
(
x86_capability
&
X86_FEATURE_PGE
)
{
set_in_cr4
(
X86_CR4_PGE
);
__pe
+=
_PAGE_GLOBAL
;
}
pgd_val
(
pg_dir
[
768
]
)
=
__pe
;
pgd_val
(
*
pg_dir
)
=
__pe
;
pg_dir
++
;
address
+=
4
*
1024
*
1024
;
continue
;
...
...
@@ -239,13 +239,13 @@ __initfunc(unsigned long paging_init(unsigned long start_mem, unsigned long end_
* We're on a [34]86, use normal page tables.
* pg_table is physical at this point
*/
pg_table
=
(
pte_t
*
)
(
PAGE_MASK
&
pgd_val
(
pg_dir
[
768
]
));
pg_table
=
(
pte_t
*
)
(
PAGE_MASK
&
pgd_val
(
*
pg_dir
));
if
(
!
pg_table
)
{
pg_table
=
(
pte_t
*
)
__pa
(
start_mem
);
start_mem
+=
PAGE_SIZE
;
}
pgd_val
(
pg_dir
[
768
]
)
=
_PAGE_TABLE
|
(
unsigned
long
)
pg_table
;
pgd_val
(
*
pg_dir
)
=
_PAGE_TABLE
|
(
unsigned
long
)
pg_table
;
pg_dir
++
;
/* now change pg_table to kernel virtual addresses */
pg_table
=
(
pte_t
*
)
__va
(
pg_table
);
...
...
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