From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D598C43603 for ; Tue, 10 Dec 2019 20:13:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 087F720838 for ; Tue, 10 Dec 2019 20:13:34 +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="NnCHMKpL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 087F720838 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ielsz-00082d-W9 for qemu-devel@archiver.kernel.org; Tue, 10 Dec 2019 15:13:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43487) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ielsA-0007Vb-Eu for qemu-devel@nongnu.org; Tue, 10 Dec 2019 15:12:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iels8-0006dk-E2 for qemu-devel@nongnu.org; Tue, 10 Dec 2019 15:12:42 -0500 Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]:46523) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iels8-0006dF-70; Tue, 10 Dec 2019 15:12:40 -0500 Received: by mail-io1-xd2c.google.com with SMTP id t26so8755596ioi.13; Tue, 10 Dec 2019 12:12:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wXF79992wt0z9yLgV32jgth2ukQCBU2SjhmYPQSjvTA=; b=NnCHMKpLVX6bx21f3ihWVTIGF3XzCpyrcrxFN5M3f7Dn3LUubc6Up6sEVJ80xmQlsI Vk59bmNy+2QURfrh8ygYmnjAHC/HZ0CJzYaR2t+mgpS1v6+JK/LSgtB08fQrmsBJyh54 /XTnO5kjm1fS28z6OaSgkJ8RSDPgKUpx4CnyVOsbGJF2F3tzBiLAhrHH03E6FD/oIHEs o7+mcZm76WHOdPXGuv7zXx5GhaE7JiUA+v1+LDBVxZCticqxxRQyssxGrCAZocSy2fJ6 86ssm5P0uBeCcExxxXqJs+PwiZdjzZ17B82XzWo4oa0UyYBd76nHRW6gMZN2WQGD3SQN vuwg== 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=wXF79992wt0z9yLgV32jgth2ukQCBU2SjhmYPQSjvTA=; b=YhjC7oAt162LcaaUdHXuDlDpaOKxnzKMIHErZjc1hkPp5715ZwmJrUjgG2kcHjMAUs DiLorl+Pbu7Q4ZE26EtByJY1Yn4CiyXMiPsHUvSErM1pDh/v8INR6BcCIkzIrNQuzr+k PMgZS2Enr4jlcllYYro5HnaoZR85UA6eVW7cSkBG9H+hF/56sFou1kZeHHHCFBfAoZLd SdWJVXXy9E3QKcke0jDDzjG/OFfA3lg4lO9e2sQt2r6YD3dgUHW4GB75n/XadahSRGIr 7LPXZKdjZD0ZWltRUSIYyW55nZmJW/xb107vvWaO2++QPvPc7dks3G19yOeTpS0QTixs a1Jw== X-Gm-Message-State: APjAAAXOp/+4vfgq4h0JE+FTAV96iKTw25GhnrZawnJmOdFzLGCaDFJI qT7wRSltwh1a3tjebKqYprZcgm3PKzpvuCFW7J0= X-Google-Smtp-Source: APXvYqy1RzotywzvT2jY6UDbh+BLvRsZr1eI6AoRbe3IOkDUh8yrAP7jYrdFDy0iijsiiIKiMsuwX7W+n6e4AeqiheY= X-Received: by 2002:a02:662a:: with SMTP id k42mr27982977jac.73.1576008759530; Tue, 10 Dec 2019 12:12:39 -0800 (PST) MIME-Version: 1.0 References: <20191202210947.3603-1-nieklinnenbank@gmail.com> <74df65db-1f84-62ba-6d01-edf765fd1dc2@redhat.com> In-Reply-To: <74df65db-1f84-62ba-6d01-edf765fd1dc2@redhat.com> From: Niek Linnenbank Date: Tue, 10 Dec 2019 21:12:28 +0100 Message-ID: Subject: Re: [PATCH 00/10] Add Allwinner H3 SoC and Orange Pi PC Machine To: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= Content-Type: multipart/alternative; boundary="000000000000465c4f05995f2266" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::d2c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Beniamino Galvani , Peter Maydell , qemu-arm , Richard Henderson , QEMU Developers Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --000000000000465c4f05995f2266 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Philippe, On Tue, Dec 10, 2019 at 9:26 AM Philippe Mathieu-Daud=C3=A9 wrote: > On 12/9/19 10:37 PM, Niek Linnenbank wrote: > > Hi Philippe, > > > > On Tue, Dec 3, 2019 at 9:47 AM Philippe Mathieu-Daud=C3=A9 > > wrote: > > > > On 12/2/19 10:09 PM, Niek Linnenbank wrote: > > > Dear QEMU developers, > > > > > > Hereby I would like to contribute the following set of patches t= o > > QEMU > > > which add support for the Allwinner H3 System on Chip and the > > > Orange Pi PC machine. The following features and devices are > > supported: > > > > > > * SMP (Quad Core Cortex A7) > > > * Generic Interrupt Controller configuration > > > * SRAM mappings > > > * Timer device (re-used from Allwinner A10) > > > * UART > > > * SD/MMC storage controller > > > * EMAC ethernet connectivity > > > * USB 2.0 interfaces > > > * Clock Control Unit > > > * System Control module > > > * Security Identifier device > > > > Awesome! > > > > > Functionality related to graphical output such as HDMI, GPU, > > > Display Engine and audio are not included. Recently released > > > mainline Linux kernels (4.19 up to latest master) and mainline > U-Boot > > > are known to work. The SD/MMC code is tested using bonnie++ and > > > various tools such as fsck, dd and fdisk. The EMAC is verified > > with iperf3 > > > using -netdev socket. > > > > > > To build a Linux mainline kernel that can be booted by the Orang= e > > Pi PC > > > machine, simply configure the kernel using the sunxi_defconfig > > configuration: > > > $ ARCH=3Darm CROSS_COMPILE=3Darm-linux-gnueabi- make mrproper > > > $ ARCH=3Darm CROSS_COMPILE=3Darm-linux-gnueabi- make sunxi_def= config > > > > > > To be able to use USB storage, you need to manually enable the > > corresponding > > > configuration item. Start the kconfig configuration tool: > > > $ ARCH=3Darm CROSS_COMPILE=3Darm-linux-gnueabi- make menuconfi= g > > > > > > Navigate to the following item, enable it and save your > > configuration: > > > Device Drivers > USB support > USB Mass Storage support > > > > > > Build the Linux kernel with: > > > $ ARCH=3Darm CROSS_COMPILE=3Darm-linux-gnueabi- make -j5 > > > > > > To boot the newly build linux kernel in QEMU with the Orange Pi > > PC machine, use: > > > $ qemu-system-arm -M orangepi -m 512 -nic user -nographic \ > > > -kernel /path/to/linux/arch/arm/boot/zImage \ > > > -append 'console=3DttyS0,115200' \ > > > -dtb > /path/to/linux/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dtb > > > > > > Note that this kernel does not have a root filesystem. You may > > provide it > > > with an official Orange Pi PC image [1] either as an SD card or = as > > > USB mass storage. To boot using the Orange Pi PC Debian image on > > SD card, > > > simply add the -sd argument and provide the proper root=3D kerne= l > > parameter: > > > $ qemu-system-arm -M orangepi -m 512 -nic user -nographic \ > > > -kernel /path/to/linux/arch/arm/boot/zImage \ > > > -append 'console=3DttyS0,115200 root=3D/dev/mmcblk0p2' \ > > > -dtb > > /path/to/linux/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dtb \ > > > -sd OrangePi_pc_debian_stretch_server_linux5.3.5_v1.0.img > > > > > > Alternatively, you can also choose to build and boot a recent > > buildroot [2] > > > using the orangepi_pc_defconfig or Armbian image [3] for Orange > > Pi PC. > > > > Richard, trying the Armbian image from > > https://apt.armbian.com/pool/main/l/linux-4.20.7-sunxi/ I get: > > > > $ arm-softmmu/qemu-system-arm -M orangepi -m 512 -nic user \ > > -append 'console=3DttyS0,115200' \ > > -kernel boot/vmlinuz-4.20.7-sunxi \ > > -dtb usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb \ > > -serial stdio -d unimp > > Uncompressing Linux... done, booting the kernel. > > rtc: unimplemented device write (size 4, value 0x16aa0001, offset > 0x0) > > rtc: unimplemented device read (size 4, offset 0x0) > > rtc: unimplemented device read (size 4, offset 0x0) > > rtc: unimplemented device read (size 4, offset 0x8) > > qemu-system-arm: target/arm/helper.c:11359: cpu_get_tb_cpu_state: > > Assertion `flags =3D=3D rebuild_hflags_internal(env)' failed. > > Aborted (core dumped) > > > > > > I'm trying to reproduce the error you reported here with my patch set o= n > > latest master, > > but so far without any result. The host OS I'm using is Ubuntu 18.04.3 > > LTS on x86_64. > > I ran several times using the same 4.20.7-sunxi kernel and same command > > line. > > > > Some questions that might help: > > 1) Are there any specific steps you did in order to produce this error? > > I build QEMU with: > > ./configure --enable-trace-backends=3Dlog --extra-cflags=3D-ggdb --enable= -debug > > > 2) Could this be a known / existing issue? > > 3) How many times did you see this error? > > Always > > > 4) Are you also using Ubuntu 18.04.3 LTS on x86_64, or a different host > OS? > > Host is Fedora 30. > OK thanks, I will try again using the info above after I finished reworking the other patch comments. Niek > > > > > Regards, > > Niek > > --=20 Niek Linnenbank --000000000000465c4f05995f2266 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Philippe,

=
On Tue, Dec 10, 2019 at 9:26 AM Phili= ppe Mathieu-Daud=C3=A9 <philmd@redh= at.com> wrote:
On 12/9/19 10:37 PM, Niek Linnenbank wrote:
> Hi Philippe,
>
> On Tue, Dec 3, 2019 at 9:47 AM Philippe Mathieu-Daud=C3=A9 <philmd@redhat.com
> <mailto:phil= md@redhat.com>> wrote:
>
>=C2=A0 =C2=A0 =C2=A0On 12/2/19 10:09 PM, Niek Linnenbank wrote:
>=C2=A0 =C2=A0 =C2=A0 > Dear QEMU developers,
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > Hereby I would like to contribute the followi= ng set of patches to
>=C2=A0 =C2=A0 =C2=A0QEMU
>=C2=A0 =C2=A0 =C2=A0 > which add support for the Allwinner H3 System= on Chip and the
>=C2=A0 =C2=A0 =C2=A0 > Orange Pi PC machine. The following features = and devices are
>=C2=A0 =C2=A0 =C2=A0supported:
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0* SMP (Quad Core Cortex A7)
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0* Generic Interrupt Controller co= nfiguration
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0* SRAM mappings
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0* Timer device (re-used from Allw= inner A10)
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0* UART
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0* SD/MMC storage controller
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0* EMAC ethernet connectivity
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0* USB 2.0 interfaces
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0* Clock Control Unit
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0* System Control module
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0* Security Identifier device
>
>=C2=A0 =C2=A0 =C2=A0Awesome!
>
>=C2=A0 =C2=A0 =C2=A0 > Functionality related to graphical output suc= h as HDMI, GPU,
>=C2=A0 =C2=A0 =C2=A0 > Display Engine and audio are not included. Re= cently released
>=C2=A0 =C2=A0 =C2=A0 > mainline Linux kernels (4.19 up to latest mas= ter) and mainline U-Boot
>=C2=A0 =C2=A0 =C2=A0 > are known to work. The SD/MMC code is tested = using bonnie++ and
>=C2=A0 =C2=A0 =C2=A0 > various tools such as fsck, dd and fdisk. The= EMAC is verified
>=C2=A0 =C2=A0 =C2=A0with iperf3
>=C2=A0 =C2=A0 =C2=A0 > using -netdev socket.
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > To build a Linux mainline kernel that can be = booted by the Orange
>=C2=A0 =C2=A0 =C2=A0Pi PC
>=C2=A0 =C2=A0 =C2=A0 > machine, simply configure the kernel using th= e sunxi_defconfig
>=C2=A0 =C2=A0 =C2=A0configuration:
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0$ ARCH=3Darm CROSS_COMPILE=3Darm-= linux-gnueabi- make mrproper
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0$ ARCH=3Darm CROSS_COMPILE=3Darm-= linux-gnueabi- make sunxi_defconfig
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > To be able to use USB storage, you need to ma= nually enable the
>=C2=A0 =C2=A0 =C2=A0corresponding
>=C2=A0 =C2=A0 =C2=A0 > configuration item. Start the kconfig configu= ration tool:
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0$ ARCH=3Darm CROSS_COMPILE=3Darm-= linux-gnueabi- make menuconfig
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > Navigate to the following item, enable it and= save your
>=C2=A0 =C2=A0 =C2=A0configuration:
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0Device Drivers > USB support &= gt; USB Mass Storage support
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > Build the Linux kernel with:
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0$ ARCH=3Darm CROSS_COMPILE=3Darm-= linux-gnueabi- make -j5
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > To boot the newly build linux kernel in QEMU = with the Orange Pi
>=C2=A0 =C2=A0 =C2=A0PC machine, use:
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0$ qemu-system-arm -M orangepi -m = 512 -nic user -nographic \
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 =C2=A0-kernel /path/to/li= nux/arch/arm/boot/zImage \
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 =C2=A0-append 'consol= e=3DttyS0,115200' \
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 =C2=A0-dtb /path/to/linux= /arch/arm/boot/dts/sun8i-h3-orangepi-pc.dtb
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > Note that this kernel does not have a root fi= lesystem. You may
>=C2=A0 =C2=A0 =C2=A0provide it
>=C2=A0 =C2=A0 =C2=A0 > with an official Orange Pi PC image [1] eithe= r as an SD card or as
>=C2=A0 =C2=A0 =C2=A0 > USB mass storage. To boot using the Orange Pi= PC Debian image on
>=C2=A0 =C2=A0 =C2=A0SD card,
>=C2=A0 =C2=A0 =C2=A0 > simply add the -sd argument and provide the p= roper root=3D kernel
>=C2=A0 =C2=A0 =C2=A0parameter:
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0$ qemu-system-arm -M orangepi -m = 512 -nic user -nographic \
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 =C2=A0-kernel /path/to/li= nux/arch/arm/boot/zImage \
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 =C2=A0-append 'consol= e=3DttyS0,115200 root=3D/dev/mmcblk0p2' \
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 =C2=A0-dtb
>=C2=A0 =C2=A0 =C2=A0/path/to/linux/arch/arm/boot/dts/sun8i-h3-orangepi-= pc.dtb \
>=C2=A0 =C2=A0 =C2=A0 >=C2=A0 =C2=A0 =C2=A0 =C2=A0-sd OrangePi_pc_deb= ian_stretch_server_linux5.3.5_v1.0.img
>=C2=A0 =C2=A0 =C2=A0 >
>=C2=A0 =C2=A0 =C2=A0 > Alternatively, you can also choose to build a= nd boot a recent
>=C2=A0 =C2=A0 =C2=A0buildroot [2]
>=C2=A0 =C2=A0 =C2=A0 > using the orangepi_pc_defconfig or Armbian im= age [3] for Orange
>=C2=A0 =C2=A0 =C2=A0Pi PC.
>
>=C2=A0 =C2=A0 =C2=A0Richard, trying the Armbian image from
>=C2=A0 =C2=A0 =C2=A0https://apt.armbian.c= om/pool/main/l/linux-4.20.7-sunxi/ I get:
>
>=C2=A0 =C2=A0 =C2=A0$ arm-softmmu/qemu-system-arm -M orangepi -m 512 -n= ic user \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-append 'console=3DttyS0,115200&#= 39; \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-kernel boot/vmlinuz-4.20.7-sunxi \ >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-dtb usr/lib/linux-image-dev-sunxi/su= n8i-h3-orangepi-pc.dtb \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-serial stdio -d unimp
>=C2=A0 =C2=A0 =C2=A0Uncompressing Linux... done, booting the kernel. >=C2=A0 =C2=A0 =C2=A0rtc: unimplemented device write (size 4, value 0x16= aa0001, offset 0x0)
>=C2=A0 =C2=A0 =C2=A0rtc: unimplemented device read (size 4, offset 0x0)=
>=C2=A0 =C2=A0 =C2=A0rtc: unimplemented device read (size 4, offset 0x0)=
>=C2=A0 =C2=A0 =C2=A0rtc: unimplemented device read (size 4, offset 0x8)=
>=C2=A0 =C2=A0 =C2=A0qemu-system-arm: target/arm/helper.c:11359: cpu_get= _tb_cpu_state:
>=C2=A0 =C2=A0 =C2=A0Assertion `flags =3D=3D rebuild_hflags_internal(env= )' failed.
>=C2=A0 =C2=A0 =C2=A0Aborted (core dumped)
>
>
> I'm trying to reproduce the error you reported here with my patch = set on
> latest master,
> but so far without any result. The host OS I'm using is Ubuntu 18.= 04.3
> LTS on x86_64.
> I ran several times using the same 4.20.7-sunxi kernel and same comman= d
> line.
>
> Some questions that might help:
> 1) Are there any specific steps you did in order to produce this error= ?

I build QEMU with:

./configure --enable-trace-backends=3Dlog --extra-cflags=3D-ggdb --enable-d= ebug

> 2) Could this be a known / existing issue?
> 3) How many times did you see this error?

Always

> 4) Are you also using Ubuntu 18.04.3 LTS on x86_64, or a different hos= t OS?

Host is Fedora 30.

OK thanks, I will tr= y again using the info above after I finished reworking the other patch com= ments.

Niek
=C2=A0

>
> Regards,
> Niek



--
Niek Linnenbank

--000000000000465c4f05995f2266--