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
96d467b3
Commit
96d467b3
authored
18 years ago
by
rsc
Browse files
Options
Downloads
Patches
Plain Diff
more named constants
parent
799c9176
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
ide.c
+10
-6
10 additions, 6 deletions
ide.c
with
10 additions
and
6 deletions
ide.c
+
10
−
6
View file @
96d467b3
...
...
@@ -9,10 +9,13 @@
#include
"traps.h"
#include
"spinlock.h"
#define IDE_BSY 0x80
#define IDE_DRDY 0x40
#define IDE_DF 0x20
#define IDE_ERR 0x01
#define IDE_BSY 0x80
#define IDE_DRDY 0x40
#define IDE_DF 0x20
#define IDE_ERR 0x01
#define IDE_CMD_READ 0x20
#define IDE_CMD_WRITE 0x30
struct
ide_request
{
int
diskno
;
...
...
@@ -95,9 +98,10 @@ ide_start_request (void)
outb
(
0x1F4
,
(
r
->
secno
>>
8
)
&
0xFF
);
outb
(
0x1F5
,
(
r
->
secno
>>
16
)
&
0xFF
);
outb
(
0x1F6
,
0xE0
|
((
r
->
diskno
&
1
)
<<
4
)
|
((
r
->
secno
>>
24
)
&
0x0F
));
if
(
r
->
read
)
outb
(
0x1F7
,
0x20
);
// read
if
(
r
->
read
)
outb
(
0x1F7
,
IDE_CMD_READ
);
else
{
outb
(
0x1F7
,
0x30
);
// write
outb
(
0x1F7
,
IDE_CMD_WRITE
);
outsl
(
0x1F0
,
r
->
addr
,
512
/
4
);
}
}
...
...
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