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 8DC8ED8118F for ; Wed, 10 Jan 2024 09:35:46 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=bJCmhge5Sj3oQrc6dLcGdw53TkmsGkvi3ZGfVq+41w0=; c=relaxed/simple; d=groups.io; h=Subject:To:Cc:References:From:Message-ID:Date:User-Agent:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Language:Content-Transfer-Encoding; s=20140610; t=1704879345; v=1; b=cYDuDvKhvJPmeLiaz1g0iucCoZO2dLvYtw53AyCxQtD57eCKuwjXMPL6wfmyQ6DHLrt5u8vP WcIUVRioQsDlE61IdgRYShqUQPSTzXyfEPlAogEPR7iPqSDJYRUBhU5I0D4DV0czEARxFoJvZoJ r/jmrgtnMvRJVBqDvBjy8gV0= X-Received: by 127.0.0.2 with SMTP id qFTAYY7687511x5znyCncPDD; Wed, 10 Jan 2024 01:35:45 -0800 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web10.8312.1704879343133416028 for ; Wed, 10 Jan 2024 01:35:43 -0800 X-Received: from loongson.cn (unknown [10.20.42.173]) by gateway (Coremail) with SMTP id _____8Cx67rpZJ5lK80DAA--.3286S3; Wed, 10 Jan 2024 17:35:37 +0800 (CST) X-Received: from [10.20.42.173] (unknown [10.20.42.173]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Bx+93hZJ5lHKMKAA--.28454S3; Wed, 10 Jan 2024 17:35:31 +0800 (CST) Subject: Re: [edk2-devel] [PATCH v6 26/36] OvmfPkg/LoongArchVirt: Add a NULL library named CollectApResouceLibNull To: Chao Li , devel@edk2.groups.io Cc: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Dongyan Qian References: <20240105094118.2279380-1-lichao@loongson.cn> <20240105094549.2281628-1-lichao@loongson.cn> <07c50d79-ddd1-7679-1046-e0f50bb293c7@loongson.cn> <6728db33-f653-4f2f-bf60-f2416842cac2@loongson.cn> From: "maobibo" Message-ID: Date: Wed, 10 Jan 2024 17:35:29 +0800 User-Agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <6728db33-f653-4f2f-bf60-f2416842cac2@loongson.cn> X-CM-TRANSID: AQAAf8Bx+93hZJ5lHKMKAA--.28454S3 X-CM-SenderInfo: xpdruxter6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBj93XoW3Gr1fXw43GFWfWrykXF4DJrc_yoWxXF45pr 1rCa12yryrJ34xJw4fK34UXF9a9rs3Kw1UGr1agFy8tFn7tr12gr15ZrZ09ryDuw4rCr10 vryj9a17uFn8trgCm3ZEXasCq-sJn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUUvIb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6xACxx 1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv 67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0VAS07 AlzVAYIcxG8wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02 F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw 1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7Cj xVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r 4j6F4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07j8 sqAUUUUU= 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,maobibo@loongson.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: hmvLGsgqKdV8FafGF6oIv6xox7686176AA= Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US 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=cYDuDvKh; 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 On 2024/1/10 上午10:47, Chao Li wrote: > Hi Bibo, > > > Thanks, > Chao > On 2024/1/10 09:24, maobibo wrote: >> >> >> On 2024/1/5 下午5:45, Chao Li wrote: >>> 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 >>> Cc: Bibo Mao >>> Cc: Dongyan Qian >>> 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..19995c1193 >>> --- /dev/null >>> +++ >>> b/OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.c >>> @@ -0,0 +1,38 @@ >>> +/** @file >>> +  LoongArch64 CPU Collect AP resource NULL Library functions. >>> + >>> +  Copyright (c) 2024, 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" >> The included path is a little strange, should we put >> CollectApResouceLibNull library in ovmf package or >> UefiCpuPkg/Library/LoongArch64MpInitLib package? > This library is a private because virtual-matchines collect AP resouces > differently from physical machines, so I thought would be fine if it was > located in OvmfPkg/LoongArchVirt/Library. Ok, that sounds good to me. Reviewed-by: Bibo Mao >> >> Regards >> Bibo Mao >> >>> + >>> +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..c166df6bbd >>> --- /dev/null >>> +++ >>> b/OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.inf >>> @@ -0,0 +1,31 @@ >>> +## @file >>> +#  LoongArch64 CPU Collect AP resource NULL Library. >>> +# >>> +#  Copyright (c) 2024, 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..d1638ab11e >>> --- /dev/null >>> +++ >>> b/OvmfPkg/LoongArchVirt/Library/CollectApResouceLibNull/CollectApResourceLibNull.uni >>> @@ -0,0 +1,9 @@ >>> +// @file >>> +//  LoongArch64 CPU Collect AP resource NULL Library. >>> +// >>> +//  Copyright (c) 2024, 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." >>> >> >> >> >> >> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113522): https://edk2.groups.io/g/devel/message/113522 Mute This Topic: https://groups.io/mt/103540125/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-