Changeset 6050 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Dec 11, 2007 2:18:07 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 26687
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c
r6043 r6050 63 63 static int VBoxAddSolarisIOCtl(dev_t Dev, int Cmd, intptr_t pArg, int mode, cred_t *pCred, int *pVal); 64 64 65 static int VBoxAddSolarisGetInfo(dev_info_t *pDip, ddi_info_cmd_t enmCmd, void *pArg, void **ppResult); 65 66 static int VBoxAddSolarisAttach(dev_info_t *pDip, ddi_attach_cmd_t enmCmd); 66 67 static int VBoxAddSolarisDetach(dev_info_t *pDip, ddi_detach_cmd_t enmCmd); … … 108 109 DEVO_REV, /* driver build revision */ 109 110 0, /* ref count */ 110 nulldev, /* get info */111 VBoxAddSolarisGetInfo, 111 112 nulldev, /* identify */ 112 113 nulldev, /* probe */ … … 146 147 /** PCI handle of VMMDev. */ 147 148 ddi_acc_handle_t PciHandle; 149 /** IO port handle. */ 150 ddi_acc_handle_t PciIOHandle; 151 /** MMIO handle. */ 152 ddi_acc_handle_t PciMMIOHandle; 148 153 /** Interrupt block cookie. */ 149 154 ddi_iblock_cookie_t BlockCookie; … … 303 308 deviceAttr.devacc_attr_dataorder = DDI_STRICTORDER_ACC; 304 309 deviceAttr.devacc_attr_access = DDI_DEFAULT_ACC; 305 rc = ddi_regs_map_setup(pDip, 0, &baseAddr, 0, cbIOSize, &deviceAttr, &pState->Pci Handle);310 rc = ddi_regs_map_setup(pDip, 0, &baseAddr, 0, cbIOSize, &deviceAttr, &pState->PciIOHandle); 306 311 if (rc == DDI_SUCCESS) 307 312 { 308 313 pState->uIOPortBase = (uint16_t)*baseAddr; 309 rc = ddi_regs_map_setup(pDip, 1, &baseAddr, 0, pState->cbMMIO, &deviceAttr, &pState->Pci Handle);314 rc = ddi_regs_map_setup(pDip, 1, &baseAddr, 0, pState->cbMMIO, &deviceAttr, &pState->PciMMIOHandle); 310 315 if (rc == DDI_SUCCESS) 311 316 { … … 341 346 else 342 347 VBA_LOGNOTE("VBoxGuestSolarisAddIRQ failed.\n"); 348 ddi_regs_map_free(&pState->PciMMIOHandle); 343 349 } 344 350 else 345 351 VBA_LOGNOTE("ddi_regs_map_setup for MMIO region failed.\n"); 346 ddi_regs_map_free(&pState->Pci Handle);352 ddi_regs_map_free(&pState->PciIOHandle); 347 353 } 348 354 else … … 360 366 } 361 367 else 362 VBA_LOGNOTE("pci_config_setup failed .\n");368 VBA_LOGNOTE("pci_config_setup failed rc=%d.\n", rc); 363 369 RTSpinlockDestroy(g_Spinlock); 364 370 g_Spinlock = NIL_RTSPINLOCK; … … 424 430 return DDI_FAILURE; 425 431 } 432 } 433 434 435 /** 436 * Info entry point, called by solaris kernel for obtaining driver info. 437 * 438 * @param pDip The module structure instance (do not use). 439 * @param enmCmd Information request type. 440 * @param pArg Type specific argument. 441 * @param ppResult Where to store the requested info. 442 * 443 * @return corresponding solaris error code. 444 */ 445 static int VBoxAddSolarisGetInfo(dev_info_t *pDip, ddi_info_cmd_t enmCmd, void *pArg, void **ppResult) 446 { 447 VBA_LOGCONT("VBoxAddSolarisGetInfo\n"); 448 449 int rc = DDI_SUCCESS; 450 switch (enmCmd) 451 { 452 case DDI_INFO_DEVT2DEVINFO: 453 *ppResult = (void *)g_pDip; 454 break; 455 456 case DDI_INFO_DEVT2INSTANCE: 457 *ppResult = (void *)ddi_get_instance(g_pDip); 458 break; 459 460 default: 461 rc = DDI_FAILURE; 462 break; 463 } 464 return rc; 426 465 } 427 466
Note:
See TracChangeset
for help on using the changeset viewer.