From 1cfd2d627d87a6936e43c98c7a1a3645b89a8fe2 Mon Sep 17 00:00:00 2001 From: Tom Cherry Date: Thu, 30 Sep 2021 09:09:23 -0700 Subject: [PATCH] x86_64: pass the ramoops command line to bios This was an oversight from the previous commit to pass the kernel command line to a bios. BUG=b:200208446 TEST=Observe pstore working across reboots Change-Id: Ie93cc3399000a83099d396f4dde1da9d835704be Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3197732 Reviewed-by: Daniel Verkamp Reviewed-by: Dennis Kempin Reviewed-by: Noah Gold Tested-by: kokoro Commit-Queue: Dennis Kempin Auto-Submit: Tom Cherry --- x86_64/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/x86_64/src/lib.rs b/x86_64/src/lib.rs index 4754a9a817..ce6d762843 100644 --- a/x86_64/src/lib.rs +++ b/x86_64/src/lib.rs @@ -492,6 +492,11 @@ impl arch::LinuxArch for X8664arch { cmdline.insert_str(¶m).map_err(Error::Cmdline)?; } + if let Some(ramoops_region) = ramoops_region { + arch::pstore::add_ramoops_kernel_cmdline(&mut cmdline, &ramoops_region) + .map_err(Error::Cmdline)?; + } + match components.vm_image { VmImage::Bios(ref mut bios) => { // Allow a bios to hardcode CMDLINE_OFFSET and read the kernel command line from it. @@ -504,11 +509,6 @@ impl arch::LinuxArch for X8664arch { Self::load_bios(&mem, bios)? } VmImage::Kernel(ref mut kernel_image) => { - if let Some(ramoops_region) = ramoops_region { - arch::pstore::add_ramoops_kernel_cmdline(&mut cmdline, &ramoops_region) - .map_err(Error::Cmdline)?; - } - // separate out load_kernel from other setup to get a specific error for // kernel loading let (params, kernel_end) = Self::load_kernel(&mem, kernel_image)?;