mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
UefiCpuPkg/MpInitLib: Reduce compiler dependencies for LoongArch
Structure assignment may depend on the compiler to expand to memcpy. For this, we may need to add -mno-memcpy to the compilation flag. Here, we reduce dependencies and use CopyMem for data conversion without memcpy. Cc: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Chao Li <lichao@loongson.cn> Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn> Co-authored-by: Chao Li <lichao@loongson.cn>
This commit is contained in:
parent
6271b617b4
commit
556640bcea
@ -130,8 +130,8 @@ SortApicId (
|
||||
} else {
|
||||
for ( ; Index2 <= ApCount; Index2++) {
|
||||
if (CpuInfoInHob[Index2].ApicId == INVALID_APIC_ID) {
|
||||
CopyMem (&CpuInfoInHob[Index2], &CpuInfoInHob[Index1], sizeof (CPU_INFO_IN_HOB));
|
||||
CpuMpData->CpuData[Index2] = CpuMpData->CpuData[Index1];
|
||||
CopyMem (CpuInfoInHob + Index2, CpuInfoInHob + Index1, sizeof (CPU_INFO_IN_HOB));
|
||||
CopyMem (CpuMpData->CpuData + Index2, CpuMpData->CpuData + Index1, sizeof (CPU_AP_DATA));
|
||||
CpuInfoInHob[Index1].ApicId = INVALID_APIC_ID;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user