Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CSEP551
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
b02e13f0
Commit
b02e13f0
authored
18 years ago
by
rsc
Browse files
Options
Downloads
Patches
Plain Diff
shorten
parent
3689c7f5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bootasm.S
+9
-13
9 additions, 13 deletions
bootasm.S
with
9 additions
and
13 deletions
bootasm.S
+
9
−
13
View file @
b02e13f0
...
...
@@ -54,16 +54,15 @@ seta20.2:
movb
$
0xdf
,%
al
#
Enable
outb
%
al
,
$
0x60
#
A20
#
Switch
from
real
to
protected
mode
#
The
descriptors
in
our
GDT
allow
all
physical
memory
to
be
accessed
.
#
Furthermore
,
the
descriptors
have
base
addresses
of
0
,
so
that
the
#
segment
translation
is
a
NOP
,
ie
.
virtual
addresses
are
identical
to
#
their
physical
addresses
.
With
this
setup
,
immediately
after
#
enabling
protected
mode
it
will
still
appear
to
this
code
#
that
it
is
running
directly
on
physical
memory
with
no
translation
.
#
This
initial
NOP
-
translation
setup
is
required
by
the
processor
#
to
ensure
that
the
transition
to
protected
mode
occurs
smoothly
.
#
Switch
from
real
to
protected
mode
#
The
descriptors
in
our
GDT
allow
all
physical
memory
to
be
accessed
.
#
Furthermore
,
the
descriptors
have
base
addresses
of
0
,
so
that
the
#
segment
translation
is
a
NOP
,
ie
.
virtual
addresses
are
identical
to
#
their
physical
addresses
.
With
this
setup
,
immediately
after
#
enabling
protected
mode
it
will
still
appear
to
this
code
#
that
it
is
running
directly
on
physical
memory
with
no
translation
.
#
This
initial
NOP
-
translation
setup
is
required
by
the
processor
#
to
ensure
that
the
transition
to
protected
mode
occurs
smoothly
.
real_to_prot
:
cli
#
Mandatory
since
we
dont
set
up
an
IDT
lgdt
gdtdesc
#
load
GDT
--
mandatory
in
protected
mode
...
...
@@ -85,19 +84,16 @@ protcseg:
movw
%
ax
,
%
fs
#
->
FS
movw
%
ax
,
%
gs
#
->
GS
movw
%
ax
,
%
ss
#
->
SS
:
Stack
Segment
call
cmain
#
finish
the
boot
load
from
C
.
#
cmain
()
should
not
return
spin
:
jmp
spin
#
..
but
in
case
it
does
,
spin
.
p2align
2
#
force
4
byte
alignment
gdt
:
SEG_NULLASM
#
null
seg
SEG_ASM
(
STA_X
|
STA_R
,
0x0
,
0xffffffff
)
#
code
seg
SEG_ASM
(
STA_W
,
0x0
,
0xffffffff
)
#
data
seg
gdtdesc
:
.
word
0x17
#
sizeof
(
gdt
)
-
1
.
long
gdt
#
address
gdt
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