VirtualBox

Changeset 64393 in vbox


Ignore:
Timestamp:
Oct 24, 2016 2:42:05 PM (8 years ago)
Author:
vboxsync
Message:

PDMPCIDEV: s/config/abConfig/ everywhere, removing the legacy alias.

Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmpcidev.h

    r64392 r64393  
    127127typedef struct PDMPCIDEV
    128128{
    129     union
    130     {
    131         /** PCI config space. */
    132         uint8_t             abConfig[256];
    133 #ifndef PDMPCIDEVICE_NO_DEPRECATED
    134         /** @deprecated Use abConfig! */
    135         uint8_t             config[256];
    136 #endif
    137     };
     129    /** PCI config space. */
     130    uint8_t                 abConfig[256];
    138131
    139132    /** Internal data. */
  • trunk/src/VBox/Devices/Audio/DevIchAc97.cpp

    r64389 r64393  
    28122812
    28132813    /* PCI Device (the assertions will be removed later) */
    2814     PCIDevSetVendorId         (&pThis->PciDev, 0x8086); /* 00 ro - intel. */               Assert(pThis->PciDev.config[0x00] == 0x86); Assert(pThis->PciDev.config[0x01] == 0x80);
    2815     PCIDevSetDeviceId         (&pThis->PciDev, 0x2415); /* 02 ro - 82801 / 82801aa(?). */  Assert(pThis->PciDev.config[0x02] == 0x15); Assert(pThis->PciDev.config[0x03] == 0x24);
    2816     PCIDevSetCommand          (&pThis->PciDev, 0x0000); /* 04 rw,ro - pcicmd. */           Assert(pThis->PciDev.config[0x04] == 0x00); Assert(pThis->PciDev.config[0x05] == 0x00);
    2817     PCIDevSetStatus           (&pThis->PciDev, VBOX_PCI_STATUS_DEVSEL_MEDIUM |  VBOX_PCI_STATUS_FAST_BACK); /* 06 rwc?,ro? - pcists. */      Assert(pThis->PciDev.config[0x06] == 0x80); Assert(pThis->PciDev.config[0x07] == 0x02);
    2818     PCIDevSetRevisionId       (&pThis->PciDev, 0x01);   /* 08 ro - rid. */                 Assert(pThis->PciDev.config[0x08] == 0x01);
    2819     PCIDevSetClassProg        (&pThis->PciDev, 0x00);   /* 09 ro - pi. */                  Assert(pThis->PciDev.config[0x09] == 0x00);
    2820     PCIDevSetClassSub         (&pThis->PciDev, 0x01);   /* 0a ro - scc; 01 == Audio. */    Assert(pThis->PciDev.config[0x0a] == 0x01);
    2821     PCIDevSetClassBase        (&pThis->PciDev, 0x04);   /* 0b ro - bcc; 04 == multimedia. */ Assert(pThis->PciDev.config[0x0b] == 0x04);
    2822     PCIDevSetHeaderType       (&pThis->PciDev, 0x00);   /* 0e ro - headtyp. */             Assert(pThis->PciDev.config[0x0e] == 0x00);
     2814    PCIDevSetVendorId         (&pThis->PciDev, 0x8086); /* 00 ro - intel. */               Assert(pThis->PciDev.abConfig[0x00] == 0x86); Assert(pThis->PciDev.abConfig[0x01] == 0x80);
     2815    PCIDevSetDeviceId         (&pThis->PciDev, 0x2415); /* 02 ro - 82801 / 82801aa(?). */  Assert(pThis->PciDev.abConfig[0x02] == 0x15); Assert(pThis->PciDev.abConfig[0x03] == 0x24);
     2816    PCIDevSetCommand          (&pThis->PciDev, 0x0000); /* 04 rw,ro - pcicmd. */           Assert(pThis->PciDev.abConfig[0x04] == 0x00); Assert(pThis->PciDev.abConfig[0x05] == 0x00);
     2817    PCIDevSetStatus           (&pThis->PciDev, VBOX_PCI_STATUS_DEVSEL_MEDIUM |  VBOX_PCI_STATUS_FAST_BACK); /* 06 rwc?,ro? - pcists. */      Assert(pThis->PciDev.abConfig[0x06] == 0x80); Assert(pThis->PciDev.abConfig[0x07] == 0x02);
     2818    PCIDevSetRevisionId       (&pThis->PciDev, 0x01);   /* 08 ro - rid. */                 Assert(pThis->PciDev.abConfig[0x08] == 0x01);
     2819    PCIDevSetClassProg        (&pThis->PciDev, 0x00);   /* 09 ro - pi. */                  Assert(pThis->PciDev.abConfig[0x09] == 0x00);
     2820    PCIDevSetClassSub         (&pThis->PciDev, 0x01);   /* 0a ro - scc; 01 == Audio. */    Assert(pThis->PciDev.abConfig[0x0a] == 0x01);
     2821    PCIDevSetClassBase        (&pThis->PciDev, 0x04);   /* 0b ro - bcc; 04 == multimedia. */ Assert(pThis->PciDev.abConfig[0x0b] == 0x04);
     2822    PCIDevSetHeaderType       (&pThis->PciDev, 0x00);   /* 0e ro - headtyp. */             Assert(pThis->PciDev.abConfig[0x0e] == 0x00);
    28232823    PCIDevSetBaseAddress      (&pThis->PciDev, 0,       /* 10 rw - nambar - native audio mixer base. */
    2824                                true /* fIoSpace */, false /* fPrefetchable */, false /* f64Bit */, 0x00000000); Assert(pThis->PciDev.config[0x10] == 0x01); Assert(pThis->PciDev.config[0x11] == 0x00); Assert(pThis->PciDev.config[0x12] == 0x00); Assert(pThis->PciDev.config[0x13] == 0x00);
     2824                               true /* fIoSpace */, false /* fPrefetchable */, false /* f64Bit */, 0x00000000); Assert(pThis->PciDev.abConfig[0x10] == 0x01); Assert(pThis->PciDev.abConfig[0x11] == 0x00); Assert(pThis->PciDev.abConfig[0x12] == 0x00); Assert(pThis->PciDev.abConfig[0x13] == 0x00);
    28252825    PCIDevSetBaseAddress      (&pThis->PciDev, 1,       /* 14 rw - nabmbar - native audio bus mastering. */
    2826                                true /* fIoSpace */, false /* fPrefetchable */, false /* f64Bit */, 0x00000000); Assert(pThis->PciDev.config[0x14] == 0x01); Assert(pThis->PciDev.config[0x15] == 0x00); Assert(pThis->PciDev.config[0x16] == 0x00); Assert(pThis->PciDev.config[0x17] == 0x00);
    2827     PCIDevSetInterruptLine    (&pThis->PciDev, 0x00);   /* 3c rw. */                       Assert(pThis->PciDev.config[0x3c] == 0x00);
    2828     PCIDevSetInterruptPin     (&pThis->PciDev, 0x01);   /* 3d ro - INTA#. */               Assert(pThis->PciDev.config[0x3d] == 0x01);
     2826                               true /* fIoSpace */, false /* fPrefetchable */, false /* f64Bit */, 0x00000000); Assert(pThis->PciDev.abConfig[0x14] == 0x01); Assert(pThis->PciDev.abConfig[0x15] == 0x00); Assert(pThis->PciDev.abConfig[0x16] == 0x00); Assert(pThis->PciDev.abConfig[0x17] == 0x00);
     2827    PCIDevSetInterruptLine    (&pThis->PciDev, 0x00);   /* 3c rw. */                       Assert(pThis->PciDev.abConfig[0x3c] == 0x00);
     2828    PCIDevSetInterruptPin     (&pThis->PciDev, 0x01);   /* 3d ro - INTA#. */               Assert(pThis->PciDev.abConfig[0x3d] == 0x01);
    28292829
    28302830    if (pThis->uCodecModel == AC97_CODEC_AD1980)
  • trunk/src/VBox/Devices/Bus/DevPCI.cpp

    r64392 r64393  
    259259    uint32_t last_addr, new_addr, config_ofs;
    260260
    261     cmd = RT_LE2H_U16(*(uint16_t *)(d->config + PCI_COMMAND));
     261    cmd = RT_LE2H_U16(*(uint16_t *)(d->abConfig + PCI_COMMAND));
    262262    for(i = 0; i < PCI_NUM_REGIONS; i++) {
    263263        r = &d->Int.s.aIORegions[i];
     
    270270            if (r->type & PCI_ADDRESS_SPACE_IO) {
    271271                if (cmd & PCI_COMMAND_IO) {
    272                     new_addr = RT_LE2H_U32(*(uint32_t *)(d->config +
     272                    new_addr = RT_LE2H_U32(*(uint32_t *)(d->abConfig +
    273273                                                         config_ofs));
    274274                    new_addr = new_addr & ~(r->size - 1);
     
    284284            } else {
    285285                if (cmd & PCI_COMMAND_MEMORY) {
    286                     new_addr = RT_LE2H_U32(*(uint32_t *)(d->config +
     286                    new_addr = RT_LE2H_U32(*(uint32_t *)(d->abConfig +
    287287                                                         config_ofs));
    288288                    /* the ROM slot has a specific enable bit */
     
    313313                        /* NOTE: specific hack for IDE in PC case:
    314314                           only one byte must be mapped. */
    315                         devclass = d->config[0x0a] | (d->config[0x0b] << 8);
     315                        devclass = d->abConfig[0x0a] | (d->abConfig[0x0b] << 8);
    316316                        if (devclass == 0x0101 && r->size == 4) {
    317317                            int rc = PDMDevHlpIOPortDeregister(d->Int.s.CTX_SUFF(pDevIns), r->addr + 2, 1);
     
    355355    switch(len) {
    356356    case 1:
    357         val = d->config[address];
     357        val = d->abConfig[address];
    358358        break;
    359359    case 2:
    360         val = RT_LE2H_U16(*(uint16_t *)(d->config + address));
     360        val = RT_LE2H_U16(*(uint16_t *)(d->abConfig + address));
    361361        break;
    362362    default:
    363363    case 4:
    364         val = RT_LE2H_U32(*(uint32_t *)(d->config + address));
     364        val = RT_LE2H_U32(*(uint32_t *)(d->abConfig + address));
    365365        break;
    366366    }
     
    396396            val |= r->type;
    397397        }
    398         *(uint32_t *)(d->config + address) = RT_H2LE_U32(val);
     398        *(uint32_t *)(d->abConfig + address) = RT_H2LE_U32(val);
    399399        pci_update_mappings(d);
    400400        return;
     
    405405    for(i = 0; i < len; i++) {
    406406        /* default read/write accesses */
    407         switch(d->config[0x0e]) {
     407        switch(d->abConfig[0x0e]) {
    408408        case 0x00: /* normal device */
    409409        case 0x80: /* multi-function device */
     
    460460            /* don't change reserved bits (11-15) */
    461461            val &= ~UINT32_C(0xf8);
    462             d->config[addr] = val;
     462            d->abConfig[addr] = val;
    463463        }
    464464        else if (addr == 0x06)  /* Status register, bits 0-7. */
     
    467467            val &= ~UINT32_C(0xff);
    468468            /* status register, low part: clear bits by writing a '1' to the corresponding bit */
    469             d->config[addr] &= ~val;
     469            d->abConfig[addr] &= ~val;
    470470        }
    471471        else if (addr == 0x07)  /* Status register, bits 8-15. */
     
    474474            val &= ~UINT32_C(0x06);
    475475            /* status register, high part: clear bits by writing a '1' to the corresponding bit */
    476             d->config[addr] &= ~val;
     476            d->abConfig[addr] &= ~val;
    477477        }
    478478        else
    479479#endif
    480480        if (can_write) {
    481             d->config[addr] = val;
     481            d->abConfig[addr] = val;
    482482        }
    483483        addr++;
     
    672672{
    673673    PPCIBUS     pBus =     &pGlobals->PciBus;
    674     uint8_t    *pbCfg = pGlobals->PIIX3State.dev.config;
    675     const bool  fIsAcpiDevice = pPciDev->config[2] == 0x13 && pPciDev->config[3] == 0x71;
     674    uint8_t    *pbCfg = pGlobals->PIIX3State.dev.abConfig;
     675    const bool  fIsAcpiDevice = pPciDev->abConfig[2] == 0x13 && pPciDev->abConfig[3] == 0x71;
    676676    /* If the two configuration space bytes at 0xde, 0xad are set to 0xbe, 0xef, a back door
    677677     * is opened to route PCI interrupts directly to the I/O APIC and bypass the PIC.
     
    697697                 * PCI device configuration space).
    698698                 */
    699                 apic_set_irq(pBus, uDevFn, pPciDev, -1, iLevel, pPciDev->config[PCI_INTERRUPT_LINE], uTagSrc);
     699                apic_set_irq(pBus, uDevFn, pPciDev, -1, iLevel, pPciDev->abConfig[PCI_INTERRUPT_LINE], uTagSrc);
    700700            else
    701701                apic_set_irq(pBus, uDevFn, pPciDev, iIrq, iLevel, -1, uTagSrc);
     
    706706        {
    707707            /* As per above treat ACPI in a special way */
    708             pic_irq = pPciDev->config[PCI_INTERRUPT_LINE];
     708            pic_irq = pPciDev->abConfig[PCI_INTERRUPT_LINE];
    709709            pGlobals->acpi_irq = pic_irq;
    710710            pGlobals->acpi_irq_level = iLevel & PDM_IRQ_LEVEL_HIGH;
     
    789789                  ("Device is not a PCI bridge but on the list of PCI bridges\n"));
    790790
    791         if (   iBus >= pBridgeTemp->config[VBOX_PCI_SECONDARY_BUS]
    792             && iBus <= pBridgeTemp->config[VBOX_PCI_SUBORDINATE_BUS])
     791        if (   iBus >= pBridgeTemp->abConfig[VBOX_PCI_SECONDARY_BUS]
     792            && iBus <= pBridgeTemp->abConfig[VBOX_PCI_SUBORDINATE_BUS])
    793793            return pBridgeTemp;
    794794    }
     
    800800static void pciR3Piix3Reset(PIIX3State *d)
    801801{
    802     uint8_t *pci_conf = d->dev.config;
     802    uint8_t *pci_conf = d->dev.abConfig;
    803803
    804804    pci_conf[0x04] = 0x07; /* master, memory and I/O */
     
    12751275        {
    12761276            SSMR3PutU32(pSSM, i);
    1277             SSMR3PutMem(pSSM, pDev->config, sizeof(pDev->config));
     1277            SSMR3PutMem(pSSM, pDev->abConfig, sizeof(pDev->abConfig));
    12781278
    12791279            int rc = SSMR3PutS32(pSSM, pDev->Int.s.uIrqPinState);
     
    14241424     */
    14251425    uint8_t const fBridge = fIsBridge ? 2 : 1;
    1426     uint8_t *pbDstConfig = &pDev->config[0];
     1426    uint8_t *pbDstConfig = &pDev->abConfig[0];
    14271427    for (uint32_t i = 0; i < RT_ELEMENTS(s_aFields); i++)
    14281428        if (s_aFields[i].fBridge & fBridge)
     
    14761476     * restoring functionality governed by these registers.
    14771477     */
    1478     for (uint32_t off = 0x40; off < sizeof(pDev->config); off++)
     1478    for (uint32_t off = 0x40; off < sizeof(pDev->abConfig); off++)
    14791479        if (pbDstConfig[off] != pbSrcConfig[off])
    14801480        {
     
    15591559        /* get the data */
    15601560        DevTmp.Int.s.uIrqPinState = ~0; /* Invalid value in case we have an older saved state to force a state change in pciSetIrq. */
    1561         SSMR3GetMem(pSSM, DevTmp.config, sizeof(DevTmp.config));
     1561        SSMR3GetMem(pSSM, DevTmp.abConfig, sizeof(DevTmp.abConfig));
    15621562        if (uVersion < 3)
    15631563        {
     
    15881588
    15891589        /* match the vendor id assuming that this will never be changed. */
    1590         if (    DevTmp.config[0] != pDev->config[0]
    1591             ||  DevTmp.config[1] != pDev->config[1])
     1590        if (   DevTmp.abConfig[0] != pDev->abConfig[0]
     1591            || DevTmp.abConfig[1] != pDev->abConfig[1])
    15921592            return SSMR3SetCfgError(pSSM, RT_SRC_POS, N_("Device in slot %#x (%s) vendor id mismatch! saved=%.4Rhxs current=%.4Rhxs"),
    1593                                      i, pDev->pszNameR3, DevTmp.config, pDev->config);
     1593                                    i, pDev->pszNameR3, DevTmp.abConfig, pDev->abConfig);
    15941594
    15951595        /* commit the loaded device config. */
    1596         pciR3CommonRestoreConfig(pDev, &DevTmp.config[0], false ); /** @todo fix bridge fun! */
     1596        pciR3CommonRestoreConfig(pDev, &DevTmp.abConfig[0], false ); /** @todo fix bridge fun! */
    15971597
    15981598        pDev->Int.s.uIrqPinState = DevTmp.Int.s.uIrqPinState;
     
    22562256
    22572257    /* If the current bus is not the target bus search for the bus which contains the device. */
    2258     if (iBus != pBus->PciDev.config[VBOX_PCI_SECONDARY_BUS])
     2258    if (iBus != pBus->PciDev.abConfig[VBOX_PCI_SECONDARY_BUS])
    22592259    {
    22602260        PPDMPCIDEV pBridgeDevice = pciR3FindBridge(pBus, iBus);
     
    22892289
    22902290    /* If the current bus is not the target bus search for the bus which contains the device. */
    2291     if (iBus != pBus->PciDev.config[VBOX_PCI_SECONDARY_BUS])
     2291    if (iBus != pBus->PciDev.abConfig[VBOX_PCI_SECONDARY_BUS])
    22922292    {
    22932293        PPDMPCIDEV pBridgeDevice = pciR3FindBridge(pBus, iBus);
     
    23432343
    23442344    /* Reset config space to default values. */
    2345     pBus->PciDev.config[VBOX_PCI_PRIMARY_BUS] = 0;
    2346     pBus->PciDev.config[VBOX_PCI_SECONDARY_BUS] = 0;
    2347     pBus->PciDev.config[VBOX_PCI_SUBORDINATE_BUS] = 0;
     2345    pBus->PciDev.abConfig[VBOX_PCI_PRIMARY_BUS] = 0;
     2346    pBus->PciDev.abConfig[VBOX_PCI_SECONDARY_BUS] = 0;
     2347    pBus->PciDev.abConfig[VBOX_PCI_SUBORDINATE_BUS] = 0;
    23482348}
    23492349
  • trunk/src/VBox/Devices/Bus/DevPciIch9.cpp

    r64392 r64393  
    10641064            SSMR3PutU32(pSSM, i);
    10651065            /* PCI config registers */
    1066             SSMR3PutMem(pSSM, pDev->config, sizeof(pDev->config));
     1066            SSMR3PutMem(pSSM, pDev->abConfig, sizeof(pDev->abConfig));
    10671067
    10681068            /* Device flags */
     
    13031303    uint8_t const fBridge = fIsBridge ? 2 : 1;
    13041304    Assert(!pciDevIsPassthrough(pDev));
    1305     uint8_t *pbDstConfig = &pDev->config[0];
     1305    uint8_t *pbDstConfig = &pDev->abConfig[0];
    13061306
    13071307    for (uint32_t i = 0; i < RT_ELEMENTS(s_aFields); i++)
     
    13561356     * restoring functionality governed by these registers.
    13571357     */
    1358     for (uint32_t off = 0x40; off < sizeof(pDev->config); off++)
     1358    for (uint32_t off = 0x40; off < sizeof(pDev->abConfig); off++)
    13591359        if (pbDstConfig[off] != pbSrcConfig[off])
    13601360        {
     
    14491449        DevTmp.Int.s.u8MsixCapSize = 0;
    14501450        DevTmp.Int.s.uIrqPinState = ~0; /* Invalid value in case we have an older saved state to force a state change in pciSetIrq. */
    1451         SSMR3GetMem(pSSM, DevTmp.config, sizeof(DevTmp.config));
     1451        SSMR3GetMem(pSSM, DevTmp.abConfig, sizeof(DevTmp.abConfig));
    14521452
    14531453        SSMR3GetU32(pSSM, &DevTmp.Int.s.fFlags);
     
    14941494        /* commit the loaded device config. */
    14951495        Assert(!pciDevIsPassthrough(pDev));
    1496         pciR3CommonRestoreConfig(pDev, &DevTmp.config[0], false ); /** @todo fix bridge fun! */
     1496        pciR3CommonRestoreConfig(pDev, &DevTmp.abConfig[0], false ); /** @todo fix bridge fun! */
    14971497
    14981498        pDev->Int.s.uIrqPinState = DevTmp.Int.s.uIrqPinState;
     
    21852185                u8Val &= ~UINT32_C(0xff);
    21862186                /* status register, low part: clear bits by writing a '1' to the corresponding bit */
    2187                 pPciDev->config[addr] &= ~u8Val;
     2187                pPciDev->abConfig[addr] &= ~u8Val;
    21882188                break;
    21892189            case VBOX_PCI_STATUS+1:  /* Status register, bits 8-15. */
     
    21912191                u8Val &= ~UINT32_C(0x06);
    21922192                /* status register, high part: clear bits by writing a '1' to the corresponding bit */
    2193                 pPciDev->config[addr] &= ~u8Val;
     2193                pPciDev->abConfig[addr] &= ~u8Val;
    21942194                break;
    21952195            case VBOX_PCI_ROM_ADDRESS:    case VBOX_PCI_ROM_ADDRESS   +1: case VBOX_PCI_ROM_ADDRESS   +2: case VBOX_PCI_ROM_ADDRESS   +3:
     
    26112611        {
    26122612            /* Extracted from MsiPciConfigWrite(). */
    2613             pDev->config[pDev->Int.s.u8MsiCapOffset + VBOX_MSI_CAP_MESSAGE_CONTROL] &= 0x8e;
     2613            pDev->abConfig[pDev->Int.s.u8MsiCapOffset + VBOX_MSI_CAP_MESSAGE_CONTROL] &= 0x8e;
    26142614        }
    26152615
     
    26182618        {
    26192619            /* Extracted from MsixPciConfigWrite(); no side effects. */
    2620             pDev->config[pDev->Int.s.u8MsixCapOffset + VBOX_MSIX_CAP_MESSAGE_CONTROL + 1] &= 0x3f;
     2620            pDev->abConfig[pDev->Int.s.u8MsixCapOffset + VBOX_MSIX_CAP_MESSAGE_CONTROL + 1] &= 0x3f;
    26212621        }
    26222622    }
  • trunk/src/VBox/Devices/Bus/MsiCommon.cpp

    r64387 r64393  
    5050        return NULL;
    5151    iOff += pDev->Int.s.u8MsiCapOffset;
    52     return (uint32_t*)(pDev->config + iOff);
     52    return (uint32_t*)(pDev->abConfig + iOff);
    5353}
    5454
     
    6060        return NULL;
    6161    iOff += pDev->Int.s.u8MsiCapOffset;
    62     return (uint32_t*)(pDev->config + iOff);
     62    return (uint32_t*)(pDev->abConfig + iOff);
    6363}
    6464
     
    140140                /* don't change read-only bits: 1-3,7 */
    141141                u8Val &= UINT8_C(~0x8e);
    142                 pDev->config[uAddr] = u8Val | (pDev->config[uAddr] & UINT8_C(0x8e));
     142                pDev->abConfig[uAddr] = u8Val | (pDev->abConfig[uAddr] & UINT8_C(0x8e));
    143143                break;
    144144            case VBOX_MSI_CAP_MESSAGE_CONTROL + 1:
     
    146146                break;
    147147            default:
    148                 if (pDev->config[uAddr] != u8Val)
     148                if (pDev->abConfig[uAddr] != u8Val)
    149149                {
    150150                    int32_t maskUpdated = -1;
     
    175175                            uint32_t uVector = maskUpdated*8 + iBitNum;
    176176
    177                             if (msiBitJustCleared(pDev->config[uAddr], u8Val, iBit))
     177                            if (msiBitJustCleared(pDev->abConfig[uAddr], u8Val, iBit))
    178178                            {
    179179                                Log(("msi: mask updated bit %d@%x (%d)\n", iBitNum, uAddr, maskUpdated));
    180180
    181181                                /* To ensure that we're no longer masked */
    182                                 pDev->config[uAddr] &= ~iBit;
     182                                pDev->abConfig[uAddr] &= ~iBit;
    183183                                if ((*puPending & (1 << uVector)) != 0)
    184184                                {
     
    187187                                }
    188188                            }
    189                             if (msiBitJustSet(pDev->config[uAddr], u8Val, iBit))
     189                            if (msiBitJustSet(pDev->abConfig[uAddr], u8Val, iBit))
    190190                            {
    191191                                Log(("msi: mask vector: %d\n", uVector));
     
    194194                    }
    195195
    196                     pDev->config[uAddr] = u8Val;
     196                    pDev->abConfig[uAddr] = u8Val;
    197197                }
    198198        }
  • trunk/src/VBox/Devices/Bus/MsixCommon.cpp

    r64390 r64393  
    310310            {
    311311                /* don't change read-only bits 8-13 */
    312                 u8NewVal = (u8Val & UINT8_C(~0x3f)) | (pDev->config[uAddr] & UINT8_C(0x3f));
     312                u8NewVal = (u8Val & UINT8_C(~0x3f)) | (pDev->abConfig[uAddr] & UINT8_C(0x3f));
    313313                /* If just enabled globally - check pending vectors */
    314                 fJustEnabled |= msixBitJustCleared(pDev->config[uAddr], u8NewVal, VBOX_PCI_MSIX_FLAGS_ENABLE >> 8);
    315                 fJustEnabled |= msixBitJustCleared(pDev->config[uAddr], u8NewVal, VBOX_PCI_MSIX_FLAGS_FUNCMASK >> 8);
    316                 pDev->config[uAddr] = u8NewVal;
     314                fJustEnabled |= msixBitJustCleared(pDev->abConfig[uAddr], u8NewVal, VBOX_PCI_MSIX_FLAGS_ENABLE >> 8);
     315                fJustEnabled |= msixBitJustCleared(pDev->abConfig[uAddr], u8NewVal, VBOX_PCI_MSIX_FLAGS_FUNCMASK >> 8);
     316                pDev->abConfig[uAddr] = u8NewVal;
    317317                break;
    318318        }
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r64387 r64393  
    49544954    PCIDevSetVendorId(&pThis->PciDev, 0x1022);
    49554955    PCIDevSetDeviceId(&pThis->PciDev, 0x2000);
    4956     pThis->PciDev.config[0x04] = 0x07; /* command */
    4957     pThis->PciDev.config[0x05] = 0x00;
    4958     pThis->PciDev.config[0x06] = 0x80; /* status */
    4959     pThis->PciDev.config[0x07] = 0x02;
    4960     pThis->PciDev.config[0x08] = pThis->fAm79C973 ? 0x40 : 0x10; /* revision */
    4961     pThis->PciDev.config[0x09] = 0x00;
    4962     pThis->PciDev.config[0x0a] = 0x00; /* ethernet network controller */
    4963     pThis->PciDev.config[0x0b] = 0x02;
    4964     pThis->PciDev.config[0x0e] = 0x00; /* header_type */
    4965 
    4966     pThis->PciDev.config[0x10] = 0x01; /* IO Base */
    4967     pThis->PciDev.config[0x11] = 0x00;
    4968     pThis->PciDev.config[0x12] = 0x00;
    4969     pThis->PciDev.config[0x13] = 0x00;
    4970     pThis->PciDev.config[0x14] = 0x00; /* MMIO Base */
    4971     pThis->PciDev.config[0x15] = 0x00;
    4972     pThis->PciDev.config[0x16] = 0x00;
    4973     pThis->PciDev.config[0x17] = 0x00;
     4956    pThis->PciDev.abConfig[0x04] = 0x07; /* command */
     4957    pThis->PciDev.abConfig[0x05] = 0x00;
     4958    pThis->PciDev.abConfig[0x06] = 0x80; /* status */
     4959    pThis->PciDev.abConfig[0x07] = 0x02;
     4960    pThis->PciDev.abConfig[0x08] = pThis->fAm79C973 ? 0x40 : 0x10; /* revision */
     4961    pThis->PciDev.abConfig[0x09] = 0x00;
     4962    pThis->PciDev.abConfig[0x0a] = 0x00; /* ethernet network controller */
     4963    pThis->PciDev.abConfig[0x0b] = 0x02;
     4964    pThis->PciDev.abConfig[0x0e] = 0x00; /* header_type */
     4965
     4966    pThis->PciDev.abConfig[0x10] = 0x01; /* IO Base */
     4967    pThis->PciDev.abConfig[0x11] = 0x00;
     4968    pThis->PciDev.abConfig[0x12] = 0x00;
     4969    pThis->PciDev.abConfig[0x13] = 0x00;
     4970    pThis->PciDev.abConfig[0x14] = 0x00; /* MMIO Base */
     4971    pThis->PciDev.abConfig[0x15] = 0x00;
     4972    pThis->PciDev.abConfig[0x16] = 0x00;
     4973    pThis->PciDev.abConfig[0x17] = 0x00;
    49744974
    49754975    /* subsystem and subvendor IDs */
    4976     pThis->PciDev.config[0x2c] = 0x22; /* subsystem vendor id */
    4977     pThis->PciDev.config[0x2d] = 0x10;
    4978     pThis->PciDev.config[0x2e] = 0x00; /* subsystem id */
    4979     pThis->PciDev.config[0x2f] = 0x20;
    4980     pThis->PciDev.config[0x3d] = 1;    /* interrupt pin 0 */
    4981     pThis->PciDev.config[0x3e] = 0x06;
    4982     pThis->PciDev.config[0x3f] = 0xff;
     4976    pThis->PciDev.abConfig[0x2c] = 0x22; /* subsystem vendor id */
     4977    pThis->PciDev.abConfig[0x2d] = 0x10;
     4978    pThis->PciDev.abConfig[0x2e] = 0x00; /* subsystem id */
     4979    pThis->PciDev.abConfig[0x2f] = 0x20;
     4980    pThis->PciDev.abConfig[0x3d] = 1;    /* interrupt pin 0 */
     4981    pThis->PciDev.abConfig[0x3e] = 0x06;
     4982    pThis->PciDev.abConfig[0x3f] = 0xff;
    49834983
    49844984    /*
  • trunk/src/VBox/Devices/PC/DevACPI.cpp

    r64387 r64393  
    793793{
    794794    return    (pThis->u8SMBusHstCnt & SMBHSTCNT_INTEREN)
    795            && (pThis->dev.config[SMBHSTCFG] & SMBHSTCFG_SMB_HST_EN)
    796            && (pThis->dev.config[SMBHSTCFG] & SMBHSTCFG_INTRSEL) == SMBHSTCFG_INTRSEL_IRQ9 << SMBHSTCFG_INTRSEL_SHIFT
     795           && (pThis->dev.abConfig[SMBHSTCFG] & SMBHSTCFG_SMB_HST_EN)
     796           && (pThis->dev.abConfig[SMBHSTCFG] & SMBHSTCFG_INTRSEL) == SMBHSTCFG_INTRSEL_IRQ9 << SMBHSTCFG_INTRSEL_SHIFT
    797797           && (pThis->u8SMBusHstSts & SMBHSTSTS_INT_MASK);
    798798}
     
    19271927static void acpiR3PmPCIBIOSFake(ACPIState *pThis)
    19281928{
    1929     pThis->dev.config[PMBA  ] = pThis->uPmIoPortBase | 1; /* PMBA, PM base address, bit 0 marks it as IO range */
    1930     pThis->dev.config[PMBA+1] = pThis->uPmIoPortBase >> 8;
    1931     pThis->dev.config[PMBA+2] = 0x00;
    1932     pThis->dev.config[PMBA+3] = 0x00;
     1929    pThis->dev.abConfig[PMBA  ] = pThis->uPmIoPortBase | 1; /* PMBA, PM base address, bit 0 marks it as IO range */
     1930    pThis->dev.abConfig[PMBA+1] = pThis->uPmIoPortBase >> 8;
     1931    pThis->dev.abConfig[PMBA+2] = 0x00;
     1932    pThis->dev.abConfig[PMBA+3] = 0x00;
    19331933}
    19341934
     
    22282228static void acpiR3SMBusPCIBIOSFake(ACPIState *pThis)
    22292229{
    2230     pThis->dev.config[SMBBA  ] = pThis->uSMBusIoPortBase | 1; /* SMBBA, SMBus base address, bit 0 marks it as IO range */
    2231     pThis->dev.config[SMBBA+1] = pThis->uSMBusIoPortBase >> 8;
    2232     pThis->dev.config[SMBBA+2] = 0x00;
    2233     pThis->dev.config[SMBBA+3] = 0x00;
    2234     pThis->dev.config[SMBHSTCFG] = SMBHSTCFG_INTRSEL_IRQ9 << SMBHSTCFG_INTRSEL_SHIFT | SMBHSTCFG_SMB_HST_EN; /* SMBHSTCFG */
    2235     pThis->dev.config[SMBSLVC] = 0x00; /* SMBSLVC */
    2236     pThis->dev.config[SMBSHDW1] = 0x00; /* SMBSHDW1 */
    2237     pThis->dev.config[SMBSHDW2] = 0x00; /* SMBSHDW2 */
    2238     pThis->dev.config[SMBREV] = 0x00; /* SMBREV */
     2230    pThis->dev.abConfig[SMBBA  ] = pThis->uSMBusIoPortBase | 1; /* SMBBA, SMBus base address, bit 0 marks it as IO range */
     2231    pThis->dev.abConfig[SMBBA+1] = pThis->uSMBusIoPortBase >> 8;
     2232    pThis->dev.abConfig[SMBBA+2] = 0x00;
     2233    pThis->dev.abConfig[SMBBA+3] = 0x00;
     2234    pThis->dev.abConfig[SMBHSTCFG] = SMBHSTCFG_INTRSEL_IRQ9 << SMBHSTCFG_INTRSEL_SHIFT | SMBHSTCFG_SMB_HST_EN; /* SMBHSTCFG */
     2235    pThis->dev.abConfig[SMBSLVC] = 0x00; /* SMBSLVC */
     2236    pThis->dev.abConfig[SMBSHDW1] = 0x00; /* SMBSHDW1 */
     2237    pThis->dev.abConfig[SMBSHDW2] = 0x00; /* SMBSHDW2 */
     2238    pThis->dev.abConfig[SMBREV] = 0x00; /* SMBREV */
    22392239}
    22402240
     
    33013301        RTIOPORT NewIoPortBase = 0;
    33023302        /* Check Power Management IO Space Enable (PMIOSE) bit */
    3303         if (pPciDev->config[PMREGMISC] & 0x01)
     3303        if (pPciDev->abConfig[PMREGMISC] & 0x01)
    33043304        {
    33053305            NewIoPortBase = (RTIOPORT)PCIDevGetDWord(pPciDev, PMBA);
     
    33153315        RTIOPORT NewIoPortBase = 0;
    33163316        /* Check SMBus Controller Host Interface Enable (SMB_HST_EN) bit */
    3317         if (pPciDev->config[SMBHSTCFG] & SMBHSTCFG_SMB_HST_EN)
     3317        if (pPciDev->abConfig[SMBHSTCFG] & SMBHSTCFG_SMB_HST_EN)
    33183318        {
    33193319            NewIoPortBase = (RTIOPORT)PCIDevGetDWord(pPciDev, SMBBA);
  • trunk/src/VBox/Devices/PC/DevLPC.cpp

    r64387 r64393  
    190190    LogFlow(("lpcInfo: \n"));
    191191
    192     if (pThis->dev.config[0xde] == 0xbe && pThis->dev.config[0xad] == 0xef)
     192    if (pThis->dev.abConfig[0xde] == 0xbe && pThis->dev.abConfig[0xad] == 0xef)
    193193        pHlp->pfnPrintf(pHlp, "APIC backdoor activated\n");
    194194    else
    195195        pHlp->pfnPrintf(pHlp, "APIC backdoor closed: %02x %02x\n",
    196                         pThis->dev.config[0xde], pThis->dev.config[0xad]);
     196                        pThis->dev.abConfig[0xde], pThis->dev.abConfig[0xad]);
    197197
    198198
     
    246246
    247247    /* 40h - 43h PMBASE 40-43 ACPI Base Address */
    248     pThis->dev.config[0x40] = 0x01; /* IO space */
    249     pThis->dev.config[0x41] = 0x80; /* base address / 128, see DevACPI.cpp */
     248    pThis->dev.abConfig[0x40] = 0x01; /* IO space */
     249    pThis->dev.abConfig[0x41] = 0x80; /* base address / 128, see DevACPI.cpp */
    250250
    251251    /* 44h       ACPI_CNTL    ACPI Control */
    252     pThis->dev.config[0x44] = 0x00 | (1<<7); /* SCI is IRQ9, ACPI enabled */
     252    pThis->dev.abConfig[0x44] = 0x00 | (1<<7); /* SCI is IRQ9, ACPI enabled */
    253253    /* 48h–4Bh   GPIOBASE     GPIO Base Address */
    254254
    255255    /* 4C        GC           GPIO Control */
    256     pThis->dev.config[0x4c] = 0x4d;
     256    pThis->dev.abConfig[0x4c] = 0x4d;
    257257    /* ???? */
    258     pThis->dev.config[0x4e] = 0x03;
    259     pThis->dev.config[0x4f] = 0x00;
     258    pThis->dev.abConfig[0x4e] = 0x03;
     259    pThis->dev.abConfig[0x4f] = 0x00;
    260260
    261261    /* 60h-63h PIRQ[n]_ROUT PIRQ[A-D] Routing Control */
    262     pThis->dev.config[0x60] = 0x0b; /* PCI A -> IRQ 11 */
    263     pThis->dev.config[0x61] = 0x09; /* PCI B -> IRQ 9  */
    264     pThis->dev.config[0x62] = 0x0b; /* PCI C -> IRQ 11 */
    265     pThis->dev.config[0x63] = 0x09; /* PCI D -> IRQ 9  */
     262    pThis->dev.abConfig[0x60] = 0x0b; /* PCI A -> IRQ 11 */
     263    pThis->dev.abConfig[0x61] = 0x09; /* PCI B -> IRQ 9  */
     264    pThis->dev.abConfig[0x62] = 0x0b; /* PCI C -> IRQ 11 */
     265    pThis->dev.abConfig[0x63] = 0x09; /* PCI D -> IRQ 9  */
    266266
    267267    /* 64h SIRQ_CNTL Serial IRQ Control 10h R/W, RO */
    268     pThis->dev.config[0x64] = 0x10;
     268    pThis->dev.abConfig[0x64] = 0x10;
    269269
    270270    /* 68h-6Bh PIRQ[n]_ROUT PIRQ[E-H] Routing Control  */
    271     pThis->dev.config[0x68] = 0x80;
    272     pThis->dev.config[0x69] = 0x80;
    273     pThis->dev.config[0x6A] = 0x80;
    274     pThis->dev.config[0x6B] = 0x80;
     271    pThis->dev.abConfig[0x68] = 0x80;
     272    pThis->dev.abConfig[0x69] = 0x80;
     273    pThis->dev.abConfig[0x6A] = 0x80;
     274    pThis->dev.abConfig[0x6B] = 0x80;
    275275
    276276    /* 6C-6Dh     LPC_IBDF  IOxAPIC Bus:Device:Function   00F8h     R/W */
    277     pThis->dev.config[0x70] = 0x80;
    278     pThis->dev.config[0x76] = 0x0c;
    279     pThis->dev.config[0x77] = 0x0c;
    280     pThis->dev.config[0x78] = 0x02;
    281     pThis->dev.config[0x79] = 0x00;
     277    pThis->dev.abConfig[0x70] = 0x80;
     278    pThis->dev.abConfig[0x76] = 0x0c;
     279    pThis->dev.abConfig[0x77] = 0x0c;
     280    pThis->dev.abConfig[0x78] = 0x02;
     281    pThis->dev.abConfig[0x79] = 0x00;
    282282    /* 80h        LPC_I/O_DEC I/O Decode Ranges           0000h     R/W */
    283283    /* 82h-83h    LPC_EN   LPC I/F Enables                0000h     R/W */
     
    288288
    289289    /* A0h-CFh    Power Management */
    290     pThis->dev.config[0xa0] = 0x08;
    291     pThis->dev.config[0xa2] = 0x00;
    292     pThis->dev.config[0xa3] = 0x00;
    293     pThis->dev.config[0xa4] = 0x00;
    294     pThis->dev.config[0xa5] = 0x00;
    295     pThis->dev.config[0xa6] = 0x00;
    296     pThis->dev.config[0xa7] = 0x00;
    297     pThis->dev.config[0xa8] = 0x0f;
    298     pThis->dev.config[0xaa] = 0x00;
    299     pThis->dev.config[0xab] = 0x00;
    300     pThis->dev.config[0xac] = 0x00;
    301     pThis->dev.config[0xae] = 0x00;
     290    pThis->dev.abConfig[0xa0] = 0x08;
     291    pThis->dev.abConfig[0xa2] = 0x00;
     292    pThis->dev.abConfig[0xa3] = 0x00;
     293    pThis->dev.abConfig[0xa4] = 0x00;
     294    pThis->dev.abConfig[0xa5] = 0x00;
     295    pThis->dev.abConfig[0xa6] = 0x00;
     296    pThis->dev.abConfig[0xa7] = 0x00;
     297    pThis->dev.abConfig[0xa8] = 0x0f;
     298    pThis->dev.abConfig[0xaa] = 0x00;
     299    pThis->dev.abConfig[0xab] = 0x00;
     300    pThis->dev.abConfig[0xac] = 0x00;
     301    pThis->dev.abConfig[0xae] = 0x00;
    302302
    303303    /* D0h-D3h   FWH_SEL1  Firmware Hub Select 1  */
     
    311311
    312312    /* F0h-F3h RCBA Root Complex Base Address */
    313     pThis->dev.config[0xf0] = RT_BYTE1(RCBA_BASE | 1); /* enabled */
    314     pThis->dev.config[0xf1] = RT_BYTE2(RCBA_BASE);
    315     pThis->dev.config[0xf2] = RT_BYTE3(RCBA_BASE);
    316     pThis->dev.config[0xf3] = RT_BYTE4(RCBA_BASE);
     313    pThis->dev.abConfig[0xf0] = RT_BYTE1(RCBA_BASE | 1); /* enabled */
     314    pThis->dev.abConfig[0xf1] = RT_BYTE2(RCBA_BASE);
     315    pThis->dev.abConfig[0xf2] = RT_BYTE3(RCBA_BASE);
     316    pThis->dev.abConfig[0xf3] = RT_BYTE4(RCBA_BASE);
    317317
    318318    rc = PDMDevHlpPCIRegisterEx(pDevIns, &pThis->dev, PDMPCIDEVREG_CFG_PRIMARY, PDMPCIDEVREG_F_NOT_MANDATORY_NO,
  • trunk/src/VBox/Devices/Serial/DevSerial.cpp

    r64387 r64393  
    11891189#ifdef VBOX_SERIAL_PCI
    11901190    /* the PCI device */
    1191     pThis->PciDev.config[0x00] = 0xee; /* Vendor: ??? */
    1192     pThis->PciDev.config[0x01] = 0x80;
    1193     pThis->PciDev.config[0x02] = 0x01; /* Device: ??? */
    1194     pThis->PciDev.config[0x03] = 0x01;
    1195     pThis->PciDev.config[0x04] = PCI_COMMAND_IOACCESS;
    1196     pThis->PciDev.config[0x09] = 0x01; /* Programming interface: 16450 */
    1197     pThis->PciDev.config[0x0a] = 0x00; /* Subclass: Serial controller */
    1198     pThis->PciDev.config[0x0b] = 0x07; /* Class: Communication controller */
    1199     pThis->PciDev.config[0x0e] = 0x00; /* Header type: standard */
    1200     pThis->PciDev.config[0x3c] = irq_lvl; /* preconfigure IRQ number (0 = autoconfig)*/
    1201     pThis->PciDev.config[0x3d] = 1;    /* interrupt pin 0 */
     1191    pThis->PciDev.abConfig[0x00] = 0xee; /* Vendor: ??? */
     1192    pThis->PciDev.abConfig[0x01] = 0x80;
     1193    pThis->PciDev.abConfig[0x02] = 0x01; /* Device: ??? */
     1194    pThis->PciDev.abConfig[0x03] = 0x01;
     1195    pThis->PciDev.abConfig[0x04] = PCI_COMMAND_IOACCESS;
     1196    pThis->PciDev.abConfig[0x09] = 0x01; /* Programming interface: 16450 */
     1197    pThis->PciDev.abConfig[0x0a] = 0x00; /* Subclass: Serial controller */
     1198    pThis->PciDev.abConfig[0x0b] = 0x07; /* Class: Communication controller */
     1199    pThis->PciDev.abConfig[0x0e] = 0x00; /* Header type: standard */
     1200    pThis->PciDev.abConfig[0x3c] = irq_lvl; /* preconfigure IRQ number (0 = autoconfig)*/
     1201    pThis->PciDev.abConfig[0x3d] = 1;    /* interrupt pin 0 */
    12021202#endif /* VBOX_SERIAL_PCI */
    12031203
  • trunk/src/VBox/Devices/Storage/DevAHCI.cpp

    r64387 r64393  
    58675867    PCIDevSetInterruptPin (&pThis->dev, 0x01);
    58685868
    5869     pThis->dev.config[0x70] = VBOX_PCI_CAP_ID_PM; /* Capability ID: PCI Power Management Interface */
    5870     pThis->dev.config[0x71] = 0xa8; /* next */
    5871     pThis->dev.config[0x72] = 0x03; /* version ? */
    5872 
    5873     pThis->dev.config[0x90] = 0x40; /* AHCI mode. */
    5874     pThis->dev.config[0x92] = 0x3f;
    5875     pThis->dev.config[0x94] = 0x80;
    5876     pThis->dev.config[0x95] = 0x01;
    5877     pThis->dev.config[0x97] = 0x78;
    5878 
    5879     pThis->dev.config[0xa8] = 0x12;                /* SATACR capability */
    5880     pThis->dev.config[0xa9] = 0x00;                /* next */
     5869    pThis->dev.abConfig[0x70] = VBOX_PCI_CAP_ID_PM; /* Capability ID: PCI Power Management Interface */
     5870    pThis->dev.abConfig[0x71] = 0xa8; /* next */
     5871    pThis->dev.abConfig[0x72] = 0x03; /* version ? */
     5872
     5873    pThis->dev.abConfig[0x90] = 0x40; /* AHCI mode. */
     5874    pThis->dev.abConfig[0x92] = 0x3f;
     5875    pThis->dev.abConfig[0x94] = 0x80;
     5876    pThis->dev.abConfig[0x95] = 0x01;
     5877    pThis->dev.abConfig[0x97] = 0x78;
     5878
     5879    pThis->dev.abConfig[0xa8] = 0x12;              /* SATACR capability */
     5880    pThis->dev.abConfig[0xa9] = 0x00;              /* next */
    58815881    PCIDevSetWord(&pThis->dev, 0xaa, 0x0010);      /* Revision */
    58825882    PCIDevSetDWord(&pThis->dev, 0xac, 0x00000028); /* SATA Capability Register 1 */
     
    60716071            /* Mark that a device is present on that port */
    60726072            if (i < 6)
    6073                 pThis->dev.config[0x93] |= (1 << i);
     6073                pThis->dev.abConfig[0x93] |= (1 << i);
    60746074
    60756075            /*
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r64387 r64393  
    74167416            PCIDevSetDeviceId(&pThis->dev, 0x269e); /* ICH6 IDE */
    74177417            /** @todo do we need it? Do we need anything else? */
    7418             pThis->dev.config[0x48] = 0x00; /* UDMACTL */
    7419             pThis->dev.config[0x4A] = 0x00; /* UDMATIM */
    7420             pThis->dev.config[0x4B] = 0x00;
     7418            pThis->dev.abConfig[0x48] = 0x00; /* UDMACTL */
     7419            pThis->dev.abConfig[0x4A] = 0x00; /* UDMATIM */
     7420            pThis->dev.abConfig[0x4B] = 0x00;
    74217421            {
    74227422                /*
     
    74287428                 */
    74297429                uint16_t u16Config = (1<<10) | (1<<7)  | (1<<6) | (1<<5) | (1<<4) ;
    7430                 pThis->dev.config[0x54] = u16Config & 0xff;
    7431                 pThis->dev.config[0x55] = u16Config >> 8;
     7430                pThis->dev.abConfig[0x54] = u16Config & 0xff;
     7431                pThis->dev.abConfig[0x55] = u16Config >> 8;
    74327432            }
    74337433            break;
     
    74357435            PCIDevSetDeviceId(&pThis->dev, 0x7111); /* PIIX4 IDE */
    74367436            PCIDevSetRevisionId(&pThis->dev, 0x01); /* PIIX4E */
    7437             pThis->dev.config[0x48] = 0x00; /* UDMACTL */
    7438             pThis->dev.config[0x4A] = 0x00; /* UDMATIM */
    7439             pThis->dev.config[0x4B] = 0x00;
     7437            pThis->dev.abConfig[0x48] = 0x00; /* UDMACTL */
     7438            pThis->dev.abConfig[0x4A] = 0x00; /* UDMATIM */
     7439            pThis->dev.abConfig[0x4B] = 0x00;
    74407440            break;
    74417441        case CHIPSET_PIIX3:
  • trunk/src/VBox/Devices/VirtIO/Virtio.cpp

    r64387 r64393  
    619619}
    620620
    621 /**
    622  * Sets 8-bit register in PCI configuration space.
    623  * @param   refPciDev   The PCI device.
    624  * @param   uOffset     The register offset.
    625  * @param   u16Value    The value to store in the register.
    626  * @thread  EMT
    627  */
    628 DECLINLINE(void) vpciCfgSetU8(PDMPCIDEV& refPciDev, uint32_t uOffset, uint8_t u8Value)
    629 {
    630     Assert(uOffset < sizeof(refPciDev.config));
    631     refPciDev.config[uOffset] = u8Value;
    632 }
    633 
    634 /**
    635  * Sets 16-bit register in PCI configuration space.
    636  * @param   refPciDev   The PCI device.
    637  * @param   uOffset     The register offset.
    638  * @param   u16Value    The value to store in the register.
    639  * @thread  EMT
    640  */
    641 DECLINLINE(void) vpciCfgSetU16(PDMPCIDEV& refPciDev, uint32_t uOffset, uint16_t u16Value)
    642 {
    643     Assert(uOffset+sizeof(u16Value) <= sizeof(refPciDev.config));
    644     *(uint16_t*)&refPciDev.config[uOffset] = u16Value;
    645 }
    646621
    647622#if 0 /* unused */
     
    807782    PCIDevSetVendorId(&pci, DEVICE_PCI_VENDOR_ID);
    808783    PCIDevSetDeviceId(&pci, DEVICE_PCI_BASE_ID + uDeviceId);
    809     vpciCfgSetU16(pci, VBOX_PCI_SUBSYSTEM_VENDOR_ID, DEVICE_PCI_SUBSYSTEM_VENDOR_ID);
    810     vpciCfgSetU16(pci, VBOX_PCI_SUBSYSTEM_ID, DEVICE_PCI_SUBSYSTEM_BASE_ID + uDeviceId);
     784    PDMPciDevSetWord(&pci, VBOX_PCI_SUBSYSTEM_VENDOR_ID, DEVICE_PCI_SUBSYSTEM_VENDOR_ID);
     785    PDMPciDevSetWord(&pci, VBOX_PCI_SUBSYSTEM_ID, DEVICE_PCI_SUBSYSTEM_BASE_ID + uDeviceId);
    811786
    812787    /* ABI version, must be equal 0 as of 2.6.30 kernel. */
    813     vpciCfgSetU8( pci, VBOX_PCI_REVISION_ID,          0x00);
     788    PDMPciDevSetByte(&pci, VBOX_PCI_REVISION_ID,          0x00);
    814789    /* Ethernet adapter */
    815     vpciCfgSetU8( pci, VBOX_PCI_CLASS_PROG,           0x00);
    816     vpciCfgSetU16(pci, VBOX_PCI_CLASS_DEVICE,       uClass);
     790    PDMPciDevSetByte(&pci, VBOX_PCI_CLASS_PROG,           0x00);
     791    PDMPciDevSetWord(&pci,  VBOX_PCI_CLASS_DEVICE,         uClass);
    817792    /* Interrupt Pin: INTA# */
    818     vpciCfgSetU8( pci, VBOX_PCI_INTERRUPT_PIN,        0x01);
     793    PDMPciDevSetByte(&pci, VBOX_PCI_INTERRUPT_PIN,        0x01);
    819794
    820795#ifdef VBOX_WITH_MSI_DEVICES
    821     PCIDevSetCapabilityList     (&pci, 0x80);
    822     PCIDevSetStatus             (&pci, VBOX_PCI_STATUS_CAP_LIST);
     796    PCIDevSetCapabilityList(&pci, 0x80);
     797    PCIDevSetStatus( &pci, VBOX_PCI_STATUS_CAP_LIST);
    823798#endif
    824799}
Note: See TracChangeset for help on using the changeset viewer.

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