Skip to content

Commit ab0ba5f

Browse files
JasonChenCJlijinxia
authored andcommitted
Doc: add UEFI boot chapter in primer
add UEFI boot chapter in primer. Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
1 parent 8fbb21f commit ab0ba5f

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

doc/primer/index.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,3 +911,56 @@ or
911911
.. code-block:: bash
912912
913913
screen /dev/pts/0
914+
915+
UEFI Boot
916+
*********
917+
This section introduces UEFI boot support by ACRN.
918+
919+
Usage of acrn.efi
920+
=================
921+
922+
ACRN supports boot from UEFI FW, this section is the UEFI boot HOWTO under
923+
Clear Linux environment.
924+
925+
The pre-condition is like below:
926+
- You have installed the Service OS (bare-metal for now)
927+
- CL Bootloader is "\EFI\org.clearlinux\bootloaderx64.efi"
928+
- Boot device is '/dev/sda'
929+
- EFI System Partition (ESP) is '1'
930+
931+
Suggest to follow the following step:
932+
1. Build out the acrn.efi image with command "make PLATFORM=uefi".
933+
2. Put the acrn.efi under "\EFI\acrn\"
934+
3. To change the default boot entry to boot the ACRN hypervisor, enter:
935+
# efibootmgr -c -l "\EFI\acrn\acrn.efi" -d /dev/sda -p 1 \
936+
-L "ACRN Hypervisor" -u "bootloader=\EFI\org.clearlinux\bootloaderx64.efi"
937+
4. Update the bsp/uefi/clearlinux/acrn.conf file by filling the field
938+
<UUID of rootfs partition> with the your native rootfs partition uuid.
939+
5. Copy bsp/uefi/clearlinux/acrn.conf to loader\\entries\\ directory.
940+
6. Reboot.
941+
942+
943+
DM memory allocation mechanism
944+
==============================
945+
946+
There are two kinds of DM memory allocation mechanism - CMA & Hugetlb, they can
947+
be choose to support but hugetlb will become the default one.
948+
949+
To support CMA, please make sure:
950+
1) add "cma=reserved_mem_size@recommend_memory_offset-0" like
951+
"cma=2560M@0x100000000-0" to the SOS cmdline in acrn.conf
952+
2) start acrn-dm without "-T" option
953+
954+
To support Hugetlb, please make sure:
955+
1) Do huge page reservation
956+
- For 1G huge page reservation, add "hugepagesz=1G hugepages=reserved_pg_num"
957+
like "hugepagesz=1G hugepages=4" to the SOS cmdline(in acrn.conf for EFI)
958+
- For 2M huge page reservation, after SOS start up,
959+
echo reserved_pg_num > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
960+
- NOTE:
961+
You can use 2M reserving method to do reservation for 1G page size, but it
962+
may fail.
963+
For EFI platform, you may skip 1G page reservation by just using 2M page,
964+
but make sure your huge page reservation size is enough for your usage.
965+
2) Let acrn-dm use hugetlb
966+
- start acrn-dm with "-T" option
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
title The ACRN Service OS
22
linux /EFI/org.clearlinux/kernel-org.clearlinux.pk414-sos.4.14.23-19
3-
options pci_devices_ignore=(0:18:2) maxcpus=1 console=tty0 console=ttyS0 i915.nuclear_pageflip=1 root=PARTUUID=<UUID of rootfs partition> rw rootwait ignore_loglevel no_timer_check consoleblank=0 i915.tsd_init=7 i915.tsd_delay=2000 i915.avail_planes_per_pipe=0x00000F i915.domain_plane_owners=0x011111110000 i915.enable_guc_loading=0 i915.enable_guc_submission=0 i915.enable_preemption=1 i915.context_priority_mode=2 i915.enable_gvt=1 hvlog=2M@0x1FE00000 cma=2560M@0x100000000-0
3+
options pci_devices_ignore=(0:18:2) maxcpus=1 console=tty0 console=ttyS0 i915.nuclear_pageflip=1 root=PARTUUID=<UUID of rootfs partition> rw rootwait ignore_loglevel no_timer_check consoleblank=0 i915.tsd_init=7 i915.tsd_delay=2000 i915.avail_planes_per_pipe=0x00000F i915.domain_plane_owners=0x011111110000 i915.enable_guc_loading=0 i915.enable_guc_submission=0 i915.enable_preemption=1 i915.context_priority_mode=2 i915.enable_gvt=1 hvlog=2M@0x1FE00000

0 commit comments

Comments
 (0)