Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSEP551
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
Krishna Vinnakota
CSEP551
Commits
3431cd49
Commit
3431cd49
authored
8 years ago
by
Robert Morris
Browse files
Options
Downloads
Patches
Plain Diff
more comments in entryother.S
parent
0a69dc9b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
entryother.S
+17
-11
17 additions, 11 deletions
entryother.S
main.c
+5
-4
5 additions, 4 deletions
main.c
with
22 additions
and
15 deletions
entryother.S
+
17
−
11
View file @
3431cd49
...
...
@@ -17,37 +17,43 @@
#
place
to
jump
to
(
mpenter
)
in
start
-
8
,
and
the
physical
address
#
of
entrypgdir
in
start
-
12
.
#
#
This
code
is
identical
to
bootasm
.
S
except
:
#
-
it
does
not
need
to
enable
A20
#
-
it
uses
the
address
at
start
-
4
,
start
-
8
,
and
start
-
12
#
This
code
combines
elements
of
bootasm
.
S
and
entry
.
S
.
.
code16
.
globl
start
start
:
cli
#
Zero
data
segment
registers
DS
,
ES
,
and
SS
.
xorw
%
ax
,%
ax
movw
%
ax
,%
ds
movw
%
ax
,%
es
movw
%
ax
,%
ss
#
Switch
from
real
to
protected
mode
.
Use
a
bootstrap
GDT
that
makes
#
virtual
addresses
map
directly
to
physical
addresses
so
that
the
#
effective
memory
map
doesn
't change during the transition.
lgdt
gdtdesc
movl
%
cr0
,
%
eax
orl
$CR0_PE
,
%
eax
movl
%
eax
,
%
cr0
//
PAGEBREAK
!
#
Complete
the
transition
to
32
-
bit
protected
mode
by
using
a
long
jmp
#
to
reload
%
cs
and
%
eip
.
The
segment
descriptors
are
set
up
with
no
#
translation
,
so
that
the
mapping
is
still
the
identity
mapping
.
ljmpl
$
(
SEG_KCODE
<<
3
),
$
(
start32
)
.
code32
.
code32
#
Tell
assembler
to
generate
32
-
bit
code
now
.
start32
:
movw
$
(
SEG_KDATA
<<
3
),
%
ax
movw
%
ax
,
%
ds
movw
%
ax
,
%
es
movw
%
ax
,
%
ss
movw
$
0
,
%
ax
movw
%
ax
,
%
fs
movw
%
ax
,
%
gs
#
Set
up
the
protected
-
mode
data
segment
registers
movw
$
(
SEG_KDATA
<<
3
),
%
ax
#
Our
data
segment
selector
movw
%
ax
,
%
ds
#
->
DS
:
Data
Segment
movw
%
ax
,
%
es
#
->
ES
:
Extra
Segment
movw
%
ax
,
%
ss
#
->
SS
:
Stack
Segment
movw
$
0
,
%
ax
#
Zero
segments
not
ready
for
use
movw
%
ax
,
%
fs
#
->
FS
movw
%
ax
,
%
gs
#
->
GS
#
Turn
on
page
size
extension
for
4
Mbyte
pages
movl
%
cr4
,
%
eax
...
...
This diff is collapsed.
Click to expand it.
main.c
+
5
−
4
View file @
3431cd49
...
...
@@ -98,10 +98,11 @@ startothers(void)
}
}
// Boot page table used in entry.S and entryother.S.
// Page directories (and page tables), must start on a page boundary,
// hence the "__aligned__" attribute.
// Use PTE_PS in page directory entry to enable 4Mbyte pages.
// The boot page table used in entry.S and entryother.S.
// Page directories (and page tables) must start on page boundaries,
// hence the __aligned__ attribute.
// PTE_PS in a page directory entry enables 4Mbyte pages.
__attribute__
((
__aligned__
(
PGSIZE
)))
pde_t
entrypgdir
[
NPDENTRIES
]
=
{
// Map VA's [0, 4MB) to PA's [0, 4MB)
...
...
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