hv/acrn-config/efi-stuf: assign hvlog and ramoops buffer address < 256MB

If HV relocation is enabled, either ACRN efi-stub or GRUB relocates
hypervisor image above HPA 256MB, thus we put hvlog and ramoops buffer
under 256MB to avoid conflict with hypervisor owned address.

This patch hardcodes these addresses:

0xa00000 - 0xdfffff: 4MiB for ramoops buffer
0xe00000 - 0xffffff: 2MiB for hvlog buffer

However, user can customize them to other addresses as long as it's under
256MB, available in host e820, and SOS bootarg "nokaslr" is not specified.

If HV relocation is disabled, need to make sure that these buffer
addresses are not between HV_RAM_START and HV_RAM_START + HV_RAM_SIZE.

Tracked-On: #4760
Signed-off-by: Zide Chen <zide.chen@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
Zide Chen 2020-04-23 10:01:21 -07:00 committed by wenlingz
parent be4797a10c
commit 1bc5c7ac5b
26 changed files with 30 additions and 37 deletions

View File

@ -21,10 +21,9 @@
#define SOS_COM2_IRQ 10U
#ifndef CONFIG_RELEASE
#define BOOTARG_DEBUG "hvlog=2M@0x6de00000 " \
"memmap=0x200000$0x6de00000 " \
"memmap=0x400000$0x6da00000 " \
"ramoops.mem_address=0x6da00000 " \
#define BOOTARG_DEBUG "hvlog=2M@0xe00000 " \
"memmap=0x600000$0xa00000 " \
"ramoops.mem_address=0xa00000 " \
"ramoops.mem_size=0x400000 " \
"ramoops.console_size=0x200000 " \
"reboot_panic=p,w "

View File

@ -21,10 +21,9 @@
#define SOS_COM2_IRQ 3U
#ifndef CONFIG_RELEASE
#define BOOTARG_DEBUG "hvlog=2M@0x5de00000 " \
"memmap=0x200000$0x5de00000 " \
"memmap=0x400000$0x5da00000 " \
"ramoops.mem_address=0x5da00000 " \
#define BOOTARG_DEBUG "hvlog=2M@0xe00000 " \
"memmap=0x600000$0xa00000 " \
"ramoops.mem_address=0xa00000 " \
"ramoops.mem_size=0x400000 " \
"ramoops.console_size=0x200000 " \
"reboot_panic=p,w "

View File

@ -20,8 +20,7 @@
#define SOS_COM2_IRQ 3U
#ifndef CONFIG_RELEASE
#define SOS_BOOTARGS_DIFF "hvlog=2M@0x1FE00000 " \
"memmap=0x200000$0x1fe00000 "
#define SOS_BOOTARGS_DIFF "hvlog=2M@0xE00000 memmap=0x200000$0xE00000 "
#else
#define SOS_BOOTARGS_DIFF ""
#endif

View File

@ -21,8 +21,7 @@
#define SOS_COM2_IRQ 3U
#ifndef CONFIG_RELEASE
#define SOS_BOOTARGS_DIFF "hvlog=2M@0x1FE00000 " \
"memmap=0x200000$0x1fe00000 "
#define SOS_BOOTARGS_DIFF "hvlog=2M@0xE00000 memmap=0x200000$0xE00000 "
#else
#define SOS_BOOTARGS_DIFF ""
#endif

View File

@ -20,8 +20,7 @@
#define SOS_COM2_IRQ 3U
#ifndef CONFIG_RELEASE
#define SOS_BOOTARGS_DIFF "hvlog=2M@0x1FE00000 " \
"memmap=0x200000$0x1fe00000 "
#define SOS_BOOTARGS_DIFF "hvlog=2M@0xE00000 memmap=0x200000$0xE00000 "
#else
#define SOS_BOOTARGS_DIFF ""
#endif

View File

@ -21,8 +21,7 @@
#define SOS_COM2_IRQ 3U
#ifndef CONFIG_RELEASE
#define SOS_BOOTARGS_DIFF "hvlog=2M@0x1FE00000 " \
"memmap=0x200000$0x1fe00000 "
#define SOS_BOOTARGS_DIFF "hvlog=2M@0xE00000 memmap=0x200000$0xE00000 "
#else
#define SOS_BOOTARGS_DIFF ""
#endif

View File

@ -22,8 +22,7 @@
#define SOS_COM2_IRQ 3U
#ifndef CONFIG_RELEASE
#define SOS_BOOTARGS_DIFF "hvlog=2M@0x1FE00000 " \
"memmap=0x200000$0x1fe00000 "
#define SOS_BOOTARGS_DIFF "hvlog=2M@0xE00000 memmap=0x200000$0xE00000 "
#else
#define SOS_BOOTARGS_DIFF ""
#endif

View File

@ -135,7 +135,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01070F i915.domain_plane_owners=0x011100001111 i915.enable_gvt=1
hvlog=2M@0x6de00000 memmap=0x600000$0x6da00000 ramoops.mem_address=0x6da00000 ramoops.mem_size=0x400000 ramoops.console_size=0x200000
hvlog=2M@0xe00000 memmap=0x600000$0xa00000 ramoops.mem_address=0xa00000 ramoops.mem_size=0x400000 ramoops.console_size=0x200000
reboot_panic=p,w module_blacklist=dwc3_pci i915.enable_initial_modeset=1 i915.enable_guc=0x02 video=DP-1:d video=DP-2:d cma=64M@0- panic_print=0x1f
</bootargs>
</board_private>

View File

@ -88,7 +88,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01010F i915.domain_plane_owners=0x011111110000 i915.enable_gvt=1
hvlog=2M@0x6de00000 memmap=0x600000$0x6da00000 ramoops.mem_address=0x6da00000 ramoops.mem_size=0x400000 ramoops.console_size=0x200000
hvlog=2M@0xe00000 memmap=0x600000$0xa00000 ramoops.mem_address=0xa00000 ramoops.mem_size=0x400000 ramoops.console_size=0x200000
reboot_panic=p,w module_blacklist=dwc3_pci i915.enable_initial_modeset=1 i915.enable_guc=0x02 video=DP-1:d video=DP-2:d cma=64M@0- panic_print=0x1f
</bootargs>
</board_private>

View File

@ -88,7 +88,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01010F i915.domain_plane_owners=0x011111110000 i915.enable_gvt=1
hvlog=2M@0x6de00000 memmap=0x600000$0x6da00000 ramoops.mem_address=0x6da00000 ramoops.mem_size=0x400000 ramoops.console_size=0x200000
hvlog=2M@0xe00000 memmap=0x600000$0xa00000 ramoops.mem_address=0xa00000 ramoops.mem_size=0x400000 ramoops.console_size=0x200000
reboot_panic=p,w module_blacklist=dwc3_pci i915.enable_initial_modeset=1 i915.enable_guc=0x02 video=DP-1:d video=DP-2:d cma=64M@0- panic_print=0x1f
</bootargs>
</board_private>

View File

@ -135,7 +135,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01070F i915.domain_plane_owners=0x011100001111 i915.enable_gvt=1
hvlog=2M@0x5de00000 memmap=0x600000$0x5da00000 ramoops.mem_address=0x5da00000 ramoops.mem_size=0x400000 ramoops.console_size=0x200000
hvlog=2M@0xe00000 memmap=0x600000$0xa00000 ramoops.mem_address=0xa00000 ramoops.mem_size=0x400000 ramoops.console_size=0x200000
reboot_panic=p,w module_blacklist=dwc3_pci i915.enable_guc=0x02 cma=64M@0-
</bootargs>
</board_private>

View File

@ -88,7 +88,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01010F i915.domain_plane_owners=0x011111110000 i915.enable_gvt=1
hvlog=2M@0x5de00000 memmap=0x600000$0x5da00000 ramoops.mem_address=0x5da00000 ramoops.mem_size=0x400000 ramoops.console_size=0x200000
hvlog=2M@0xe00000 memmap=0x600000$0xa00000 ramoops.mem_address=0xa00000 ramoops.mem_size=0x400000 ramoops.console_size=0x200000
reboot_panic=p,w module_blacklist=dwc3_pci i915.enable_guc=0x02 cma=64M@0-
</bootargs>
</board_private>

View File

@ -88,7 +88,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01010F i915.domain_plane_owners=0x011111110000 i915.enable_gvt=1
hvlog=2M@0x5de00000 memmap=0x600000$0x5da00000 ramoops.mem_address=0x5da00000 ramoops.mem_size=0x400000 ramoops.console_size=0x200000
hvlog=2M@0xe00000 memmap=0x600000$0xa00000 ramoops.mem_address=0xa00000 ramoops.mem_size=0x400000 ramoops.console_size=0x200000
reboot_panic=p,w module_blacklist=dwc3_pci i915.enable_guc=0x02 cma=64M@0-
</bootargs>
</board_private>

View File

@ -135,7 +135,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01070F i915.domain_plane_owners=0x011100001111 i915.enable_gvt=1
hvlog=2M@0x1fe00000 memmap=0x200000$0x1fe00000
hvlog=2M@0xe00000 memmap=0x200000$0xe00000
</bootargs>
</board_private>
</vm>

View File

@ -89,7 +89,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01010F i915.domain_plane_owners=0x011111110000 i915.enable_gvt=1
hvlog=2M@0x1fe00000 memmap=0x200000$0x1fe00000
hvlog=2M@0xe00000 memmap=0x200000$0xe00000
</bootargs>
</board_private>
</vm>

View File

@ -89,7 +89,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01010F i915.domain_plane_owners=0x011111110000 i915.enable_gvt=1
hvlog=2M@0x1fe00000 memmap=0x200000$0x1fe00000
hvlog=2M@0xe00000 memmap=0x200000$0xe00000
</bootargs>
</board_private>
</vm>

View File

@ -135,7 +135,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01070F i915.domain_plane_owners=0x011100001111 i915.enable_gvt=1
hvlog=2M@0x1fe00000 memmap=0x200000$0x1fe00000
hvlog=2M@0xe00000 memmap=0x200000$0xe00000
</bootargs>
</board_private>
</vm>

View File

@ -88,7 +88,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01010F i915.domain_plane_owners=0x011111110000 i915.enable_gvt=1
hvlog=2M@0x1fe00000 memmap=0x200000$0x1fe00000
hvlog=2M@0xe00000 memmap=0x200000$0xe00000
</bootargs>
</board_private>
</vm>

View File

@ -88,7 +88,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01010F i915.domain_plane_owners=0x011111110000 i915.enable_gvt=1
hvlog=2M@0x1fe00000 memmap=0x200000$0x1fe00000
hvlog=2M@0xe00000 memmap=0x200000$0xe00000
</bootargs>
</board_private>
</vm>

View File

@ -135,7 +135,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01070F i915.domain_plane_owners=0x011100001111 i915.enable_gvt=1
hvlog=2M@0x1fe00000 memmap=0x200000$0x1fe00000
hvlog=2M@0xe00000 memmap=0x200000$0xe00000
</bootargs>
</board_private>
</vm>

View File

@ -88,7 +88,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01010F i915.domain_plane_owners=0x011111110000 i915.enable_gvt=1
hvlog=2M@0x1fe00000 memmap=0x200000$0x1fe00000
hvlog=2M@0xe00000 memmap=0x200000$0xe00000
</bootargs>
</board_private>
</vm>

View File

@ -88,7 +88,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01010F i915.domain_plane_owners=0x011111110000 i915.enable_gvt=1
hvlog=2M@0x1fe00000 memmap=0x200000$0x1fe00000
hvlog=2M@0xe00000 memmap=0x200000$0xe00000
</bootargs>
</board_private>
</vm>

View File

@ -135,7 +135,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01070F i915.domain_plane_owners=0x011100001111 i915.enable_gvt=1
hvlog=2M@0x1fe00000 memmap=0x200000$0x1fe00000
hvlog=2M@0xe00000 memmap=0x200000$0xe00000
</bootargs>
</board_private>
</vm>

View File

@ -88,7 +88,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01010F i915.domain_plane_owners=0x011111110000 i915.enable_gvt=1
hvlog=2M@0x1fe00000 memmap=0x200000$0x1fe00000
hvlog=2M@0xe00000 memmap=0x200000$0xe00000
</bootargs>
</board_private>
</vm>

View File

@ -88,7 +88,7 @@
<bootargs desc="Specify kernel boot arguments">
rw rootwait console=tty0 consoleblank=0 no_timer_check quiet loglevel=3 idle=halt
i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01010F i915.domain_plane_owners=0x011111110000 i915.enable_gvt=1
hvlog=2M@0x1fe00000 memmap=0x200000$0x1fe00000
hvlog=2M@0xe00000 memmap=0x200000$0xe00000
</bootargs>
</board_private>
</vm>

View File

@ -1,3 +1,3 @@
title The ACRN Service OS
linux /EFI/org.clearlinux/kernel-org.clearlinux.iot-lts2018-sos.4.19.13-1901141830
options console=tty0 console=ttyS0 root=PARTUUID=<UUID of rootfs partition> rw rootwait ignore_loglevel no_timer_check consoleblank=0 i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01010F i915.domain_plane_owners=0x011111110000 i915.enable_gvt=1 i915.enable_guc=0 hvlog=2M@0x1FE00000 memmap=2M$0x1FE00000
options console=tty0 console=ttyS0 root=PARTUUID=<UUID of rootfs partition> rw rootwait ignore_loglevel no_timer_check consoleblank=0 i915.nuclear_pageflip=1 i915.avail_planes_per_pipe=0x01010F i915.domain_plane_owners=0x011111110000 i915.enable_gvt=1 i915.enable_guc=0 hvlog=2M@0xE00000 memmap=2M$0xE00000