Reserve memory for the crash-gathering kernel

Microdroid kernel now boots with the `crashkernel=<size>M` cmdline
option to reserve some memory space for use by the crashdumping kernel.

Currently, we reserve this statically, i.e. regardless of whether
ramdump is enabled or not. This can't be moved to the bootconfig because
the memory reservation happens 'before' bootconfig is read. If we move
this config to bootconfig, the kernel doesn't reserve any space.

Ideally, this shall be done conditionally. The bootloader (u-boot) will
append the option at runtime when the ramdump is enabled.

Bug: 237381762
Test: cat /proc/iomem in Microdroid shows ...
80000000-92bfffff : System RAM
  80210000-827bffff : Kernel code
  827c0000-8291ffff : reserved
  82920000-82beffff : Kernel data
  87fff000-87ffffff : reserved
  8f000000-903fffff : Crash kernel
  90400000-913fffff : reserved

Test: /system/bin/kexec /system/etc/microdroid_crashdump_kernel
/system/etc/microdroid_crashdump_initrd.img "1 rdinit=/bin/crashdump
nr_cpus=1 reset_devices console=hvc0 earlycon=uart8250,mmio,0x3f8" in
Microdroid works.

Change-Id: I7d8de4bbaf3c7bb40b15b478ed224acd7f543f29
1 file changed
tree: b6b1e58c147e3e4cdb1ed4f195b8e52683a9f0bd
  1. .prebuilt_info/
  2. apex/
  3. apkdmverity/
  4. authfs/
  5. compos/
  6. demo/
  7. docs/
  8. javalib/
  9. launcher/
  10. libs/
  11. microdroid/
  12. microdroid_manager/
  13. pvmfw/
  14. tests/
  15. virtualizationservice/
  16. vm/
  17. vmbase/
  18. vmclient/
  19. zipfuse/
  20. .clang-format
  21. .gitignore
  22. Android.bp
  23. OWNERS
  24. PREUPLOAD.cfg
  25. README.md
  26. TEST_MAPPING
README.md

Virtualization

This repository contains userspace services related to running virtual machines on Android, especially protected virtual machines. See the getting started documentation and Microdroid README for more information.