Updated FspApiEntry.asm/.s to auto detect the size of the MCU region.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Rangarajan, Ravi P" <ravi.p.rangarajan@intel.com> Reviewed-by: "Ma, Maurice" <maurice.ma@intel.com> Reviewed-by: "Mudusuru, Giri P" <giri.p.mudusuru@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16478 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user