From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.103.53.11; helo=mail5.wrs.com; envelope-from=bill.paul@windriver.com; receiver=edk2-devel@lists.01.org Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7B3A1210C998C for ; Thu, 6 Dec 2018 14:55:50 -0800 (PST) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id wB6MtClu027946 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 6 Dec 2018 14:55:22 -0800 Received: from ala-wpaul-lx1.wrs.com (147.11.157.242) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 6 Dec 2018 14:55:02 -0800 From: Bill Paul Organization: Wind River Systems To: Date: Thu, 6 Dec 2018 14:46:51 -0800 User-Agent: KMail/1.13.5 (Linux/2.6.32-28-generic; KDE/4.4.5; x86_64; ; ) References: In-Reply-To: MIME-Version: 1.0 Message-ID: <201812061446.52228.wpaul@windriver.com> Subject: Re: edk2 and gnu-efi calling schemes X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Dec 2018 22:55:50 -0000 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Of all the gin joints in all the towns in all the world, Peter Wiehe had to walk into mine at 14:34 on Thursday 06 December 2018 and say: > OK, another question: > > when writing an UEFI application, edk2 and gnu-efi have different 64bit > calling schemes. Does that only apply to calling the > runtime-library/object file (and inside of the UEFI-application, of > course)? Or does the call from application to UEFI differ in both > toolkits, too? (If it is the latter, it would mean that the UEFI > standard is unprecise!) Both the EDK and GNU EFI obey the same standards when calling UEFI APIs. Their exact implementations may differ depending on the circumstances. For example, GNU EFI may use the __attribute__((ms_abi)) tag to tell the compiler what ABI to use, or if the compiler doesn't support this it can fall back to using some compatibility wrapper macros (see lib/x86_64/efi_stub.S). Either way, you end up with the same behavior. Within a given FOO.EFI application, the application code itself can get away with using whatever calling convention it wants, right up until it needs to call a UEFI firmware routine. At that point, it has to follow the conventions spelled out in the UEFI spec. -Bill > Kind regards > > Peter Wiehe > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel -- ============================================================================= -Bill Paul (510) 749-2329 | Senior Member of Technical Staff, wpaul@windriver.com | Master of Unix-Fu - Wind River Systems ============================================================================= "I put a dollar in a change machine. Nothing changed." - George Carlin =============================================================================