Changeset 58459 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.c
- Timestamp:
- Oct 28, 2015 8:17:18 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
-
Property svn:mergeinfo
set to (toggle deleted branches)
/vendor/edk2/current 103735-103757
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.c
r48674 r58459 3 3 This file provides the information dump support for EHCI when in debug mode. 4 4 5 Copyright (c) 2007 - 201 0, Intel Corporation. All rights reserved.<BR>5 Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR> 6 6 This program and the accompanying materials 7 7 are licensed and made available under the terms and conditions of the BSD License … … 29 29 { 30 30 if (EHC_BIT_IS_SET (State, QTD_STAT_DO_PING)) { 31 DEBUG ((EFI_D_ INFO, " Do_Ping"));31 DEBUG ((EFI_D_VERBOSE, " Do_Ping")); 32 32 } else { 33 DEBUG ((EFI_D_ INFO, " Do_Out"));33 DEBUG ((EFI_D_VERBOSE, " Do_Out")); 34 34 } 35 35 36 36 if (EHC_BIT_IS_SET (State, QTD_STAT_DO_CS)) { 37 DEBUG ((EFI_D_ INFO, " Do_CS"));37 DEBUG ((EFI_D_VERBOSE, " Do_CS")); 38 38 } else { 39 DEBUG ((EFI_D_ INFO, " Do_SS"));39 DEBUG ((EFI_D_VERBOSE, " Do_SS")); 40 40 } 41 41 42 42 if (EHC_BIT_IS_SET (State, QTD_STAT_TRANS_ERR)) { 43 DEBUG ((EFI_D_ INFO, " Transfer_Error"));43 DEBUG ((EFI_D_VERBOSE, " Transfer_Error")); 44 44 } 45 45 46 46 if (EHC_BIT_IS_SET (State, QTD_STAT_BABBLE_ERR)) { 47 DEBUG ((EFI_D_ INFO, " Babble_Error"));47 DEBUG ((EFI_D_VERBOSE, " Babble_Error")); 48 48 } 49 49 50 50 if (EHC_BIT_IS_SET (State, QTD_STAT_BUFF_ERR)) { 51 DEBUG ((EFI_D_ INFO, " Buffer_Error"));51 DEBUG ((EFI_D_VERBOSE, " Buffer_Error")); 52 52 } 53 53 54 54 if (EHC_BIT_IS_SET (State, QTD_STAT_HALTED)) { 55 DEBUG ((EFI_D_ INFO, " Halted"));55 DEBUG ((EFI_D_VERBOSE, " Halted")); 56 56 } 57 57 58 58 if (EHC_BIT_IS_SET (State, QTD_STAT_ACTIVE)) { 59 DEBUG ((EFI_D_ INFO, " Active"));60 } 61 62 DEBUG ((EFI_D_ INFO, "\n"));59 DEBUG ((EFI_D_VERBOSE, " Active")); 60 } 61 62 DEBUG ((EFI_D_VERBOSE, "\n")); 63 63 } 64 64 … … 81 81 82 82 if (Msg != NULL) { 83 DEBUG ((EFI_D_ INFO, Msg));84 } 85 86 DEBUG ((EFI_D_ INFO, "Queue TD @ 0x%p, data length %d\n", Qtd, (UINT32)Qtd->DataLen));83 DEBUG ((EFI_D_VERBOSE, Msg)); 84 } 85 86 DEBUG ((EFI_D_VERBOSE, "Queue TD @ 0x%p, data length %d\n", Qtd, (UINT32)Qtd->DataLen)); 87 87 88 88 QtdHw = &Qtd->QtdHw; 89 89 90 DEBUG ((EFI_D_ INFO, "Next QTD : %x\n", QtdHw->NextQtd));91 DEBUG ((EFI_D_ INFO, "AltNext QTD : %x\n", QtdHw->AltNext));92 DEBUG ((EFI_D_ INFO, "Status : %x\n", QtdHw->Status));90 DEBUG ((EFI_D_VERBOSE, "Next QTD : %x\n", QtdHw->NextQtd)); 91 DEBUG ((EFI_D_VERBOSE, "AltNext QTD : %x\n", QtdHw->AltNext)); 92 DEBUG ((EFI_D_VERBOSE, "Status : %x\n", QtdHw->Status)); 93 93 EhcDumpStatus (QtdHw->Status); 94 94 95 95 if (QtdHw->Pid == QTD_PID_SETUP) { 96 DEBUG ((EFI_D_ INFO, "PID : Setup\n"));96 DEBUG ((EFI_D_VERBOSE, "PID : Setup\n")); 97 97 98 98 } else if (QtdHw->Pid == QTD_PID_INPUT) { 99 DEBUG ((EFI_D_ INFO, "PID : IN\n"));99 DEBUG ((EFI_D_VERBOSE, "PID : IN\n")); 100 100 101 101 } else if (QtdHw->Pid == QTD_PID_OUTPUT) { 102 DEBUG ((EFI_D_ INFO, "PID : OUT\n"));103 104 } 105 106 DEBUG ((EFI_D_ INFO, "Error Count : %d\n", QtdHw->ErrCnt));107 DEBUG ((EFI_D_ INFO, "Current Page : %d\n", QtdHw->CurPage));108 DEBUG ((EFI_D_ INFO, "IOC : %d\n", QtdHw->Ioc));109 DEBUG ((EFI_D_ INFO, "Total Bytes : %d\n", QtdHw->TotalBytes));110 DEBUG ((EFI_D_ INFO, "Data Toggle : %d\n", QtdHw->DataToggle));102 DEBUG ((EFI_D_VERBOSE, "PID : OUT\n")); 103 104 } 105 106 DEBUG ((EFI_D_VERBOSE, "Error Count : %d\n", QtdHw->ErrCnt)); 107 DEBUG ((EFI_D_VERBOSE, "Current Page : %d\n", QtdHw->CurPage)); 108 DEBUG ((EFI_D_VERBOSE, "IOC : %d\n", QtdHw->Ioc)); 109 DEBUG ((EFI_D_VERBOSE, "Total Bytes : %d\n", QtdHw->TotalBytes)); 110 DEBUG ((EFI_D_VERBOSE, "Data Toggle : %d\n", QtdHw->DataToggle)); 111 111 112 112 for (Index = 0; Index < 5; Index++) { 113 DEBUG ((EFI_D_ INFO, "Page[%d] : 0x%x\n", (UINT32)Index, QtdHw->Page[Index]));113 DEBUG ((EFI_D_VERBOSE, "Page[%d] : 0x%x\n", (UINT32)Index, QtdHw->Page[Index])); 114 114 } 115 115 } … … 137 137 138 138 if (Msg != NULL) { 139 DEBUG ((EFI_D_ INFO, Msg));140 } 141 142 DEBUG ((EFI_D_ INFO, "Queue head @ 0x%p, interval %ld, next qh %p\n",139 DEBUG ((EFI_D_VERBOSE, Msg)); 140 } 141 142 DEBUG ((EFI_D_VERBOSE, "Queue head @ 0x%p, interval %ld, next qh %p\n", 143 143 Qh, (UINT64)Qh->Interval, Qh->NextQh)); 144 144 145 145 QhHw = &Qh->QhHw; 146 146 147 DEBUG ((EFI_D_ INFO, "Hoziontal link: %x\n", QhHw->HorizonLink));148 DEBUG ((EFI_D_ INFO, "Device address: %d\n", QhHw->DeviceAddr));149 DEBUG ((EFI_D_ INFO, "Inactive : %d\n", QhHw->Inactive));150 DEBUG ((EFI_D_ INFO, "EP number : %d\n", QhHw->EpNum));151 DEBUG ((EFI_D_ INFO, "EP speed : %d\n", QhHw->EpSpeed));152 DEBUG ((EFI_D_ INFO, "DT control : %d\n", QhHw->DtCtrl));153 DEBUG ((EFI_D_ INFO, "Reclaim head : %d\n", QhHw->ReclaimHead));154 DEBUG ((EFI_D_ INFO, "Max packet len: %d\n", QhHw->MaxPacketLen));155 DEBUG ((EFI_D_ INFO, "Ctrl EP : %d\n", QhHw->CtrlEp));156 DEBUG ((EFI_D_ INFO, "Nak reload : %d\n", QhHw->NakReload));157 158 DEBUG ((EFI_D_ INFO, "SMask : %x\n", QhHw->SMask));159 DEBUG ((EFI_D_ INFO, "CMask : %x\n", QhHw->CMask));160 DEBUG ((EFI_D_ INFO, "Hub address : %d\n", QhHw->HubAddr));161 DEBUG ((EFI_D_ INFO, "Hub port : %d\n", QhHw->PortNum));162 DEBUG ((EFI_D_ INFO, "Multiplier : %d\n", QhHw->Multiplier));163 164 DEBUG ((EFI_D_ INFO, "Cur QTD : %x\n", QhHw->CurQtd));165 166 DEBUG ((EFI_D_ INFO, "Next QTD : %x\n", QhHw->NextQtd));167 DEBUG ((EFI_D_ INFO, "AltNext QTD : %x\n", QhHw->AltQtd));168 DEBUG ((EFI_D_ INFO, "Status : %x\n", QhHw->Status));147 DEBUG ((EFI_D_VERBOSE, "Hoziontal link: %x\n", QhHw->HorizonLink)); 148 DEBUG ((EFI_D_VERBOSE, "Device address: %d\n", QhHw->DeviceAddr)); 149 DEBUG ((EFI_D_VERBOSE, "Inactive : %d\n", QhHw->Inactive)); 150 DEBUG ((EFI_D_VERBOSE, "EP number : %d\n", QhHw->EpNum)); 151 DEBUG ((EFI_D_VERBOSE, "EP speed : %d\n", QhHw->EpSpeed)); 152 DEBUG ((EFI_D_VERBOSE, "DT control : %d\n", QhHw->DtCtrl)); 153 DEBUG ((EFI_D_VERBOSE, "Reclaim head : %d\n", QhHw->ReclaimHead)); 154 DEBUG ((EFI_D_VERBOSE, "Max packet len: %d\n", QhHw->MaxPacketLen)); 155 DEBUG ((EFI_D_VERBOSE, "Ctrl EP : %d\n", QhHw->CtrlEp)); 156 DEBUG ((EFI_D_VERBOSE, "Nak reload : %d\n", QhHw->NakReload)); 157 158 DEBUG ((EFI_D_VERBOSE, "SMask : %x\n", QhHw->SMask)); 159 DEBUG ((EFI_D_VERBOSE, "CMask : %x\n", QhHw->CMask)); 160 DEBUG ((EFI_D_VERBOSE, "Hub address : %d\n", QhHw->HubAddr)); 161 DEBUG ((EFI_D_VERBOSE, "Hub port : %d\n", QhHw->PortNum)); 162 DEBUG ((EFI_D_VERBOSE, "Multiplier : %d\n", QhHw->Multiplier)); 163 164 DEBUG ((EFI_D_VERBOSE, "Cur QTD : %x\n", QhHw->CurQtd)); 165 166 DEBUG ((EFI_D_VERBOSE, "Next QTD : %x\n", QhHw->NextQtd)); 167 DEBUG ((EFI_D_VERBOSE, "AltNext QTD : %x\n", QhHw->AltQtd)); 168 DEBUG ((EFI_D_VERBOSE, "Status : %x\n", QhHw->Status)); 169 169 170 170 EhcDumpStatus (QhHw->Status); 171 171 172 172 if (QhHw->Pid == QTD_PID_SETUP) { 173 DEBUG ((EFI_D_ INFO, "PID : Setup\n"));173 DEBUG ((EFI_D_VERBOSE, "PID : Setup\n")); 174 174 175 175 } else if (QhHw->Pid == QTD_PID_INPUT) { 176 DEBUG ((EFI_D_ INFO, "PID : IN\n"));176 DEBUG ((EFI_D_VERBOSE, "PID : IN\n")); 177 177 178 178 } else if (QhHw->Pid == QTD_PID_OUTPUT) { 179 DEBUG ((EFI_D_ INFO, "PID : OUT\n"));180 } 181 182 DEBUG ((EFI_D_ INFO, "Error Count : %d\n", QhHw->ErrCnt));183 DEBUG ((EFI_D_ INFO, "Current Page : %d\n", QhHw->CurPage));184 DEBUG ((EFI_D_ INFO, "IOC : %d\n", QhHw->Ioc));185 DEBUG ((EFI_D_ INFO, "Total Bytes : %d\n", QhHw->TotalBytes));186 DEBUG ((EFI_D_ INFO, "Data Toggle : %d\n", QhHw->DataToggle));179 DEBUG ((EFI_D_VERBOSE, "PID : OUT\n")); 180 } 181 182 DEBUG ((EFI_D_VERBOSE, "Error Count : %d\n", QhHw->ErrCnt)); 183 DEBUG ((EFI_D_VERBOSE, "Current Page : %d\n", QhHw->CurPage)); 184 DEBUG ((EFI_D_VERBOSE, "IOC : %d\n", QhHw->Ioc)); 185 DEBUG ((EFI_D_VERBOSE, "Total Bytes : %d\n", QhHw->TotalBytes)); 186 DEBUG ((EFI_D_VERBOSE, "Data Toggle : %d\n", QhHw->DataToggle)); 187 187 188 188 for (Index = 0; Index < 5; Index++) { 189 DEBUG ((EFI_D_ INFO, "Page[%d] : 0x%x\n", Index, QhHw->Page[Index]));190 } 191 192 DEBUG ((EFI_D_ INFO, "\n"));189 DEBUG ((EFI_D_VERBOSE, "Page[%d] : 0x%x\n", Index, QhHw->Page[Index])); 190 } 191 192 DEBUG ((EFI_D_VERBOSE, "\n")); 193 193 194 194 EFI_LIST_FOR_EACH (Entry, &Qh->Qtds) { … … 220 220 for (Index = 0; Index < Len; Index++) { 221 221 if (Index % 16 == 0) { 222 DEBUG ((EFI_D_ INFO,"\n"));222 DEBUG ((EFI_D_VERBOSE,"\n")); 223 223 } 224 224 225 DEBUG ((EFI_D_ INFO, "%02x ", Buf[Index]));226 } 227 228 DEBUG ((EFI_D_ INFO, "\n"));225 DEBUG ((EFI_D_VERBOSE, "%02x ", Buf[Index])); 226 } 227 228 DEBUG ((EFI_D_VERBOSE, "\n")); 229 229 } 230 230 … … 242 242 UINT8 Index; 243 243 244 DEBUG ((EFI_D_ INFO, " EHC_CAPLENGTH_OFFSET = 0x%08x\n", EhcReadCapRegister (Ehc, EHC_CAPLENGTH_OFFSET)));245 DEBUG ((EFI_D_ INFO, " EHC_HCSPARAMS_OFFSET = 0x%08x\n", EhcReadCapRegister (Ehc, EHC_HCSPARAMS_OFFSET)));246 DEBUG ((EFI_D_ INFO, " EHC_HCCPARAMS_OFFSET = 0x%08x\n", EhcReadCapRegister (Ehc, EHC_HCCPARAMS_OFFSET)));247 DEBUG ((EFI_D_ INFO, " EHC_USBCMD_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_USBCMD_OFFSET)));248 DEBUG ((EFI_D_ INFO, " EHC_USBSTS_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_USBSTS_OFFSET)));249 DEBUG ((EFI_D_ INFO, " EHC_USBINTR_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_USBINTR_OFFSET)));250 DEBUG ((EFI_D_ INFO, " EHC_FRINDEX_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_FRINDEX_OFFSET)));251 DEBUG ((EFI_D_ INFO, " EHC_CTRLDSSEG_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_CTRLDSSEG_OFFSET)));252 DEBUG ((EFI_D_ INFO, " EHC_FRAME_BASE_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_FRAME_BASE_OFFSET)));253 DEBUG ((EFI_D_ INFO, " EHC_ASYNC_HEAD_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_ASYNC_HEAD_OFFSET)));254 DEBUG ((EFI_D_ INFO, " EHC_CONFIG_FLAG_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_CONFIG_FLAG_OFFSET)));244 DEBUG ((EFI_D_VERBOSE, " EHC_CAPLENGTH_OFFSET = 0x%08x\n", EhcReadCapRegister (Ehc, EHC_CAPLENGTH_OFFSET))); 245 DEBUG ((EFI_D_VERBOSE, " EHC_HCSPARAMS_OFFSET = 0x%08x\n", EhcReadCapRegister (Ehc, EHC_HCSPARAMS_OFFSET))); 246 DEBUG ((EFI_D_VERBOSE, " EHC_HCCPARAMS_OFFSET = 0x%08x\n", EhcReadCapRegister (Ehc, EHC_HCCPARAMS_OFFSET))); 247 DEBUG ((EFI_D_VERBOSE, " EHC_USBCMD_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_USBCMD_OFFSET))); 248 DEBUG ((EFI_D_VERBOSE, " EHC_USBSTS_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_USBSTS_OFFSET))); 249 DEBUG ((EFI_D_VERBOSE, " EHC_USBINTR_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_USBINTR_OFFSET))); 250 DEBUG ((EFI_D_VERBOSE, " EHC_FRINDEX_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_FRINDEX_OFFSET))); 251 DEBUG ((EFI_D_VERBOSE, " EHC_CTRLDSSEG_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_CTRLDSSEG_OFFSET))); 252 DEBUG ((EFI_D_VERBOSE, " EHC_FRAME_BASE_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_FRAME_BASE_OFFSET))); 253 DEBUG ((EFI_D_VERBOSE, " EHC_ASYNC_HEAD_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_ASYNC_HEAD_OFFSET))); 254 DEBUG ((EFI_D_VERBOSE, " EHC_CONFIG_FLAG_OFFSET = 0x%08x\n", EhcReadOpReg (Ehc, EHC_CONFIG_FLAG_OFFSET))); 255 255 for (Index = 0; Index < (UINT8) (Ehc->HcStructParams & HCSP_NPORTS); Index++) { 256 DEBUG ((EFI_D_ INFO, " EHC_PORT_STAT_OFFSET(%d) = 0x%08x\n", Index, EhcReadOpReg (Ehc, EHC_PORT_STAT_OFFSET + (4 * Index))));257 } 258 } 256 DEBUG ((EFI_D_VERBOSE, " EHC_PORT_STAT_OFFSET(%d) = 0x%08x\n", Index, EhcReadOpReg (Ehc, EHC_PORT_STAT_OFFSET + (4 * Index)))); 257 } 258 }
Note:
See TracChangeset
for help on using the changeset viewer.