Hi Andrew,
As you are maintainer of XCLANG compilation I call to you to resolve the
problem.
I reported about it a year ago but now I see the wrong version of Thunk16.s is
returned into the library
MdePkg/Library/BaseLib/X64/Thunk16.S
The problematic codes is here
--------------
.byte 0x66,0x2e # 2eh is "cs:" segment override
lgdt (SavedGdt - L_Base)(%rdi)
.byte 0x66
movl $0xc0000080,%ecx
rdmsr
--------------
Good compilation with GCC toolset. Disassemble as
--------------
000000b7 662e0f0157ee lgdt cs:[bx-0012]
000000bd 66b9800000c0 mov ecx, c0000080
000000c3 0f32 rdmsr
-------------
Now the same produced by XCLANG
---------------
000001e7 662e0f0197f8ff lgdt cs:[bx-8]
000001ee ff db 0xff
000001ef ff66b9 jmp word ptr [bp-0047]
000001f2 800000 add byte ptr [bx+si], 0x0
000001f5 c00f32 ror byte ptr [bx], 0x32
---------------
It is happen because Clang don't like expressions like (SavedGdt - L_Base)
This must be replaced by constants, or the toolset must use another ASM
compiler.
This is a reason why Ovmf by XCLANG is not working.
Sergey
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel