From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 45959AC0B16 for ; Mon, 6 Nov 2023 03:29:45 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=g81t/T2CqS1ca2NCUJtquGhSBf5Wd65m+KDMfh0yUSE=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1699241384; v=1; b=wBobIG3CPAowRh+5ZCcWkDRI3kybMXoblg62WBzbV0cZ1UgqmatJm0g5IX9DRy3fPSQDzNo3 uRKAnyqPuVxBC0dEkuSZCqc0ZTjrgrNiX89hCr5zwYxDlnAAD5c89dzzUz/vxCrkY7/zZpRD+AG hEayB7oMpyzXfCiTM42fXF0I= X-Received: by 127.0.0.2 with SMTP id dqqTYY7687511xeIg9PPbnnj; Sun, 05 Nov 2023 19:29:44 -0800 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.47085.1699241382742271062 for ; Sun, 05 Nov 2023 19:29:43 -0800 X-Received: from loongson.cn (unknown [10.2.9.245]) by gateway (Coremail) with SMTP id _____8DxRvGlXUhlejc3AA--.42888S3; Mon, 06 Nov 2023 11:29:41 +0800 (CST) X-Received: from code-server.gen (unknown [10.2.9.245]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxzdyiXUhlZhI6AA--.60639S2; Mon, 06 Nov 2023 11:29:39 +0800 (CST) From: "Chao Li" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann Subject: [edk2-devel] [PATCH v2 19/30] OvmfPkg/LoongArchVirt: Add a NULL library named CollectApResouceLibNull Date: Mon, 6 Nov 2023 11:29:36 +0800 Message-Id: <20231106032936.2285770-1-lichao@loongson.cn> In-Reply-To: <20231106032521.2251143-1-lichao@loongson.cn> References: <20231106032521.2251143-1-lichao@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8DxzdyiXUhlZhI6AA--.60639S2 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAGCGVFqihSvgBJsI X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx nUUI43ZEXa7xR_UUUUUUUUU== Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lichao@loongson.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Mr6FUsLLepUntXh7k0lv337Zx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=wBobIG3C; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io This Library is used to collect APs resources, but is currently NULL for OvmfPkg, because it is not used by the LoongArch virtual machine. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Signed-off-by: Chao Li --- .../CollectApResourceLibNull.c | 35 +++++++++++++++++++ .../CollectApResourceLibNull.inf | 32 +++++++++++++++++ .../CollectApResourceLibNull.uni | 9 +++++ 3 files changed, 76 insertions(+) create mode 100644 OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.c create mode 100644 OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.inf create mode 100644 OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.uni diff --git a/OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.c b/OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.c new file mode 100644 index 0000000000..528914973e --- /dev/null +++ b/OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.c @@ -0,0 +1,35 @@ +/** @file + LoongArch64 CPU Collect AP resource NULL Library functions. + + Copyright (c) 2023, Loongson Technology Corporation Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include +#include "../../../UefiCpuPkg/Library/LoongArch64MpInitLib/MpLib.h" + +VOID +SaveProcessorResourceData ( + IN PROCESSOR_RESOURCE_DATA * + ); + +VOID +EFIAPI +SaveProcessorResource ( + PROCESSOR_RESOURCE_DATA *mProcessorResource + ) +{ + SaveProcessorResourceData (mProcessorResource); +} + +VOID +EFIAPI +CollectAllProcessorResource ( + VOID + ) +{ + return; +} diff --git a/OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.inf b/OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.inf new file mode 100644 index 0000000000..d8d281421c --- /dev/null +++ b/OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.inf @@ -0,0 +1,32 @@ +## @file +# LoongArch64 CPU Collect AP resource NULL Library. +# +# Copyright (c) 2023, Loongson Technology Corporation Limited. All rights reserved.
+# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = CollectApResourceLibNull + MODULE_UNI_FILE = CollectApResourceLibNull.uni + FILE_GUID = 8C3B54BF-6A9F-E8B4-4D57-67B3AB578DD6 + MODULE_TYPE = BASE + VERSION_STRING = 1.1 + LIBRARY_CLASS = BaseLib + +[Sources.common] + CollectApResourceLibNull.c + +[Packages] + MdePkg/MdePkg.dec + UefiCpuPkg/UefiCpuPkg.dec + +[LibraryClasses] + BaseLib + MemoryAllocationLib + HobLib + SynchronizationLib + +[Pcd] + gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber diff --git a/OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.uni b/OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.uni new file mode 100644 index 0000000000..701e2d7e6b --- /dev/null +++ b/OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.uni @@ -0,0 +1,9 @@ +// @file +// LoongArch64 CPU Collect AP resource NULL Library. +// +// Copyright (c) 2023, Loongson Technology Corporation Limited. All rights reserved.
+// SPDX-License-Identifier: BSD-2-Clause-Patent + +#string STR_MODULE_ABSTRACT #language en-US "CPU Collect AP resource NULL Library." + +#string STR_MODULE_DESCRIPTION #language en-US "CPU Collect AP resource NULL Library." -- 2.27.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110723): https://edk2.groups.io/g/devel/message/110723 Mute This Topic: https://groups.io/mt/102413884/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-