Changeset 5605 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Nov 1, 2007 4:09:26 PM (17 years ago)
- Location:
- trunk/src/VBox/Devices/PC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevACPI.cpp
r4787 r5605 65 65 66 66 /* PM1x status register bits */ 67 #define TMR_STS BIT(0)68 #define RSR1_STS ( BIT(1) | BIT(2) |BIT(3))69 #define BM_STS BIT(4)70 #define GBL_STS BIT(5)71 #define RSR2_STS ( BIT(6) |BIT(7))72 #define PWRBTN_STS BIT(8)73 #define SLPBTN_STS BIT(9)74 #define RTC_STS BIT(10)75 #define IGN_STS BIT(11)76 #define RSR3_STS ( BIT(12) | BIT(13) |BIT(14))77 #define WAK_STS BIT(15)67 #define TMR_STS RT_BIT(0) 68 #define RSR1_STS (RT_BIT(1) | RT_BIT(2) | RT_BIT(3)) 69 #define BM_STS RT_BIT(4) 70 #define GBL_STS RT_BIT(5) 71 #define RSR2_STS (RT_BIT(6) | RT_BIT(7)) 72 #define PWRBTN_STS RT_BIT(8) 73 #define SLPBTN_STS RT_BIT(9) 74 #define RTC_STS RT_BIT(10) 75 #define IGN_STS RT_BIT(11) 76 #define RSR3_STS (RT_BIT(12) | RT_BIT(13) | RT_BIT(14)) 77 #define WAK_STS RT_BIT(15) 78 78 #define RSR_STS (RSR1_STS | RSR2_STS | RSR3_STS) 79 79 80 80 /* PM1x enable register bits */ 81 #define TMR_EN BIT(0)82 #define RSR1_EN ( BIT(1) | BIT(2) | BIT(3) |BIT(4))83 #define GBL_EN BIT(5)84 #define RSR2_EN ( BIT(6) |BIT(7))85 #define PWRBTN_EN BIT(8)86 #define SLPBTN_EN BIT(9)87 #define RTC_EN BIT(10)88 #define RSR3_EN ( BIT(11) | BIT(12) | BIT(13) | BIT(14) |BIT(15))81 #define TMR_EN RT_BIT(0) 82 #define RSR1_EN (RT_BIT(1) | RT_BIT(2) | RT_BIT(3) | RT_BIT(4)) 83 #define GBL_EN RT_BIT(5) 84 #define RSR2_EN (RT_BIT(6) | RT_BIT(7)) 85 #define PWRBTN_EN RT_BIT(8) 86 #define SLPBTN_EN RT_BIT(9) 87 #define RTC_EN RT_BIT(10) 88 #define RSR3_EN (RT_BIT(11) | RT_BIT(12) | RT_BIT(13) | RT_BIT(14) | RT_BIT(15)) 89 89 #define RSR_EN (RSR1_EN | RSR2_EN | RSR3_EN) 90 90 #define IGN_EN 0 91 91 92 92 /* PM1x control register bits */ 93 #define SCI_EN BIT(0)94 #define BM_RLD BIT(1)95 #define GBL_RLS BIT(2)96 #define RSR1_CNT ( BIT(3) | BIT(4) | BIT(5) | BIT(6) | BIT(7) |BIT(8))97 #define IGN_CNT BIT(9)93 #define SCI_EN RT_BIT(0) 94 #define BM_RLD RT_BIT(1) 95 #define GBL_RLS RT_BIT(2) 96 #define RSR1_CNT (RT_BIT(3) | RT_BIT(4) | RT_BIT(5) | RT_BIT(6) | RT_BIT(7) | RT_BIT(8)) 97 #define IGN_CNT RT_BIT(9) 98 98 #define SLP_TYPx_SHIFT 10 99 99 #define SLP_TYPx_MASK 7 100 #define SLP_EN BIT(13)101 #define RSR2_CNT ( BIT(14) |BIT(15))100 #define SLP_EN RT_BIT(13) 101 #define RSR2_CNT (RT_BIT(14) | RT_BIT(15)) 102 102 #define RSR_CNT (RSR1_CNT | RSR2_CNT) 103 103 104 #define GPE0_BATTERY_INFO_CHANGED BIT(0)104 #define GPE0_BATTERY_INFO_CHANGED RT_BIT(0) 105 105 106 106 enum … … 139 139 #define BAT_TECH_SECONDARY 2 140 140 141 #define BAT_STATUS_DISCHARGING_MASK BIT(0)142 #define BAT_STATUS_CHARGING_MASK BIT(1)143 #define BAT_STATUS_CRITICAL_MASK BIT(2)144 145 #define STA_DEVICE_PRESENT_MASK BIT(0)146 #define STA_DEVICE_ENABLED_MASK BIT(1)147 #define STA_DEVICE_SHOW_IN_UI_MASK BIT(2)148 #define STA_DEVICE_FUNCTIONING_PROPERLY_MASK BIT(3)149 #define STA_BATTERY_PRESENT_MASK BIT(4)141 #define BAT_STATUS_DISCHARGING_MASK RT_BIT(0) 142 #define BAT_STATUS_CHARGING_MASK RT_BIT(1) 143 #define BAT_STATUS_CRITICAL_MASK RT_BIT(2) 144 145 #define STA_DEVICE_PRESENT_MASK RT_BIT(0) 146 #define STA_DEVICE_ENABLED_MASK RT_BIT(1) 147 #define STA_DEVICE_SHOW_IN_UI_MASK RT_BIT(2) 148 #define STA_DEVICE_FUNCTIONING_PROPERLY_MASK RT_BIT(3) 149 #define STA_BATTERY_PRESENT_MASK RT_BIT(4) 150 150 151 151 struct ACPIState … … 309 309 uint8_t u8Century; /**< RTC CMOS RAM index of century */ 310 310 uint16_t u16IAPCBOOTARCH; /**< IA-PC boot architecture flags */ 311 #define IAPC_BOOT_ARCH_LEGACY_DEV BIT(0) /**< legacy devices present such as LPT311 #define IAPC_BOOT_ARCH_LEGACY_DEV RT_BIT(0) /**< legacy devices present such as LPT 312 312 (COM too?) */ 313 #define IAPC_BOOT_ARCH_8042 BIT(1) /**< legacy keyboard device present */314 #define IAPC_BOOT_ARCH_NO_VGA BIT(2) /**< VGA not present */313 #define IAPC_BOOT_ARCH_8042 RT_BIT(1) /**< legacy keyboard device present */ 314 #define IAPC_BOOT_ARCH_NO_VGA RT_BIT(2) /**< VGA not present */ 315 315 uint8_t u8Must0_0; /**< must be 0 */ 316 316 uint32_t u32Flags; /**< fixed feature flags */ 317 #define FADT_FL_WBINVD BIT(0) /**< emulation of WBINVD available */318 #define FADT_FL_WBINVD_FLUSH BIT(1)319 #define FADT_FL_PROC_C1 BIT(2) /**< 1=C1 supported on all processors */320 #define FADT_FL_P_LVL2_UP BIT(3) /**< 1=C2 works on SMP and UNI systems */321 #define FADT_FL_PWR_BUTTON BIT(4) /**< 1=power button handled as ctrl method dev */322 #define FADT_FL_SLP_BUTTON BIT(5) /**< 1=sleep button handled as ctrl method dev */323 #define FADT_FL_FIX_RTC BIT(6) /**< 0=RTC wake status in fixed register */324 #define FADT_FL_RTC_S4 BIT(7) /**< 1=RTC can wake system from S4 */325 #define FADT_FL_TMR_VAL_EXT BIT(8) /**< 1=TMR_VAL implemented as 32 bit */326 #define FADT_FL_DCK_CAP BIT(9) /**< 0=system cannot support docking */327 #define FADT_FL_RESET_REG_SUP BIT(10) /**< 1=system supports system resets */328 #define FADT_FL_SEALED_CASE BIT(11) /**< 1=case is sealed */329 #define FADT_FL_HEADLESS BIT(12) /**< 1=system cannot detect moni/keyb/mouse */330 #define FADT_FL_CPU_SW_SLP BIT(13)331 #define FADT_FL_PCI_EXT_WAK BIT(14) /**< 1=system supports PCIEXP_WAKE_STS */332 #define FADT_FL_USE_PLATFORM_CLOCK BIT(15) /**< 1=system has ACPI PM timer */333 #define FADT_FL_S4_RTC_STS_VALID BIT(16) /**< 1=RTC_STS flag is valid when waking from S4 */334 #define FADT_FL_REMOVE_POWER_ON_CAPABLE BIT(17) /**< 1=platform can remote power on */335 #define FADT_FL_FORCE_APIC_CLUSTER_MODEL BIT(18)336 #define FADT_FL_FORCE_APIC_PHYS_DEST_MODE BIT(19)317 #define FADT_FL_WBINVD RT_BIT(0) /**< emulation of WBINVD available */ 318 #define FADT_FL_WBINVD_FLUSH RT_BIT(1) 319 #define FADT_FL_PROC_C1 RT_BIT(2) /**< 1=C1 supported on all processors */ 320 #define FADT_FL_P_LVL2_UP RT_BIT(3) /**< 1=C2 works on SMP and UNI systems */ 321 #define FADT_FL_PWR_BUTTON RT_BIT(4) /**< 1=power button handled as ctrl method dev */ 322 #define FADT_FL_SLP_BUTTON RT_BIT(5) /**< 1=sleep button handled as ctrl method dev */ 323 #define FADT_FL_FIX_RTC RT_BIT(6) /**< 0=RTC wake status in fixed register */ 324 #define FADT_FL_RTC_S4 RT_BIT(7) /**< 1=RTC can wake system from S4 */ 325 #define FADT_FL_TMR_VAL_EXT RT_BIT(8) /**< 1=TMR_VAL implemented as 32 bit */ 326 #define FADT_FL_DCK_CAP RT_BIT(9) /**< 0=system cannot support docking */ 327 #define FADT_FL_RESET_REG_SUP RT_BIT(10) /**< 1=system supports system resets */ 328 #define FADT_FL_SEALED_CASE RT_BIT(11) /**< 1=case is sealed */ 329 #define FADT_FL_HEADLESS RT_BIT(12) /**< 1=system cannot detect moni/keyb/mouse */ 330 #define FADT_FL_CPU_SW_SLP RT_BIT(13) 331 #define FADT_FL_PCI_EXT_WAK RT_BIT(14) /**< 1=system supports PCIEXP_WAKE_STS */ 332 #define FADT_FL_USE_PLATFORM_CLOCK RT_BIT(15) /**< 1=system has ACPI PM timer */ 333 #define FADT_FL_S4_RTC_STS_VALID RT_BIT(16) /**< 1=RTC_STS flag is valid when waking from S4 */ 334 #define FADT_FL_REMOVE_POWER_ON_CAPABLE RT_BIT(17) /**< 1=platform can remote power on */ 335 #define FADT_FL_FORCE_APIC_CLUSTER_MODEL RT_BIT(18) 336 #define FADT_FL_FORCE_APIC_PHYS_DEST_MODE RT_BIT(19) 337 337 ACPIGENADDR ResetReg; /**< ext addr of reset register */ 338 338 uint8_t u8ResetVal; /**< ResetReg value to reset the system */ -
trunk/src/VBox/Devices/PC/DevPcBios.cpp
r5170 r5605 454 454 default:u32 = 0; break; /* floppy not installed. */ 455 455 } 456 u32 |= BIT(1); /* math coprocessor installed */457 u32 |= BIT(2); /* keyboard enabled (or mouse?) */458 u32 |= BIT(3); /* display enabled (monitory type is 0, i.e. vga) */456 u32 |= RT_BIT(1); /* math coprocessor installed */ 457 u32 |= RT_BIT(2); /* keyboard enabled (or mouse?) */ 458 u32 |= RT_BIT(3); /* display enabled (monitory type is 0, i.e. vga) */ 459 459 pcbiosCmosWrite(pDevIns, 0x14, u32); /* 14h - Equipment Byte */ 460 460 … … 761 761 STRCPY(pszStr, "12/01/2006"); 762 762 pBIOSInf->u8ROMSize = 1; /* 128K */ 763 pBIOSInf->u64Characteristics = BIT(4) /* ISA is supported */764 | BIT(7) /* PCI is supported */765 | BIT(15) /* Boot from CD is supported */766 | BIT(16) /* Selectable Boot is supported */767 | BIT(27) /* Int 9h, 8042 Keyboard services supported */768 | BIT(30) /* Int 10h, CGA/Mono Video Services supported */763 pBIOSInf->u64Characteristics = RT_BIT(4) /* ISA is supported */ 764 | RT_BIT(7) /* PCI is supported */ 765 | RT_BIT(15) /* Boot from CD is supported */ 766 | RT_BIT(16) /* Selectable Boot is supported */ 767 | RT_BIT(27) /* Int 9h, 8042 Keyboard services supported */ 768 | RT_BIT(30) /* Int 10h, CGA/Mono Video Services supported */ 769 769 /* any more?? */ 770 770 ; 771 pBIOSInf->u8CharacteristicsByte1 = BIT(0) /* ACPI is supported */771 pBIOSInf->u8CharacteristicsByte1 = RT_BIT(0) /* ACPI is supported */ 772 772 /* any more?? */ 773 773 ;
Note:
See TracChangeset
for help on using the changeset viewer.