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
004747de
Commit
004747de
authored
Oct 21, 2002
by
Matt Domsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EDD: add comments, magic value defines, use snprintf always
parent
ecf2c214
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
100 additions
and
70 deletions
+100
-70
arch/i386/boot/setup.S
arch/i386/boot/setup.S
+28
-6
arch/i386/kernel/edd.c
arch/i386/kernel/edd.c
+66
-63
arch/i386/kernel/setup.c
arch/i386/kernel/setup.c
+2
-1
include/asm-i386/edd.h
include/asm-i386/edd.h
+4
-0
No files found.
arch/i386/boot/setup.S
View file @
004747de
...
@@ -46,8 +46,9 @@
...
@@ -46,8 +46,9 @@
*
by
Robert
Schwebel
,
December
2001
<
robert
@
schwebel
.
de
>
*
by
Robert
Schwebel
,
December
2001
<
robert
@
schwebel
.
de
>
*
*
*
BIOS
Enhanced
Disk
Drive
support
*
BIOS
Enhanced
Disk
Drive
support
*
by
Matt
Domsch
<
Matt_Domsch
@
dell
.
com
>
September
2002
*
by
Matt
Domsch
<
Matt_Domsch
@
dell
.
com
>
October
2002
*
*
conformant
to
T13
Committee
www
.
t13
.
org
*
projects
1572
D
,
1484
D
,
1386
D
,
1226
DT
*/
*/
#include <linux/config.h>
#include <linux/config.h>
...
@@ -549,6 +550,27 @@ done_apm_bios:
...
@@ -549,6 +550,27 @@ done_apm_bios:
#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
#
Do
the
BIOS
Enhanced
Disk
Drive
calls
#
Do
the
BIOS
Enhanced
Disk
Drive
calls
#
This
consists
of
two
calls
:
#
int
13
h
ah
=
41
h
"Check Extensions Present"
#
int
13
h
ah
=
48
h
"Get Device Parameters"
#
#
A
buffer
of
size
EDDMAXNR
*(
EDDEXTSIZE
+
EDDPARMSIZE
)
is
reserved
for
our
use
#
in
the
empty_zero_page
at
EDDBUF
.
The
first
four
bytes
of
which
are
#
used
to
store
the
device
number
,
interface
support
map
and
version
#
results
from
fn41
.
The
following
74
bytes
are
used
to
store
#
the
results
from
fn48
.
Starting
from
device
80
h
,
fn41
,
then
fn48
#
are
called
and
their
results
stored
in
EDDBUF
+
n
*(
EDDEXTSIZE
+
EDDPARMIZE
)
.
#
Then
the
pointer
is
incremented
to
store
the
data
for
the
next
call
.
#
This
repeats
until
either
a
device
doesn
't exist, or until EDDMAXNR
#
devices
have
been
stored
.
#
The
one
tricky
part
is
that
ds
:
si
always
points
four
bytes
into
#
the
structure
,
and
the
fn41
results
are
stored
at
offsets
#
from
there
.
This
removes
the
need
to
increment
the
pointer
for
#
every
store
,
and
leaves
it
ready
for
the
fn48
call
.
#
A
second
one
-
byte
buffer
,
EDDNR
,
in
the
empty_zero_page
stores
#
the
number
of
BIOS
devices
which
exist
,
up
to
EDDMAXNR
.
#
In
setup
.
c
,
copy_edd
()
stores
both
empty_zero_page
buffers
away
#
for
later
use
,
as
they
would
get
overwritten
otherwise
.
#
This
code
is
sensitive
to
the
size
of
the
structs
in
edd
.
h
#
This
code
is
sensitive
to
the
size
of
the
structs
in
edd
.
h
edd_start
:
edd_start
:
#
%
ds
points
to
the
bootsector
#
%
ds
points
to
the
bootsector
...
@@ -559,12 +581,12 @@ edd_start:
...
@@ -559,12 +581,12 @@ edd_start:
movb
$
0x80
,
%
dl
#
BIOS
device
0x80
movb
$
0x80
,
%
dl
#
BIOS
device
0x80
edd_check_ext
:
edd_check_ext
:
movb
$
0x41
,
%
ah
#
Function
41
movb
$
CHECKEXTENSIONSPRESENT
,
%
ah
#
Function
41
movw
$
0x55aa
,
%
bx
#
magic
movw
$
EDDMAGIC1
,
%
bx
#
magic
int
$
0x13
#
make
the
call
int
$
0x13
#
make
the
call
jc
edd_done
#
no
more
BIOS
devices
jc
edd_done
#
no
more
BIOS
devices
cmpw
$
0xAA55
,
%
bx
#
is
magic
right
?
cmpw
$
EDDMAGIC2
,
%
bx
#
is
magic
right
?
jne
edd_next
#
nope
,
next
...
jne
edd_next
#
nope
,
next
...
movb
%
dl
,
%
ds
:
-
4
(%
si
)
#
store
device
number
movb
%
dl
,
%
ds
:
-
4
(%
si
)
#
store
device
number
...
@@ -574,7 +596,7 @@ edd_check_ext:
...
@@ -574,7 +596,7 @@ edd_check_ext:
edd_get_device_params
:
edd_get_device_params
:
movw
$EDDPARMSIZE
,
%
ds
:
(%
si
)
#
put
size
movw
$EDDPARMSIZE
,
%
ds
:
(%
si
)
#
put
size
movb
$
0x48
,
%
ah
#
Function
48
movb
$
GETDEVICEPARAMETERS
,
%
ah
#
Function
48
int
$
0x13
#
make
the
call
int
$
0x13
#
make
the
call
#
Don
't check for fail return
#
Don
't check for fail return
#
it
doesn
't matter.
#
it
doesn
't matter.
...
...
arch/i386/kernel/edd.c
View file @
004747de
This diff is collapsed.
Click to expand it.
arch/i386/kernel/setup.c
View file @
004747de
...
@@ -471,7 +471,8 @@ static int __init copy_e820_map(struct e820entry * biosmap, int nr_map)
...
@@ -471,7 +471,8 @@ static int __init copy_e820_map(struct e820entry * biosmap, int nr_map)
unsigned
char
eddnr
;
unsigned
char
eddnr
;
struct
edd_info
edd
[
EDDNR
];
struct
edd_info
edd
[
EDDNR
];
/**
/**
* copy_edd() - Copy the BIOS EDD information into a safe place.
* copy_edd() - Copy the BIOS EDD information
* from empty_zero_page into a safe place.
*
*
*/
*/
static
inline
void
copy_edd
(
void
)
static
inline
void
copy_edd
(
void
)
...
...
include/asm-i386/edd.h
View file @
004747de
...
@@ -36,6 +36,10 @@
...
@@ -36,6 +36,10 @@
#define EDDMAXNR 6
/* number of edd_info structs starting at EDDBUF */
#define EDDMAXNR 6
/* number of edd_info structs starting at EDDBUF */
#define EDDEXTSIZE 4
/* change these if you muck with the structures */
#define EDDEXTSIZE 4
/* change these if you muck with the structures */
#define EDDPARMSIZE 74
#define EDDPARMSIZE 74
#define CHECKEXTENSIONSPRESENT 0x41
#define GETDEVICEPARAMETERS 0x48
#define EDDMAGIC1 0x55AA
#define EDDMAGIC2 0xAA55
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLY__
...
...
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