Andrew:
                It is good to me.

        Reviewed-by: Elvin Li <[email protected]>

Thanks
Elvin

-----Original Message-----
From: Andrew Fish [mailto:[email protected]] 
Sent: Wednesday, August 27, 2014 7:37 AM
To: [email protected]
Subject: [edk2] [IntelFrameworkModulePkg][PATCH 1/1] LegacyBiosDxe: Remove C 
undefined behavior.

 Remove C undefined  behavior.

The C standard defines accessing address zero as undefined behavior and clang 
optimizes all code after the access. The volatile is required to allow access 
to address zero.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anderw Fish <[email protected]>
---
 IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c 
b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c
index 3d9a8b9..a5d2f14 100644
--- a/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c
+++ b/IntelFrameworkModulePkg/Csm/LegacyBiosDxe/Thunk.c
@@ -57,7 +57,7 @@ LegacyBiosInt86 (
   IN  EFI_IA32_REGISTER_SET         *Regs
   )
 {
-  UINT32  *VectorBase;
+  volatile UINT32  *VectorBase;
 
   Regs->X.Flags.Reserved1 = 1;
   Regs->X.Flags.Reserved2 = 0;
-- 
1.8.5.2 (Apple Git-48)


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to