Home | History | Annotate | Download | only in UhciDxe
      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 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
     10 
     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.
     13 
     14 **/
     15 
     16 #include "Uhci.h"
     17 
     18 /**
     19   Dump the content of QH structure.
     20 
     21   @param  QhSw    Pointer to software QH structure.
     22 
     23 **/
     24 VOID
     25 UhciDumpQh (
     26   IN UHCI_QH_SW    *QhSw
     27   )
     28 {
     29   DEBUG ((EFI_D_VERBOSE, "&QhSw @ 0x%p\n", QhSw));
     30   DEBUG ((EFI_D_VERBOSE, "QhSw.NextQh    - 0x%p\n", QhSw->NextQh));
     31   DEBUG ((EFI_D_VERBOSE, "QhSw.TDs       - 0x%p\n", QhSw->TDs));
     32   DEBUG ((EFI_D_VERBOSE, "QhSw.QhHw:\n"));
     33   DEBUG ((EFI_D_VERBOSE, " Horizon  Link - %x\n", QhSw->QhHw.HorizonLink));
     34   DEBUG ((EFI_D_VERBOSE, " Vertical Link - %x\n\n", QhSw->QhHw.VerticalLink));
     35 }
     36 
     37 
     38 /**
     39   Dump the content of TD structure.
     40 
     41   @param  TdSw    Pointer to software TD structure.
     42 
     43 **/
     44 VOID
     45 UhciDumpTds (
     46   IN UHCI_TD_SW           *TdSw
     47   )
     48 {
     49   UHCI_TD_SW              *CurTdSw;
     50 
     51   CurTdSw = TdSw;
     52 
     53   while (CurTdSw != NULL) {
     54     DEBUG ((EFI_D_VERBOSE, "TdSw @ 0x%p\n",           CurTdSw));
     55     DEBUG ((EFI_D_VERBOSE, "TdSw.NextTd   - 0x%p\n",  CurTdSw->NextTd));
     56     DEBUG ((EFI_D_VERBOSE, "TdSw.DataLen  - %d\n",    CurTdSw->DataLen));
     57     DEBUG ((EFI_D_VERBOSE, "TdSw.Data     - 0x%p\n",  CurTdSw->Data));
     58     DEBUG ((EFI_D_VERBOSE, "TdHw:\n"));
     59     DEBUG ((EFI_D_VERBOSE, " NextLink     - 0x%x\n",  CurTdSw->TdHw.NextLink));
     60     DEBUG ((EFI_D_VERBOSE, " ActualLen    - %d\n",    CurTdSw->TdHw.ActualLen));
     61     DEBUG ((EFI_D_VERBOSE, " Status       - 0x%x\n",  CurTdSw->TdHw.Status));
     62     DEBUG ((EFI_D_VERBOSE, " IOC          - %d\n",    CurTdSw->TdHw.IntOnCpl));
     63     DEBUG ((EFI_D_VERBOSE, " IsIsoCh      - %d\n",    CurTdSw->TdHw.IsIsoch));
     64     DEBUG ((EFI_D_VERBOSE, " LowSpeed     - %d\n",    CurTdSw->TdHw.LowSpeed));
     65     DEBUG ((EFI_D_VERBOSE, " ErrorCount   - %d\n",    CurTdSw->TdHw.ErrorCount));
     66     DEBUG ((EFI_D_VERBOSE, " ShortPacket  - %d\n",    CurTdSw->TdHw.ShortPacket));
     67     DEBUG ((EFI_D_VERBOSE, " PidCode      - 0x%x\n",  CurTdSw->TdHw.PidCode));
     68     DEBUG ((EFI_D_VERBOSE, " DevAddr      - %d\n",    CurTdSw->TdHw.DeviceAddr));
     69     DEBUG ((EFI_D_VERBOSE, " EndPoint     - %d\n",    CurTdSw->TdHw.EndPoint));
     70     DEBUG ((EFI_D_VERBOSE, " DataToggle   - %d\n",    CurTdSw->TdHw.DataToggle));
     71     DEBUG ((EFI_D_VERBOSE, " MaxPacketLen - %d\n",    CurTdSw->TdHw.MaxPacketLen));
     72     DEBUG ((EFI_D_VERBOSE, " DataBuffer   - 0x%x\n\n",CurTdSw->TdHw.DataBuffer));
     73 
     74     CurTdSw = CurTdSw->NextTd;
     75   }
     76 }
     77 
     78