]>
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 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22 Print the data of ED and the TDs attached to the ED
24 @param Uhc Pointer to OHCI private data
25 @param Ed Pointer to a ED to free
26 @param Td Pointer to the Td head
28 @retval EFI_SUCCESS ED
33 IN USB_OHCI_HC_DEV
*Uhc
,
42 DEBUG ((EFI_D_INFO
, "\n Before executing command\n"));
44 DEBUG ((EFI_D_INFO
, "\n after executing command\n"));
47 DEBUG ((EFI_D_INFO
, "\nED Address:%p, ED buffer:\n", Ed
));
48 DEBUG ((EFI_D_INFO
, "DWord0 :TD Tail :TD Head :Next ED\n"));
49 for (Index
= 0; Index
< sizeof (ED_DESCRIPTOR
)/4; Index
++) {
50 DEBUG ((EFI_D_INFO
, "%8x ", *((UINT32
*)(Ed
) + Index
) ));
52 DEBUG ((EFI_D_INFO
, "\nNext TD buffer:%p\n", Td
));
55 if (Td
->Word0
.DirPID
== TD_SETUP_PID
) {
56 DEBUG ((EFI_D_INFO
, "\nSetup PID "));
57 }else if (Td
->Word0
.DirPID
== TD_OUT_PID
) {
58 DEBUG ((EFI_D_INFO
, "\nOut PID "));
59 }else if (Td
->Word0
.DirPID
== TD_IN_PID
) {
60 DEBUG ((EFI_D_INFO
, "\nIn PID "));
61 }else if (Td
->Word0
.DirPID
== TD_NODATA_PID
) {
62 DEBUG ((EFI_D_INFO
, "\nNo data PID "));
64 DEBUG ((EFI_D_INFO
, "TD Address:%p, TD buffer:\n", Td
));
65 DEBUG ((EFI_D_INFO
, "DWord0 :CuBuffer:Next TD :Buff End:Next TD :DataBuff:ActLength\n"));
66 for (Index
= 0; Index
< sizeof (TD_DESCRIPTOR
)/4; Index
++) {
67 DEBUG ((EFI_D_INFO
, "%8x ", *((UINT32
*)(Td
) + Index
) ));
69 DEBUG ((EFI_D_INFO
, "\nCurrent TD Data buffer(size%d)\n", (UINT32
)Td
->ActualSendLength
));
70 for (Index
= 0; Index
< Td
->ActualSendLength
; Index
++) {
71 DEBUG ((EFI_D_INFO
, "%2x ", *(UINT8
*)(UINTN
)(Td
->DataBuffer
+ Index
) ));
73 Td
= (TD_DESCRIPTOR
*)(UINTN
)(Td
->NextTDPointer
);
75 DEBUG ((EFI_D_INFO
, "\n TD buffer End\n"));