public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Pete Batard <pete@akeo.ie>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Leif Lindholm <leif.lindholm@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH v4 edk2-platforms 20/23] Platform/Raspberry/Pi3: Add platform readme
Date: Thu, 31 Jan 2019 17:19:35 +0000	[thread overview]
Message-ID: <c9fa65a0-e553-9a51-177b-831d176ca566@akeo.ie> (raw)
In-Reply-To: <CAKv+Gu_OPksTdkXbg7iqaWzAcpRK0yVRa2enVrR+=r9HQCxwXw@mail.gmail.com>

On 2019.01.31 14:44, Ard Biesheuvel wrote:
> On Thu, 31 Jan 2019 at 15:36, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>>
>> On Thu, 31 Jan 2019 at 15:13, Leif Lindholm <leif.lindholm@linaro.org> 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 <pete@akeo.ie>
>>>>>> ---
>>>>>>    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.
>>>>>> +<kbd>Esc</kbd> enters platform setup. <kbd>F1</kbd> 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)

It is.

On that subject, I have now ran a new series of tests, with the default 
AARCH64 Debian 9.7 compiler (gcc 6.3.0 20170516), and so far I have not 
been able to observe the Synchronous Exceptions that had us switch to 
the Linaro compiler.

It needs to be noted however that, since we ran into those, we did 
switch to using different ATF binaries, different VideoCore firmware, 
and removed some drivers (such as an HyperVisor) from the firmware. So 
there are quite a few elements that could have had an impact on the 
earlier issue.

I will continue to test with the default Debian compiler for now, and, 
if I don't see a resurgence of the issue, I'll remove the note about 
preferring a Linaro toolchain.


Also, given that Leif doesn't want the full hand-holding compilation 
instructions and that I have no intention to push back on that, I will 
remove that part from the readme, and keep only the line that provides 
the build options.

>>
>> 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

That's probably a good idea. I'll make sure we have the above just in case.

Regards,

/Pete


  reply	other threads:[~2019-01-31 17:19 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-29 16:26 [PATCH v4 edk2-platforms 00/23] Platform/Raspberry: Add Raspberry Pi 3 support Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 01/23] Silicon/Broadcom/Bcm282x: Add interrupt driver Pete Batard
2019-01-31 15:24   ` Leif Lindholm
2019-01-31 17:19     ` Ard Biesheuvel
2019-01-31 19:57       ` Leif Lindholm
2019-01-31 21:01         ` Andrew Fish
2019-02-01  8:43           ` Laszlo Ersek
2019-02-01 10:28             ` Pete Batard
2019-02-01 15:18               ` Leif Lindholm
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 02/23] Silicon/Broadcom/Bcm283x: Add GpioLib Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 03/23] Platform/Raspberry/Pi3: Add ACPI tables Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 04/23] Platform/Raspberry/Pi3: Add reset and memory init libraries Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 05/23] Platform/Raspberry/Pi3: Add platform library Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 06/23] Platform/Raspberry/Pi3: Add RTC library Pete Batard
2019-01-30 22:22   ` Leif Lindholm
2019-01-31 12:31     ` Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 07/23] Platform/Raspberry/Pi3: Add firmware driver Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 08/23] Platform/Raspberry/Pi3: Add platform config driver Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 09/23] Platform/Raspberry/Pi3: Add SMBIOS driver Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 10/23] Platform/Raspberry/Pi3: Add display driver Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 11/23] Platform/Raspberry/Pi3: Add console driver Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 12/23] Platform/Raspberry/Pi3: Add NV storage driver Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 13/23] Platform/Raspberry/Pi3: Add Device Tree driver Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 14/23] Platform/Raspberry/Pi3: Add base MMC driver Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 15/23] Platform/Raspberry/Pi3: Add Arasan " Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 16/23] Platform/Raspberry/Pi3: Platform/Raspberry/Pi3: Add SD Host driver Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 17/23] Platform/Raspberry/Pi3: Add platform boot manager and helper libraries Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 18/23] Platform/Raspberry/Pi3: Add USB host driver Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 19/23] Platform/Raspberry/Pi3: Add platform Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 20/23] Platform/Raspberry/Pi3: Add platform readme Pete Batard
2019-01-30 21:50   ` Leif Lindholm
2019-01-31 12:30     ` Pete Batard
2019-01-31 14:13       ` Leif Lindholm
2019-01-31 14:36         ` Ard Biesheuvel
2019-01-31 14:44           ` Ard Biesheuvel
2019-01-31 17:19             ` Pete Batard [this message]
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 21/23] Platform/Raspberry/Pi3 *NON-OSI*: Add ATF binaries Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 22/23] Platform/Raspberry/Pi3 *NON-OSI*: Add Device Tree binaries Pete Batard
2019-01-29 16:26 ` [PATCH v4 edk2-platforms 23/23] Platform/Raspberry/Pi3 *NON-OSI*: Add logo driver Pete Batard
2019-01-29 17:40 ` [PATCH v4 edk2-platforms 00/23] Platform/Raspberry: Add Raspberry Pi 3 support Ard Biesheuvel
2019-01-29 21:09   ` Pete Batard
2019-01-30 19:38     ` Ard Biesheuvel
2019-01-30 19:42       ` Leif Lindholm
2019-01-30 19:45         ` Ard Biesheuvel
2019-01-30 21:59 ` Leif Lindholm
2019-01-30 22:28   ` Leif Lindholm
2019-01-31 12:31   ` Pete Batard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c9fa65a0-e553-9a51-177b-831d176ca566@akeo.ie \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox