VirtualBox

Changeset 63665 in vbox


Ignore:
Timestamp:
Aug 30, 2016 2:46:05 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
110408
Message:

PCI: Take into account amount of RAM below/above 4GB when mapping devices. Removed fixed VGA LFB hack.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevPciIch9.cpp

    r63663 r63665  
    109109    /** The next MMIO address which the PCI BIOS will use. */
    110110    uint32_t            uPciBiosMmio;
     111    /** Actual bus number. */
     112    uint8_t             uBus;
    111113    /** The next 64-bit MMIO address which the PCI BIOS will use. */
    112114    uint64_t            uPciBiosMmio64;
    113     /** Actual bus number. */
    114     uint8_t             uBus;
    115115    uint8_t             Alignment0[7];
    116116#endif
     
    17311731        case 0x0300:
    17321732            /* VGA controller */
    1733             if (uVendor != 0x80ee)
    1734                 goto default_map;
    1735             /* VGA: map frame buffer to default Bochs VBE address */
    1736             ich9pciSetRegionAddress(pGlobals, uBus, uDevFn, 0, 0xE0000000);
     1733
     1734            /* NB: Default Bochs VGA LFB address is 0xE0000000. Old guest
     1735             * software may break if the framebuffer isn't mapped there.
     1736             */
     1737
    17371738            /*
    17381739             * Legacy VGA I/O ports are implicitly decoded by a VGA class device. But
     
    17421743            uCmd = ich9pciConfigRead(pGlobals, uBus, uDevFn, VBOX_PCI_COMMAND, 1);
    17431744            ich9pciConfigWrite(pGlobals, uBus, uDevFn, VBOX_PCI_COMMAND,
    1744                                uCmd | PCI_COMMAND_IOACCESS | PCI_COMMAND_MEMACCESS,
     1745                               uCmd | PCI_COMMAND_IOACCESS,
    17451746                               1);
     1747            goto default_map;
    17461748            break;
    17471749        case 0x0604:
     
    19641966    uint32_t const  cbBelow4GB = MMR3PhysGetRamSizeBelow4GB(pVM);
    19651967    uint64_t const  cbAbove4GB = MMR3PhysGetRamSizeAbove4GB(pVM);
    1966     RT_NOREF(cbBelow4GB, cbAbove4GB);
    19671968
    19681969    /*
    19691970     * Set the start addresses.
    19701971     */
    1971     pGlobals->uPciBiosIo  = 0xd000;
    1972     pGlobals->uPciBiosMmio = UINT32_C(0xf0000000);
    1973     pGlobals->uPciBiosMmio64 = 128 * 0x100000000;   ///@todo: Make dynamic!
     1972    pGlobals->uPciBiosIo     = 0xd000;
     1973    pGlobals->uPciBiosMmio   = cbBelow4GB;
     1974    pGlobals->uPciBiosMmio64 = cbAbove4GB + 0x100000000;
    19741975    pGlobals->uBus = 0;
     1976
     1977    /* NB: Assume that if MMIO range is enabled, it is at the bottom of the memory hole. */
     1978    if (pGlobals->u64PciConfigMMioAddress)
     1979    {
     1980        AssertRelease(pGlobals->u64PciConfigMMioAddress == cbBelow4GB);
     1981        pGlobals->uPciBiosMmio = pGlobals->u64PciConfigMMioAddress + pGlobals->u64PciConfigMMioLength;
     1982    }
     1983    Log(("cbBelow4GB: %lX, uPciBiosMmio: %lX, cbAbove4GB: %llX\n", cbBelow4GB, pGlobals->uPciBiosMmio, cbAbove4GB));
    19751984
    19761985    /*
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