Skip to content

Commit

Permalink
fix some boot issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dgruss committed Mar 10, 2023
1 parent 67d1f58 commit 8496e9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arch/common/include/ArchInterrupts.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#define IO_TIMEOUT (4000000)
#define IO_TIMEOUT (600000)
#define IRQ0_TIMER_FREQUENCY 0

#include "types.h"
Expand Down
4 changes: 4 additions & 0 deletions arch/x86/common/source/IDEDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,13 @@ uint32 IDEDriver::doDeviceDetection()
{
outportbp(base_port + 6, (cs % 2 == 0 ? 0xA0 : 0xB0));

jiffies = 0;
while(inportbp(base_port + 7) & 0x80 && jiffies++ < IO_TIMEOUT);

uint8 c1 = inportbp(base_port + 2);
uint8 c2 = inportbp(base_port + 3);

debug(IDE_DRIVER, "c1 = %x, c2 = %x\n", c1, c2);
if (c1 != 0x01 && c2 != 0x01)
debug(IDE_DRIVER, "doDetection: Not found after reset ! \n");
else
Expand Down

0 comments on commit 8496e9b

Please sign in to comment.