]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFspPkg/FspSecCore/Ia32/FspApiEntry.asm
Updated FspApiEntry.asm/.s to auto detect the size of the MCU region.
[mirror_edk2.git] / IntelFspPkg / FspSecCore / Ia32 / FspApiEntry.asm
index 8ad9744ab43935d25b8a3a83dcb4733b1da86735..219b0ee9c18a80c549a4d3f24f3ec5e52f3ab7d6 100644 (file)
@@ -214,16 +214,21 @@ advance_fixed_size:
 \r
 check_address:\r
    ; Is valid Microcode start point ?\r
-   cmp   dword ptr [esi], 0ffffffffh\r
+   cmp   dword ptr [esi].ucode_hdr.version, 0ffffffffh\r
    jz    done\r
 \r
+   ; Is automatic size detection ?\r
+   mov   eax, [esp].LOAD_UCODE_PARAMS.ucode_code_size\r
+   cmp   eax, 0ffffffffh\r
+   jz    @f\r
+\r
    ; Address >= microcode region address + microcode region size?\r
-   mov   eax, [esp].LOAD_UCODE_PARAMS.ucode_code_addr\r
-   add   eax, [esp].LOAD_UCODE_PARAMS.ucode_code_size\r
+   add   eax, [esp].LOAD_UCODE_PARAMS.ucode_code_addr\r
    cmp   esi, eax\r
    jae   done        ;Jif address is outside of ucode region\r
    jmp   check_main_header\r
 \r
+@@:\r
 load_check:\r
    ; Get the revision of the current microcode update loaded\r
    mov   ecx, MSR_IA32_BIOS_SIGN_ID\r