>
> (1) For more clarity, I would suggest
>
> lock xadd dword [edi], ebx
>
> (even though "ebx" already specifies the width, yes)
>
> Applies to the X64 version too.
OK.
>
>
> > +incebx ; EBX is CpuNumber
> >
> > +; program stack
>
> (2)
On 02/04/21 12:24, Zeng, Star wrote:
> Hi All,
>
> Do you think it worth or not to also update MpFuncs.nasm in
> Edk2\UefiCpuPkg\PiSmmCpuDxeSmm?
I haven't done any measurements, so I couldn't say...
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
lo Ersek ; Dong, Eric ;
> Kumar, Rahul1
> Subject: [edk2-devel] [PATCH 2/2] UefiCpuPkg/MpInitLib: Use XADD to avoid
> lock acquire/release
>
> When AP firstly wakes up, MpFuncs.nasm contains below logic to assign an
> unique ApIndex to each AP according to who comes first:
&
On 02/04/21 03:59, Ni, Ray wrote:
> When AP firstly wakes up, MpFuncs.nasm contains below logic to assign
> an unique ApIndex to each AP according to who comes first:
> ---ASM---
> TestLock:
> xchg [edi], eax
> cmpeax, NotVacantFlag
> jz TestLock
>
> mov
When AP firstly wakes up, MpFuncs.nasm contains below logic to assign
an unique ApIndex to each AP according to who comes first:
---ASM---
TestLock:
xchg [edi], eax
cmpeax, NotVacantFlag
jz TestLock
movecx, esi
addecx, ApIndexLocation