VirtualBox

Opened 16 years ago

Last modified 16 years ago

#1907 closed defect

Incorrect bit adjustment in PCIDevSetBaseAddress — at Initial Version

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

Description

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

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use