diff --git a/src/acpi/fadt.rs b/src/acpi/fadt.rs index 6094d42e65..c565f578ae 100644 --- a/src/acpi/fadt.rs +++ b/src/acpi/fadt.rs @@ -53,10 +53,12 @@ mod offsets { /// Structure address. ACPI 2.0+. pub const X_FIRMWARE_CTRL_64: usize = 140; /// FADT minimum size for ACPI 2.0+ (i.e., enough to - /// include `x_firmware_ctrl` at offset 140). - pub const FADT_MIN_SIZE_ACPI_2_0: usize = 148; - /// FADT minimum size for ACPI 1.0. - pub const FADT_MIN_SIZE_ACPI_1_0: usize = 76; + /// include `x_firmware_ctrl` at offset 140). Stored as + /// `u32` to match `Sdt::length()` (which is `u32` per + /// ACPI spec) and avoid a usize/u32 comparison on x86_64. + pub const FADT_MIN_SIZE_ACPI_2_0: u32 = 148; + /// FADT minimum size for ACPI 1.0. Same rationale. + pub const FADT_MIN_SIZE_ACPI_1_0: u32 = 76; } /// Parse the FADT from the given SDT bytes and extract the