From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 1D85B386EC3A for ; Tue, 29 Sep 2020 14:06:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1D85B386EC3A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Richard.Earnshaw@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8940112FC; Tue, 29 Sep 2020 07:06:26 -0700 (PDT) Received: from [192.168.1.19] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 107953F6CF; Tue, 29 Sep 2020 07:06:25 -0700 (PDT) Subject: Re: [PATCH] libgloss/aarch64: Add support for Armv8-R AArch64 To: Alex Coplan , newlib@sourceware.org References: <20200918144327.7qgh64f57myg6njs@arm.com> From: "Richard Earnshaw (lists)" Message-ID: <0bdab8d7-67ee-0d61-3e80-1b8365c41204@arm.com> Date: Tue, 29 Sep 2020 15:06:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200918144327.7qgh64f57myg6njs@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3035.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_NUMSUBJECT, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2020 14:06:28 -0000 On 18/09/2020 15:43, Alex Coplan wrote: > Hello, > > This patch adds support for Armv8-R AArch64. We update the AArch64 CPU > boot code to work on Armv8-R if __ARM_ARCH_PROFILE is set to 'R'. > Armv8-R AArch64 has no EL3, so we don't set vbar_el3, and adjust the > code to set up the MPU for Armv8-R. > > We also add a specs file for use with Armv8-R AArch64 models. > > Testing: > * Ran AArch64 GCC testsuite using --with-arch=armv8-r together with the > new specs file and boot code in an Armv8-R AArch64 model. > * Ran newlib testsuite, no regressions. > > OK for master? > > Thanks, > Alex > > --- > > 2020-09-18 Alex Coplan > > libgloss/ChangeLog: > > * aarch64/Makefile.in: Install new specs file. > * aarch64/cpu-init/Makefile.in: Also build boot code for Armv8-R. > * aarch64/cpu-init/rdimon-aem-el3.S: Add support for Armv8-R. > * aarch64/elf-aem-v8-r.specs: New. > The main problem I see with this is that it assumes that the compiler being used is *not* configured for a default CPU architecture of ARMv8-r. If it is, then the normal rdimon-aem-el3.o file will in fact become the same as the v8-r version, which is not really what we want. Perhaps, rather than hacking around the __ARM_ARCH_PROFILE setting you should just set things up to build the file twice, but with a different conventional pre-define set each time. R.