Changeset 82215 in vbox
- Timestamp:
- Nov 26, 2019 3:03:45 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r82147 r82215 397 397 /** Emulated device type. */ 398 398 uint8_t uDevType; 399 /** Backwards compatible shared memory region during state loading. */ 400 bool fSharedRegion; 401 bool afAlignment5[2]; 399 bool afAlignment5[3]; 402 400 /** Link speed to be reported through CSR68. */ 403 401 uint32_t u32LinkSpeed; … … 418 416 /** ISA I/O ports offset 0x00-0x0f. */ 419 417 IOMIOPORTHANDLE hIoPortsIsaAProm; 418 419 /** Backwards compatible shared memory region during state loading (before 4.3.6). */ 420 PGMMMIO2HANDLE hMmio2Shared; 420 421 421 422 /** The loopback transmit buffer (avoid stack allocations). */ … … 4485 4486 /* older saved states contain the shared memory region which was never used for ages. */ 4486 4487 void *pvSharedMMIOR3; 4487 rc = PDMDevHlpM MIO2Register(pDevIns, pDevIns->apPciDevs[0], 2, _512K, 0, (void **)&pvSharedMMIOR3, "PCnetSh");4488 rc = PDMDevHlpMmio2Create(pDevIns, pDevIns->apPciDevs[0], 2, _512K, 0, "PCnetSh", &pvSharedMMIOR3, &pThis->hMmio2Shared); 4488 4489 if (RT_FAILURE(rc)) 4489 4490 rc = PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS, 4490 4491 N_("Failed to allocate the dummy shmem region for the PCnet device")); 4491 pThis->fSharedRegion = true;4492 } 4492 } 4493 4493 4494 PDMDevHlpCritSectLeave(pDevIns, &pThis->CritSect); 4494 4495 4495 return rc; 4496 4496 } … … 4610 4610 PPCNETSTATE pThis = PDMDEVINS_2_DATA(pDevIns, PPCNETSTATE); 4611 4611 int rc = VINF_SUCCESS; 4612 if (pThis-> fSharedRegion)4612 if (pThis->hMmio2Shared != NIL_PGMMMIO2HANDLE) 4613 4613 { 4614 4614 /* drop this dummy region */ 4615 rc = PDMDevHlpMMIOExDeregister(pDevIns, NULL, 2); 4616 pThis->fSharedRegion = false; 4615 rc = pDevIns->pHlpR3->pfnMmio2Destroy(pDevIns, pThis->hMmio2Shared); 4616 AssertLogRelRC(rc); 4617 pThis->hMmio2Shared = NIL_PGMMMIO2HANDLE; 4617 4618 } 4618 4619 return rc; … … 5079 5080 pThis->hIoPortsIsa = NIL_IOMIOPORTHANDLE; 5080 5081 pThis->hIoPortsIsaAProm = NIL_IOMIOPORTHANDLE; 5082 pThis->hMmio2Shared = NIL_PGMMMIO2HANDLE; 5081 5083 pThisCC->pDevIns = pDevIns; 5082 5084
Note:
See TracChangeset
for help on using the changeset viewer.