VirtualBox

Changeset 29891 in vbox for trunk/src/VBox/Devices/Serial


Ignore:
Timestamp:
May 31, 2010 10:23:34 AM (15 years ago)
Author:
vboxsync
Message:

Devices/Serial: allow to force the guest into 16450 mode by CFGM key

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Serial/DevSerial.cpp

    r29889 r29891  
    974974    {
    975975        pThis->f16550AEnabled = false;
     976        LogRel(("Serial#%d: falling back to 16450 mode from load state\n", pDevIns->iInstance));
    976977    }
    977978    else
     
    11561157     * Validate and read the configuration.
    11571158     */
    1158     if (!CFGMR3AreValuesValid(pCfg, "IRQ\0" "IOBase\0" "GCEnabled\0" "R0Enabled\0" "YieldOnLSRRead\0"))
     1159    if (!CFGMR3AreValuesValid(pCfg, "IRQ\0"
     1160                                    "IOBase\0"
     1161                                    "GCEnabled\0"
     1162                                    "R0Enabled\0"
     1163                                    "YieldOnLSRRead\0"
     1164                                    "Enable16550A\0"
     1165                                    ))
    11591166    {
    11601167        AssertMsgFailed(("serialConstruct Invalid configuration values\n"));
     
    12081215    Log(("DevSerial: instance %d iobase=%04x irq=%d\n", iInstance, io_base, irq_lvl));
    12091216
     1217    rc = CFGMR3QueryBoolDef(pCfg, "Enable16550A", &pThis->f16550AEnabled, true);
     1218    if (RT_FAILURE(rc))
     1219        return PDMDEV_SET_ERROR(pDevIns, rc,
     1220                                N_("Configuration error: Failed to get the \"Enable16550A\" value"));
     1221
    12101222    pThis->irq = irq_lvl;
    12111223#ifdef VBOX_SERIAL_PCI
     
    12151227#endif
    12161228
    1217     pThis->f16550AEnabled = true;
     1229    LogRel(("Serial#%d: emulating %s\n", pDevIns->iInstance, pThis->f16550AEnabled ? "16550A" : "16450"));
    12181230
    12191231    /*
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