From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.1795.1663296392441633838 for ; Thu, 15 Sep 2022 19:46:32 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: jianyong.wu@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 48CBCED1; Thu, 15 Sep 2022 19:46:38 -0700 (PDT) Received: from entos-thunderx2-desktop.shanghai.arm.com (entos-thunderx2-desktop.shanghai.arm.com [10.169.212.232]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0A8E83F71A; Thu, 15 Sep 2022 19:46:29 -0700 (PDT) From: "Jianyong Wu" To: devel@edk2.groups.io, Sami.Mujawar@arm.com Cc: ardb+tianocore@kernel.org, justin.he@arm.com, jianyong.wu@arm.com Subject: [PATCH 0/3] CloudHv:arm: Enable direct kernel boot Date: Fri, 16 Sep 2022 10:46:17 +0800 Message-Id: <20220916024620.114084-1-jianyong.wu@arm.com> X-Mailer: git-send-email 2.17.1 Direct kernel boot removes the dependency of retrieving kernel image from block device. For Cloud Hypervisor, we use the following way to support it. 1. Cloud Hypervisor store kernel image into memory and put kernel info, including the memory base and size, into DT; 2. When init memory in edk2, the kernel memory region is retrieved from DT and set it as read only memory region; 3. Edk2 fetches kernel from memory and prepare a image handle; 4. Load kernel using LoadImage in the end. 1 is done in Cloud Hypervisor, 2 and 3 is done in this patch set, 4 is not affected. github PR link: https://github.com/tianocore/edk2/pull/3339 Signed-off-by: Jianyong Wu Jianyong Wu (3): CloudHv:arm: add kernel load fs driver CloudHv:arm: build hob for kernel image memory as read-only CloudHv:arm: add kernel loader lib dsc/fdf ArmVirtPkg/ArmVirtCloudHv.dsc | 8 +- ArmVirtPkg/ArmVirtCloudHv.fdf | 1 + .../CloudHvKernelLoaderFsDxe.c | 969 ++++++++++++++++++ .../CloudHvKernelLoaderFsDxe.inf | 55 + .../CloudHvVirtMemInfoLib.c | 66 +- 5 files changed, 1094 insertions(+), 5 deletions(-) create mode 100644 ArmVirtPkg/CloudHvKernelLoaderFsDxe/CloudHvKernelLoaderFsDxe.c create mode 100644 ArmVirtPkg/CloudHvKernelLoaderFsDxe/CloudHvKernelLoaderFsDxe.inf -- 2.17.1