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 D6247D8027A for ; Thu, 2 Nov 2023 13:44:42 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=alg8W+WB/QEHLsLv9sB2p6j0ZsUKuKoXnTAXJ50Ldoo=; 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=1698932681; v=1; b=Rk9DHafEY127yH79DZHDDGDxyYQgEOnRn5Op5HnTCdrum4sXBOvz4CjEV3XSEHKgwkJ5U+Hl nYxV4OkD1zIA5eqPjD1yaYhGfYj5mg1XPZf1/fUaJ9fX9P3nZ9dtNd0MeKvhtRyo6tpbgDhAGw/ lVKAG//cjc1STdEFLnIKssw8= X-Received: by 127.0.0.2 with SMTP id jtefYY7687511xPffpdbY1w3; Thu, 02 Nov 2023 06:44:41 -0700 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.31475.1698932672714828043 for ; Thu, 02 Nov 2023 06:44:40 -0700 X-Received: from loongson.cn (unknown [10.2.9.245]) by gateway (Coremail) with SMTP id _____8Axueqvp0Nl1oA2AA--.31243S3; Thu, 02 Nov 2023 21:44:15 +0800 (CST) X-Received: from code-server.gen (unknown [10.2.9.245]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cx7y9fp0Nl0Zg4AA--.56656S21; Thu, 02 Nov 2023 21:44:15 +0800 (CST) From: "Chao Li" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann Subject: [edk2-devel] [PATCH v1 19/29] OvmfPkg/LoongArchVirt: Add a NULL library named CollectApResouceLibNull Date: Thu, 2 Nov 2023 21:42:39 +0800 Message-Id: <20231102134249.3983594-20-lichao@loongson.cn> In-Reply-To: <20231102134249.3983594-1-lichao@loongson.cn> References: <20231102134249.3983594-1-lichao@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Cx7y9fp0Nl0Zg4AA--.56656S21 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQADCGVDP+bQRQAWs2 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: XmHG5a82SM74xuQfLCA62alzx7686176AA= 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=Rk9DHafE; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none 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 (#110530): https://edk2.groups.io/g/devel/message/110530 Mute This Topic: https://groups.io/mt/102342170/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-