1// Copyright 2020 The ChromiumOS Authors 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5//! ACPI table generation. 6 7pub mod aml; 8pub mod facs; 9pub mod rsdp; 10pub mod sdt; 11 12pub use self::sdt::HEADER_LEN; 13 14fn generate_checksum(data: &[u8]) -> u8 { 15 (255 - data.iter().fold(0u8, |acc, x| acc.wrapping_add(*x))).wrapping_add(1) 16} 17 18