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 BF756AC0EF4 for ; Tue, 12 Dec 2023 13:13:59 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=nOLLE9eAaytp0cr/h87S+g/qob3p1/0WPZL7sz/kBCQ=; 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=1702386838; v=1; b=CuCCzClFYgYHrKM9DD03nlEBtv9JRlYbb3QiAGzEpDT3qVc0qdQhUr+YDFAIpcTjeeiG3woW AgE8FMTfZv9qIypk9ITJPsae4ObqoXQkbpZlC00W0mOGTAmOrtEydi3ppyS2CjkXCsjL3ECvG/u VSrSu8ucOJwxAg1yAFyDQRR0= X-Received: by 127.0.0.2 with SMTP id 8qWRYY7687511xZK9ALegiAg; Tue, 12 Dec 2023 05:13:58 -0800 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.1316.1702386836987122766 for ; Tue, 12 Dec 2023 05:13:58 -0800 X-Received: from loongson.cn (unknown [10.2.9.245]) by gateway (Coremail) with SMTP id _____8CxueiTXHhlAloAAA--.2188S3; Tue, 12 Dec 2023 21:13:55 +0800 (CST) X-Received: from code-server.gen (unknown [10.2.9.245]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Axv+GSXHhls6QAAA--.4767S2; Tue, 12 Dec 2023 21:13:54 +0800 (CST) From: "Chao Li" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann Subject: [edk2-devel] [PATCH v4 27/37] OvmfPkg/LoongArchVirt: Add a NULL library named CollectApResouceLibNull Date: Tue, 12 Dec 2023 21:13:53 +0800 Message-Id: <20231212131353.2471747-1-lichao@loongson.cn> In-Reply-To: <20231212130932.2467028-1-lichao@loongson.cn> References: <20231212130932.2467028-1-lichao@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Axv+GSXHhls6QAAA--.4767S2 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQADCGV3wy0H6gAqsx 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: sL5i8wOV1zNImKP5ClvE4T4hx7686176AA= 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=CuCCzClF; 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 | 38 +++++++++++++++++++ .../CollectApResourceLibNull.inf | 31 +++++++++++++++ .../CollectApResourceLibNull.uni | 9 +++++ 3 files changed, 78 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..d427376a33 --- /dev/null +++ b/OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.c @@ -0,0 +1,38 @@ +/** @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 +#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..2c2d1fdba5 --- /dev/null +++ b/OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.inf @@ -0,0 +1,31 @@ +## @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 = 1.29 + BASE_NAME = CollectApResourceLibNull + MODULE_UNI_FILE = CollectApResourceLibNull.uni + FILE_GUID = 8C3B54BF-6A9F-E8B4-4D57-67B3AB578DD6 + MODULE_TYPE = PEIM + VERSION_STRING = 1.1 + LIBRARY_CLASS = PEIM + +[Sources.common] + CollectApResourceLibNull.c + +[Packages] + MdePkg/MdePkg.dec + UefiCpuPkg/UefiCpuPkg.dec + +[LibraryClasses] + BaseLib + HobLib + MemoryAllocationLib + +[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 (#112417): https://edk2.groups.io/g/devel/message/112417 Mute This Topic: https://groups.io/mt/103129142/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-