summaryrefslogtreecommitdiff
path: root/ide.c
diff options
context:
space:
mode:
authorkaashoek <kaashoek>2006-07-06 21:47:22 +0000
committerkaashoek <kaashoek>2006-07-06 21:47:22 +0000
commit7837c71b32fc716101a859302e0349061416bd6e (patch)
tree57ec72178b980a3cd794b2f93bd021e08004368f /ide.c
parentb22d898297a2496ba4cfd31d445769fbebc0a46d (diff)
downloadxv6-labs-7837c71b32fc716101a859302e0349061416bd6e.tar.gz
xv6-labs-7837c71b32fc716101a859302e0349061416bd6e.tar.bz2
xv6-labs-7837c71b32fc716101a859302e0349061416bd6e.zip
disable all interrupts when acquiring lock
user program that makes a blocking system call
Diffstat (limited to 'ide.c')
-rw-r--r--ide.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/ide.c b/ide.c
index 0e63a86..e870628 100644
--- a/ide.c
+++ b/ide.c
@@ -39,6 +39,13 @@ ide_init(void)
ide_wait_ready(0);
}
+void
+ide_intr(void)
+{
+ cprintf("ide_intr\n");
+}
+
+
int
ide_probe_disk1(void)
@@ -87,13 +94,15 @@ ide_read(uint32_t secno, void *dst, unsigned nsecs)
outb(0x1F5, (secno >> 16) & 0xFF);
outb(0x1F6, 0xE0 | ((diskno&1)<<4) | ((secno>>24)&0x0F));
outb(0x1F7, 0x20); // CMD 0x20 means read sector
-
+
+#if 0
for (; nsecs > 0; nsecs--, dst += 512) {
if ((r = ide_wait_ready(1)) < 0)
return r;
insl(0x1F0, dst, 512/4);
}
-
+#endif
+
return 0;
}