Hi Andrew,
your patches are good. I tested CpuExceptionHandler.lib and Thunk16.nasm in
Ovmf+Qemu2.0 compiled by GCC49. Works fine!
But with XCLANG (Xcode 4.4.1) I got an error
------
qemu: fatal: Trying to execute code outside RAM or ROM at 0x00000000000a0000
RAX=0000000000000000 RBX=00000000fffcc0e4 RCX=800000000000000e
RDX=000000007ff95df8
RSI=00000000fffd6104 RDI=0000000000005042 RBP=000000007ff5b9a0
RSP=000000007ff5b930
R8 =000000007fe75d70 R9 =000000007fe75d88 R10=0000000000000000
R11=0000000000000000
R12=0000000000000000 R13=0000000000000000 R14=0000000000000000
R15=0000000000000000
RIP=000000000009ffbe RFL=00000046 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0008 0000000000000000 ffffffff 00cf9300 DPL=0 DS [-WA]
CS =0018 0000000000000000 ffffffff 00af9b00 DPL=0 CS64 [-RA]
SS =0008 0000000000000000 ffffffff 00cf9300 DPL=0 DS [-WA]
DS =0008 0000000000000000 ffffffff 00cf9300 DPL=0 DS [-WA]
FS =0008 0000000000000000 ffffffff 00cf9300 DPL=0 DS [-WA]
GS =0008 0000000000000000 ffffffff 00cf9300 DPL=0 DS [-WA]
LDT=0000 0000000000000000 0000ffff 00008200 DPL=0 LDT
TR =0000 0000000000000000 0000ffff 00008b00 DPL=0 TSS64-busy
GDT= 00000000ffffff80 0000001f
IDT= 000000007c01fd58 0000021f
CR0=80000033 CR2=0000000000000000 CR3=000000007fefa000 CR4=00000660
DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000
DR3=0000000000000000
DR6=00000000ffff0ff0 DR7=0000000000000400
CCS=0000000000000000 CCD=0000000000000000 CCO=ADDB
EFER=0000000000000500
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
FPR2=0000000000000000 0000 FPR3=0000000000000000 0000
FPR4=0000000000000000 0000 FPR5=0000000000000000 0000
FPR6=0000000000000000 0000 FPR7=0000000000000000 0000
XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000
XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000
XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000
XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000
XMM08=00000000000000000000000000000000 XMM09=00000000000000000000000000000000
XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000
XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000
XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000
Abort trap: 6
-------
I will debug the issue and it will take me a time.
Just an error with GCC
-----
X64/ExceptionHandlerAsm.iii:32: Error: alignment not a power of 2
-----
Should be there align32?
---------
#EXTRN ASM_PFX(mDoFarReturnFlag):QWORD # Do far return flag
.text
+.align 3
#
---------
After that I may recommend these patches to be committed into trunk.
Thanks for the great work!
Sergey
On 30.08.2014, at 3:53, Andrew Fish wrote:
> With these 3 patches you can boot the EFI shell X64 Ovmf on Mac OS X using
> Xcode 5.
> [edk2] [OvmfPkg][Review] Use XCODE5 toolchain for current and future OS X
> versions
> [edk2] [SourceLevelDebugPkg] Code review: Compile/link with clang/Xcode 5
> [UefiCpuPkg][CpuExceptionHandlerLib] Make self modifying code work with Xcode
>
> OvmfPkg/build.sh -a X64
> OvmfPkg/build.sh -a X64 qemu -debugcon file:debug.log -global
> isa-debugcon.iobase=0x402 -monitor stdio -no-reboot -no-shutdown -s
> -singlestep
>
> I was forced to install nasm, and you MUST set NASM_PREFIX to the install
> location of nasm. Xcode ships with a very old version of nasm in
> /usr/bin/nasm.
>
> You get errors trying to assemble the SEC with the Xcode nasm (It looks like
> it is missing some needed features).
> Ia32/Flat32ToFlat64.asm:38: warning: numeric constant 0x100000000 does not
> fit in 32 bits
> Ia32/Flat32ToFlat64.asm:39: error: `64' is not a valid segment size; must be
> 16 or 32
> Ia16/Real16ToFlat32.asm:40: warning: numeric constant 0x100000000 does not
> fit in 32 bits
> Ia16/Real16ToFlat32.asm:62: warning: numeric constant 0x100000000 does not
> fit in 32 bits
> Main.asm:78: error: `64' is not a valid segment size; must be 16 or 32
>
> Thanks,
>
> Andrew Fish
>
> PS. Sorry I omitted Contributed-under, and Signed-off-by from some of the
> patch mails. It has been a long week.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Anderw Fish <[email protected]>
>
> ------------------------------------------------------------------------------
> 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