From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: "Ni, Ray" <ray.ni@intel.com>, Andrew Fish <afish@apple.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>,
"Liu, Zhiguang" <zhiguang.liu@intel.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: Is Xcode5ExceptionHandlerAsm.nasm still needed?
Date: Thu, 30 Mar 2023 15:30:47 +0000 [thread overview]
Message-ID: <SA2PR11MB4938EECD26217CC62B3064F6D28E9@SA2PR11MB4938.namprd11.prod.outlook.com> (raw)
In-Reply-To: <MN6PR11MB8244E7D0589C5CE6B1E171758C8E9@MN6PR11MB8244.namprd11.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 1466 bytes --]
Hi Ray,
No sure if I recall all the details. Andrew may know them much better than me.
The code gen for XCODE uses PIE and RIP relative addressing, which does not require the same number/type of relocation fixups.
Whenever there is a need to access a data element at an absolute address and the code is copied to
a new location the RIP relative address will not work.
And if you try to use absolute addressing, you will get an error from XCODE linker for an unsupported fixup type.
Mike
From: Ni, Ray <ray.ni@intel.com>
Sent: Thursday, March 30, 2023 3:16 AM
To: Andrew Fish <afish@apple.com>
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io; Liu, Zhiguang <zhiguang.liu@intel.com>
Subject: Is Xcode5ExceptionHandlerAsm.nasm still needed?
Andrew,
In UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\, there are two nasm files: ExceptionHandlerAsm.nasm and the other XCODE version.
The major diff between the two is the second operand in “mov rax, ASM_PFX(CommonInterruptEntry)” is patched at runtime by code, instead of relying on linker/loader to fix it.
Can I know more background why it’s needed for XCODE?
Given Apple is switching away from X86 CPU, is the XCODE version still needed?
+ Mike because I found another commit by you for bug: 565 – Fix X64 XCODE5/NASM compatibility issue in UefiCpuPkg MpInitLib (tianocore.org)<https://bugzilla.tianocore.org/show_bug.cgi?id=565>.
Thanks,
Ray
[-- Attachment #2: Type: text/html, Size: 42038 bytes --]
prev parent reply other threads:[~2023-03-30 15:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 10:16 Is Xcode5ExceptionHandlerAsm.nasm still needed? Ni, Ray
2023-03-30 10:48 ` [edk2-devel] " Ard Biesheuvel
2023-03-30 11:47 ` Ard Biesheuvel
2023-03-30 14:25 ` Ni, Ray
2023-03-30 15:04 ` Ard Biesheuvel
2023-03-30 16:33 ` Ard Biesheuvel
2023-03-30 16:47 ` Ard Biesheuvel
2023-03-30 16:54 ` Rebecca Cran
2023-03-30 17:03 ` Ard Biesheuvel
2023-03-30 15:30 ` Michael D Kinney [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=SA2PR11MB4938EECD26217CC62B3064F6D28E9@SA2PR11MB4938.namprd11.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox