X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=IntelFspPkg%2FFspSecCore%2FIa32%2FFspApiEntry.asm;fp=IntelFspPkg%2FFspSecCore%2FIa32%2FFspApiEntry.asm;h=219b0ee9c18a80c549a4d3f24f3ec5e52f3ab7d6;hp=8ad9744ab43935d25b8a3a83dcb4733b1da86735;hb=975f1c64174967c6e1e26d63892b630a6bea8b23;hpb=54190e8366e79b5b2baacb07dc43b481fd54baa0 diff --git a/IntelFspPkg/FspSecCore/Ia32/FspApiEntry.asm b/IntelFspPkg/FspSecCore/Ia32/FspApiEntry.asm index 8ad9744ab4..219b0ee9c1 100644 --- a/IntelFspPkg/FspSecCore/Ia32/FspApiEntry.asm +++ b/IntelFspPkg/FspSecCore/Ia32/FspApiEntry.asm @@ -214,16 +214,21 @@ advance_fixed_size: check_address: ; Is valid Microcode start point ? - cmp dword ptr [esi], 0ffffffffh + cmp dword ptr [esi].ucode_hdr.version, 0ffffffffh jz done + ; Is automatic size detection ? + mov eax, [esp].LOAD_UCODE_PARAMS.ucode_code_size + cmp eax, 0ffffffffh + jz @f + ; Address >= microcode region address + microcode region size? - mov eax, [esp].LOAD_UCODE_PARAMS.ucode_code_addr - add eax, [esp].LOAD_UCODE_PARAMS.ucode_code_size + add eax, [esp].LOAD_UCODE_PARAMS.ucode_code_addr cmp esi, eax jae done ;Jif address is outside of ucode region jmp check_main_header +@@: load_check: ; Get the revision of the current microcode update loaded mov ecx, MSR_IA32_BIOS_SIGN_ID