On 10/30/15 13:26, Laszlo Ersek wrote:
>> diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c b/UefiCpuPkg/CpuDxe/CpuMp.c
>> index 3f56faa..e7f5b41 100644
>> --- a/UefiCpuPkg/CpuDxe/CpuMp.c
>> +++ b/UefiCpuPkg/CpuDxe/CpuMp.c
>> @@ -1451,6 +1451,8 @@ ApEntryPointInC (
>> VOID* TopOfApStack;
>> UINTN ProcessorNumber;
>>
>> + AsmEnableCache ();
>> +
>> if (!mAPsAlreadyInitFinished) {
>> FillInProcessorInformation (FALSE, mMpSystemData.NumberOfProcessors);
>> TopOfApStack = (UINT8*)mApStackStart + gApStackSize;
>
> This should clear CR0.CD, and "undo" kernel commit b18d5431acc7 for
> the AP (by falsifying the second subcondition seen in (1)).
>
> Janusz, can you please test this one-liner (with no other out-of-tree
> patch applied)?
If it doesn't help (much), we can also try to do this in assembly, in
earlier parts of the startup code. Because, AsmApEntryPoint() in
UefiCpuPkg/CpuDxe/Ia32/MpAsm.asm
UefiCpuPkg/CpuDxe/Ia32/MpAsm.nasm
UefiCpuPkg/CpuDxe/X64/MpAsm.asm
UefiCpuPkg/CpuDxe/X64/MpAsm.nasm
already runs spinlock-like code.
Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel