From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::142; helo=mail-it1-x142.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it1-x142.google.com (mail-it1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) (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 B6A1A2194D3B8 for ; Thu, 31 Jan 2019 06:44:48 -0800 (PST) Received: by mail-it1-x142.google.com with SMTP id c9so4500096itj.1 for ; Thu, 31 Jan 2019 06:44:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=H0BIvhcivYWyh27GVJxN3WDjlj0shvFiLRP2MGijzXc=; b=MXRVduvoLFDjV9a76WC3IFXJUlbn0pEBoELM12UJYrjxFVjQklrFHHBZKo6h38a1+x Vfer9VpGaWKvzEsmD9HyK3/k+Eyp5ErrD/kdHhvoRhEhT9h98+AAhsgx+vQvh1Vje29q DJ4+5A/Mfqh/7VVLVFCHvezSPmgZBFFVfF1cw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=H0BIvhcivYWyh27GVJxN3WDjlj0shvFiLRP2MGijzXc=; b=Gq5ZyblVoumXcPmWyuyzd2Jv7ZuzSPy8eZcMEgOK+805ptHw4ooVT4SvTzrkYd7tGS AcNv8sEiwM8pdB0DHqFVxwnSkPfX3se7+ZE/fIES26CWvI/Infj1Sq8BusYySQwqEC+R 3DgtUU8JBB4DoyGSHZiNy3uyWNxlE2xlxRv1qyJsF89/cGKWoooLPcSllbq1JDqwZ7EL ud/gM3ddHHKydoSypnGrehGh+iipIfpxYqMbZPy8xpbxonCBmFdtqaSTxo8TkqCfAiwf KKzS8JAvW3L7qGnQr6t1/Oovh2yiIf8cg+Kmhzf8ldr3vmdFfMgRtGdnWL9HCZnalxtk scQQ== X-Gm-Message-State: AJcUukeBQyD6lfWHCSa06BFEZXkaF8Z0/YusTtsPmmUs3wwYirrJylBs Xefw+/qqLhA7W4blECEVA494RCfuVdtjOLd0eUF9PQ== X-Google-Smtp-Source: ALg8bN5+9WbDvrPUOkfMsZgg04VSuuKA+NiKtctb/QujcmlvLu6kpLaySJDGtXQZrwYoanDu04TqWqFnFCz0aB6/wOk= X-Received: by 2002:a05:660c:4b:: with SMTP id p11mr19402522itk.71.1548945887628; Thu, 31 Jan 2019 06:44:47 -0800 (PST) MIME-Version: 1.0 References: <20190129162655.3800-1-pete@akeo.ie> <20190129162655.3800-21-pete@akeo.ie> <20190130215024.6rzpicbnykk5hzuo@bivouac.eciton.net> <4877c43c-a16a-c468-f5ad-bd6cde214ce0@akeo.ie> <20190131141351.znaggng6ywqnzfus@bivouac.eciton.net> In-Reply-To: From: Ard Biesheuvel Date: Thu, 31 Jan 2019 15:44:36 +0100 Message-ID: To: Leif Lindholm Cc: Pete Batard , "edk2-devel@lists.01.org" Subject: Re: [PATCH v4 edk2-platforms 20/23] Platform/Raspberry/Pi3: Add platform readme 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, 31 Jan 2019 14:44:49 -0000 Content-Type: text/plain; charset="UTF-8" On Thu, 31 Jan 2019 at 15:36, Ard Biesheuvel wrote: > > On Thu, 31 Jan 2019 at 15:13, Leif Lindholm wrote: > > > > On Thu, Jan 31, 2019 at 12:30:22PM +0000, Pete Batard wrote: > > > Hi Leif. Thanks for reviewing this patchset. > > > > > > On 2019.01.30 21:50, Leif Lindholm wrote: > > > > Hi Pete, > > > > > > > > I will only have minor comments on this set, but I'll start with this > > > > documentation. > > > > > > > > On Tue, Jan 29, 2019 at 04:26:52PM +0000, Pete Batard wrote: > > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > > > > Signed-off-by: Pete Batard > > > > > --- > > > > > Platform/Raspberry/Pi3/Readme.md | 259 ++++++++++++++++++++ > > > > > Readme.md | 3 + > > > > > 2 files changed, 262 insertions(+) > > > > > > > > > > diff --git a/Platform/Raspberry/Pi3/Readme.md b/Platform/Raspberry/Pi3/Readme.md > > > > > new file mode 100644 > > > > > index 000000000000..7fb59ccdc321 > > > > > --- /dev/null > > > > > +++ b/Platform/Raspberry/Pi3/Readme.md > > > > > @@ -0,0 +1,259 @@ > > > > > +Raspberry Pi 3 EDK2 Platform Support > > > > > +==================================== > > > > > + > > > > > +# Summary > > > > > + > > > > > +This is a port of 64-bit Tiano Core UEFI firmware for the Raspberry Pi 3/3B+ platforms, > > > > > +based on [Ard Bisheuvel's 64-bit](http://www.workofard.com/2017/02/uefi-on-the-pi/) > > > > > +and [Microsoft's 32-bit](https://github.com/ms-iot/RPi-UEFI/tree/ms-iot/Pi3BoardPkg) > > > > > +implementations, as maintained by [Andrei Warkentin](https://github.com/andreiw/RaspberryPiPkg). > > > > > + > > > > > +This is meant as a generally useful 64-bit ATF + UEFI implementation for the Raspberry > > > > > +Pi 3/3B+ which should be good enough for most kind of UEFI development, as well as for > > > > > +running consummer Operating Systems in such as Linux or Windows. > > > > > + > > > > > +Raspberry Pi is a trademark of the [Raspberry Pi Foundation](http://www.raspberrypi.org). > > > > > + > > > > > +# Status > > > > > + > > > > > +This firmware, that has been validated to compile against the current > > > > > +[edk2](https://github.com/tianocore/edk2)/[edk2-platforms](https://github.com/tianocore/edk2-platforms), > > > > > +should be able to boot Linux (SUSE, Ubuntu), NetBSD, FreeBSD as well as Windows 10 ARM64 > > > > > +(full GUI version). > > > > > + > > > > > +It also provides support for ATF ([Arm Trusted Platform](https://github.com/ARM-software/arm-trusted-firmware)). > > > > > + > > > > > +HDMI and the mini-UART serial port can be used for output devices, with mirrored output. > > > > > +USB keyboards and the mini-UART serial port can be used as input. > > > > > + > > > > > +The boot order is currently hardcoded, first to the USB ports and then to the uSD card. > > > > > +If there no bootable media media is found, the UEFI Shell is launched. > > > > > +Esc enters platform setup. F1 boots the UEFI Shell. > > > > > + > > > > > +# Building > > > > > + > > > > > +(These instructions were validated against the latest edk2 / edk2-platforms / > > > > > +edk2-non-osi as of 2019.01.27, on a Debian 9.6 x64 system). > > > > > + > > > > > +You may need to install the relevant compilation tools. Especially you should have the > > > > > +ACPI Source Language (ASL) compiler, `nasm` as well as a native compiler installed. > > > > > > > > nasm? The x86 assembler? > > > > > > I'll remove that. > > > > > > > > +On a Debian system, you can get these prerequisites installed with: > > > > > +``` > > > > > +sudo apt-get install build-essential acpica-tools nasm uuid-dev > > > > > +``` > > > > > + > > > > > +**IMPORTANT:** We recommend the use of the Linaro GCC for compilation instead of > > > > > +your system's native ARM64 GCC cross compiler. > > > > > > > > This sounds like something written in the days of GCC 4.8. I doubt it > > > > has any relevance today. > > > > > > It very much had until circa one month ago, as we observed early Synchronous > > > Exceptions when trying to use the native Debian ARM64 compiler, which we did > > > not observe with Linaro's toolchain. We even had trouble (similar issue) > > > with recent Linaro toolchains at some stage, which is why, until v3, we > > > recommended an older version, but recent tests showed that the latest Linaro > > > GCC (2019.02) appeared to be okay, which is why I removed the previous > > > requirement to use exclusively Linaro's 2017.10 GCC 5.5. > > > > Urgh. But that actually makes the above statement even more > > misleading. What you have isn't an issue with non-Linaro toolchains, > > you have an unidentified toolchain issue that you've triggered more > > frequently > > > > Could you please check whether the broken toolchain in question has > the workaround for Cortex-A53 erratum 843419 enabled? (gcc -v will > tell you) > > While playing with this port the other day, I noticed that the RPi3 is > affected by this, and the Debian kernels don't enable mitigations for > it either. > Answering to self: my stretch gcc has Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/6/lto-wrapper Target: aarch64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18+deb9u1' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-arm64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-arm64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-arm64 --with-arch-directory=aarch64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-multiarch --enable-fix-cortex-a53-843419 --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu Thread model: posix gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) which means it is built so that it will pass the correct linker option to ld, it does not affect code generation in general. In any case, it may be worth adding this to the .dsc [BuildOptions] GCC:*_*_*_DLINK_FLAGS = -Wl,--fix-cortex-a53-843419