Index: trunk/src/VBox/Devices/PC/DevACPI.cpp
===================================================================
--- trunk/src/VBox/Devices/PC/DevACPI.cpp	(revision 16158)
+++ trunk/src/VBox/Devices/PC/DevACPI.cpp	(revision 16170)
@@ -66,5 +66,4 @@
 #define SYSI_DATA       0x0000404c
 #define ACPI_RESET_BLK  0x00004050
-#define FDC_STATUS      0x00004054
 
 /* PM1x status register bits */
@@ -132,5 +131,8 @@
     SYSTEM_INFO_INDEX_MEMORY_LENGTH     = 0,
     SYSTEM_INFO_INDEX_USE_IOAPIC        = 1,
-    SYSTEM_INFO_INDEX_LAST              = 2,
+    SYSTEM_INFO_INDEX_HPET_STATUS       = 2,
+    SYSTEM_INFO_INDEX_SMC_STATUS        = 3,
+    SYSTEM_INFO_INDEX_FDC_STATUS        = 4,
+    SYSTEM_INFO_INDEX_LAST              = 5,
     SYSTEM_INFO_INDEX_INVALID           = 0x80,
     SYSTEM_INFO_INDEX_VALID             = 0x200
@@ -184,6 +186,10 @@
     uint8_t             u8UseIOApic;
     uint8_t             u8UseFdc;
+    /* If High Precision Event Timer device should be supported */
+    uint8_t             u8UseHpet;
+    /* If System Management Controller device should be supported */
+    uint8_t             u8UseSmc;
+
     bool                fPowerButtonHandled;
-
     /** ACPI port base interface. */
     PDMIBASE            IBase;
@@ -196,4 +202,7 @@
     /** Pointer to the driver connector interface */
     R3PTRTYPE(PPDMIACPICONNECTOR) pDrv;
+
+    uint32_t            Alignment0; /**< Structure size alignment. */
+
 };
 
@@ -533,5 +542,4 @@
 IO_WRITE_PROTO (acpiBatIndexWrite);
 IO_READ_PROTO  (acpiBatDataRead);
-IO_READ_PROTO  (acpiFdcStatusRead);
 IO_READ_PROTO  (acpiSysInfoDataRead);
 IO_WRITE_PROTO (acpiSysInfoDataWrite);
@@ -1246,24 +1254,4 @@
 }
 
-IO_READ_PROTO (acpiFdcStatusRead)
-{
-    ACPIState *s = (ACPIState *)pvUser;
-
-    switch (cb)
-    {
-        case 4:
-            *pu32 = s->u8UseFdc
-                ?   STA_DEVICE_PRESENT_MASK                 /* present */
-                  | STA_DEVICE_ENABLED_MASK                 /* enabled and decodes its resources */
-                  | STA_DEVICE_SHOW_IN_UI_MASK              /* should be shown in UI */
-                  | STA_DEVICE_FUNCTIONING_PROPERLY_MASK    /* functioning properly */
-                : 0;                                        /* device not present */
-            break;
-        default:
-            return VERR_IOM_IOPORT_UNUSED;
-    }
-    return VINF_SUCCESS;
-}
-
 IO_WRITE_PROTO (acpiSysInfoIndexWrite)
 {
@@ -1277,4 +1265,13 @@
         else
         {
+            /* see comment at the declaration of u8IndexShift */
+            if (s->u8IndexShift == 0)
+            {
+                if (((u32 >> 2) < SYSTEM_INFO_INDEX_LAST) && ((u32 & 0x3)) == 0)
+                {
+                    s->u8IndexShift = 2;
+                }
+            }
+
             u32 >>= s->u8IndexShift;
             Assert (u32 < SYSTEM_INFO_INDEX_LAST);
@@ -1306,10 +1303,35 @@
                     *pu32 = s->u8UseIOApic;
                     break;
- 
+
+                case SYSTEM_INFO_INDEX_HPET_STATUS:
+                    *pu32 = s->u8UseHpet ? (  STA_DEVICE_PRESENT_MASK
+                                            | STA_DEVICE_ENABLED_MASK
+                                            | STA_DEVICE_SHOW_IN_UI_MASK
+                                            | STA_DEVICE_FUNCTIONING_PROPERLY_MASK)
+                            : 0;
+                    break;
+
+                case SYSTEM_INFO_INDEX_SMC_STATUS:
+                    *pu32 = s->u8UseSmc ? (  STA_DEVICE_PRESENT_MASK
+                                           | STA_DEVICE_ENABLED_MASK
+                                           /* no need to show this device in the UI */
+                                           | STA_DEVICE_FUNCTIONING_PROPERLY_MASK)
+                            : 0;
+                    break;
+
+                case SYSTEM_INFO_INDEX_FDC_STATUS:
+                    *pu32 = s->u8UseFdc ? (  STA_DEVICE_PRESENT_MASK
+                                           | STA_DEVICE_ENABLED_MASK
+                                           | STA_DEVICE_SHOW_IN_UI_MASK
+                                           | STA_DEVICE_FUNCTIONING_PROPERLY_MASK)
+                            : 0;
+                    break;
+
+
                 /* Solaris 9 tries to read from this index */
                 case SYSTEM_INFO_INDEX_INVALID:
                     *pu32 = 0;
                     break;
-                    
+
                 default:
                     AssertMsgFailed (("Invalid system info index %d\n", s->uSystemInfoIndex));
@@ -1754,5 +1776,8 @@
                                "GCEnabled\0"
                                "R0Enabled\0"
-                               "FdcEnabled\0"))
+                               "HpetEnabled\0"
+                               "SmcEnabled\0"
+                               "FdcEnabled\0"
+                               ))
         return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
                                 N_("Configuration error: Invalid config key for ACPI device"));
@@ -1780,4 +1805,15 @@
         return PDMDEV_SET_ERROR(pDevIns, rc,
                                 N_("Configuration error: Failed to read \"FdcEnabled\""));
+
+    /* query whether we are supposed to present HPET */
+    rc = CFGMR3QueryU8Def (pCfgHandle, "HpetEnabled", &s->u8UseHpet, 0);
+    if (RT_FAILURE(rc))
+        return PDMDEV_SET_ERROR(pDevIns, rc,
+                                N_("Configuration error: Failed to read \"HpetEnabled\""));
+    /* query whether we are supposed to present SMC */
+    rc = CFGMR3QueryU8Def (pCfgHandle, "SmcEnabled", &s->u8UseSmc, 0);
+    if (RT_FAILURE(rc))
+        return PDMDEV_SET_ERROR(pDevIns, rc,
+                                N_("Configuration error: Failed to read \"SmcEnabled\""));
 
     rc = CFGMR3QueryBool (pCfgHandle, "GCEnabled", &fGCEnabled);
@@ -1831,5 +1867,4 @@
     R (SYSI_INDEX,     1, acpiSysInfoIndexWrite, NULL,                "ACPI system info index");
     R (SYSI_DATA,      1, acpiSysInfoDataWrite,  acpiSysInfoDataRead, "ACPI system info data");
-    R (FDC_STATUS,     1, NULL,                  acpiFdcStatusRead,   "ACPI FDC status index");
     R (GPE0_BLK + L,   L, acpiGpe0EnWrite,       acpiGpe0EnRead,      "ACPI GPE0 Enable");
     R (GPE0_BLK,       L, acpiGpe0StsWrite,      acpiGpe0StsRead,     "ACPI GPE0 Status");
@@ -2021,3 +2056,2 @@
 #endif /* IN_RING3 */
 #endif /* !VBOX_DEVICE_STRUCT_TESTCASE */
-
Index: trunk/src/VBox/Devices/PC/vbox.dsl
===================================================================
--- trunk/src/VBox/Devices/PC/vbox.dsl	(revision 16158)
+++ trunk/src/VBox/Devices/PC/vbox.dsl	(revision 16170)
@@ -141,4 +141,7 @@
             MEML, 32,
             UIOA, 32,
+            UHPT, 32,
+            USMC, 32,
+            UFDC, 32,
             Offset (0x80),
             ININ, 32,
@@ -154,4 +157,10 @@
             DBG ("UIOA: ")
             HEX4 (UIOA)
+            DBG ("UHPT: ")
+            HEX4 (UHPT)
+            DBG ("USMC: ")
+            HEX4 (USMC)
+            DBG ("UFDC: ")
+            HEX4 (UFDC)
         }
 
@@ -564,13 +573,7 @@
                     Name (_HID, EisaId ("PNP0700"))
 
-                    OperationRegion (CFDC, SystemIO, 0x4054, 0x08)
-                    Field (CFDC, DwordAcc, NoLock, Preserve)
-                    {
-                        FSTA, 32,
-                    }
-
                     Method (_STA, 0, NotSerialized)
                     {
-                        Return (FSTA)
+                        Return (UFDC)
                     }
 
@@ -852,4 +855,46 @@
     Scope (\_SB)
     {
+         // High Precision Event Timer
+        Device(HPET) {
+            Name(_HID,  EISAID("PNP0103"))
+            Name(_UID, 0)
+            Method (_STA, 0, NotSerialized) {
+                    Return(UHPT)
+            }
+            Name(_CRS, ResourceTemplate() {
+                DWordMemory(
+                    ResourceConsumer, PosDecode, MinFixed, MaxFixed,
+                    NonCacheable, ReadWrite,
+                    0x00000000,
+                    0xFED00000,
+                    0xFED003FF,
+                    0x00000000,
+                    0x00000400 /* 1K memory: FED00000 - FED003FF */
+                )
+            })
+        }
+ 
+       // System Management Controller
+       Device (SMC)
+       {
+            Name (_HID, EisaId ("APP0001"))
+            Name (_CID, "smc-napa")
+
+            Method (_STA, 0, NotSerialized)
+            {
+                Return (USMC)
+            }
+            Name (_CRS, ResourceTemplate ()
+            {
+                IO (Decode16,
+                    0x0300,             // Range Minimum
+                    0x0300,             // Range Maximum
+                    0x01,               // Alignment
+                    0x20,               // Length
+                    )
+                //IRQNoFlags () {8}
+            })
+        }
+
         // Fields within PIIX3 configuration[0x60..0x63] with
         // IRQ mappings
