Changeset 82065 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Nov 21, 2019 8:32:15 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134871
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r82064 r82065 3259 3259 # ifdef IN_RING3 3260 3260 /** 3261 * @callback_method_impl{FNIOMIOPORTOUT,HGSMI OUT handler.} 3262 */ 3263 static DECLCALLBACK(int) vgaR3IOPortHGSMIWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb) 3261 * @callback_method_impl{FNIOMIOPORTNEWOUT,HGSMI OUT handler.} 3262 */ 3263 static DECLCALLBACK(VBOXSTRICTRC) 3264 vgaR3IOPortHgsmiWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT offPort, uint32_t u32, unsigned cb) 3264 3265 { 3265 3266 PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE); 3266 3267 Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo))); 3267 LogFlowFunc(("Port 0x%x, u32 0x%x, cb %d\n", Port, u32, cb)); 3268 3268 LogFlowFunc(("offPort=0x%x u32=0x%x cb=%u\n", offPort, u32, cb)); 3269 3269 3270 3270 NOREF(pvUser); … … 3272 3272 if (cb == 4) 3273 3273 { 3274 switch ( Port)3274 switch (offPort) 3275 3275 { 3276 3276 case VGA_PORT_HGSMI_HOST: /* Host */ … … 3314 3314 default: 3315 3315 # ifdef DEBUG_sunlover 3316 AssertMsgFailed(("vgaR3IOPortH GSMIWrite: Port=%#x cb=%d u32=%#x\n",Port, cb, u32));3316 AssertMsgFailed(("vgaR3IOPortHgsmiWrite: offPort=%#x cb=%d u32=%#x\n", offPort, cb, u32)); 3317 3317 # endif 3318 3318 break; … … 3321 3321 else 3322 3322 { 3323 /** @todo r=bird: According to Ralf Brown, one and two byte accesses to the 3324 * 0x3b0-0x3b1 and 0x3b2-0x3b3 I/O port pairs should work the same as 3325 * 0x3b4-0x3b5 (MDA CRT control). */ 3326 Log(("vgaR3IOPortHgsmiWrite: offPort=%#x cb=%d u32=%#x - possible valid MDA CRT access\n", offPort, cb, u32)); 3323 3327 # ifdef DEBUG_sunlover 3324 AssertMsgFailed(("vgaR3IOPortH GSMIWrite: Port=%#x cb=%d u32=%#x\n",Port, cb, u32));3328 AssertMsgFailed(("vgaR3IOPortHgsmiWrite: offPort=%#x cb=%d u32=%#x\n", offPort, cb, u32)); 3325 3329 # endif 3330 STAM_REL_COUNTER_INC(&pThis->StatHgsmiMdaCgaAccesses); 3326 3331 } 3327 3332 … … 3331 3336 3332 3337 /** 3333 * @callback_method_impl{FNIOMIOPORTOUT,HGSMI IN handler.} 3334 */ 3335 static DECLCALLBACK(int) vgaR3IOPortHGSMIRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb) 3338 * @callback_method_impl{FNIOMIOPORTNEWOUT,HGSMI IN handler.} 3339 */ 3340 static DECLCALLBACK(VBOXSTRICTRC) 3341 vgaR3IOPortHgmsiRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT offPort, uint32_t *pu32, unsigned cb) 3336 3342 { 3337 3343 PVGASTATE pThis = PDMDEVINS_2_DATA(pDevIns, PVGASTATE); 3338 3344 Assert(PDMDevHlpCritSectIsOwner(pDevIns, pDevIns->CTX_SUFF(pCritSectRo))); 3339 LogFlowFunc((" Port 0x%x, cb %d\n",Port, cb));3345 LogFlowFunc(("offPort=0x%x cb=%d\n", offPort, cb)); 3340 3346 3341 3347 NOREF(pvUser); 3342 3348 3343 intrc = VINF_SUCCESS;3349 VBOXSTRICTRC rc = VINF_SUCCESS; 3344 3350 if (cb == 4) 3345 3351 { 3346 switch ( Port)3352 switch (offPort) 3347 3353 { 3348 3354 case VGA_PORT_HGSMI_HOST: /* Host */ … … 3354 3360 default: 3355 3361 # ifdef DEBUG_sunlover 3356 AssertMsgFailed(("vgaR3IOPortH GSMIRead: Port=%#x cb=%d\n", Port, cb));3362 AssertMsgFailed(("vgaR3IOPortHgmsiRead: Port=%#x cb=%d\n", Port, cb)); 3357 3363 # endif 3358 3364 rc = VERR_IOM_IOPORT_UNUSED; … … 3362 3368 else 3363 3369 { 3364 # ifdef DEBUG_sunlover 3365 Log(("vgaR3IOPortHGSMIRead: Port=%#x cb=%d\n", Port, cb)); 3366 # endif 3370 /** @todo r=bird: According to Ralf Brown, one and two byte accesses to the 3371 * 0x3b0-0x3b1 and 0x3b2-0x3b3 I/O port pairs should work the same as 3372 * 0x3b4-0x3b5 (MDA CRT control). */ 3373 Log(("vgaR3IOPortHgmsiRead: offPort=%#x cb=%d - possible valid MDA CRT access\n", offPort, cb)); 3374 STAM_REL_COUNTER_INC(&pThis->StatHgsmiMdaCgaAccesses); 3367 3375 rc = VERR_IOM_IOPORT_UNUSED; 3368 3376 } … … 6761 6769 #ifdef VBOX_WITH_HGSMI 6762 6770 /* Use reserved VGA IO ports for HGSMI. */ 6763 rc = PDMDevHlpIOPortRegister(pDevIns, VGA_PORT_HGSMI_HOST, 4, NULL, vgaR3IOPortHGSMIWrite, vgaR3IOPortHGSMIRead, NULL, NULL, "VGA - 3b0 (HGSMI host)"); 6764 AssertRCReturn(rc, rc); 6765 rc = PDMDevHlpIOPortRegister(pDevIns, VGA_PORT_HGSMI_GUEST, 4, NULL, vgaR3IOPortHGSMIWrite, vgaR3IOPortHGSMIRead, NULL, NULL, "VGA - 3d0 (HGSMI guest)"); 6766 AssertRCReturn(rc, rc); 6771 REG_PORT(VGA_PORT_HGSMI_HOST, 4, vgaR3IOPortHgsmiWrite, vgaR3IOPortHgmsiRead, "HGSMI host (3b0-3b3)", &pThis->hIoPortHgsmiHost); 6772 REG_PORT(VGA_PORT_HGSMI_GUEST, 4, vgaR3IOPortHgsmiWrite, vgaR3IOPortHgmsiRead, "HGSMI guest (3d0-3d3)", &pThis->hIoPortHgsmiGuest); 6767 6773 #endif /* VBOX_WITH_HGSMI */ 6768 6774 … … 7362 7368 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMapPage, STAMTYPE_COUNTER, "MapPageCalls", STAMUNIT_OCCURENCES, "Calls to IOMMMIOMapMMIO2Page."); 7363 7369 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatUpdateDisp, STAMTYPE_COUNTER, "UpdateDisplay", STAMUNIT_OCCURENCES, "Calls to vgaPortUpdateDisplay()."); 7370 #endif 7371 #ifdef VBOX_WITH_HGSMI 7372 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatHgsmiMdaCgaAccesses, STAMTYPE_COUNTER, "HgmsiMdaCgaAccesses", STAMUNIT_OCCURENCES, "Number of non-HGMSI accesses for 03b0-3b3 and 03d0-3d3."); 7364 7373 #endif 7365 7374 -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r82064 r82065 378 378 STAMCOUNTER StatMapPage; /**< Counts IOMMMIOMapMMIO2Page calls. */ 379 379 STAMCOUNTER StatUpdateDisp; /**< Counts vgaPortUpdateDisplay calls. */ 380 # ifdef VBOX_WITH_HGSMI 381 STAMCOUNTER StatHgsmiMdaCgaAccesses; 382 # endif 380 383 381 384 /* Keep track of ring 0 latched accesses to the VGA MMIO memory. */ … … 516 519 /** @} */ 517 520 521 # ifdef VBOX_WITH_HGSMI 522 /** @name I/O ports for HGSMI 0x3b0-03b3 and 0x3d0-03d3 (ring-3 only) 523 * @{ */ 524 IOMIOPORTHANDLE hIoPortHgsmiHost; 525 IOMIOPORTHANDLE hIoPortHgsmiGuest; 526 /** @} */ 527 # endif 528 518 529 /** @name I/O ports for Boch VBE 0x1ce-0x1cf 519 530 * @{ */
Note:
See TracChangeset
for help on using the changeset viewer.