- Timestamp:
- May 23, 2012 6:50:53 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r41409 r41423 6463 6463 6464 6464 /** 6465 * Dump receive descriptor to debugger info buffer. 6466 * 6467 * @param pState The device state structure. 6468 * @param pHlp The output helpers. 6469 * @param addr Physical address of the descriptor in guest context. 6470 * @param pDesc Pointer to the descriptor. 6471 */ 6472 static void e1kRDescInfo(E1KSTATE* pState, PCDBGFINFOHLP pHlp, RTGCPHYS addr, E1KRXDESC* pDesc) 6473 { 6474 pHlp->pfnPrintf(pHlp, "%RGp: Address=%16LX Length=%04X Csum=%04X\n", 6475 addr, pDesc->u64BufAddr, pDesc->u16Length, pDesc->u16Checksum); 6476 pHlp->pfnPrintf(pHlp, " STA: %s %s %s %s %s %s %s ERR: %s %s %s %s SPECIAL: %s VLAN=%03x PRI=%x\n", 6477 pDesc->status.fPIF ? "PIF" : "pif", 6478 pDesc->status.fIPCS ? "IPCS" : "ipcs", 6479 pDesc->status.fTCPCS ? "TCPCS" : "tcpcs", 6480 pDesc->status.fVP ? "VP" : "vp", 6481 pDesc->status.fIXSM ? "IXSM" : "ixsm", 6482 pDesc->status.fEOP ? "EOP" : "eop", 6483 pDesc->status.fDD ? "DD" : "dd", 6484 pDesc->status.fRXE ? "RXE" : "rxe", 6485 pDesc->status.fIPE ? "IPE" : "ipe", 6486 pDesc->status.fTCPE ? "TCPE" : "tcpe", 6487 pDesc->status.fCE ? "CE" : "ce", 6488 E1K_SPEC_CFI(pDesc->status.u16Special) ? "CFI" :"cfi", 6489 E1K_SPEC_VLAN(pDesc->status.u16Special), 6490 E1K_SPEC_PRI(pDesc->status.u16Special)); 6491 } 6492 6493 /** 6494 * Dump transmit descriptor to debugger info buffer. 6495 * 6496 * @param pState The device state structure. 6497 * @param pHlp The output helpers. 6498 * @param addr Physical address of the descriptor in guest context. 6499 * @param pDesc Pointer to descriptor union. 6500 */ 6501 static void e1kTDescInfo(E1KSTATE* pState, PCDBGFINFOHLP pHlp, RTGCPHYS addr, E1KTXDESC* pDesc) 6502 { 6503 switch (e1kGetDescType(pDesc)) 6504 { 6505 case E1K_DTYP_CONTEXT: 6506 pHlp->pfnPrintf(pHlp, "%RGp: Type=Context\n", addr); 6507 pHlp->pfnPrintf(pHlp, " IPCSS=%02X IPCSO=%02X IPCSE=%04X TUCSS=%02X TUCSO=%02X TUCSE=%04X\n", 6508 pDesc->context.ip.u8CSS, pDesc->context.ip.u8CSO, pDesc->context.ip.u16CSE, 6509 pDesc->context.tu.u8CSS, pDesc->context.tu.u8CSO, pDesc->context.tu.u16CSE); 6510 pHlp->pfnPrintf(pHlp, " TUCMD:%s%s%s %s %s PAYLEN=%04x HDRLEN=%04x MSS=%04x STA: %s\n", 6511 pDesc->context.dw2.fIDE ? " IDE":"", 6512 pDesc->context.dw2.fRS ? " RS" :"", 6513 pDesc->context.dw2.fTSE ? " TSE":"", 6514 pDesc->context.dw2.fIP ? "IPv4":"IPv6", 6515 pDesc->context.dw2.fTCP ? "TCP":"UDP", 6516 pDesc->context.dw2.u20PAYLEN, 6517 pDesc->context.dw3.u8HDRLEN, 6518 pDesc->context.dw3.u16MSS, 6519 pDesc->context.dw3.fDD?"DD":""); 6520 break; 6521 case E1K_DTYP_DATA: 6522 pHlp->pfnPrintf(pHlp, "%RGp: Type=Data Address=%16LX DTALEN=%05X\n", 6523 addr, 6524 pDesc->data.u64BufAddr, 6525 pDesc->data.cmd.u20DTALEN); 6526 pHlp->pfnPrintf(pHlp, " DCMD:%s%s%s%s%s%s STA:%s%s%s POPTS:%s%s SPECIAL:%s VLAN=%03x PRI=%x\n", 6527 pDesc->data.cmd.fIDE ? " IDE" :"", 6528 pDesc->data.cmd.fVLE ? " VLE" :"", 6529 pDesc->data.cmd.fRS ? " RS" :"", 6530 pDesc->data.cmd.fTSE ? " TSE" :"", 6531 pDesc->data.cmd.fIFCS? " IFCS":"", 6532 pDesc->data.cmd.fEOP ? " EOP" :"", 6533 pDesc->data.dw3.fDD ? " DD" :"", 6534 pDesc->data.dw3.fEC ? " EC" :"", 6535 pDesc->data.dw3.fLC ? " LC" :"", 6536 pDesc->data.dw3.fTXSM? " TXSM":"", 6537 pDesc->data.dw3.fIXSM? " IXSM":"", 6538 E1K_SPEC_CFI(pDesc->data.dw3.u16Special) ? "CFI" :"cfi", 6539 E1K_SPEC_VLAN(pDesc->data.dw3.u16Special), 6540 E1K_SPEC_PRI(pDesc->data.dw3.u16Special)); 6541 break; 6542 case E1K_DTYP_LEGACY: 6543 pHlp->pfnPrintf(pHlp, "%RGp: Type=Legacy Address=%16LX DTALEN=%05X\n", 6544 addr, 6545 pDesc->data.u64BufAddr, 6546 pDesc->legacy.cmd.u16Length); 6547 pHlp->pfnPrintf(pHlp, " CMD:%s%s%s%s%s%s STA:%s%s%s CSO=%02x CSS=%02x SPECIAL:%s VLAN=%03x PRI=%x\n", 6548 pDesc->legacy.cmd.fIDE ? " IDE" :"", 6549 pDesc->legacy.cmd.fVLE ? " VLE" :"", 6550 pDesc->legacy.cmd.fRS ? " RS" :"", 6551 pDesc->legacy.cmd.fIC ? " IC" :"", 6552 pDesc->legacy.cmd.fIFCS? " IFCS":"", 6553 pDesc->legacy.cmd.fEOP ? " EOP" :"", 6554 pDesc->legacy.dw3.fDD ? " DD" :"", 6555 pDesc->legacy.dw3.fEC ? " EC" :"", 6556 pDesc->legacy.dw3.fLC ? " LC" :"", 6557 pDesc->legacy.cmd.u8CSO, 6558 pDesc->legacy.dw3.u8CSS, 6559 E1K_SPEC_CFI(pDesc->legacy.dw3.u16Special) ? "CFI" :"cfi", 6560 E1K_SPEC_VLAN(pDesc->legacy.dw3.u16Special), 6561 E1K_SPEC_PRI(pDesc->legacy.dw3.u16Special)); 6562 break; 6563 default: 6564 pHlp->pfnPrintf(pHlp, "%RGp: Invalid Transmit Descriptor\n", addr); 6565 break; 6566 } 6567 } 6568 6569 /** 6465 6570 * Status info callback. 6466 6571 * … … 6512 6617 pHlp->pfnPrintf(pHlp, "RA%02d: %s %RTmac\n", i, pcszTmp, ra->addr); 6513 6618 } 6619 } 6620 unsigned cDescs = RDLEN / sizeof(E1KRXDESC); 6621 pHlp->pfnPrintf(pHlp, "\n-- Receive Descriptors (%d total) --\n", cDescs); 6622 for (i = 0; i < cDescs; ++i) 6623 { 6624 E1KRXDESC desc; 6625 PDMDevHlpPhysRead(pDevIns, e1kDescAddr(RDBAH, RDBAL, i), 6626 &desc, sizeof(desc)); 6627 e1kRDescInfo(pState, pHlp, e1kDescAddr(RDBAH, RDBAL, i), &desc); 6628 } 6629 cDescs = TDLEN / sizeof(E1KTXDESC); 6630 pHlp->pfnPrintf(pHlp, "\n-- Transmit Descriptors (%d total) --\n", cDescs); 6631 for (i = 0; i < cDescs; ++i) 6632 { 6633 E1KTXDESC desc; 6634 PDMDevHlpPhysRead(pDevIns, e1kDescAddr(TDBAH, TDBAL, i), 6635 &desc, sizeof(desc)); 6636 e1kTDescInfo(pState, pHlp, e1kDescAddr(TDBAH, TDBAL, i), &desc); 6514 6637 } 6515 6638
Note:
See TracChangeset
for help on using the changeset viewer.