Fixed link error by adding the following 2 lines in .nasm and adding some type 
case in source.

1. DEFAULT REL ; (only required for x64 version)
2. SECTION .text

IA32 version seemed working well (APs output messages). But X64 version made 
windows QEMU crashed, I haven't found the root cause by now.

Jeff
-----Original Message-----
From: Fan, Jeff 
Sent: Monday, September 15, 2014 3:48 PM
To: 'Jordan Justen'
Cc: Chen Fan; [email protected]
Subject: RE: [RFC v2 00/15] Introduce Mp Service protocol to UefiCpuPkg

MpAsm.obj is generated. But Link error on both IA32 and x64 tips as below.

CpuDxe.lib(CpuMp.obj) : error LNK2001: unresolved external symbol 
_AsmApEntryPoint

Jeff
-----Original Message-----
From: Jordan Justen [mailto:[email protected]] 
Sent: Friday, September 12, 2014 11:52 PM
To: Fan, Jeff
Cc: Chen Fan; [email protected]
Subject: Re: [RFC v2 00/15] Introduce Mp Service protocol to UefiCpuPkg

On Thu, Sep 11, 2014 at 7:47 PM, Fan, Jeff <[email protected]> wrote:
> Maybe instead of .S, we should provide .nasm source for this when building on 
> GCC toolchains, since NASM is already a requirement for MdePkg.
>
> Would you be able to help test .nasm with a Visual Studio toolchain if I 
> convert that code to .nasm?
>
> [Jeff]  It makes sense to add .ASM instead of .nasm for MSFT toolchain for 
> this patch.
>            I could test .nasm for MSFT toolchain.

I updated my patches to have .nasm assembly code:
https://github.com/jljusten/edk2/tree/ap-startup-example

Right now it tries to build the NASM source for MSFT as well, so it would be a 
good time to test that. Can you try this out with NASM and Visual Studio?

If you are using git, then you can download my tree at:
https://github.com/jljusten/edk2.git
then 'git checkout ap-startup-example' to switch to this branch.

Or, the less efficient way would be to download a .zip of the tree:
https://github.com/jljusten/edk2/archive/ap-startup-example.zip

After building, I run:
qemu-system-x86_64 -pflash OVMF.fd -smp 4 -debugcon vc -global
isa-debugcon.iobase=0x402

Then I press Ctrl-Alt-5 to see the debug messages from APs 1, 2 and 3.
(0 is BSP)

Thanks,

-Jordan
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to