summary refs log tree commit diff
path: root/acpi_tables/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'acpi_tables/src/lib.rs')
-rw-r--r--acpi_tables/src/lib.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/acpi_tables/src/lib.rs b/acpi_tables/src/lib.rs
new file mode 100644
index 0000000..49cf760
--- /dev/null
+++ b/acpi_tables/src/lib.rs
@@ -0,0 +1,12 @@
+// Copyright 2020 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+pub mod rsdp;
+pub mod sdt;
+
+pub use self::sdt::HEADER_LEN;
+
+fn generate_checksum(data: &[u8]) -> u8 {
+    (255 - data.iter().fold(0u8, |acc, x| acc.wrapping_add(*x))).wrapping_add(1)
+}