📄 debug.cpp
字号:
else {
DEBUGMSG(ZONE_INIT, (TEXT(
" LBA mode : not supported\r\n")));
}
if (pId->Capabilities & 0x0100) {
DEBUGMSG(ZONE_INIT, (TEXT(
" DMA : supported\r\n")));
}
else {
DEBUGMSG(ZONE_INIT, (TEXT(
" DMA : 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")));
}
DEBUGMSG(ZONE_INIT, (TEXT(
" current number of cylinders : %d\r\n"), pId->NumberOfCurrentCylinders));
DEBUGMSG(ZONE_INIT, (TEXT(
" current number of heads : %d\r\n"), pId->NumberOfCurrentHeads));
DEBUGMSG(ZONE_INIT, (TEXT(
" current number of sectors/track : %d\r\n"), pId->CurrentSectorsPerTrack));
DEBUGMSG(ZONE_INIT, (TEXT(
" current sector capacity : %d\r\n"), pId->CurrentSectorCapacity));
DEBUGMSG(ZONE_INIT, (TEXT(
" sectors/interrupt with read/write multiple : %d\r\n"), pId->MultiSectorCount));
if (pId->MultiSectorSettingValid & 1) {
DEBUGMSG(ZONE_INIT, (TEXT(
" multi sector setting : valid\r\n")));
}
else {
DEBUGMSG(ZONE_INIT, (TEXT(
" multi sector setting : invalid\r\n")));
}
DEBUGMSG(ZONE_INIT, (TEXT(
" total user addressable sectors : %d\r\n"), pId->TotalUserAddressableSectors));
DEBUGMSG(ZONE_INIT, (TEXT(
" single word DMA modes supported : %x\r\n"), pId->SingleDmaModesSupported));
DEBUGMSG(ZONE_INIT, (TEXT(
" single word transfer mode active : %x\r\n"), pId->SingleDmaTransferActive));
DEBUGMSG(ZONE_INIT, (TEXT(
" multi word DMA modes supported : %x\r\n"), pId->MultiDmaModesSupported));
DEBUGMSG(ZONE_INIT, (TEXT(
" multi word transfer mode active : %x\r\n"), pId->MultiDmaTransferActive));
}
#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
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")));
}
// TranslationFieldsValid <=> Word 53
if (pId->TranslationFieldsValid & 0x0002) {
// 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));
// Word 64; determine "best" supported PIO mode
if (pId->AdvancedPIOxferreserved & 0x01) {
DEBUGMSG(ZONE_INIT, (_T(" PIO mode 0 supported\r\n")));
}
if (pId->AdvancedPIOxferreserved & 0x02) {
DEBUGMSG(ZONE_INIT, (_T(" PIO mode 1 supported\r\n")));
}
if (pId->AdvancedPIOxferreserved & 0x04) {
DEBUGMSG(ZONE_INIT, (_T(" PIO mode 2 supported\r\n")));
}
if (pId->AdvancedPIOxferreserved & 0x08) {
DEBUGMSG(ZONE_INIT, (_T(" PIO mode 3 supported\r\n")));
}
if (pId->AdvancedPIOxferreserved & 0x10) {
DEBUGMSG(ZONE_INIT, (_T(" PIO mode 4 supported\r\n")));
}
if (!(pId->AdvancedPIOxferreserved & 0x1F)) {
DEBUGMSG(ZONE_INIT, (_T(" PIO mode not supported\r\n")));
}
}
else {
DEBUGMSG(ZONE_INIT, (_T(" 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(" multi word DMA mode 2 and below is supported\r\n")));
}
else if (pId->MultiDmaModesSupported & 0x02) {
DEBUGMSG(ZONE_INIT, (_T(" multi word DMA mode 1 and below is supported\r\n")));
}
else if (pId->MultiDmaModesSupported & 0x01) {
DEBUGMSG(ZONE_INIT, (_T(" multi word DMA mode 0 is supported\r\n")));
}
else {
DEBUGMSG(ZONE_INIT, (_T(" multi word DMA mode not supported\r\n")));
fDMASupported = FALSE;
}
if (fDMASupported) {
// MultiDmaTransferActive <=> Word 64, high-byte; dump selected Multiword DMA modes
if (pId->MultiDmaTransferActive & 0x04) {
DEBUGMSG(ZONE_INIT, (_T(" >>> multi word DMA mode 2 selected by default <<<\r\n")));
}
if (pId->MultiDmaTransferActive & 0x02) {
DEBUGMSG(ZONE_INIT, (_T(" >>> multi word DMA mode 1 selected by default <<<\r\n")));
}
if (pId->MultiDmaTransferActive & 0x01) {
DEBUGMSG(ZONE_INIT, (_T(" >>> multi word DMA mode 0 selected by default <<<\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(" ultra DMA mode 5 and below is supported\r\n")));
}
else if (pId->UltraDMASupport & 0x10) {
DEBUGMSG(ZONE_INIT, (_T(" ultra DMA mode 4 and below is supported\r\n")));
}
else if (pId->UltraDMASupport & 0x08) {
DEBUGMSG(ZONE_INIT, (_T(" ultra DMA mode 3 and below is supported\r\n")));
}
else if (pId->UltraDMASupport & 0x04) {
DEBUGMSG(ZONE_INIT, (_T(" ultra DMA mode 2 and below is supported\r\n")));
}
else if (pId->UltraDMASupport & 0x02) {
DEBUGMSG(ZONE_INIT, (_T(" ultra DMA mode 1 and below is supported\r\n")));
}
else if (pId->UltraDMASupport & 0x01) {
DEBUGMSG(ZONE_INIT, (_T(" ultra DMA mode 0 is supported\r\n")));
}
else {
DEBUGMSG(ZONE_INIT, (_T(" ultra DMA mode not supported\r\n")));
fDMASupported = FALSE;
}
// UltraDMAActive <=> Word 88, high-byte; dump selected Ultra DMA modes
if (fDMASupported) {
if (pId->UltraDMAActive & 0x20) {
DEBUGMSG(ZONE_INIT, (_T(" >>> ultra DMA mode 5 selected by default <<<\r\n")));
}
if (pId->UltraDMAActive & 0x10) {
DEBUGMSG(ZONE_INIT, (_T(" >>> ultra DMA mode 4 selected by default <<<\r\n")));
}
if (pId->UltraDMAActive & 0x08) {
DEBUGMSG(ZONE_INIT, (_T(" >>> ultra DMA mode 3 selected by default <<<\r\n")));
}
if (pId->UltraDMAActive & 0x04) {
DEBUGMSG(ZONE_INIT, (_T(" >>> ultra DMA mode 2 selected by default <<<\r\n")));
}
if (pId->UltraDMAActive & 0x02) {
DEBUGMSG(ZONE_INIT, (_T(" >>> ultra DMA mode 1 selected by default <<<\r\n")));
}
if (pId->UltraDMAActive & 0x01) {
DEBUGMSG(ZONE_INIT, (_T(" >>> ultra DMA mode 0 selected by default <<<\r\n")));
}
}
}
else {
DEBUGMSG(ZONE_INIT, (_T(" ultra DMA mode not supported\r\n")));
}
// CommandSetSupported1 <=> Word 82 <=> whether look-ahead + write cache are supported
if (pId->CommandSetSupported1 & (1 << 6)) {
DEBUGMSG(ZONE_INIT, (_T(" look-ahead supported\r\n")));
}
else {
DEBUGMSG(ZONE_INIT, (_T(" look-ahead not supported\r\n")));
}
if (pId->CommandSetSupported1 & (1 << 5)) {
DEBUGMSG(ZONE_INIT, (_T(" write cache supported\r\n")));
}
else {
DEBUGMSG(ZONE_INIT, (_T(" write cache not supported\r\n")));
}
if (pId->CommandSetSupported1 & 0x01) {
RETAILMSG(1, (_T(" S.M.A.R.T. feature set supported\r\n")));
}
else {
RETAILMSG(1, (_T(" S.M.A.R.T. feature set not supported\r\n")));
}
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -