1 /** @file
2 
3   This file provides the information dump support for Uhci when in debug mode.
4 
5 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7 
8 **/
9 
10 #include "Uhci.h"
11 
12 /**
13   Dump the content of QH structure.
14 
15   @param  QhSw    Pointer to software QH structure.
16 
17 **/
18 VOID
UhciDumpQh(IN UHCI_QH_SW * QhSw)19 UhciDumpQh (
20   IN UHCI_QH_SW    *QhSw
21   )
22 {
23   DEBUG ((EFI_D_VERBOSE, "&QhSw @ 0x%p\n", QhSw));
24   DEBUG ((EFI_D_VERBOSE, "QhSw.NextQh    - 0x%p\n", QhSw->NextQh));
25   DEBUG ((EFI_D_VERBOSE, "QhSw.TDs       - 0x%p\n", QhSw->TDs));
26   DEBUG ((EFI_D_VERBOSE, "QhSw.QhHw:\n"));
27   DEBUG ((EFI_D_VERBOSE, " Horizon  Link - %x\n", QhSw->QhHw.HorizonLink));
28   DEBUG ((EFI_D_VERBOSE, " Vertical Link - %x\n\n", QhSw->QhHw.VerticalLink));
29 }
30 
31 
32 /**
33   Dump the content of TD structure.
34 
35   @param  TdSw    Pointer to software TD structure.
36 
37 **/
38 VOID
UhciDumpTds(IN UHCI_TD_SW * TdSw)39 UhciDumpTds (
40   IN UHCI_TD_SW           *TdSw
41   )
42 {
43   UHCI_TD_SW              *CurTdSw;
44 
45   CurTdSw = TdSw;
46 
47   while (CurTdSw != NULL) {
48     DEBUG ((EFI_D_VERBOSE, "TdSw @ 0x%p\n",           CurTdSw));
49     DEBUG ((EFI_D_VERBOSE, "TdSw.NextTd   - 0x%p\n",  CurTdSw->NextTd));
50     DEBUG ((EFI_D_VERBOSE, "TdSw.DataLen  - %d\n",    CurTdSw->DataLen));
51     DEBUG ((EFI_D_VERBOSE, "TdSw.Data     - 0x%p\n",  CurTdSw->Data));
52     DEBUG ((EFI_D_VERBOSE, "TdHw:\n"));
53     DEBUG ((EFI_D_VERBOSE, " NextLink     - 0x%x\n",  CurTdSw->TdHw.NextLink));
54     DEBUG ((EFI_D_VERBOSE, " ActualLen    - %d\n",    CurTdSw->TdHw.ActualLen));
55     DEBUG ((EFI_D_VERBOSE, " Status       - 0x%x\n",  CurTdSw->TdHw.Status));
56     DEBUG ((EFI_D_VERBOSE, " IOC          - %d\n",    CurTdSw->TdHw.IntOnCpl));
57     DEBUG ((EFI_D_VERBOSE, " IsIsoCh      - %d\n",    CurTdSw->TdHw.IsIsoch));
58     DEBUG ((EFI_D_VERBOSE, " LowSpeed     - %d\n",    CurTdSw->TdHw.LowSpeed));
59     DEBUG ((EFI_D_VERBOSE, " ErrorCount   - %d\n",    CurTdSw->TdHw.ErrorCount));
60     DEBUG ((EFI_D_VERBOSE, " ShortPacket  - %d\n",    CurTdSw->TdHw.ShortPacket));
61     DEBUG ((EFI_D_VERBOSE, " PidCode      - 0x%x\n",  CurTdSw->TdHw.PidCode));
62     DEBUG ((EFI_D_VERBOSE, " DevAddr      - %d\n",    CurTdSw->TdHw.DeviceAddr));
63     DEBUG ((EFI_D_VERBOSE, " EndPoint     - %d\n",    CurTdSw->TdHw.EndPoint));
64     DEBUG ((EFI_D_VERBOSE, " DataToggle   - %d\n",    CurTdSw->TdHw.DataToggle));
65     DEBUG ((EFI_D_VERBOSE, " MaxPacketLen - %d\n",    CurTdSw->TdHw.MaxPacketLen));
66     DEBUG ((EFI_D_VERBOSE, " DataBuffer   - 0x%x\n\n",CurTdSw->TdHw.DataBuffer));
67 
68     CurTdSw = CurTdSw->NextTd;
69   }
70 }
71 
72