From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 008D51A1F3F for ; Thu, 22 Sep 2016 02:43:07 -0700 (PDT) Received: by mail-wm0-x244.google.com with SMTP id 133so13030905wmq.2 for ; Thu, 22 Sep 2016 02:43:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:subject:to:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=NsyJjj8EX7vi3w2xiX0MarcphGxz7RsbbhmW7tXQmq4=; b=I6ilmhnl87jRyQ41iqejAuxawfhA1SMRDvOxnX4io+927ejREb876ZUJS+JlJyMO5d Z9Jj9bhq8rPu05zHubTkoK0r3yUDcJVBVCT8y+FfHtFYbp7r5Gkj1ki66Qzf46uzAc0v oj6uLzadCgUvG9nQvA4A3TdOSFlLdZ25xpHS6RT21LNIgpB+ndwyYNb2II8pciv5TJ2K CTFX2cKWIf0BJ+vtY5bIUguf7AZV7SIAe31FM0uJqEsMvCIjc8WnTO4BcSzrZPS2EIky epTRxIGgwFVBd+B7sJ7lYYGMlO0iAkGc5vKkAUz0LxsxHVJTpPeox9oup1lFgwlihI0x LlIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=NsyJjj8EX7vi3w2xiX0MarcphGxz7RsbbhmW7tXQmq4=; b=TJTOAdLJEVUv9uVVDf87OmGIZOthLjL8X+k4Ki+CXWz3ZgApxqjuCAfGTBLgUx5M2A G09z9v6nBPxf9Abjdu6LGQb+ySQXp8QBoHV07CnjnqXIE1g3100y+BXzzvuwWxCnpGQ4 dN4z7qRhG6RqmxeilMk38ElTCTwpu3+Cg7ZRdrPWCEZyNqHaS5DSBgX1xMO3BLFKQz0M tPQor/6uPOyFa+f21bKyr8wfoA29sFsbRgDeOb/IfPH5LWTBwvyzubjO4aOotaF+bkZ2 Cg4B80yX0mUHOIHLKwmjoQI1EIe06ARBEiRt4taHjYECZM/XZKqvAUwU9HCr9CI12txb oSdQ== X-Gm-Message-State: AE9vXwPC563tWus3IWkCNdgSTtoUyafV+8HBlj8KiOHgwoGgQ6eUqthXCZoox496B+GPFQ== X-Received: by 10.28.10.138 with SMTP id 132mr7730368wmk.1.1474537386012; Thu, 22 Sep 2016 02:43:06 -0700 (PDT) Received: from [10.0.0.101] ([84.203.89.142]) by smtp.googlemail.com with ESMTPSA id d64sm39477430wmh.0.2016.09.22.02.43.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Sep 2016 02:43:05 -0700 (PDT) From: Pete Batard To: edk2-devel@lists.01.org Message-ID: <88690c52-2185-13cb-2f61-eabedeb59b03@akeo.ie> Date: Thu, 22 Sep 2016 10:43:04 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 Subject: [PATCH 0/1] MdeModulePkg/EbcDxe: add ARM support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2016 09:43:08 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi, The following is an updated/fixed version of the patch(es), put forward by Ard Biesheuvel on August 9 ([1], [2]), and re-submitted for formal inclusion, so that the EDK2 can provide EBC functionality for all of IA32, IA64, X64, AARCH64 and ARM at last. This updated patch now includes the necessary corollary dsc/fdf updates as well as fixes to the assembly's EbcLLCALLEXNative, as I found the following issues there: - At least gcc5 didn't seem to like the manually optimized branching for all register args ("sub r1, r1, r3, lsr #1"), and one can never be sure of the actual size instructions will be assembled into, in case of assembler internal alignment/optimization, so I broke it down into actual labelled branches. There are only 4 of those anyway. - For register + stack calls, while 8 x 64 bit registers on AARCH64 do equate to #64 bytes that need to be taken off the stack, on ARM the 4 x 32 bit registers equate to #16 bytes, not #32 - Even after fixing the above, I found some issues with the manual stack duplication assembly code, so I switched to using a call to CopyMem(), like IA32 does. With these changes, I believe that the ARM/EBC feature should be fully functional, especially as I have heavily tested multiparameter calls from EBC into native, using an fasmg-based EBC assembler [3], to confirm that they performed just as well with ARM as with AARCH64, IA32 or X64. Regards, /Pete [1] https://patches.linaro.org/patch/73554/ [2] https://patches.linaro.org/patch/73559/ [3] https://github.com/pbatard/fasmg-ebc