VirtualBox

儲存庫 vbox 的更動 62614


忽略:
時間撮記:
2016-7-28 上午10:40:46 (8 年 以前)
作者:
vboxsync
訊息:

hdaRegWriteSDCTL: Todo about IN_RING3/VINF_IOM_R3_MMIO_WRITE mess that the author needs cleaning up ASAP.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/Audio/DevIchHda.cpp

    r62613 r62614  
    20162016static int hdaRegReadUnimpl(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
    20172017{
     2018    RT_NOREF_PV(pThis); RT_NOREF_PV(iReg);
    20182019    *pu32Value = 0;
    20192020    return VINF_SUCCESS;
     
    20222023static int hdaRegWriteUnimpl(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
    20232024{
     2025    RT_NOREF_PV(pThis); RT_NOREF_PV(iReg); RT_NOREF_PV(u32Value);
    20242026    return VINF_SUCCESS;
    20252027}
     
    20842086static int hdaRegWriteGCTL(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
    20852087{
     2088    RT_NOREF_PV(iReg);
     2089
    20862090    if (u32Value & HDA_REG_FIELD_FLAG_MASK(GCTL, RST))
    20872091    {
     
    21342138static int hdaRegReadINTSTS(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
    21352139{
     2140    RT_NOREF_PV(iReg);
     2141
    21362142    uint32_t v = 0;
    21372143    if (   HDA_REG_FLAG_VALUE(pThis, RIRBSTS, RIRBOIS)
     
    21882194static int hdaRegReadWALCLK(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
    21892195{
     2196    RT_NOREF_PV(iReg);
     2197
    21902198    /* HDA spec (1a): 3.3.16 WALCLK counter ticks with 24Mhz bitclock rate. */
    21912199    *pu32Value = (uint32_t)ASMMultU64ByU32DivByU32(PDMDevHlpTMTimeVirtGetNano(pThis->CTX_SUFF(pDevIns))
     
    21972205static int hdaRegReadSSYNC(PHDASTATE pThis, uint32_t iReg, uint32_t *pu32Value)
    21982206{
     2207    RT_NOREF_PV(iReg);
     2208
    21992209    /* HDA spec (1a): 3.3.16 WALCLK counter ticks with 24Mhz bitclock rate. */
    22002210    *pu32Value = HDA_REG(pThis, SSYNC);
     
    22112221static int hdaRegWriteCORBRP(PHDASTATE pThis, uint32_t iReg, uint32_t u32Value)
    22122222{
     2223    RT_NOREF_PV(iReg);
     2224
    22132225    if (u32Value & HDA_REG_FIELD_FLAG_MASK(CORBRP, RST))
    22142226    {
     
    22342246    return rc;
    22352247#else
     2248    RT_NOREF_PV(pThis); RT_NOREF_PV(iReg); RT_NOREF_PV(u32Value);
    22362249    return VINF_IOM_R3_MMIO_WRITE;
    22372250#endif
     
    22592272    return rc;
    22602273#else  /* !IN_RING3 */
     2274    RT_NOREF_PV(pThis); RT_NOREF_PV(iReg); RT_NOREF_PV(u32Value);
    22612275    return VINF_IOM_R3_MMIO_WRITE;
    22622276#endif /* IN_RING3 */
     
    22932307    return VINF_SUCCESS; /* Always return success to the MMIO handler. */
    22942308#else  /* !IN_RING3 */
     2309    RT_NOREF_PV(pThis); RT_NOREF_PV(iReg); RT_NOREF_PV(u32Value);
    22952310    return VINF_IOM_R3_MMIO_WRITE;
    22962311#endif /* IN_RING3 */
     
    23252340        return hdaRegWriteU24(pThis, iReg, u32Value);
    23262341    }
     2342
     2343
     2344
     2345/** @todo r=bird: Andy, the spotty IN_RING3 in the rest of this function makes
     2346 *        little sense.  If you need to request a lock in ring-3, why don't
     2347 *        you need it in ring-0 / RC?  Or, reversely, why can you do the
     2348 *        fInReset handling without locking and resolving pStream in R0+RC
     2349 *        but not in ring-3?
     2350 *
     2351 *        What makes the least sense, is that you do fInReset +
     2352 *        hdaProcessInterrupt in R0/RC and then unconditionally forces a trip to
     2353 *        ring-3 and does the same again.
     2354 *
     2355 *        Please, do make up your mind what you want to do here ASAP!
     2356 */
     2357
    23272358
    23282359#ifdef IN_RING3
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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