Changeset 81909 in vbox for trunk/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp
- Timestamp:
- Nov 17, 2019 6:23:56 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp
r81369 r81909 45 45 */ 46 46 47 /** @interface_method_impl{PDMPICHLP R3,pfnSetInterruptFF} */47 /** @interface_method_impl{PDMPICHLP,pfnSetInterruptFF} */ 48 48 static DECLCALLBACK(void) pdmR3PicHlp_SetInterruptFF(PPDMDEVINS pDevIns) 49 49 { 50 50 PDMDEV_ASSERT_DEVINS(pDevIns); 51 51 PVM pVM = pDevIns->Internal.s.pVMR3; 52 PVMCPU pVCpu = pVM->apCpusR3[0]; /* for PIC we always deliver to CPU 0, MP useAPIC */52 PVMCPU pVCpu = pVM->apCpusR3[0]; /* for PIC we always deliver to CPU 0, SMP uses APIC */ 53 53 54 54 /* IRQ state should be loaded as-is by "LoadExec". Changes can be made from LoadDone. */ … … 59 59 60 60 61 /** @interface_method_impl{PDMPICHLP R3,pfnClearInterruptFF} */61 /** @interface_method_impl{PDMPICHLP,pfnClearInterruptFF} */ 62 62 static DECLCALLBACK(void) pdmR3PicHlp_ClearInterruptFF(PPDMDEVINS pDevIns) 63 63 { 64 64 PDMDEV_ASSERT_DEVINS(pDevIns); 65 65 PVM pVM = pDevIns->Internal.s.pVMR3; 66 PVMCPU pVCpu = pVM->apCpusR3[0]; /* for PIC we always deliver to CPU 0, MP useAPIC */66 PVMCPU pVCpu = pVM->apCpusR3[0]; /* for PIC we always deliver to CPU 0, SMP uses APIC */ 67 67 68 68 /* IRQ state should be loaded as-is by "LoadExec". Changes can be made from LoadDone. */ … … 73 73 74 74 75 /** @interface_method_impl{PDMPICHLP R3,pfnLock} */75 /** @interface_method_impl{PDMPICHLP,pfnLock} */ 76 76 static DECLCALLBACK(int) pdmR3PicHlp_Lock(PPDMDEVINS pDevIns, int rc) 77 77 { … … 81 81 82 82 83 /** @interface_method_impl{PDMPICHLP R3,pfnUnlock} */83 /** @interface_method_impl{PDMPICHLP,pfnUnlock} */ 84 84 static DECLCALLBACK(void) pdmR3PicHlp_Unlock(PPDMDEVINS pDevIns) 85 85 { … … 89 89 90 90 91 /** @interface_method_impl{PDMPICHLPR3,pfnGetRCHelpers} */92 static DECLCALLBACK(PCPDMPICHLPRC) pdmR3PicHlp_GetRCHelpers(PPDMDEVINS pDevIns)93 {94 PDMDEV_ASSERT_DEVINS(pDevIns);95 PVM pVM = pDevIns->Internal.s.pVMR3;96 VM_ASSERT_EMT(pVM);97 98 RTRCPTR pRCHelpers = NIL_RTRCPTR;99 if (VM_IS_RAW_MODE_ENABLED(pVM))100 {101 int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCPicHlp", &pRCHelpers);102 AssertReleaseRC(rc);103 AssertRelease(pRCHelpers);104 }105 106 LogFlow(("pdmR3PicHlp_GetRCHelpers: caller='%s'/%d: returns %RRv\n",107 pDevIns->pReg->szName, pDevIns->iInstance, pRCHelpers));108 return pRCHelpers;109 }110 111 112 /** @interface_method_impl{PDMPICHLPR3,pfnGetR0Helpers} */113 static DECLCALLBACK(PCPDMPICHLPR0) pdmR3PicHlp_GetR0Helpers(PPDMDEVINS pDevIns)114 {115 PDMDEV_ASSERT_DEVINS(pDevIns);116 PVM pVM = pDevIns->Internal.s.pVMR3;117 VM_ASSERT_EMT(pVM);118 PCPDMPICHLPR0 pR0Helpers = 0;119 int rc = PDMR3LdrGetSymbolR0(pVM, NULL, "g_pdmR0PicHlp", &pR0Helpers);120 AssertReleaseRC(rc);121 AssertRelease(pR0Helpers);122 LogFlow(("pdmR3PicHlp_GetR0Helpers: caller='%s'/%d: returns %RHv\n",123 pDevIns->pReg->szName, pDevIns->iInstance, pR0Helpers));124 return pR0Helpers;125 }126 127 128 91 /** 129 92 * PIC Device Helpers. 130 93 */ 131 const PDMPICHLP R3g_pdmR3DevPicHlp =132 { 133 PDM_PICHLP R3_VERSION,94 const PDMPICHLP g_pdmR3DevPicHlp = 95 { 96 PDM_PICHLP_VERSION, 134 97 pdmR3PicHlp_SetInterruptFF, 135 98 pdmR3PicHlp_ClearInterruptFF, 136 99 pdmR3PicHlp_Lock, 137 100 pdmR3PicHlp_Unlock, 138 pdmR3PicHlp_GetRCHelpers, 139 pdmR3PicHlp_GetR0Helpers, 140 PDM_PICHLPR3_VERSION /* the end */ 101 PDM_PICHLP_VERSION /* the end */ 141 102 }; 142 103
Note:
See TracChangeset
for help on using the changeset viewer.