* [edk2-devel] [edk2-platforms] MinPlatformPkg: Corret AcpiProcessorUid in MADT
@ 2024-03-28 8:45 duntan
0 siblings, 0 replies; only message in thread
From: duntan @ 2024-03-28 8:45 UTC (permalink / raw)
To: devel; +Cc: Ray Ni, Jason Lou, Chasel Chiu, Nate DeSimone, Liming Gao,
Eric Dong
Change AcpiProcessorUid in CpuApicIdOrderTable to
the Index value in MP service regardless of diabled
fore.
Let take a simple example:
CORE number APICID Index in MpService
CORE0 0x0000_0000 0
CORE1(Disabled) 0x0000_0010 1
CORE2 0x0000_0040 2
With current implementation, the results of the x2apic
structure entries in MADT are:
MADT Entry APICID AcpiProcessorUid
Entry[0](core0) 0x0000_0000 0
Entry[0](core2) 0x0000_0040 1
The ACPI Processor UID will be associated with the
processor device defined in DSDT/SSDT. To make sure
the x2apic structure entry in MADT can be mapped to
the right processor device in DSDT, the AcpiProcessorUid
value should be the Index in MpService 2.
Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Jason Lou <yun.lou@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
---
Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
index 2a833ec99c..f6ea7454d3 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
@@ -190,7 +190,7 @@ CreateCpuLocalApicInTable (
//
for (Socket = 0; Socket < FixedPcdGet32 (PcdMaxCpuSocketCount); Socket++) {
for (CurrProcessor = 0, Index = 0; CurrProcessor < mNumberOfCpus; CurrProcessor++) {
- if (CpuApicIdOrderTable[CurrProcessor].Flags && (CpuApicIdOrderTable[CurrProcessor].SocketNum == Socket)) {
+ if (CpuApicIdOrderTable[CurrProcessor].SocketNum == Socket) {
CpuApicIdOrderTable[CurrProcessor].AcpiProcessorUid = (CpuApicIdOrderTable[CurrProcessor].SocketNum << mNumOfBitShift) + Index;
Index++;
}
--
2.31.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117202): https://edk2.groups.io/g/devel/message/117202
Mute This Topic: https://groups.io/mt/105193259/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-28 8:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-28 8:45 [edk2-devel] [edk2-platforms] MinPlatformPkg: Corret AcpiProcessorUid in MADT duntan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox