VirtualBox

Changeset 16042 in vbox for trunk/src/VBox/Devices/PC


Ignore:
Timestamp:
Jan 19, 2009 12:06:00 PM (16 years ago)
Author:
vboxsync
Message:

reverted r41685 (thanks Sander)

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

Legend:

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

    r16041 r16042  
    6666#define SYSI_DATA       0x0000404c
    6767#define ACPI_RESET_BLK  0x00004050
     68#define FDC_STATUS      0x00004054
    6869
    6970/* PM1x status register bits */
     
    131132    SYSTEM_INFO_INDEX_MEMORY_LENGTH     = 0,
    132133    SYSTEM_INFO_INDEX_USE_IOAPIC        = 1,
    133     SYSTEM_INFO_INDEX_HPET_STATUS       = 2,
    134     SYSTEM_INFO_INDEX_SMC_STATUS        = 3,
    135     SYSTEM_INFO_INDEX_FDC_STATUS        = 4,
    136     SYSTEM_INFO_INDEX_LAST              = 5,
     134    SYSTEM_INFO_INDEX_LAST              = 2,
    137135    SYSTEM_INFO_INDEX_INVALID           = 0x80,
    138136    SYSTEM_INFO_INDEX_VALID             = 0x200
     
    198196    /** Pointer to the driver connector interface */
    199197    R3PTRTYPE(PPDMIACPICONNECTOR) pDrv;
    200 
    201     /* If High Precision Event Timer device should be supported */
    202     uint8_t             u8UseHpet;
    203     /* If System Management Controller device should be supported */
    204     uint8_t             u8UseSmc;
    205 
    206     uint32_t            Alignment0; /**< Structure size alignment. */
    207198};
    208199
     
    542533IO_WRITE_PROTO (acpiBatIndexWrite);
    543534IO_READ_PROTO  (acpiBatDataRead);
     535IO_READ_PROTO  (acpiFdcStatusRead);
    544536IO_READ_PROTO  (acpiSysInfoDataRead);
    545537IO_WRITE_PROTO (acpiSysInfoDataWrite);
     
    12541246}
    12551247
     1248IO_READ_PROTO (acpiFdcStatusRead)
     1249{
     1250    ACPIState *s = (ACPIState *)pvUser;
     1251
     1252    switch (cb)
     1253    {
     1254        case 4:
     1255            *pu32 = s->u8UseFdc
     1256                ?   STA_DEVICE_PRESENT_MASK                 /* present */
     1257                  | STA_DEVICE_ENABLED_MASK                 /* enabled and decodes its resources */
     1258                  | STA_DEVICE_SHOW_IN_UI_MASK              /* should be shown in UI */
     1259                  | STA_DEVICE_FUNCTIONING_PROPERLY_MASK    /* functioning properly */
     1260                : 0;                                        /* device not present */
     1261            break;
     1262        default:
     1263            return VERR_IOM_IOPORT_UNUSED;
     1264    }
     1265    return VINF_SUCCESS;
     1266}
     1267
    12561268IO_WRITE_PROTO (acpiSysInfoIndexWrite)
    12571269{
     
    12651277        else
    12661278        {
    1267             /* see comment at the declaration of u8IndexShift */
    1268             if (s->u8IndexShift == 0)
    1269             {
    1270                 uint32_t u32Index;
    1271                 for (u32Index = 0; u32Index < SYSTEM_INFO_INDEX_LAST; u32Index++)
    1272                 {
    1273                     if (u32 == (u32Index << 2))
    1274                     {
    1275                         s->u8IndexShift = 2;
    1276                         break;
    1277                     }
    1278                 }
    1279             }
    12801279            u32 >>= s->u8IndexShift;
    12811280            Assert (u32 < SYSTEM_INFO_INDEX_LAST);
     
    12941293{
    12951294    ACPIState *s = (ACPIState *)pvUser;
    1296  
     1295
    12971296    switch (cb)
    12981297    {
    1299         case 4:           
     1298        case 4:
    13001299            switch (s->uSystemInfoIndex)
    13011300            {
     
    13071306                    *pu32 = s->u8UseIOApic;
    13081307                    break;
    1309 
    1310                 case SYSTEM_INFO_INDEX_HPET_STATUS:
    1311                     *pu32 = s->u8UseHpet ? (  STA_DEVICE_PRESENT_MASK
    1312                                             | STA_DEVICE_ENABLED_MASK
    1313                                             | STA_DEVICE_SHOW_IN_UI_MASK
    1314                                             | STA_DEVICE_FUNCTIONING_PROPERLY_MASK)
    1315                                          : 0;
    1316                     break;
    1317 
    1318                 case SYSTEM_INFO_INDEX_SMC_STATUS:
    1319                     *pu32 = s->u8UseSmc ? (  STA_DEVICE_PRESENT_MASK
    1320                                            | STA_DEVICE_ENABLED_MASK
    1321                                            /* no need to show this device in the UI */
    1322                                            | STA_DEVICE_FUNCTIONING_PROPERLY_MASK)
    1323                                         : 0;
    1324                     break;
    1325                
    1326                 case SYSTEM_INFO_INDEX_FDC_STATUS:
    1327                     *pu32 = s->u8UseFdc ? (  STA_DEVICE_PRESENT_MASK
    1328                                            | STA_DEVICE_ENABLED_MASK
    1329                                            | STA_DEVICE_SHOW_IN_UI_MASK
    1330                                            | STA_DEVICE_FUNCTIONING_PROPERLY_MASK)
    1331                                         : 0;
    1332                     break;
    1333 
    13341308 
    13351309                /* Solaris 9 tries to read from this index */
     
    17801754                               "GCEnabled\0"
    17811755                               "R0Enabled\0"
    1782                                "FdcEnabled\0"
    1783                                "HpetEnabled\0"
    1784                                "SmcEnabled\0"))
     1756                               "FdcEnabled\0"))
    17851757        return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
    17861758                                N_("Configuration error: Invalid config key for ACPI device"));
     
    17951767        return PDMDEV_SET_ERROR(pDevIns, rc,
    17961768                                N_("Configuration error: Failed to read \"IOAPIC\""));
    1797 
    1798     /* query whether we are supposed to present HPET */
    1799     rc = CFGMR3QueryU8Def (pCfgHandle, "HpetEnabled", &s->u8UseHpet, 0);
    1800     if (RT_FAILURE(rc))
    1801         return PDMDEV_SET_ERROR(pDevIns, rc,
    1802                                 N_("Configuration error: Failed to read \"HpetEnabled\""));
    1803      /* query whether we are supposed to present SMC */
    1804     rc = CFGMR3QueryU8Def (pCfgHandle, "SmcEnabled", &s->u8UseSmc, 0);
    1805     if (RT_FAILURE(rc))
    1806         return PDMDEV_SET_ERROR(pDevIns, rc,
    1807                                 N_("Configuration error: Failed to read \"SmcEnabled\""));
    18081769
    18091770    rc = CFGMR3QueryU16Def(pCfgHandle, "NumCPUs", &s->cCpus, 1);
     
    18701831    R (SYSI_INDEX,     1, acpiSysInfoIndexWrite, NULL,                "ACPI system info index");
    18711832    R (SYSI_DATA,      1, acpiSysInfoDataWrite,  acpiSysInfoDataRead, "ACPI system info data");
     1833    R (FDC_STATUS,     1, NULL,                  acpiFdcStatusRead,   "ACPI FDC status index");
    18721834    R (GPE0_BLK + L,   L, acpiGpe0EnWrite,       acpiGpe0EnRead,      "ACPI GPE0 Enable");
    18731835    R (GPE0_BLK,       L, acpiGpe0StsWrite,      acpiGpe0StsRead,     "ACPI GPE0 Status");
  • trunk/src/VBox/Devices/PC/vbox.dsl

    r16041 r16042  
    130130    Scope (\_SB)
    131131    {
    132         OperationRegion (SYSI, SystemIO, 0x4048, 0x8)
     132        OperationRegion (SYSI, SystemIO, 0x4048, 0x08)
    133133        Field (SYSI, DwordAcc, NoLock, Preserve)
    134134        {
     
    141141            MEML, 32,
    142142            UIOA, 32,
    143             UHPT, 32,
    144             USMC, 32,
    145             UFDC, 32,
    146143            Offset (0x80),
    147144            ININ, 32,
     
    157154            DBG ("UIOA: ")
    158155            HEX4 (UIOA)
    159             DBG ("UHPT: ")
    160             HEX4 (UHPT)
    161             DBG ("USMC: ")
    162             HEX4 (USMC)
    163             DBG ("UFDC: ")
    164             HEX4 (UFDC)
    165156        }
    166157
     
    498489            IRQ (Level, ActiveLow, Shared) {5,9,10,11}
    499490        })
    500        
    501         // High Precision Event Timer
    502         Device (HPET)
    503         {
    504             Name (_HID, EisaId ("PNP0103"))
    505             Name (_CID, 0x010CD041)
    506             Name (BUF0, ResourceTemplate ()
    507             {
    508                 IRQNoFlags ()
    509                     {2}
    510                 IRQNoFlags ()
    511                     {8}
    512                 Memory32Fixed (ReadOnly,
    513                     0xFED00000,         // Address Base
    514                     0x00000400,         // Address Length
    515                     _Y16)
    516             })
    517             Method (_STA, 0, NotSerialized)
    518             {
    519                 Return (UHPT)
    520             }
    521             Method (_CRS, 0, Serialized)
    522             {
    523                 Return (BUF0)
    524             }
    525         }
    526 
    527         // System Management Controller
    528         Device (SMC)
    529         {
    530             Name (_HID, EisaId ("APP0001"))
    531             Name (_CID, "smc-napa")
    532 
    533             Method (_STA, 0, NotSerialized)
    534             {
    535                 Return (USMC)
    536             }
    537             Name (_CRS, ResourceTemplate ()
    538             {
    539                 IO (Decode16,
    540                     0x0300,             // Range Minimum
    541                     0x0300,             // Range Maximum
    542                     0x01,               // Alignment
    543                     0x20,               // Length
    544                     )
    545                 IRQNoFlags ()
    546                     {6}
    547             })
    548         }
    549 
    550491
    551492        // PCI bus 0
     
    623564                    Name (_HID, EisaId ("PNP0700"))
    624565
     566                    OperationRegion (CFDC, SystemIO, 0x4054, 0x08)
     567                    Field (CFDC, DwordAcc, NoLock, Preserve)
     568                    {
     569                        FSTA, 32,
     570                    }
     571
    625572                    Method (_STA, 0, NotSerialized)
    626573                    {
    627                           Return (UFDC)           
     574                        Return (FSTA)
    628575                    }
     576
    629577                    // Current resource settings
    630578                    Name (_CRS, ResourceTemplate ()
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