ide_cmd_out(0, nsect, sect_nr, HD_CMD_READ_EXT);
- //printk("ide_debug\n");
+ printk("ide_debug\n");
}
DECLARE_MUTEX(mutex);
{
u8_t status = inb(REG_STATUS(0));
- //memset(buf, 0xEE, 1024);
+ memset(buf, 0xEE, 1024);
status = inb(drv.iobase+PCI_IDE_STATUS);
if(0 == (status & PCI_IDE_STATUS_INTR))
outb(status, drv.iobase+PCI_IDE_STATUS);
outb(0x00, drv.iobase+PCI_IDE_CMD);
- //insl(REG_DATA(0), buf, (512>>2));
- int i;
- unsigned short sig;
- for(i=0; i<256; ++i)
- sig = inw(REG_DATA(0));
- //u16_t *s = (u16_t *) (buf+510);
- //printd(11, "hard disk data %04x\n", sig);
- //up(&mutex);
+ insl(REG_DATA(0), buf, (512>>2));
+ u16_t sig = *((u16_t *) (buf+510));
+ printd(11, "hard disk data %04x", sig);
+
+ up(&mutex);
}
if(retires == 0)
panic("hard disk is not ready");
- //char buf[1024];
insl(REG_DATA(0), buf, 512>>2);
print_ide_identify(buf);
}
if(scan_code == 0x01) // Esc
reboot();
- //printk("[%02x]", scan_code);
+ printk("[%02x]", scan_code);
if(scan_code == 0x13) // r
ide_debug();
if(scan_code == 0x3E) // F4
debug_wait_queue_put(2);
-#if 0
+#if 1
printd(10, "CNSL HEAD : %d", cnsl_rd_q.head);
if((cnsl_rd_q.head+1) == cnsl_rd_q.tail)
goto end;
cnsl_rd_q.data[cnsl_rd_q.head++] = (char) scan_code;
end:
-
wake_up(&cnsl_rd_q.wait);
#endif
}
{
jiffies++;
- //printk("^");
- //printd(0, "clock: %d", jiffies);
+ printk("^");
+ printd(0, "clock: %d", jiffies);
}
int cnt;
while(1)
{
- printd(1, "root_task [%08x] cnt %d preempt_cnt %08x", current, cnt++, root_task.preempt_cnt);
- printd(9, "pid %d ppid %08x state %08x weight %08x",
+ printd(1, "root_task [%08x] cnt %d preempt_cnt %d", current, cnt++, root_task.preempt_cnt);
+ printd(9, "pid %d ppid %d state %d weight %d",
root_task.pid, root_task.ppid, root_task.state, root_task.weight);
asm("sti;hlt;");
//sysc_test();
resched:
- #call schedule
+ call schedule
restore_regs:
root_task.preempt_cnt = 0;
root_task.pid = get_next_pid();
- root_task.ppid = 1000;
- root_task.state = 2000;//TASK_RUNNING;
- root_task.weight = 3000;//TASK_INIT_WEIGHT;
+ root_task.ppid = 0;
+ root_task.state = TASK_RUNNING;
+ root_task.weight = TASK_INIT_WEIGHT;
INIT_LIST_HEAD(&root_task.list);
for(i=0; i<NR_OPENS; i++)
unsigned int debug_global_var = 0;
int debug_wait_queue_get()
{
- return 0;
unsigned int v = 0;
task_union * task = current;
DECLARE_WAIT_QUEUE(wait, task);