summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Include
diff options
context:
space:
mode:
authorChao Li <lichao@loongson.cn>2024-04-12 10:38:19 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-04-16 06:00:32 +0000
commit392a368533ed82da7cd952533adcb0e1a82d397c (patch)
tree266e71a55476b4f2cacea570de1e768c43ccd52c /UefiCpuPkg/Include
parent032830e96841f2a752e364378c3428ac5d2f59d1 (diff)
downloadedk2-392a368533ed82da7cd952533adcb0e1a82d397c.tar.gz
edk2-392a368533ed82da7cd952533adcb0e1a82d397c.tar.bz2
edk2-392a368533ed82da7cd952533adcb0e1a82d397c.zip
UefiCpuPkg: Add a new GUID to store the processors resource
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 <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Chao Li <lichao@loongson.cn> Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'UefiCpuPkg/Include')
-rw-r--r--UefiCpuPkg/Include/Guid/ProcessorResourceHob.h29
1 files changed, 29 insertions, 0 deletions
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.<BR>
+
+ 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