]>
git.proxmox.com Git - mirror_edk2.git/blob - QuarkSocPkg/QuarkSouthCluster/Usb/Ohci/Dxe/OhciDebug.c
2 This file provides the information dump support for OHCI when in debug mode.
4 Copyright (c) 2013-2015 Intel Corporation.
6 SPDX-License-Identifier: BSD-2-Clause-Patent
16 Print the data of ED and the TDs attached to the ED
18 @param Uhc Pointer to OHCI private data
19 @param Ed Pointer to a ED to free
20 @param Td Pointer to the Td head
22 @retval EFI_SUCCESS ED
27 IN USB_OHCI_HC_DEV
*Uhc
,
36 DEBUG ((EFI_D_INFO
, "\n Before executing command\n"));
38 DEBUG ((EFI_D_INFO
, "\n after executing command\n"));
41 DEBUG ((EFI_D_INFO
, "\nED Address:%p, ED buffer:\n", Ed
));
42 DEBUG ((EFI_D_INFO
, "DWord0 :TD Tail :TD Head :Next ED\n"));
43 for (Index
= 0; Index
< sizeof (ED_DESCRIPTOR
)/4; Index
++) {
44 DEBUG ((EFI_D_INFO
, "%8x ", *((UINT32
*)(Ed
) + Index
) ));
46 DEBUG ((EFI_D_INFO
, "\nNext TD buffer:%p\n", Td
));
49 if (Td
->Word0
.DirPID
== TD_SETUP_PID
) {
50 DEBUG ((EFI_D_INFO
, "\nSetup PID "));
51 }else if (Td
->Word0
.DirPID
== TD_OUT_PID
) {
52 DEBUG ((EFI_D_INFO
, "\nOut PID "));
53 }else if (Td
->Word0
.DirPID
== TD_IN_PID
) {
54 DEBUG ((EFI_D_INFO
, "\nIn PID "));
55 }else if (Td
->Word0
.DirPID
== TD_NODATA_PID
) {
56 DEBUG ((EFI_D_INFO
, "\nNo data PID "));
58 DEBUG ((EFI_D_INFO
, "TD Address:%p, TD buffer:\n", Td
));
59 DEBUG ((EFI_D_INFO
, "DWord0 :CuBuffer:Next TD :Buff End:Next TD :DataBuff:ActLength\n"));
60 for (Index
= 0; Index
< sizeof (TD_DESCRIPTOR
)/4; Index
++) {
61 DEBUG ((EFI_D_INFO
, "%8x ", *((UINT32
*)(Td
) + Index
) ));
63 DEBUG ((EFI_D_INFO
, "\nCurrent TD Data buffer(size%d)\n", (UINT32
)Td
->ActualSendLength
));
64 for (Index
= 0; Index
< Td
->ActualSendLength
; Index
++) {
65 DEBUG ((EFI_D_INFO
, "%2x ", *(UINT8
*)(UINTN
)(Td
->DataBuffer
+ Index
) ));
67 Td
= (TD_DESCRIPTOR
*)(UINTN
)(Td
->NextTDPointer
);
69 DEBUG ((EFI_D_INFO
, "\n TD buffer End\n"));