From patchwork Wed Nov 6 09:19:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrii Anisov X-Patchwork-Id: 11229741 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E0D6D16B1 for ; Wed, 6 Nov 2019 09:21:14 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC4E62173E for ; Wed, 6 Nov 2019 09:21:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lMnYCiW1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC4E62173E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iSHTF-0006rH-Lq; Wed, 06 Nov 2019 09:19:21 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iSHTD-0006rC-Vn for xen-devel@lists.xenproject.org; Wed, 06 Nov 2019 09:19:20 +0000 X-Inumbo-ID: 8261470e-0076-11ea-9631-bc764e2007e4 Received: from mail-lf1-x141.google.com (unknown [2a00:1450:4864:20::141]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 8261470e-0076-11ea-9631-bc764e2007e4; Wed, 06 Nov 2019 09:19:18 +0000 (UTC) Received: by mail-lf1-x141.google.com with SMTP id j14so17445824lfb.8 for ; Wed, 06 Nov 2019 01:19:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=j7O3zVttSCOAUrrsXWB/4Ejtu32bZVcUyWHOG1n6Qu4=; b=lMnYCiW1pqoV9KrIRBm6zFyYOFa+j1m/lB8mgDIV9wI6RPYuHMXCbbjHzgRSkZweKs APBbuZgSVXUTeQwvblQjw3mZwrFwu8hU82w8FLeQAVJY3CTs6gqeUDhpm/PR/CD5tavy /pKoZANhEFdGiyN4zfbhrckc+WTTHF4hzt6lJfxrnMtl5Xe5ZK+/h/kaEFhlsnYsf1Co uGkiwP/ker/R0r6SWr9YFCggse8OX7R941kSgzQhcWrtPpMK2iKbmH8HYSKy9rnIDBan wGdHNFhdJabIC0e+AXY8O7ihfju5YZOx9mZBadD0Ujeo9l1bhiSh0bd80FSBOrOLrkIN UMXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=j7O3zVttSCOAUrrsXWB/4Ejtu32bZVcUyWHOG1n6Qu4=; b=CFwfCdqslmeylNDFmiepqw8VlgWUNVtf6j9gDO576lRMjOmQ2AbPB4mUQdq6jxkgrG XsqWn467802QVpCzDX7f9UWVp9ngnOE52oEETSPAaY1vLK4kwXf6X0flQd2acWX4DObk 1mJ15CcxyFI0HYC+DJnY6NVIblvBITY1xv78YRoI15nUH1ZWEXRjv3ivxZzSmOi7iePD 86AxgngYtgprUUK6roziuaCBp4vusqvvkex/iiaH5bdxjXtcKOLaNYofRXb2tXMahHI2 +PAo71MwVZ4FfEV99A3l06eBOwfPkxWSFMRYUpFCPpREsnrEh3VjgSmDsYk9LCx9A6LC 3g2Q== X-Gm-Message-State: APjAAAX7ruB7/HibhQ/IiLUoeJHiqZndaRqNX1XNyGaUAwiJsbabqrVF pO2IzEEMTWhgadgYLGtbWjlALfHMQ24= X-Google-Smtp-Source: APXvYqy8gxvU7MYTjUVcK06Re5numgoSqPLoIYC+Jt8SGgwajMEAhHaop94q4oqcTL/WdpKXdt35Xw== X-Received: by 2002:ac2:51c5:: with SMTP id u5mr24238773lfm.154.1573031957077; Wed, 06 Nov 2019 01:19:17 -0800 (PST) Received: from aanisov-work.kyiv.epam.com (ll-74.141.223.85.sovam.net.ua. [85.223.141.74]) by smtp.gmail.com with ESMTPSA id g23sm3945937lja.104.2019.11.06.01.19.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Nov 2019 01:19:15 -0800 (PST) From: Andrii Anisov To: xen-devel@lists.xenproject.org Date: Wed, 6 Nov 2019 11:19:06 +0200 Message-Id: <1573031953-12894-1-git-send-email-andrii.anisov@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [Xen-devel] [RFC 0/7] Build XEN with ARM Compiler 6.6.3 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Andrii Anisov , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Jan Beulich , Julien Grall , Daniel De Graaf , Volodymyr Babchuk MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Andrii Anisov Dear All, Here are patches to make XEN (hypervisor only) being able to be compiled for ARMv8 with ARM Compiler 6.6.3 Long Term Maintenance. ARM compiler of that version is safety certified, that is the reason for the choice. The chosen compiler has a number of bugs and deviations from GNU Compiler, which required correspondent workarounds. These patches are published for those who are interested in XEN being built by this specific compiler. Also, these patches are WIP and there is a lot of room for improvement. Here is the list of ARM Compiler 6.6.3 bugs and deviations affected XEN build: - ARM Linker scatter file is pretty primitive, it has no feature to define symbols - ARM Linker defined symbols are not counted as referred if only mentioned in a steering file for rename or resolve - C style shift operators are missed among supported scatter file expressions, so some needed values are hardcoded in scatter file - ARM Compiler tools are not able to rename sections - armclang compiles data only C files with SoftVFP attributes - static data symbols, moved to an init section, becomes global - armclang fails to process .rept assembler directive with an expression as a parameter. The latest issue is addressed in a very primitive way: these patches are ported on top of commit f11fda966365db591d280ac1522993409e20fd8c, prior to commit introduced `.rept` directive usage.: Andrii Anisov (5): arm64:armds: ARM Compiler 6.6 does not accept `rx` registers naming for AArch64 arm/gic: Drop pointless assertions WIP:arm64:armds: Build XEN with ARM Compiler 6.6 arm: Introduce dummy empty functions for data only C files arm/gic-v3: add GIC version suffix to iomem range variables Artem Mygaiev (1): WIP: Compilation with ARM DS-6 compiler Julien Grall (1): xen: clang: Support correctly cross-compile Config.mk | 8 +- config/StdGNU.mk | 20 ++- config/arm32.mk | 10 +- config/arm64.mk | 6 +- xen/Rules.mk | 8 + xen/arch/arm/Makefile | 24 +++ xen/arch/arm/Rules.mk | 8 + xen/arch/arm/gic-v3.c | 68 ++++---- xen/arch/arm/gic.c | 6 - xen/arch/arm/platforms/brcm-raspberry-pi.c | 2 + xen/arch/arm/platforms/thunderx.c | 2 + xen/arch/arm/xen.scat.S | 266 +++++++++++++++++++++++++++++ xen/arch/arm/xen.steer | 5 + xen/include/asm-arm/armds.h | 91 ++++++++++ xen/include/asm-arm/smccc.h | 60 +++++++ xen/xsm/flask/gen-policy.py | 4 + 16 files changed, 539 insertions(+), 49 deletions(-) create mode 100644 xen/arch/arm/xen.scat.S create mode 100644 xen/arch/arm/xen.steer create mode 100644 xen/include/asm-arm/armds.h