📄 debug.cpp
字号:
DEBUGMSG(ZONE_INIT, (TEXT("Atapi!CDisk::Identify> double word IO : unrecognized mode\r\n")));
}
if (pId->Capabilities & 0x0200) {
DEBUGMSG(ZONE_INIT, (TEXT("Atapi!CDisk::Identify> LBA mode : supported\r\n")));
}
else {
DEBUGMSG(ZONE_INIT, (TEXT("Atapi!CDisk::Identify> LBA mode : not supported\r\n")));
}
DEBUGMSG(ZONE_INIT, (TEXT(
" PIO cycle timing mode : %x\r\n"), pId->PioCycleTimingMode));
DEBUGMSG(ZONE_INIT, (TEXT(
" DMA cycle timing mode : %x\r\n"), pId->DmaCycleTimingMode));
if ((pId->TranslationFieldsValid & 1) == 0) {
DEBUGMSG(ZONE_INIT, (TEXT(
" current size fields valid : unknown\r\n")));
}
else {
DEBUGMSG(ZONE_INIT, (TEXT(
" current size fields valid : yes\r\n")));
}
#endif
DEBUGMSG(ZONE_INIT, (TEXT("Atapi!CDisk::Identify> (The following data may be read from an obsolete INDENTIFY DEVICE address)\r\n")));
DEBUGMSG(ZONE_INIT, (TEXT("Atapi!CDisk::Identify> %d cylinders\r\n"), pId->NumberOfCurrentCylinders));
DEBUGMSG(ZONE_INIT, (TEXT("Atapi!CDisk::Identify> %d heads\r\n"), pId->NumberOfCurrentHeads));
DEBUGMSG(ZONE_INIT, (TEXT("Atapi!CDisk::Identify> %d sectors per track\r\n"), pId->CurrentSectorsPerTrack));
DEBUGMSG(ZONE_INIT, (TEXT("Atapi!CDisk::Identify> %d total sectors\r\n"), pId->CurrentSectorCapacity));
DEBUGMSG(ZONE_INIT, (TEXT("Atapi!CDisk::Identify> %d total user-addressable sectors\r\n"), pId->TotalUserAddressableSectors));
if (pId->MaximumBlockTransfer == 0) {
DEBUGMSG(ZONE_INIT, (TEXT("Atapi!CDisk::Identify> READ/WRITE MULTIPLE not supported\r\n")));
}
else {
DEBUGMSG(ZONE_INIT, (TEXT("Atapi!CDisk::Identify> %d sectors in maximum DRQ data block (READ/WRITE MULTIPLE sectors per interrupt)\r\n"), pId->MaximumBlockTransfer));
DEBUGMSG(ZONE_INIT, (TEXT("Atapi!CDisk::Identify> %d sectors in current DRQ data block (READ/WRITE MULTIPLE sectors per interrupt) [%s] \r\n"), pId->MultiSectorCount, (pId->MultiSectorSettingValid & 1) ? (_T("valid")) : (_T("invalid"))));
}
if (pId->BufferSectorSize == 0) {
DEBUGMSG(ZONE_INIT, (TEXT("Atapi!CDisk::Identify> Unspecified on-disk cache size\r\n")));
}
else {
DEBUGMSG(ZONE_INIT, (TEXT("Atapi!CDisk::Identify> %d sector on-disk cache\r\n"), pId->BufferSectorSize));
}
}
#define TM_PIO 0x08
#define TM_MULTIWORD_DMA 0x20
#define TM_ULTRA_DMA 0x40
void
DumpSupportedTransferModes(
PIDENTIFY_DATA pId
)
{
BOOL fDMASupported = TRUE; // whether UDMA or Multiword DMA is supported
#if 0
DEBUGMSG(ZONE_INIT, (_T(
"Atapi!DumpSupportedTransferModes> Supported transfer mode summary:\r\n"
)));
// determine whether IORDY is supported
if (pId->Capabilities & IDENTIFY_CAPABILITIES_IOREADY_SUPPORTED) {
DEBUGMSG(ZONE_INIT, (_T(" IORDY supported\r\n")));
}
#endif
// TranslationFieldsValid <=> Word 53
if (pId->TranslationFieldsValid & 0x0002) {
#if 0
// Word 65
DEBUGMSG(ZONE_INIT, (_T(
" minimum multiword DMA transfer cycle time per word (ns) = %d\r\n"
), pId->MinimumMultiwordDMATime));
// Word 66
DEBUGMSG (ZONE_INIT, (_T(
" manufacturer's recommended multi word DMA transfer cycle time (ns) = %d\r\n"
), pId->ManuRecomendedDMATime));
// Word 67
DEBUGMSG(ZONE_INIT, (_T(
" minimum PIO transfer cycle time w/o flow control (ns) = %d\r\n"
), pId->MinimumPIOxferTimeWOFlow));
// Word 68
DEBUGMSG(ZONE_INIT, (_T(
" minimum PIO transfer cycle time w/ IORDY flow control (ns) = %d\r\n"
), pId->MinimumPIOxferTimeIORDYFlow));
#endif
// Word 64; determine "best" supported PIO mode
if (pId->AdvancedPIOxferreserved & 0x01) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> PIO mode 0 supported\r\n")));
}
if (pId->AdvancedPIOxferreserved & 0x02) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> PIO mode 1 supported\r\n")));
}
if (pId->AdvancedPIOxferreserved & 0x04) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> PIO mode 2 supported\r\n")));
}
if (pId->AdvancedPIOxferreserved & 0x08) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> PIO mode 3 supported\r\n")));
}
if (pId->AdvancedPIOxferreserved & 0x10) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> PIO mode 4 supported\r\n")));
}
if (!(pId->AdvancedPIOxferreserved & 0x1F)) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> PIO mode not supported\r\n")));
}
}
// MultiDMAModesSupported <=> Word 63, low-byte
// determine "best" supported Multiword DMA mode
if (pId->MultiDmaModesSupported & 0x04) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Multiword DMA mode <= 2 are supported\r\n")));
}
else if (pId->MultiDmaModesSupported & 0x02) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Multiword DMA mode <= 1 are supported\r\n")));
}
else if (pId->MultiDmaModesSupported & 0x01) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Multiword DMA mode 0 is supported\r\n")));
}
else {
fDMASupported = FALSE;
}
if (fDMASupported) {
// MultiDmaTransferActive <=> Word 64, high-byte; dump selected Multiword DMA modes
if (pId->MultiDmaTransferActive & 0x04) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Multiword DMA mode 2 is active\r\n")));
}
if (pId->MultiDmaTransferActive & 0x02) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> multiword DMA mode 1 is active\r\n")));
}
if (pId->MultiDmaTransferActive & 0x01) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> multiword DMA mode 0 is active\r\n")));
}
}
// TranslationFieldsValid <=> Word 53; UltraDMASupport <=> Word 88, low-byte
// dump supported Ultra DMA modes
if (pId->TranslationFieldsValid & 0x0004) {
if (pId->UltraDMASupport & 0x20) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Ultra DMA mode <= 5 are supported\r\n")));
}
else if (pId->UltraDMASupport & 0x10) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Ultra DMA mode <= 4 are supported\r\n")));
}
else if (pId->UltraDMASupport & 0x08) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Ultra DMA mode <= 3 are supported\r\n")));
}
else if (pId->UltraDMASupport & 0x04) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Ultra DMA mode <= 2 are supported\r\n")));
}
else if (pId->UltraDMASupport & 0x02) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Ultra DMA mode <= 1 are supported\r\n")));
}
else if (pId->UltraDMASupport & 0x01) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Ultra DMA mode 0 is supported\r\n")));
}
else {
fDMASupported = FALSE;
}
// UltraDMAActive <=> Word 88, high-byte; dump selected Ultra DMA modes
if (fDMASupported) {
if (pId->UltraDMAActive & 0x20) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Ultra DMA mode 5 is active\r\n")));
}
if (pId->UltraDMAActive & 0x10) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Ultra DMA mode 4 is active\r\n")));
}
if (pId->UltraDMAActive & 0x08) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Ultra DMA mode 3 is active\r\n")));
}
if (pId->UltraDMAActive & 0x04) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Ultra DMA mode 2 is active\r\n")));
}
if (pId->UltraDMAActive & 0x02) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Ultra DMA mode 1 is active\r\n")));
}
if (pId->UltraDMAActive & 0x01) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Ultra DMA mode 0 is active\r\n")));
}
}
}
// CommandSetSupported1 <=> Word 82 <=> whether look-ahead + write cache are supported
if (pId->CommandSetSupported1 & (1 << 6)) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Look-ahead supported\r\n")));
}
if (pId->CommandSetSupported1 & (1 << 5)) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> Write cache supported\r\n")));
}
if (pId->CommandSetSupported1 & 0x01) {
DEBUGMSG(ZONE_INIT, (_T("Atapi!CDisk::Identify> SMART feature set supported\r\n")));
}
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -