VirtualBox

Changeset 44543 in vbox


Ignore:
Timestamp:
Feb 5, 2013 1:16:35 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83595
Message:

VBox/pci.h: uOffset -> offReg.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/pci.h

    r44528 r44543  
    546546} PCIDEVICE;
    547547
    548 /* @todo: handle extended space access */
    549 DECLINLINE(void)     PCIDevSetByte(PPCIDEVICE pPciDev, uint32_t uOffset, uint8_t u8Value)
    550 {
    551     pPciDev->config[uOffset]   = u8Value;
    552 }
    553 
    554 DECLINLINE(uint8_t)  PCIDevGetByte(PPCIDEVICE pPciDev, uint32_t uOffset)
    555 {
    556     return pPciDev->config[uOffset];
    557 }
    558 
    559 DECLINLINE(void)     PCIDevSetWord(PPCIDEVICE pPciDev, uint32_t uOffset, uint16_t u16Value)
    560 {
    561     *(uint16_t*)&pPciDev->config[uOffset] = RT_H2LE_U16(u16Value);
    562 }
    563 
    564 DECLINLINE(uint16_t) PCIDevGetWord(PPCIDEVICE pPciDev, uint32_t uOffset)
    565 {
    566     uint16_t u16Value = *(uint16_t*)&pPciDev->config[uOffset];
     548/** @todo handle extended space access. */
     549
     550DECLINLINE(void)     PCIDevSetByte(PPCIDEVICE pPciDev, uint32_t offReg, uint8_t u8Value)
     551{
     552    pPciDev->config[offReg] = u8Value;
     553}
     554
     555DECLINLINE(uint8_t)  PCIDevGetByte(PPCIDEVICE pPciDev, uint32_t offReg)
     556{
     557    return pPciDev->config[offReg];
     558}
     559
     560DECLINLINE(void)     PCIDevSetWord(PPCIDEVICE pPciDev, uint32_t offReg, uint16_t u16Value)
     561{
     562    *(uint16_t*)&pPciDev->config[offReg] = RT_H2LE_U16(u16Value);
     563}
     564
     565DECLINLINE(uint16_t) PCIDevGetWord(PPCIDEVICE pPciDev, uint32_t offReg)
     566{
     567    uint16_t u16Value = *(uint16_t*)&pPciDev->config[offReg];
    567568    return RT_H2LE_U16(u16Value);
    568569}
    569570
    570 DECLINLINE(void)     PCIDevSetDWord(PPCIDEVICE pPciDev, uint32_t uOffset, uint32_t u32Value)
    571 {
    572     *(uint32_t*)&pPciDev->config[uOffset] = RT_H2LE_U32(u32Value);
    573 }
    574 
    575 DECLINLINE(uint32_t) PCIDevGetDWord(PPCIDEVICE pPciDev, uint32_t uOffset)
    576 {
    577     uint32_t u32Value = *(uint32_t*)&pPciDev->config[uOffset];
     571DECLINLINE(void)     PCIDevSetDWord(PPCIDEVICE pPciDev, uint32_t offReg, uint32_t u32Value)
     572{
     573    *(uint32_t*)&pPciDev->config[offReg] = RT_H2LE_U32(u32Value);
     574}
     575
     576DECLINLINE(uint32_t) PCIDevGetDWord(PPCIDEVICE pPciDev, uint32_t offReg)
     577{
     578    uint32_t u32Value = *(uint32_t*)&pPciDev->config[offReg];
    578579    return RT_H2LE_U32(u32Value);
    579580}
    580581
    581 DECLINLINE(void)     PCIDevSetQWord(PPCIDEVICE pPciDev, uint32_t uOffset, uint64_t u64Value)
    582 {
    583     *(uint64_t*)&pPciDev->config[uOffset] = RT_H2LE_U64(u64Value);
    584 }
    585 
    586 DECLINLINE(uint64_t) PCIDevGetQWord(PPCIDEVICE pPciDev, uint32_t uOffset)
    587 {
    588     uint64_t u64Value = *(uint64_t*)&pPciDev->config[uOffset];
     582DECLINLINE(void)     PCIDevSetQWord(PPCIDEVICE pPciDev, uint32_t offReg, uint64_t u64Value)
     583{
     584    *(uint64_t*)&pPciDev->config[offReg] = RT_H2LE_U64(u64Value);
     585}
     586
     587DECLINLINE(uint64_t) PCIDevGetQWord(PPCIDEVICE pPciDev, uint32_t offReg)
     588{
     589    uint64_t u64Value = *(uint64_t*)&pPciDev->config[offReg];
    589590    return RT_H2LE_U64(u64Value);
    590591}
Note: See TracChangeset for help on using the changeset viewer.

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