[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 0/5] Raspberry Pi framebuffer, DMA and Window
From: |
Andrew Baumann |
Subject: |
Re: [Qemu-devel] [PATCH v3 0/5] Raspberry Pi framebuffer, DMA and Windows support |
Date: |
Wed, 16 Mar 2016 23:01:07 +0000 |
> From: Peter Maydell [mailto:address@hidden
> Sent: Wednesday, 16 March 2016 9:54 AM
>
> On 8 March 2016 at 20:05, Andrew Baumann
> <address@hidden> wrote:
> > This patch series adds support for the AUX (second UART), framebuffer
> > and DMA controller on Raspberry Pi 2, and enables booting Windows on
> > this device. As with the previous series, it is heavily based on the
> > original (out of tree) work of Gregory Estrade, Stefan Weil and others
> > to support Raspberry Pi 1.
> >
> > After this series, it is possible to boot Windows by following the
> > instructions at https://github.com/0xabu/qemu/wiki. You also boot
> > Raspbian to the GUI using a command such as:
> >
> > qemu-system-arm -M raspi2 -kernel raspbian-boot/kernel7.img -sd
> > 2015-09-24-raspbian-jessie.img -append "rw earlyprintk loglevel=8
> > console=ttyAMA0 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2
> rootwait"
> > -dtb raspbian-boot/bcm2709-rpi-2-b.dtb -serial stdio
>
> So I tried something like this, and the kernel gives a WARNING with
> a backtrace, and then hangs:
>
> [ 5.413943] VFP support v0.3: implementor 41 architecture 4 part 30
> variant f rev 0
> [ 5.976888] pinctrl core: initialized pinctrl subsystem
> [ 6.171197] NET: Registered protocol family 16
> [ 6.286799] DMA: preallocated 4096 KiB pool for atomic coherent allocations
> [ 6.366889] cpuidle: using governor ladder
> [ 6.391665] cpuidle: using governor menu
> [ 6.401604] bcm2709.uart_clock = 3000000
> [ 6.478063] ------------[ cut here ]------------
> [ 6.481052] WARNING: CPU: 0 PID: 1 at
> /build/buildd/linux-3.18.0/arch/arm/mach-bcm2709/armctrl.c:148
> armctrl_xlate+0x188/0x274()
> [ 6.484474] Modules linked in:
> [ 6.489783] CPU: 0 PID: 1 Comm: swapper/0 Not tainted
> 3.18.0-20-rpi2 #21-Ubuntu
> [ 6.502781] [<80016ab0>] (unwind_backtrace) from [<800129d0>]
> (show_stack+0x10/0x14)
> [ 6.506355] [<800129d0>] (show_stack) from [<805fee10>]
> (dump_stack+0x9c/0xd4)
> [ 6.508946] [<805fee10>] (dump_stack) from [<80026ed8>]
> (warn_slowpath_common+0x70/0x8c)
> [ 6.511251] [<80026ed8>] (warn_slowpath_common) from [<80026f90>]
> (warn_slowpath_null+0x1c/0x24)
> [ 6.512797] [<80026f90>] (warn_slowpath_null) from [<80022044>]
> (armctrl_xlate+0x188/0x274)
> [ 6.514558] [<80022044>] (armctrl_xlate) from [<8007399c>]
> (irq_create_of_mapping+0x64/0x110)
> [ 6.517173] [<8007399c>] (irq_create_of_mapping) from [<804c4ef4>]
> (irq_of_parse_and_map+0x24/0x2c)
> [ 6.518741] [<804c4ef4>] (irq_of_parse_and_map) from [<804c4f14>]
> (of_irq_to_resource+0x18/0xb8)
> [ 6.520209] [<804c4f14>] (of_irq_to_resource) from [<804c4ff0>]
> (of_irq_to_resource_table+0x3c/0x54)
> [ 6.523598] [<804c4ff0>] (of_irq_to_resource_table) from
> [<804c25b8>] (of_device_alloc+0xd8/0x180)
> [ 6.528838] [<804c25b8>] (of_device_alloc) from [<804c26a8>]
> (of_platform_device_create_pdata+0x48/0x98)
> [ 6.535352] [<804c26a8>] (of_platform_device_create_pdata) from
> [<804c27f0>] (of_platform_bus_create+0xec/0x3ac)
> [ 6.539440] [<804c27f0>] (of_platform_bus_create) from [<804c2860>]
> (of_platform_bus_create+0x15c/0x3ac)
> [ 6.541217] [<804c2860>] (of_platform_bus_create) from [<804c2c28>]
> (of_platform_populate+0x5c/0xa0)
> [ 6.542770] [<804c2c28>] (of_platform_populate) from [<8088cad8>]
> (bcm2709_init+0x64/0x3fc)
> [ 6.546211] [<8088cad8>] (bcm2709_init) from [<80888870>]
> (customize_machine+0x20/0x40)
> [ 6.547711] [<80888870>] (customize_machine) from [<800088bc>]
> (do_one_initcall+0xd8/0x208)
> [ 6.549200] [<800088bc>] (do_one_initcall) from [<80885ef4>]
> (kernel_init_freeable+0x1fc/0x29c)
> [ 6.551771] [<80885ef4>] (kernel_init_freeable) from [<805f9298>]
> (kernel_init+0x8/0xf0)
> [ 6.553319] [<805f9298>] (kernel_init) from [<8000efe8>]
> (ret_from_fork+0x14/0x2c)
> [ 6.556670] ---[ end trace 088ba587f0a009cc ]---
> [ 6.649948] No ATAGs?
> [ 6.658029] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4
> watchpoint registers.
> [ 6.660393] hw-breakpoint: maximum watchpoint size is 8 bytes.
> [ 6.664206] mailbox: Broadcom VideoCore Mailbox driver
> [ 6.693912] bcm2708_vcio: mailbox at f300b880
> [ 6.703745] bcm_power: Broadcom power driver
> [ 6.707642] bcm_power_open() -> 0
> [ 6.708671] bcm_power_request(0, 8)
>
> Does that look familiar? (My first guess is just that it wants some
> bit of hardware we haven't got a device model for yet. I haven't
> tried to investigate at all yet.)
I haven't seen that, probably because I was doing all my testing with an older
release (2015-09-24). There appear to be two problems. The warning is something
related to the interrupt controller, but it's hard to tell exactly what's wrong
there because the function in question (armctl_xlate) doesn't appear to do any
hardware access. The bcm_power_request wedge should be expected for anything
that tries to interact with power management, because we don't model that
device yet (the older Pi2 kernels didn't touch it).
However, I don't seem to be able to repro this. What exactly were you booting?
On the current Raspbian (2016-02-26-raspbian-jessie-lite), I run into a
different bug, with stalled MMC commands:
[ 9.167683] mmc0: command never completed.
[ 9.172133] mmc0:>cmd op 52 arg 0xc00 flags 0x195 - resp 00000000 00000000
00000000 00000000, err 0
[ 9.180379] mmc0: =========== REGISTER DUMP ===========
[ 9.187193] mmc0: SDCMD 0x00008034
[ 9.190113] mmc0: SDARG 0x00000c00
[ 9.192952] mmc0: SDTOUT 0x00f00000
[ 9.196064] mmc0: SDCDIV 0x0000026f
[ 9.199091] mmc0: SDRSP0 0x00000000
[ 9.201915] mmc0: SDRSP1 0x00000000
[ 9.204915] mmc0: SDRSP2 0x00000000
[ 9.207672] mmc0: SDRSP3 0x00000000
[ 9.210453] mmc0: SDHSTS 0x000007f8
[ 9.213612] mmc0: SDVDD 0x00000001
[ 9.216977] mmc0: SDEDM 0x00010800
[ 9.219728] mmc0: SDHCFG 0x0000040a
[ 9.222666] mmc0: SDHBCT 0x00000000
[ 9.228116] mmc0: SDHBLC 0x00000000
[ 9.230866] mmc0: ===========================================
Cheers,
Andrew
- [Qemu-devel] [PATCH v3 0/5] Raspberry Pi framebuffer, DMA and Windows support, Andrew Baumann, 2016/03/08
- [Qemu-devel] [PATCH v3 3/5] bcm2835_fb: add framebuffer device for Raspberry Pi, Andrew Baumann, 2016/03/08
- [Qemu-devel] [PATCH v3 1/5] bcm2835_peripherals: enable sdhci pending-insert quirk for raspberry pi, Andrew Baumann, 2016/03/08
- [Qemu-devel] [PATCH v3 4/5] bcm2835_property: implement framebuffer control/configuration properties, Andrew Baumann, 2016/03/08
- [Qemu-devel] [PATCH v3 2/5] bcm2835_aux: add emulation of BCM2835 AUX (aka UART1) block, Andrew Baumann, 2016/03/08
- [Qemu-devel] [PATCH v3 5/5] bcm2835_dma: add emulation of Raspberry Pi DMA controller, Andrew Baumann, 2016/03/08
- Re: [Qemu-devel] [PATCH v3 0/5] Raspberry Pi framebuffer, DMA and Windows support, Peter Maydell, 2016/03/16
- Re: [Qemu-devel] [PATCH v3 0/5] Raspberry Pi framebuffer, DMA and Windows support, Peter Maydell, 2016/03/16
- Re: [Qemu-devel] [PATCH v3 0/5] Raspberry Pi framebuffer, DMA and Windows support,
Andrew Baumann <=