Ticket #1907 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

Incorrect bit adjustment in PCIDevSetBaseAddress

Reported by: AVonGauss Owned by:
Priority: minor Component: other
Version: VirtualBox 1.6.4 Keywords:
Cc: Guest type: Windows
Host type: Linux

Description (last modified by frank) (diff)

In trying to do some testing with the serial driver, I noticed that there was an incorrect bit adjustment in the PCIDevSetBaseAddress method in "VBox/pci.h". The second bit adjustment is rotating 16 bits while it should be using 8 bits.

    u32Addr = RT_H2LE_U32(u32Addr);
    pPciDev->config[iReg]     = u32Addr         & 0xff;
    pPciDev->config[iReg + 1] = (u32Addr >> 16) & 0xff; /* - */
    pPciDev->config[iReg + 2] = (u32Addr >> 16) & 0xff;
    pPciDev->config[iReg + 3] = (u32Addr >> 24) & 0xff;

The only device in the standard source tree using this code that I'm aware of is the "Audio/DevIchAc97.cpp".

Change History

comment:1 Changed 10 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed
  • Description modified (diff)

Thanks for the report. Fixed in SVN (actually this bug was not related to version 1.6.4). Closing.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use