VirtualBox

Opened 16 years ago

Closed 16 years ago

#1907 closed defect (fixed)

Incorrect bit adjustment in PCIDevSetBaseAddress

Reported by: Aaron Von Gauss Owned by:
Component: other Version: VirtualBox 1.6.4
Keywords: Cc:
Guest type: Windows Host type: Linux

Description (last modified by Frank Mehnert)

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 (1)

comment:1 by Frank Mehnert, 16 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

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.

© 2023 Oracle
ContactPrivacy policyTerms of Use