Ning,
I tried to run uncrustify locally and still saw additional changes. It might mean the code style doesn't follow the uncrustify.
more comments embedded in the patch mail starting with [Ray.].

Thanks,
Ray


From: Feng, Ning <ning.feng@intel.com>
Sent: Thursday, May 23, 2024 19:13
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Feng, Ning <ning.feng@intel.com>; Ni, Ray <ray.ni@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [PATCH] Pkg-Module:UefiCpuPkg/MpLib
[Ray.1] The subject should be more specific. E.g.: UefiCpuPkg/MpInitLib: Do not assume BSP is #0


 
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4778

MPlib have wrong expectation that bsp id should always be 0 in
[Ray.1] MPlib should be MpInitLib. "bsp id" -> "BSP index".

MpInitLibInitialize(), SwitchBsp(),ApWakeupFunction().

That will caused the data mismatch, if the beginning bsp is not 0.
[Ray.2] "will caused" -> "will cause", "beginning bsp" -> "initial bsp".

Use CpuMpData->NewBspNumber insted of index 0 to avoid the issue.
[Ray.3] "NewBspNumber" is only used in SwitchBsp() but not other places. I would just delete this from
commit message.



+  // Restore VolatileReg saved in CpuMpData->CpuData
[Ray.4] "Restore VolatileRegisters saved in CpuMpData->CpuData".




   //

-  InitializeApData (CpuMpData, 0, 0, CpuMpData->Buffer + ApStackSize);

+  InitializeApData (CpuMpData, CpuMpData->BspNumber, 0, CpuMpData->Buffer + ApStackSize * (CpuMpData->BspNumber+1));
[Ray.5] "BspNumber+1" -> "BspNumber + 1". (spaces before and after "+")


_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#119133) | | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_