@@ 88,6 88,32 @@ struct generic_addr {
uint64_t addr;
} __attribute__((packed));
+struct fadt_flags {
+ bool wbinvd:1;
+ bool wbinvd_flush:1;
+ bool proc_c1:1;
+ bool p_lvl2_mp:1;
+ bool no_pwr_button:1;
+ bool no_slp_button:1;
+ bool no_fixed_rtc:1;
+ bool rtc_s4:1;
+ bool tmr_val_32:1;
+ bool dck_cap:1;
+ bool reset_reg_sup:1;
+ bool sealed_case:1;
+ bool headless:1;
+ bool cpu_sw_slp:1;
+ bool pci_exp_wak:1;
+ bool use_platform_clock:1;
+ bool s4_rtc_sts_valid:1;
+ bool remote_power_on_capable:1;
+ bool force_apic_cluster_model:1;
+ bool force_apic_physical_desintation_mode:1;
+ bool hw_reduced_acpi:1;
+ bool low_power_s0_idle_capable:1;
+ uint16_t reserved:10;
+} __attribute__((packed));
+
struct fadt {
struct sdt header;
uint32_t firmware_ctrl;
@@ 127,7 153,7 @@ struct fadt {
uint8_t century;
uint16_t boot_architecture_flags;
uint8_t reserved2;
- uint32_t flags;
+ struct fadt_flags flags;
struct generic_addr reset_reg;
uint8_t reset_value;
uint8_t reserved3[3];
@@ 264,5 290,5 @@ uint32_t acpi_timer_get(void) {
}
bool acpi_timer_is_32(void) {
- return fadt->flags & (1 << 8);
+ return fadt->flags.tmr_val_32;
}