|
911 | 911 | .. code-block:: bash
|
912 | 912 |
|
913 | 913 | 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 |
0 commit comments