VirtualBox

Changeset 28487 in vbox


Ignore:
Timestamp:
Apr 19, 2010 5:59:26 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60282
Message:

ACPI: another attempt to provide primary NIC info via ACPI

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevACPI.cpp

    r27851 r28487  
    163163    SYSTEM_INFO_INDEX_CPU_EVENT_TYPE    = 13, /**< Type of the CPU hot-plug event */
    164164    SYSTEM_INFO_INDEX_CPU_EVENT         = 14, /**< The CPU id the event is for */
    165     SYSTEM_INFO_INDEX_END               = 15,
     165    SYSTEM_INFO_INDEX_NIC_ADDRESS       = 15, /**< NIC PCI address, or 0 */
     166    SYSTEM_INFO_INDEX_END               = 16,
    166167    SYSTEM_INFO_INDEX_INVALID           = 0x80,
    167168    SYSTEM_INFO_INDEX_VALID             = 0x200
     
    256257    /** Flag whether CPU hot plugging is enabled */
    257258    bool                fCpuHotPlug;
    258     /** Aligning IBase. */
    259     bool                afAlignment[4];
     259    /** Primary NIC PCI address */
     260    uint32_t             u32NicPciAddress;
    260261
    261262    /** ACPI port base interface. */
     
    15041505                    break;
    15051506
     1507                case SYSTEM_INFO_INDEX_NIC_ADDRESS:
     1508                    *pu32 = s->u32NicPciAddress;
     1509                    break;
     1510
    15061511                /* This is only for compatability with older saved states that
    15071512                   may include ACPI code that read these values.  Legacy is
     
    23482353                              "ShowRtc\0"
    23492354                              "ShowCpu\0"
     2355                              "NicPciAddress\0"
    23502356                              "CpuHotPlug\0"
    23512357                              "AmlFilePath\0"
     
    23952401        return PDMDEV_SET_ERROR(pDevIns, rc,
    23962402                                N_("Configuration error: Failed to read \"ShowCpu\""));
     2403
     2404    /* query primary NIC PCI address */
     2405    rc = CFGMR3QueryU32Def(pCfg, "NicPciAddress", &s->u32NicPciAddress, 0);
     2406    if (RT_FAILURE(rc))
     2407        return PDMDEV_SET_ERROR(pDevIns, rc,
     2408                                N_("Configuration error: Failed to read \"NicPciAddress\""));
    23972409
    23982410    /* query whether we are allow CPU hot plugging */
  • trunk/src/VBox/Devices/PC/vbox.dsl

    r27851 r28487  
    148148            CPET,  32,
    149149            CPEV,  32,
     150            NICA,  32,
    150151            Offset (0x80),
    151152            ININ, 32,
     
    760761                 }
    761762             }
    762 
     763           
     764            // NIC
     765            Device (GIGE)
     766            {               
     767                Method(_ADR, 0, NotSerialized)
     768                {
     769                    Return (NICA)
     770                }
     771
     772                Name (_PRW, Package (0x02)
     773                            {
     774                               0x09,
     775                               0x04
     776                            })
     777
     778                Method (EWOL, 1, NotSerialized)
     779                {
     780                    Return (0x00)
     781                }
     782
     783                Method (_STA, 0, NotSerialized)
     784                {
     785                    if (LEqual (NICA, Zero)) {
     786                       Return (0x00)
     787                    }
     788                    else {
     789                        Return (0x0F)
     790                    }
     791                }
     792            }
     793           
    763794            // Control method battery
    764795            Device (BAT0)
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r28406 r28487  
    22472247        rc = CFGMR3InsertInteger(pCfg,  "SmcEnabled", fSmcEnabled);                 RC_CHECK();
    22482248        rc = CFGMR3InsertInteger(pCfg,  "ShowRtc",    fExtProfile);                 RC_CHECK();
    2249 
     2249        if (fExtProfile)
     2250        {
     2251            BootNic aNic = llBootNics.front();
     2252            uint32 u32NicPciAddr = (aNic.mPciDev << 16) | aNic.mPciFn;
     2253            rc = CFGMR3InsertInteger(pCfg,  "NicPciAddress",    u32NicPciAddr);     RC_CHECK();
     2254        }
    22502255        rc = CFGMR3InsertInteger(pCfg,  "ShowCpu", fShowCpu);                       RC_CHECK();
    22512256        rc = CFGMR3InsertInteger(pCfg,  "CpuHotPlug", fCpuHotPlug);                 RC_CHECK();
     
    37683773#endif /* !VBOX_WITH_GUEST_CONTROL */
    37693774}
    3770 
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