summary refs log tree commit diff
path: root/arch
diff options
context:
space:
mode:
authorTomasz Jeznach <tjeznach@chromium.org>2020-05-20 23:27:59 -0700
committerCommit Bot <commit-bot@chromium.org>2020-06-01 23:25:39 +0000
commit4264464153a7a788ef73c5015ac8bbde5f8ebe1c (patch)
tree38d1e2b38304f9fc81b9627a037fa11146a291fb /arch
parent2705264dc649a60077dfefc9924b8689d8f7d994 (diff)
downloadcrosvm-4264464153a7a788ef73c5015ac8bbde5f8ebe1c.tar
crosvm-4264464153a7a788ef73c5015ac8bbde5f8ebe1c.tar.gz
crosvm-4264464153a7a788ef73c5015ac8bbde5f8ebe1c.tar.bz2
crosvm-4264464153a7a788ef73c5015ac8bbde5f8ebe1c.tar.lz
crosvm-4264464153a7a788ef73c5015ac8bbde5f8ebe1c.tar.xz
crosvm-4264464153a7a788ef73c5015ac8bbde5f8ebe1c.tar.zst
crosvm-4264464153a7a788ef73c5015ac8bbde5f8ebe1c.zip
acpi: support user provided ACPI SDTs.
Enable support for user provided ACPI tables with supplementary system
description. Argument --acpi-table shall point to exsting file or
pseudo-file with valid ACPI table content.

BUG=None
TEST=boot Linux kernel with generated SSDT tables.

Change-Id: I8eac21da070dcc325884ed888cc7bcb01bc086ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2212501
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Tomasz Jeznach <tjeznach@chromium.org>
Commit-Queue: Tomasz Jeznach <tjeznach@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/Cargo.toml1
-rw-r--r--arch/src/lib.rs2
2 files changed, 3 insertions, 0 deletions
diff --git a/arch/Cargo.toml b/arch/Cargo.toml
index 6b4e529..68b40a3 100644
--- a/arch/Cargo.toml
+++ b/arch/Cargo.toml
@@ -5,6 +5,7 @@ authors = ["The Chromium OS Authors"]
 edition = "2018"
 
 [dependencies]
+acpi_tables = { path = "../acpi_tables" }
 devices = { path = "../devices" }
 io_jail = { path = "../io_jail" }
 kernel_cmdline = { path = "../kernel_cmdline" }
diff --git a/arch/src/lib.rs b/arch/src/lib.rs
index ba09fa2..5aa8c67 100644
--- a/arch/src/lib.rs
+++ b/arch/src/lib.rs
@@ -16,6 +16,7 @@ use std::os::unix::io::AsRawFd;
 use std::path::PathBuf;
 use std::sync::Arc;
 
+use acpi_tables::sdt::SDT;
 use devices::split_irqchip_common::GsiRelay;
 use devices::virtio::VirtioDevice;
 use devices::{
@@ -57,6 +58,7 @@ pub struct VmComponents {
     pub initrd_image: Option<File>,
     pub extra_kernel_params: Vec<String>,
     pub wayland_dmabuf: bool,
+    pub acpi_sdts: Vec<SDT>,
 }
 
 /// Holds the elements needed to run a Linux VM. Created by `build_vm`.