]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Pci/UhciDxe/UhciDebug.c
[Description]:
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / UhciDxe / UhciDebug.c
1 /** @file
2
3 Copyright (c) 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 UhciDebug.c
15
16 Abstract:
17
18 This file provides the information dump support for Uhci when in debug mode.
19
20 Revision History
21
22
23 **/
24
25 #include "Uhci.h"
26 #include "UhciDebug.h"
27
28
29 /**
30 Dump the content of QH structure
31
32 @param QhSw Pointer to software QH structure
33
34 @return None
35
36 **/
37 VOID
38 UhciDumpQh (
39 IN UHCI_QH_SW *QhSw
40 )
41 {
42 DEBUG ((EFI_D_INFO, "&QhSw @ 0x%x\n", QhSw));
43 DEBUG ((EFI_D_INFO, "QhSw.NextQh - 0x%x\n", QhSw->NextQh));
44 DEBUG ((EFI_D_INFO, "QhSw.TDs - 0x%x\n", QhSw->TDs));
45 DEBUG ((EFI_D_INFO, "QhSw.QhHw:\n"));
46 DEBUG ((EFI_D_INFO, " Horizon Link - %x\n", QhSw->QhHw.HorizonLink));
47 DEBUG ((EFI_D_INFO, " Vertical Link - %x\n\n", QhSw->QhHw.VerticalLink));
48 }
49
50
51 /**
52 Dump the content of TD structure.
53
54 @param TdSw Pointer to software TD structure
55 @param IsCur Whether dump the whole list, or only dump the current TD
56
57 @return None
58
59 **/
60 VOID
61 UhciDumpTds (
62 IN UHCI_TD_SW *TdSw
63 )
64 {
65 UHCI_TD_SW *CurTdSw;
66
67 CurTdSw = TdSw;
68
69 while (CurTdSw != NULL) {
70 DEBUG ((EFI_D_INFO, "TdSw @ 0x%x\n", CurTdSw));
71 DEBUG ((EFI_D_INFO, "TdSw.NextTd - 0x%x\n", CurTdSw->NextTd));
72 DEBUG ((EFI_D_INFO, "TdSw.DataLen - %d\n", CurTdSw->DataLen));
73 DEBUG ((EFI_D_INFO, "TdSw.Data - 0x%x\n", CurTdSw->Data));
74 DEBUG ((EFI_D_INFO, "TdHw:\n"));
75 DEBUG ((EFI_D_INFO, " NextLink - 0x%x\n", CurTdSw->TdHw.NextLink));
76 DEBUG ((EFI_D_INFO, " ActualLen - %d\n", CurTdSw->TdHw.ActualLen));
77 DEBUG ((EFI_D_INFO, " Status - 0x%x\n", CurTdSw->TdHw.Status));
78 DEBUG ((EFI_D_INFO, " IOC - %d\n", CurTdSw->TdHw.IntOnCpl));
79 DEBUG ((EFI_D_INFO, " IsIsoCh - %d\n", CurTdSw->TdHw.IsIsoch));
80 DEBUG ((EFI_D_INFO, " LowSpeed - %d\n", CurTdSw->TdHw.LowSpeed));
81 DEBUG ((EFI_D_INFO, " ErrorCount - %d\n", CurTdSw->TdHw.ErrorCount));
82 DEBUG ((EFI_D_INFO, " ShortPacket - %d\n", CurTdSw->TdHw.ShortPacket));
83 DEBUG ((EFI_D_INFO, " PidCode - 0x%x\n", CurTdSw->TdHw.PidCode));
84 DEBUG ((EFI_D_INFO, " DevAddr - %d\n", CurTdSw->TdHw.DeviceAddr));
85 DEBUG ((EFI_D_INFO, " EndPoint - %d\n", CurTdSw->TdHw.EndPoint));
86 DEBUG ((EFI_D_INFO, " DataToggle - %d\n", CurTdSw->TdHw.DataToggle));
87 DEBUG ((EFI_D_INFO, " MaxPacketLen - %d\n", CurTdSw->TdHw.MaxPacketLen));
88 DEBUG ((EFI_D_INFO, " DataBuffer - 0x%x\n\n",CurTdSw->TdHw.DataBuffer));
89
90 CurTdSw = CurTdSw->NextTd;
91 }
92 }
93