acpi_tables: Add initial ACPI tables support

Add a revision 2 RSDP table only supporting an XSDT along with support
for creating generic SDT based tables.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2019-08-07 17:53:37 +01:00
committed by Samuel Ortiz
parent 3e99098bf3
commit eea6f1dc9e
6 changed files with 225 additions and 0 deletions

11
acpi_tables/src/lib.rs Normal file
View File

@@ -0,0 +1,11 @@
// Copyright © 2019 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
pub mod rsdp;
pub mod sdt;
fn generate_checksum(data: &[u8]) -> u8 {
(255 - data.iter().fold(0u8, |acc, x| acc.wrapping_add(*x))).wrapping_add(1)
}