Skip to contentSkip to conversation

Linux 3.4, VersatilePB and PCI

Qemu-devel Marc Marí 2 participants 5 messages Jan 13, 2015

lore
Share & tools
lore

Marc Marí

author
#0 lore raw

Hi

In short:
I have a Linux 3.4 kernel on top of a VersatilePB machine that fails to mount root file system with message:

sym53c8xx 0000:00:0c.0: BAR 0: can't reserve [io 0x44000000-0x440000ff]

after booting with:

qemu-system-arm -M versatilepb -serial telnet::4444,server -kernel vmlinuz-3.4.0 -initrd initrd.img-3.4.0 -hda hda.img -hdb hdb.img -append "console=ttyAMA0 root=/dev/sda1"

In long:
I have a VersatilePB machine with Debian and Linux 3.2 on top. I downloaded Linux 3.4 and, inside the machine (no cross-compilation, to avoid any little issues), I copied the actual 3.2 config to the new kernel, run menuconfig, just changed SCSI ACARD support (because it does not compile in 3.4) and kernel compression to GZIP, and run make-kpkg --initrd kernel_image (Debian-specific tools, to avoid any little issues). When it finished, I installed the resulting .deb, and in the host I copied the /boot/vmlinuz-3.4.0 and the /boot/initrd-3.4.0 from the guest, and tried to boot again. Initrd will fail to mount root file system with the message above.

But if I do exactly the same process with a Linux 3.2.0 it does work.

Am I doing something wrong with the kernels? Or is this a bug either in QEMU or Linux? I'd like a bit of help in, at least, knowing if the error is anything related with QEMU.

Thanks
Marc

#1 lore raw
Quoted 6 lines · Marc Marí

Hi

In short:
I have a Linux 3.4 kernel on top of a VersatilePB machine that fails to mount root file system with message:

Quoted 7 lines

sym53c8xx 0000:00:0c.0: BAR 0: can't reserve [io 0x44000000-0x440000ff]

after booting with:

qemu-system-arm -M versatilepb -serial telnet::4444,server -kernel vmlinuz-3.4.0 -initrd initrd.img-3.4.0 -hda hda.img -hdb hdb.img -append "console=ttyAMA0 root=/dev/sda1"

3.4 is pretty ancient; have you tried a newer kernel?

-- PMM

author
#2 lore raw
Quoted 13 lines · El Tue, 13 Jan 2015 10:06:00 +0000 Peter Maydell <[email protected]>…
Quoted 11 lines · Marc Marí

Hi

In short:
I have a Linux 3.4 kernel on top of a VersatilePB machine that fails to mount root file system with message:

sym53c8xx 0000:00:0c.0: BAR 0: can't reserve [io
0x44000000-0x440000ff]

after booting with:

Quoted 7 lines
Quoted 3 lines

qemu-system-arm -M versatilepb -serial telnet::4444,server -kernel vmlinuz-3.4.0 -initrd initrd.img-3.4.0 -hda hda.img -hdb hdb.img -append "console=ttyAMA0 root=/dev/sda1"

3.4 is pretty ancient; have you tried a newer kernel?

-- PMM

I was fearing that answer :). No, I can't. I want to compare the behaviour of a "normal" Linux 3.4 with another modified Linux 3.4, and the second one is fixed.

And is not that ancient, it only has 2.5 years :)

Thanks
Marc

#3 lore raw
Quoted 5 lines · Marc Marí

I was fearing that answer :). No, I can't. I want to compare the behaviour of a "normal" Linux 3.4 with another modified Linux 3.4, and the second one is fixed.

And is not that ancient, it only has 2.5 years :)

In that case you'll need to debug the issue like you would any other "kernel misbehaving" issue -- figure out what the kernel is doing to cause it to print that message, identify whether that's because the kernel itself is buggy or because QEMU's hardware emulation is buggy, and go from there...

There were a number of bugfixes applied to the versatile PCI controller code at some point after 3.4, so I wouldn't be very surprised if the answer turns out to be "this is just broken in 3.4".

In particular, commit 9b0f7e39923 which isn't in 3.4 AFAIK basically says "we broke I/O access", which is probably what you're running into. I expect you'll need other fixes too.

So you can try to find and cherry-pick the necessary fixes, which could be painful, or you can move to a newer kernel which already has them.

-- PMM

author
#4 lore raw
Quoted 19 lines · El Tue, 13 Jan 2015 10:46:20 +0000 Peter Maydell <[email protected]>…
Quoted 5 lines · Marc Marí

I was fearing that answer :). No, I can't. I want to compare the behaviour of a "normal" Linux 3.4 with another modified Linux 3.4, and the second one is fixed.

And is not that ancient, it only has 2.5 years :)

In that case you'll need to debug the issue like you would any other "kernel misbehaving" issue -- figure out what the kernel is doing to cause it to print that message, identify whether that's because the kernel itself is buggy or because QEMU's hardware emulation is buggy, and go from there...

There were a number of bugfixes applied to the versatile PCI controller code at some point after 3.4, so I wouldn't be very surprised if the answer turns out to be "this is just broken in 3.4".

Quoted 7 lines

In particular, commit 9b0f7e39923 which isn't in 3.4 AFAIK basically says "we broke I/O access", which is probably what you're running into. I expect you'll need other fixes too.

So you can try to find and cherry-pick the necessary fixes, which could be painful, or you can move to a newer kernel which already has them.

Thank you very much. I didn't know where to start looking, so I was lost. This helps me find my way again.

Thanks
Marc