Lines Matching refs:Port
134 static DECLCALLBACK(int) iomR3IOPortDummyIn(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb);
135 static DECLCALLBACK(int) iomR3IOPortDummyOut(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb);
136 static DECLCALLBACK(int) iomR3IOPortDummyInStr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, RTGCPTR *pGCPtrDst, PRTGCUINTREG pcTransfer, unsigned cb);
137 static DECLCALLBACK(int) iomR3IOPortDummyOutStr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, RTGCPTR *pGCPtrSrc, PRTGCUINTREG pcTransfer, unsigned cb);
140 static const char *iomR3IOPortGetStandardName(RTIOPORT Port);
415 * @param Port Port.
418 static PIOMIOPORTSTATS iomR3IOPortStatsCreate(PVM pVM, RTIOPORT Port, const char *pszDesc)
423 PIOMIOPORTSTATS pPort = (PIOMIOPORTSTATS)RTAvloIOPortGet(&pVM->iom.s.pTreesR3->IOPortStatTree, Port);
436 pPort->Core.Key = Port;
443 pszDesc = iomR3IOPortGetStandardName(Port);
446 rc = STAMR3RegisterF(pVM, &pPort->InR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/Ports/%04x-In-R3", Port); AssertRC(rc);
447 rc = STAMR3RegisterF(pVM, &pPort->OutR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/Ports/%04x-Out-R3", Port); AssertRC(rc);
448 rc = STAMR3RegisterF(pVM, &pPort->InRZ, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/Ports/%04x-In-RZ", Port); AssertRC(rc);
449 rc = STAMR3RegisterF(pVM, &pPort->OutRZ, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/Ports/%04x-Out-RZ", Port); AssertRC(rc);
450 rc = STAMR3RegisterF(pVM, &pPort->InRZToR3, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/Ports/%04x-In-RZtoR3", Port); AssertRC(rc);
451 rc = STAMR3RegisterF(pVM, &pPort->OutRZToR3,STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, pszDesc, "/IOM/Ports/%04x-Out-RZtoR3", Port); AssertRC(rc);
454 rc = STAMR3RegisterF(pVM, &pPort->ProfInR3, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, pszDesc,"/IOM/Ports/%04x-In-R3/Prof", Port); AssertRC(rc);
455 rc = STAMR3RegisterF(pVM, &pPort->ProfOutR3,STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, pszDesc,"/IOM/Ports/%04x-Out-R3/Prof", Port); AssertRC(rc);
456 rc = STAMR3RegisterF(pVM, &pPort->ProfInRZ, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, pszDesc,"/IOM/Ports/%04x-In-RZ/Prof", Port); AssertRC(rc);
457 rc = STAMR3RegisterF(pVM, &pPort->ProfOutRZ,STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, pszDesc,"/IOM/Ports/%04x-Out-RZ/Prof", Port); AssertRC(rc);
462 AssertMsgFailed(("what! Port=%d\n", Port));
584 pRange->Port = PortStart;
611 AssertMsgFailed(("Port range %#x-%#x (%s) conflicts with existing range(s)!\n", PortStart, (unsigned)PortStart + cPorts - 1, pszDesc));
669 RTIOPORT Port = PortStart;
670 while (Port <= PortLast && Port >= PortStart)
672 PIOMIOPORTRANGER3 pRange = (PIOMIOPORTRANGER3)RTAvlroIOPortRangeGet(&pVM->iom.s.CTX_SUFF(pTrees)->IOPortTreeR3, Port);
675 AssertMsgFailed(("No R3! Port=#x %#x-%#x! (%s)\n", Port, PortStart, (unsigned)PortStart + cPorts - 1, pszDesc));
686 AssertMsgFailed(("Not owner! Port=%#x %#x-%#x! (%s)\n", Port, PortStart, (unsigned)PortStart + cPorts - 1, pszDesc));
691 Port = pRange->Core.KeyLast + 1;
706 pRange->Port = PortStart;
726 AssertMsgFailed(("Port range %#x-%#x (%s) conflicts with existing range(s)!\n", PortStart, (unsigned)PortStart + cPorts - 1, pszDesc));
736 * Registers a Port IO R0 handler.
784 RTIOPORT Port = PortStart;
785 while (Port <= PortLast && Port >= PortStart)
787 PIOMIOPORTRANGER3 pRange = (PIOMIOPORTRANGER3)RTAvlroIOPortRangeGet(&pVM->iom.s.CTX_SUFF(pTrees)->IOPortTreeR3, Port);
790 AssertMsgFailed(("No R3! Port=#x %#x-%#x! (%s)\n", Port, PortStart, (unsigned)PortStart + cPorts - 1, pszDesc));
801 AssertMsgFailed(("Not owner! Port=%#x %#x-%#x! (%s)\n", Port, PortStart, (unsigned)PortStart + cPorts - 1, pszDesc));
806 Port = pRange->Core.KeyLast + 1;
821 pRange->Port = PortStart;
841 AssertMsgFailed(("Port range %#x-%#x (%s) conflicts with existing range(s)!\n", PortStart, (unsigned)PortStart + cPorts - 1, pszDesc));
851 * Deregisters a I/O Port range.
892 RTIOPORT Port = PortStart;
893 while (Port <= PortLast && Port >= PortStart)
895 PIOMIOPORTRANGER3 pRange = (PIOMIOPORTRANGER3)RTAvlroIOPortRangeGet(&pVM->iom.s.pTreesR3->IOPortTreeR3, Port);
898 Assert(Port <= pRange->Core.KeyLast);
908 Port = pRange->Core.KeyLast;
910 Port++;
917 Port = PortStart;
918 while (Port <= PortLast && Port >= PortStart)
923 PIOMIOPORTRANGERC pRange = (PIOMIOPORTRANGERC)RTAvlroIOPortRangeGet(&pVM->iom.s.pTreesR3->IOPortTreeRC, Port);
926 if ( pRange->Core.Key == Port
932 void *pv = RTAvlroIOPortRemove(&pVM->iom.s.pTreesR3->IOPortTreeRC, Port);
934 Port += pRange->cPorts;
937 else if (pRange->Core.Key == Port)
942 pRange->cPorts -= Port - pRange->Port;
943 pRange->Core.Key = Port;
944 pRange->Port = Port;
952 unsigned c = pRange->Core.KeyLast - Port + 1;
955 Port += c;
962 Assert(pRange->Core.KeyLast > PortLast && pRange->Core.Key < Port);
973 pRangeNew->Port = PortLast;
979 pRange->Core.KeyLast = Port - 1;
980 pRange->cPorts = Port - pRange->Port;
993 Port++;
1000 Port = PortStart;
1001 while (Port <= PortLast && Port >= PortStart)
1006 PIOMIOPORTRANGER0 pRange = (PIOMIOPORTRANGER0)RTAvlroIOPortRangeGet(&pVM->iom.s.pTreesR3->IOPortTreeR0, Port);
1009 if ( pRange->Core.Key == Port
1015 void *pv = RTAvlroIOPortRemove(&pVM->iom.s.pTreesR3->IOPortTreeR0, Port);
1017 Port += pRange->cPorts;
1020 else if (pRange->Core.Key == Port)
1025 pRange->cPorts -= Port - pRange->Port;
1026 pRange->Core.Key = Port;
1027 pRange->Port = Port;
1035 unsigned c = pRange->Core.KeyLast - Port + 1;
1038 Port += c;
1045 Assert(pRange->Core.KeyLast > PortLast && pRange->Core.Key < Port);
1056 pRangeNew->Port = PortLast;
1062 pRange->Core.KeyLast = Port - 1;
1063 pRange->cPorts = Port - pRange->Port;
1076 Port++;
1082 Port = PortStart;
1083 while (Port <= PortLast && Port >= PortStart)
1088 PIOMIOPORTRANGER3 pRange = (PIOMIOPORTRANGER3)RTAvlroIOPortRangeGet(&pVM->iom.s.pTreesR3->IOPortTreeR3, Port);
1091 if ( pRange->Core.Key == Port
1097 void *pv = RTAvlroIOPortRemove(&pVM->iom.s.pTreesR3->IOPortTreeR3, Port);
1099 Port += pRange->cPorts;
1102 else if (pRange->Core.Key == Port)
1107 pRange->cPorts -= Port - pRange->Port;
1108 pRange->Core.Key = Port;
1109 pRange->Port = Port;
1117 unsigned c = pRange->Core.KeyLast - Port + 1;
1120 Port += c;
1127 Assert(pRange->Core.KeyLast > PortLast && pRange->Core.Key < Port);
1138 pRangeNew->Port = PortLast;
1144 pRange->Core.KeyLast = Port - 1;
1145 pRange->cPorts = Port - pRange->Port;
1158 Port++;
1168 * Dummy Port I/O Handler for IN operations.
1174 * @param Port Port number used for the IN operation.
1178 static DECLCALLBACK(int) iomR3IOPortDummyIn(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb)
1180 NOREF(pDevIns); NOREF(pvUser); NOREF(Port);
1195 * Dummy Port I/O Handler for string IN operations.
1201 * @param Port Port number used for the string IN operation.
1206 static DECLCALLBACK(int) iomR3IOPortDummyInStr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, RTGCPTR *pGCPtrDst,
1209 NOREF(pDevIns); NOREF(pvUser); NOREF(Port); NOREF(pGCPtrDst); NOREF(pcTransfer); NOREF(cb);
1215 * Dummy Port I/O Handler for OUT operations.
1221 * @param Port Port number used for the OUT operation.
1225 static DECLCALLBACK(int) iomR3IOPortDummyOut(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb)
1227 NOREF(pDevIns); NOREF(pvUser); NOREF(Port); NOREF(u32); NOREF(cb);
1233 * Dummy Port I/O Handler for string OUT operations.
1239 * @param Port Port number used for the string OUT operation.
1244 static DECLCALLBACK(int) iomR3IOPortDummyOutStr(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, RTGCPTR *pGCPtrSrc,
1247 NOREF(pDevIns); NOREF(pvUser); NOREF(Port); NOREF(pGCPtrSrc); NOREF(pcTransfer); NOREF(cb);
1311 "I/O Port R3 ranges (pVM=%p)\n"
1321 "I/O Port R0 ranges (pVM=%p)\n"
1331 "I/O Port GC ranges (pVM=%p)\n"
1743 * @param Port The port to name.
1745 static const char *iomR3IOPortGetStandardName(RTIOPORT Port)
1747 switch (Port)