From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.158244.1673839346733795146 for ; Sun, 15 Jan 2023 19:22:27 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: lichao@loongson.cn) Received: from loongson.cn (unknown [10.40.24.149]) by gateway (Coremail) with SMTP id _____8AxrvDvwsRjC8wBAA--.5928S3; Mon, 16 Jan 2023 11:22:23 +0800 (CST) Received: from [10.40.24.149] (unknown [10.40.24.149]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxTL7vwsRjygUaAA--.49175S3; Mon, 16 Jan 2023 11:22:23 +0800 (CST) Message-ID: <320bf81a-d77d-c776-9592-a10bb2450cad@loongson.cn> Date: Mon, 16 Jan 2023 11:22:23 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [edk2-devel] [edk2-platforms][PATCH V4 1/8] Platform/Loongson: Add bootmode support. To: devel@edk2.groups.io, lixianglai@loongson.cn Cc: Ard Biesheuvel , Bibo Mao , Leif Lindholm , Liming Gao , Michael D Kinney References: <832a78c6db30cbe5e7b008e803fe41c337e3b91e.1673579388.git.lixianglai@loongson.cn> From: "Chao Li" In-Reply-To: <832a78c6db30cbe5e7b008e803fe41c337e3b91e.1673579388.git.lixianglai@loongson.cn> X-CM-TRANSID: AQAAf8BxTL7vwsRjygUaAA--.49175S3 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQANCGPD7O0EhQADsn X-Coremail-Antispam: 1Uk129KBjvJXoW7AF17Xry7JFy5Gw4UtF1DJrb_yoW8GF4xpF 1Duan7tr1rGryqvw15Aa48Gr40vr90kryDJrsxAw13uas8Xw1DXw1qvF4vyr47Aa4Ut3W0 qa4Ikw15ua1DZFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj DUYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUUbxxYFVCjjxCrM7AC8VAFwI0_Jr0_ Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_JrI_Jryl8cAvFV AK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVW8JVW5JwA2 z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr 1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1le2I262IYc4CY6c8Ij28IcVAaY2xG 8wAqjxCEc2xF0cIa020Ex4CE44I27wAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aV AFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcVAKI48JMx8GjcxK6IxK0xII j40E5I8CrwCYjI0SjxkI62AI1cAE67vIY487MxAIw28IcxkI7VAKI48JMxC20s026xCaFV Cjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_JrI_JrWlx2IqxVCjr7xvwVAFwI0_JrI_JrWl x4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r 1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_ JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCT nIWIevJa73UjIFyTuYvjxUz4SrUUUUU Content-Type: multipart/alternative; boundary="------------1q1cInsujtIzACXlZx5uoADR" --------------1q1cInsujtIzACXlZx5uoADR Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Reviewed-by: Chao Li Thanks, Chao 在 2023/1/13 11:17, xianglai 写道: > Add bootmode support in PEI phase. > > Cc: Ard Biesheuvel > Cc: Bibo Mao > Cc: Chao Li > Cc: Leif Lindholm > Cc: Liming Gao > Cc: Michael D Kinney > Signed-off-by: xianglai li > --- > Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c > index 32b6518f8f..84bb8e8a6d 100644 > --- a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c > +++ b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c > @@ -53,6 +53,8 @@ CONST EFI_PEI_PPI_DESCRIPTOR mPpiListBootMode = { > NULL > }; > > +STATIC EFI_BOOT_MODE mBootMode = BOOT_WITH_FULL_CONFIGURATION; > + > /** > Create Reserved type memory range hand off block. > > @@ -417,6 +419,9 @@ InitializePlatform ( > > DEBUG ((DEBUG_INFO, "Platform PEIM Loaded\n")); > > + Status = PeiServicesSetBootMode (mBootMode); > + ASSERT_EFI_ERROR (Status); > + > Status = PeiServicesInstallPpi (&mPpiListBootMode); > ASSERT_EFI_ERROR (Status); > --------------1q1cInsujtIzACXlZx5uoADR Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Reviewed-by: Chao Li <lichao@loongson.cn>


Thanks,
Chao
在 2023/1/13 11:17, xianglai 写道:
Add bootmode support in PEI phase.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Bibo Mao <maobibo@loongson.cn>
Cc: Chao Li <lichao@loongson.cn>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: xianglai li <lixianglai@loongson.cn>
---
 Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c
index 32b6518f8f..84bb8e8a6d 100644
--- a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c
+++ b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c
@@ -53,6 +53,8 @@ CONST EFI_PEI_PPI_DESCRIPTOR  mPpiListBootMode = {
   NULL
 };
 
+STATIC EFI_BOOT_MODE  mBootMode = BOOT_WITH_FULL_CONFIGURATION;
+
 /**
   Create Reserved type memory range hand off block.
 
@@ -417,6 +419,9 @@ InitializePlatform (
 
   DEBUG ((DEBUG_INFO, "Platform PEIM Loaded\n"));
 
+  Status = PeiServicesSetBootMode (mBootMode);
+  ASSERT_EFI_ERROR (Status);
+
   Status = PeiServicesInstallPpi (&mPpiListBootMode);
   ASSERT_EFI_ERROR (Status);
 
--------------1q1cInsujtIzACXlZx5uoADR--