mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-27 15:56:30 +00:00
Update debug reporting.
This commit is contained in:
parent
0561a21eaa
commit
af27249c43
1 changed files with 24 additions and 9 deletions
|
@ -224,6 +224,7 @@ U0 AHCIPortCmdWait(I64 port_num, I64 cmd_slot)
|
||||||
|
|
||||||
U64 debug_timeout = 0;
|
U64 debug_timeout = 0;
|
||||||
U64 debug_retries = 16;
|
U64 debug_retries = 16;
|
||||||
|
if (sys_boot_src.u16[0] == BOOT_SRC_DVD)
|
||||||
"DEBUG: AHCI: AHCIPortCmdWait";
|
"DEBUG: AHCI: AHCIPortCmdWait";
|
||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
|
@ -234,11 +235,13 @@ U0 AHCIPortCmdWait(I64 port_num, I64 cmd_slot)
|
||||||
if (Bt(&port->interrupt_status, AHCI_PxIf_TFE)) //Task File Error ($LK,"ATAS_ERR",A="MN:ATAS_ERR"$)
|
if (Bt(&port->interrupt_status, AHCI_PxIf_TFE)) //Task File Error ($LK,"ATAS_ERR",A="MN:ATAS_ERR"$)
|
||||||
{
|
{
|
||||||
error:
|
error:
|
||||||
|
if (sys_boot_src.u16[0] == BOOT_SRC_DVD)
|
||||||
|
{
|
||||||
"\nDEBUG: AHCI: AHCIPortCmdWait Task File Error!\n";
|
"\nDEBUG: AHCI: AHCIPortCmdWait Task File Error!\n";
|
||||||
AHCIDebug(port_num);
|
AHCIDebug(port_num);
|
||||||
"\nPausing for 10 seconds...\n";
|
"\nPausing for 10 seconds...\n";
|
||||||
Busy(10 * 1000 * 1000);
|
Busy(10 * 1000 * 1000);
|
||||||
|
}
|
||||||
if (AHCI_DEBUG)
|
if (AHCI_DEBUG)
|
||||||
{
|
{
|
||||||
StrPrint(str, "Run AHCIDebug(%d);", port_num);
|
StrPrint(str, "Run AHCIDebug(%d);", port_num);
|
||||||
|
@ -264,6 +267,7 @@ error:
|
||||||
|
|
||||||
Yield; // don't hang OS
|
Yield; // don't hang OS
|
||||||
}
|
}
|
||||||
|
if (sys_boot_src.u16[0] == BOOT_SRC_DVD)
|
||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
if (Bt(&port->interrupt_status, AHCI_PxIf_TFE)) //Second safety check
|
if (Bt(&port->interrupt_status, AHCI_PxIf_TFE)) //Second safety check
|
||||||
|
@ -571,6 +575,16 @@ U0 AHCIPortIdentify(CBlkDev *bd)
|
||||||
CPortCmdHeader *cmd_header = AHCIPortActiveHeaderGet(bd->port_num, cmd_slot);
|
CPortCmdHeader *cmd_header = AHCIPortActiveHeaderGet(bd->port_num, cmd_slot);
|
||||||
U16 *dev_id_record;
|
U16 *dev_id_record;
|
||||||
|
|
||||||
|
if (sys_boot_src.u16[0] == BOOT_SRC_DVD)
|
||||||
|
{
|
||||||
|
"AHCI: DEBUG: AHCIPortIdentify variable check 1\n";
|
||||||
|
"___________\n";
|
||||||
|
"port->cmd_issue: 0x%016X\n", port->cmd_issue;
|
||||||
|
"port->device_sleep: 0x%016X\n", port->device_sleep;
|
||||||
|
"port->fis_switch_ctrl: 0x%016X\n", port->fis_switch_ctrl;
|
||||||
|
"___________\n";
|
||||||
|
}
|
||||||
|
|
||||||
port->interrupt_status = port->interrupt_status; //TODO: Why?
|
port->interrupt_status = port->interrupt_status; //TODO: Why?
|
||||||
|
|
||||||
//Using the code heap for this alloc to stay under 32-bit address space.
|
//Using the code heap for this alloc to stay under 32-bit address space.
|
||||||
|
@ -604,7 +618,7 @@ U0 AHCIPortIdentify(CBlkDev *bd)
|
||||||
Bts(&port->cmd_issue, cmd_slot); //Issue the command.
|
Bts(&port->cmd_issue, cmd_slot); //Issue the command.
|
||||||
if (sys_boot_src.u16[0] == BOOT_SRC_DVD)
|
if (sys_boot_src.u16[0] == BOOT_SRC_DVD)
|
||||||
{
|
{
|
||||||
"AHCI: DEBUG: AHCIPortIdentify variable check\n";
|
"AHCI: DEBUG: AHCIPortIdentify variable check 2\n";
|
||||||
"___________\n";
|
"___________\n";
|
||||||
"bd : 0x%016X\n", bd;
|
"bd : 0x%016X\n", bd;
|
||||||
"cmd_table: 0x%016X\n", cmd_table;
|
"cmd_table: 0x%016X\n", cmd_table;
|
||||||
|
@ -616,7 +630,8 @@ U0 AHCIPortIdentify(CBlkDev *bd)
|
||||||
"port->signature: 0x%016X\n", port->signature;
|
"port->signature: 0x%016X\n", port->signature;
|
||||||
"cmd_fis->command: 0x%016X\n", cmd_fis->command;
|
"cmd_fis->command: 0x%016X\n", cmd_fis->command;
|
||||||
"port->cmd_issue: 0x%016X\n", port->cmd_issue;
|
"port->cmd_issue: 0x%016X\n", port->cmd_issue;
|
||||||
|
"port->device_sleep: 0x%016X\n", port->device_sleep;
|
||||||
|
"port->fis_switch_ctrl: 0x%016X\n", port->fis_switch_ctrl;
|
||||||
"___________\n";
|
"___________\n";
|
||||||
}
|
}
|
||||||
AHCIPortCmdWait(bd->port_num, cmd_slot);
|
AHCIPortCmdWait(bd->port_num, cmd_slot);
|
||||||
|
|
Loading…
Reference in a new issue