Hi Ray,

In v4, DEBUG_CODE_BEGIN/END() from DumpMicrocodeRevision() is removed, and 
calling is updated as:
DEBUG_CODE (
  DumpMicrocodeRevision ();
  );

Thanks a lot for the feedback!

Regards,
Yunahao
-----Original Message-----
From: Ni, Ray <[email protected]> 
Sent: Thursday, November 23, 2023 9:24 AM
To: Xie, Yuanhao <[email protected]>; [email protected]
Cc: Dong, Eric <[email protected]>; Kumar, Rahul R <[email protected]>; 
Tom Lendacky <[email protected]>; Laszlo Ersek <[email protected]>
Subject: RE: [Patch V3 3/3] UefiCpuPkg/MpInitLib: Extract Dump Microcode 
Revision as function.

>  VOID
> -ShadowMicrocodeUpdatePatch (
> -  IN OUT CPU_MP_DATA  *CpuMpData
> +DumpMicrocodeRevision (
> +  IN CPU_MP_DATA  *CpuMpData
>    )
>  {
> -  EFI_STATUS  Status;
> +  UINT32           ThreadId;
> +  UINT32           ExpectedMicrocodeRevision;
> +  CPU_INFO_IN_HOB  *CpuInfoInHob;
> +  UINTN            Index;


When DEBUG_CODE is disabled, above local variable declarations will cause build 
failure as the compiler only sees the local variable declarations but cannot 
see any code that references them.

So, can you remove DEBUG_CODE_BEGIN/END() from DumpMicrocodeRevision()?

Instead, you call it using following way:
DEBUG_CODE (
  DumpMicrocodeRevision ();
  );


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#111691): https://edk2.groups.io/g/devel/message/111691
Mute This Topic: https://groups.io/mt/102744601/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to