From 8e35b68162a77c580917b6f636f84b74dc4aed22 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Sat, 23 Aug 2008 08:38:20 +0000 Subject: [PATCH] 1) Make EfiCpuVersion.c pass ICC and GCC tool-chain 2) Add in CpuIA32Lib_Edk2.inf. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5717 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Foundation/Cpu/Pentium/CpuIA32Lib/CpuIA32Lib_Edk2.inf | 3 ++- .../Foundation/Cpu/Pentium/CpuIA32Lib/EfiCpuVersion.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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)); } } }