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 <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Auto-Submit: Tom Cherry <tomcherry@google.com>
This commit is contained in:
Tom Cherry 2021-09-30 09:09:23 -07:00 committed by Commit Bot
parent 2e1332276e
commit 1cfd2d627d

View file

@ -492,6 +492,11 @@ impl arch::LinuxArch for X8664arch {
cmdline.insert_str(&param).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)?;