Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
10183_BOOT
OSKernel2024-10183_BOOT
Commits
94496468
Commit
94496468
authored
13 years ago
by
Frans Kaashoek
Browse files
Options
Download
Patches
Plain Diff
Use 4Mbyte pages during boot
parent
843eecfc
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
entry.S
+5
-0
entry.S
entryother.S
+5
-1
entryother.S
main.c
+3
-1034
main.c
mmu.h
+2
-0
mmu.h
with
15 additions
and
1035 deletions
+15
-1035
entry.S
+
5
−
0
View file @
94496468
...
...
@@ -39,6 +39,11 @@ multiboot_header:
#
Multiboot
entry
point
.
Machine
is
mostly
set
up
.
.
globl
multiboot_entry
multiboot_entry
:
#
Turn
on
page
size
extension
for
4
Mbyte
pages
movl
%
cr4
,
%
eax
orl
$
(
CR4_PSE
),
%
eax
movl
%
eax
,
%
cr4
#
Set
page
directory
movl
$
(
V2P_WO
(
bootpgdir
)),
%
eax
movl
%
eax
,
%
cr3
#
Turn
on
paging
.
...
...
This diff is collapsed.
Click to expand it.
entryother.S
+
5
−
1
View file @
94496468
...
...
@@ -50,6 +50,10 @@ start32:
movw
%
ax
,
%
fs
movw
%
ax
,
%
gs
#
Turn
on
page
size
extension
for
4
Mbyte
pages
movl
%
cr4
,
%
eax
orl
$
(
CR4_PSE
),
%
eax
movl
%
eax
,
%
cr4
#
Use
bootpgdir
as
our
initial
page
table
movl
(
start
-
12
),
%
eax
movl
%
eax
,
%
cr3
...
...
@@ -58,7 +62,7 @@ start32:
orl
$
(
CR0_PE|CR0_PG|CR0_WP
),
%
eax
movl
%
eax
,
%
cr0
#
Switch
to
the
stack
allocated
by
entr
y
others
()
#
Switch
to
the
stack
allocated
by
ent
e
rothers
()
movl
(
start
-
4
),
%
esp
#
Call
mpboot
()
call
*(
start
-
8
)
...
...
This diff is collapsed.
Click to expand it.
main.c
+
3
−
1034
View file @
94496468
This diff is collapsed.
Click to expand it.
mmu.h
+
2
−
0
View file @
94496468
...
...
@@ -37,6 +37,8 @@
#define CR0_CD 0x40000000 // Cache Disable
#define CR0_PG 0x80000000 // Paging
#define CR4_PSE 0x00000010 // Page size extension
#define SEG_KCODE 1 // kernel code
#define SEG_KDATA 2 // kernel data+stack
#define SEG_KCPU 3 // kernel per-cpu data
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets