VirtualBox

Changeset 16746 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Feb 13, 2009 4:06:37 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
42787
Message:

SMP guests: implement support for multiple CPU ACPI objects (#ifdef'ed VBOX_WITH_SMP_GUESTS)

Location:
trunk/src/VBox/Devices/PC
Files:
2 edited

Legend:

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

    r16711 r16746  
    13461346                case SYSTEM_INFO_INDEX_CPU2_STATUS:
    13471347                case SYSTEM_INFO_INDEX_CPU3_STATUS:
     1348#ifdef VBOX_WITH_SMP_GUESTS
     1349                    *pu32 = (s->fShowCpu &&
     1350                             s->uSystemInfoIndex - SYSTEM_INFO_INDEX_CPU0_STATUS < cCpus)
     1351                            ? (  STA_DEVICE_PRESENT_MASK
     1352                                           | STA_DEVICE_ENABLED_MASK
     1353                                           | STA_DEVICE_SHOW_IN_UI_MASK
     1354                                           | STA_DEVICE_FUNCTIONING_PROPERLY_MASK)
     1355                            : 0;
     1356#else
    13481357                    *pu32 = 0;
     1358#endif
    13491359                    break;
    13501360
     
    18321842        return PDMDEV_SET_ERROR(pDevIns, rc,
    18331843                                N_("Configuration error: Failed to read \"SmcEnabled\""));
    1834     /** @todo: a bit of hack: if we have SMC, also show CPU in ACPI */
     1844    /** @todo: a bit of hack: if we have SMC, also show CPU object in ACPI tables */
    18351845    s->fShowCpu = s->fUseSmc;
    18361846
  • trunk/src/VBox/Devices/PC/vbox.dsl

    r16711 r16746  
    123123    // with SpeedStep if it finds a CPU object and when it finds out that it can't, it
    124124    // tries to unload and crashes (MS probably never tested this code path).
     125    // So we enable this ACPI object only for certain guests, which do need it,
     126    // if by accident Windows guest seen enabled CPU object, just boot from latest
     127    // known good configuration, as it remembers state, even if ACPI object gets disabled.
    125128    Scope (\_PR)
    126129    {
    127         Processor (CPU0, 0x00, 0x00000410, 0x06)
     130       Processor (CPU0, /* Name */
     131                   0x00, /* Id */
     132                   0x0,  /* Processor IO ports range start */
     133                   0x0   /* Processor IO ports range length */
     134                   )
    128135        {
    129136           Method (_STA) { Return(\_SB.UCP0) }
    130137        }
    131         // Maybe we'll need more entries for SMP systems, enabled depending on runtime config
     138        Processor (CPU1, /* Name */
     139                   0x01, /* Id */
     140                   0x0,  /* Processor IO ports range start */
     141                   0x0   /* Processor IO ports range length */
     142                   )
     143        {
     144           Method (_STA) { Return(\_SB.UCP1) }
     145        }
     146        Processor (CPU2, /* Name */
     147                   0x02, /* Id */
     148                   0x0,  /* Processor IO ports range start */
     149                   0x0   /* Processor IO ports range length */
     150                   )
     151        {
     152           Method (_STA) { Return(\_SB.UCP2) }
     153        }
     154        Processor (CPU3, /* Name */
     155                   0x03, /* Id */
     156                   0x0,  /* Processor IO ports range start */
     157                   0x0   /* Processor IO ports range length */
     158                   )
     159        {
     160           Method (_STA) { Return(\_SB.UCP3) }
     161        }
    132162    }
    133163
     
    148178            USMC,  32,
    149179            UFDC,  32,
     180            // @todo: maybe make it bitmask instead?
    150181            UCP0,  32,
     182            UCP1,  32,
     183            UCP2,  32,
     184            UCP3,  32,
    151185            Offset (0x80),
    152186            ININ, 32,
     
    900934                    0x20,               // Length
    901935                    )
    902                 //IRQNoFlags () {8}
     936                // This line seriously confuses Windows ACPI driver, so not even try to
     937                // enable SMC for Windows guests
     938                IRQNoFlags () {8}
    903939            })
    904940        }
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