VirtualBox

Ignore:
Timestamp:
Nov 17, 2019 6:23:56 PM (5 years ago)
Author:
vboxsync
Message:

VMM,DevPIC: Refactored the PIC registration. bugreF:9218

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp

    r81369 r81909  
    4545 */
    4646
    47 /** @interface_method_impl{PDMPICHLPR3,pfnSetInterruptFF} */
     47/** @interface_method_impl{PDMPICHLP,pfnSetInterruptFF} */
    4848static DECLCALLBACK(void) pdmR3PicHlp_SetInterruptFF(PPDMDEVINS pDevIns)
    4949{
    5050    PDMDEV_ASSERT_DEVINS(pDevIns);
    5151    PVM    pVM = pDevIns->Internal.s.pVMR3;
    52     PVMCPU pVCpu = pVM->apCpusR3[0];  /* for PIC we always deliver to CPU 0, MP use APIC */
     52    PVMCPU pVCpu = pVM->apCpusR3[0];  /* for PIC we always deliver to CPU 0, SMP uses APIC */
    5353
    5454    /* IRQ state should be loaded as-is by "LoadExec". Changes can be made from LoadDone. */
     
    5959
    6060
    61 /** @interface_method_impl{PDMPICHLPR3,pfnClearInterruptFF} */
     61/** @interface_method_impl{PDMPICHLP,pfnClearInterruptFF} */
    6262static DECLCALLBACK(void) pdmR3PicHlp_ClearInterruptFF(PPDMDEVINS pDevIns)
    6363{
    6464    PDMDEV_ASSERT_DEVINS(pDevIns);
    6565    PVM pVM = pDevIns->Internal.s.pVMR3;
    66     PVMCPU pVCpu = pVM->apCpusR3[0];  /* for PIC we always deliver to CPU 0, MP use APIC */
     66    PVMCPU pVCpu = pVM->apCpusR3[0];  /* for PIC we always deliver to CPU 0, SMP uses APIC */
    6767
    6868    /* IRQ state should be loaded as-is by "LoadExec". Changes can be made from LoadDone. */
     
    7373
    7474
    75 /** @interface_method_impl{PDMPICHLPR3,pfnLock} */
     75/** @interface_method_impl{PDMPICHLP,pfnLock} */
    7676static DECLCALLBACK(int) pdmR3PicHlp_Lock(PPDMDEVINS pDevIns, int rc)
    7777{
     
    8181
    8282
    83 /** @interface_method_impl{PDMPICHLPR3,pfnUnlock} */
     83/** @interface_method_impl{PDMPICHLP,pfnUnlock} */
    8484static DECLCALLBACK(void) pdmR3PicHlp_Unlock(PPDMDEVINS pDevIns)
    8585{
     
    8989
    9090
    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 
    12891/**
    12992 * PIC Device Helpers.
    13093 */
    131 const PDMPICHLPR3 g_pdmR3DevPicHlp =
    132 {
    133     PDM_PICHLPR3_VERSION,
     94const PDMPICHLP g_pdmR3DevPicHlp =
     95{
     96    PDM_PICHLP_VERSION,
    13497    pdmR3PicHlp_SetInterruptFF,
    13598    pdmR3PicHlp_ClearInterruptFF,
    13699    pdmR3PicHlp_Lock,
    137100    pdmR3PicHlp_Unlock,
    138     pdmR3PicHlp_GetRCHelpers,
    139     pdmR3PicHlp_GetR0Helpers,
    140     PDM_PICHLPR3_VERSION /* the end */
     101    PDM_PICHLP_VERSION /* the end */
    141102};
    142103
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette