From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail03.groups.io (mail03.groups.io [45.79.227.220]) by spool.mail.gandi.net (Postfix) with ESMTPS id 405E99413BF for ; Fri, 12 Apr 2024 07:34:48 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=bIugyu3fCJiJ3le2JpkJDZH8RgjO4j4YwPUClsyzLAg=; 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:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1712907286; v=1; b=KGzymmJMrIK9GH4Pga/UKo/7jj1cj5hQj6Relz7AZR1mmkNlRhPP7cGQ6ncISCqPpUppSL2g 3Xk0rWBTlUMlfkYlz/TSNuhAhaEWi+DCl2o7jyatPWV00xq8ZrSkq0gKTAaxK/YCfyGyeWDBtpy z40DaHGo+A2GXfqhrukhUUbp1mVVAd9hCijpEozUCLKRvlEX2Gxx8u2ggQ/cgwtIt5YQtKRp4C8 Dq/WTJ3OlSZT69vpECtp3JqT88b93hk2nsTt2kPk9/zn0iCnBWsh+bdvYgAD3ELVzevHENuQt9T 4U3/ylxs/JC21JgEWHdbKZUsl9Hjw/PocoD4c2CncRnHw== X-Received: by 127.0.0.2 with SMTP id R8qHYY7687511xLHpUBy41lz; Fri, 12 Apr 2024 00:34:46 -0700 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.41028.1712907285951695508 for ; Fri, 12 Apr 2024 00:34:46 -0700 X-Received: from loongson.cn (unknown [10.2.9.245]) by gateway (Coremail) with SMTP id _____8CxG+kU5BhmMEcmAA--.3472S3; Fri, 12 Apr 2024 15:34:44 +0800 (CST) X-Received: from code-server.gen (unknown [10.2.9.245]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxLBMS5BhmiZB4AA--.35472S2; Fri, 12 Apr 2024 15:34:42 +0800 (CST) From: "Chao Li" To: devel@edk2.groups.io Cc: Ray Ni , Rahul Kumar , Gerd Hoffmann Subject: [edk2-devel] [PATCH v3 10/13] UefiCpuPkg: Add a new GUID to store the processors resource Date: Fri, 12 Apr 2024 15:34:41 +0800 Message-Id: <20240412073441.3488372-1-lichao@loongson.cn> In-Reply-To: <20240412073254.3486364-1-lichao@loongson.cn> References: <20240412073254.3486364-1-lichao@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8CxLBMS5BhmiZB4AA--.35472S2 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAFCGYXn2oMjAANsF 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 Resent-Date: Fri, 12 Apr 2024 00:34:46 -0700 Resent-From: lichao@loongson.cn Reply-To: devel@edk2.groups.io,lichao@loongson.cn List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: dvNfOZOdW6q0j65zuklgy2Dqx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=KGzymmJM; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.227.220 as permitted sender) smtp.mailfrom=bounce@groups.io On a multi-processor system, if the BSP dose not know how many APs are online or cannot wake up the AP via broadcast, it can collect AP resouces before wakeing up the AP and add a new HOB to save the processor resouces. Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Signed-off-by: Chao Li --- .../Include/Guid/ProcessorResourceHob.h | 29 +++++++++++++++++++ UefiCpuPkg/UefiCpuPkg.dec | 3 ++ 2 files changed, 32 insertions(+) create mode 100644 UefiCpuPkg/Include/Guid/ProcessorResourceHob.h diff --git a/UefiCpuPkg/Include/Guid/ProcessorResourceHob.h b/UefiCpuPkg/Include/Guid/ProcessorResourceHob.h new file mode 100644 index 0000000000..da7f381d3b --- /dev/null +++ b/UefiCpuPkg/Include/Guid/ProcessorResourceHob.h @@ -0,0 +1,29 @@ +/** @file + Processor resource HOB + + If BSP does not known how many cores are online or the platform cannot + wake up AP via broadcast, this HOB can be used to store the processor + resource data that may come from ACPI or FDT, etc. + + Copyright (c) 2024, Loongson Technology Corporation Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef PROCESSOR_RESOURCE_HOB_H_ +#define PROCESSOR_RESOURCE_HOB_H_ + +#define PROCESSOR_RESOURCE_HOB_GUID \ + { \ + 0xb855c7fe, 0xa758, 0x701f, { 0xa7, 0x30, 0x87, 0xf3, 0x9c, 0x03, 0x46, 0x7e } \ + } + +typedef struct { + UINT32 NumberOfProcessor; + UINTN *ApicId; +} PROCESSOR_RESOURCE_DATA; + +extern EFI_GUID gProcessorResourceHobGuid; + +#endif diff --git a/UefiCpuPkg/UefiCpuPkg.dec b/UefiCpuPkg/UefiCpuPkg.dec index 1b890e975c..8ca3b7a5a6 100644 --- a/UefiCpuPkg/UefiCpuPkg.dec +++ b/UefiCpuPkg/UefiCpuPkg.dec @@ -96,6 +96,9 @@ [Guids] ## Include/Guid/MpInformation2.h gMpInformation2HobGuid = { 0x417a7f64, 0xf4e9, 0x4b32, {0x84, 0x6a, 0x5c, 0xc4, 0xd8, 0x62, 0x18, 0x79 }} + ## Include/Guid/ProcessorResourceHob.h + gProcessorResourceHobGuid = { 0xb855c7fe, 0xa758, 0x701f, { 0xa7, 0x30, 0x87, 0xf3, 0x9c, 0x03, 0x46, 0x7e }} + [Protocols] ## Include/Protocol/SmmCpuService.h gEfiSmmCpuServiceProtocolGuid = { 0x1d202cab, 0xc8ab, 0x4d5c, { 0x94, 0xf7, 0x3c, 0xfc, 0xc0, 0xd3, 0xd3, 0x35 }} -- 2.27.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117657): https://edk2.groups.io/g/devel/message/117657 Mute This Topic: https://groups.io/mt/105478501/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-