diff --git a/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/CpuIA32Lib_Edk2.inf b/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/CpuIA32Lib_Edk2.inf index 163f8505ec..3f40822e6f 100644 --- a/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/CpuIA32Lib_Edk2.inf +++ b/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/CpuIA32Lib_Edk2.inf @@ -29,11 +29,12 @@ COMPONENT_TYPE = LIBRARY [sources.ia32] IA32/CpuIA32.c | MSFT IA32/CpuIA32.asm | INTEL + IA32/CpuIA32.S | GCC [sources.x64] x64/Cpu.asm | MSFT x64/Cpu.asm | INTEL - + [includes.common] $(EDK_SOURCE)/Foundation/Efi $(EDK_SOURCE)/Foundation/Efi/Include diff --git a/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/EfiCpuVersion.c b/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/EfiCpuVersion.c index 192469fecf..7c8cf07093 100644 --- a/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/EfiCpuVersion.c +++ b/EdkCompatibilityPkg/Foundation/Cpu/Pentium/CpuIA32Lib/EfiCpuVersion.c @@ -59,14 +59,14 @@ Arguments: if (Model != NULL) { *Model = (UINT8) ((Register.RegEax >> 4) & 0xF); if (TempFamilyId == 0x6 || TempFamilyId == 0xF) { - *Model |= (Register.RegEax >> 12) & 0xF0; + *Model = (UINT8) (*Model | ((Register.RegEax >> 12) & 0xF0)); } } if (FamilyId != NULL) { *FamilyId = TempFamilyId; if (TempFamilyId == 0xF) { - *FamilyId = *FamilyId + (UINT16) ((Register.RegEax >> 20) & 0xFF); + *FamilyId = (UINT8 ) (*FamilyId + (UINT16) ((Register.RegEax >> 20) & 0xFF)); } } }