From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail04.groups.io (mail04.groups.io [45.79.224.9]) by spool.mail.gandi.net (Postfix) with ESMTPS id 64015D801B0 for ; Tue, 16 Apr 2024 02:44:40 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=gVIE0exTqP4cwnBp17GTT5D6FZmQuE1ZooMWsv3kLJ4=; 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=1713235479; v=1; b=PtpPmkxSZyUUCito7KzV9Hkzpe6U/eC4W8gtITFk3zQcstqyG+vf19EUjYN13zPU+0GPwo9N N0Fqyu9Sqh/odI3+RDym21EjsL+jZjK+S45TPSGPpEZRUoDjplhQxjhkJ1MHS8ZwiAzkS/Ko15f DLBf+JKGeO/t9+8fd3EWEOnyv3CZzK46V2tK/uZCpPUk8Q0aBFhcq2J28zzYup52QBfk/zmowaQ wNsAA8esDEW9ExCiSXzNQiSfa8Pav5BAp5IEGDs56GvmeUwFOG3Qor5NncY59nDJa8hGepaQ0MB Ct3eY90hEFC5/DI/mys9GdqWgnHYC5U8cJ15FsfZF69mQ== X-Received: by 127.0.0.2 with SMTP id FrE5YY7687511xtkhi343qWH; Mon, 15 Apr 2024 19:44:39 -0700 X-Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.10936.1713235478005671806 for ; Mon, 15 Apr 2024 19:44:38 -0700 X-Received: from loongson.cn (unknown [10.2.9.245]) by gateway (Coremail) with SMTP id _____8BxyugT5h1mGxQoAA--.5986S3; Tue, 16 Apr 2024 10:44:35 +0800 (CST) X-Received: from code-server.gen (unknown [10.2.9.245]) by localhost.localdomain (Coremail) with SMTP id AQAAf8BxWRIT5h1mmV58AA--.30112S2; Tue, 16 Apr 2024 10:44:35 +0800 (CST) From: "Chao Li" To: devel@edk2.groups.io Cc: Ray Ni , Rahul Kumar , Gerd Hoffmann Subject: [edk2-devel] [PATCH v4 10/13] UefiCpuPkg: Add a new GUID to store the processors resource Date: Tue, 16 Apr 2024 10:44:33 +0800 Message-Id: <20240416024433.3174558-1-lichao@loongson.cn> In-Reply-To: <20240416024251.3173738-1-lichao@loongson.cn> References: <20240416024251.3173738-1-lichao@loongson.cn> MIME-Version: 1.0 X-CM-TRANSID: AQAAf8BxWRIT5h1mmV58AA--.30112S2 X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAJCGYc5WsGFwAXsy 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: Mon, 15 Apr 2024 19:44:38 -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: lVTXEXLXCKH2pH4x3Gf03SO4x7686176AA= 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=PtpPmkxS; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.9 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none 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..9890cc3ea9 --- /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 (#117834): https://edk2.groups.io/g/devel/message/117834 Mute This Topic: https://groups.io/mt/105550160/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-