emulator problems - register_ioport_write invalid opaque

91 views
Skip to first unread message

Razvan Dragomirescu

unread,
Oct 14, 2011, 10:43:01 AM10/14/11
to biffe...@googlegroups.com
Hi everyone,

Since I'm playing with the flash memory I wanted to emulate the Bifferboard just in case I mess things up very badly :). I've followed the instructions on the Wiki to set up the emulator, everything went smoothly until I tried to start the emulator. Here's what I get as output:

root@drazvan-laptop:/disk2/bb-emu/bb/qemu# ./i386-softmmu/qemu -firmware ~drazvan/Desktop/openwrt-rdc-jffs2-64k-bifferboard.img -bios ~drazvan/Desktop/bios.bin
GPIO panel: Connected OK
qemu: hardware error: register_ioport_write: invalid opaque for address 0x40
CPU #0:
EAX=80000003 EBX=01fe7a90 ECX=80000003 EDX=00000cfc
ESI=00000009 EDI=00000900 EBP=80000904 ESP=00006f28
EIP=01fec2a6 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0010 00000000 ffffffff 00cf9300 DPL=0 DS   [-WA]
CS =0008 00000000 ffffffff 00cf9b00 DPL=0 CS32 [-RA]
SS =0010 00000000 ffffffff 00cf9300 DPL=0 DS   [-WA]
DS =0010 00000000 ffffffff 00cf9300 DPL=0 DS   [-WA]
FS =0010 00000000 ffffffff 00cf9300 DPL=0 DS   [-WA]
GS =0010 00000000 ffffffff 00cf9300 DPL=0 DS   [-WA]
LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT
TR =0000 00000000 0000ffff 00008b00 DPL=0 TSS32-busy
GDT=     000fd238 00000037
IDT=     000fdb80 00000000
CR0=00000011 CR2=00000000 CR3=00000000 CR4=00000000
DR0=00000000 DR1=00000000 DR2=00000000 DR3=00000000
DR6=ffff0ff0 DR7=00000400
EFER=0000000000000000
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
FPR2=0000000000000000 0000 FPR3=0000000000000000 0000
FPR4=0000000000000000 0000 FPR5=0000000000000000 0000
FPR6=0000000000000000 0000 FPR7=0000000000000000 0000
XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000
XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000
XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000
XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000
Aborted

Any clues? I've also tried with my compiled version of seabios, same error occurs. This is under Ubuntu 9.04, running in a VirtualBox machine. I do have the GPIO panel.py running.

Thanks,
Razvan

--
Razvan Dragomirescu
Chief Technology Officer
Cayenne Graphics SRL

Andrew Scheller

unread,
Oct 14, 2011, 11:04:29 AM10/14/11
to biffe...@googlegroups.com
> Since I'm playing with the flash memory I wanted to emulate the Bifferboard just in case I mess things up very badly :)

Have you got BiffJTAG? ;)

> root@drazvan-laptop:/disk2/bb-emu/bb/qemu# ./i386-softmmu/qemu -firmware
> ~drazvan/Desktop/openwrt-rdc-jffs2-64k-bifferboard.img -bios
> ~drazvan/Desktop/bios.bin

[snip]


> Any clues? I've also tried with my compiled version of seabios, same error
> occurs. This is under Ubuntu 9.04, running in a VirtualBox machine. I do
> have the GPIO panel.py running.

Which particular version of Qemu are you using? The latest one (from
Biff's "bb" github repo) is unable to read the kernel from the
firmware image directly, it needs to be supplied as a separate command
flag. See the "make run" target:
https://github.com/bifferos/bb/blob/master/Makefile


Ahhh, looks like the instructions on
http://sites.google.com/site/bifferboard/Home/howto/qemu need to be
updated... ;-)

Lurch

Razvan Dragomirescu

unread,
Oct 14, 2011, 11:40:15 AM10/14/11
to biffe...@googlegroups.com
Ok, so if I have a kernel + initramfs in the same file, I need to use both -firmware and -kernel pointing to this file? Like "qemu -kernel bzImage -firmware bzImage"?
 
And yes, the instructions see to be a bit outdated :), feel free to change them :). This is my first try at the emulator, it was just easier to run stuff on the actual hardware until now, but messing with the flash can brick the board (and no, I don't have BiffJTAG, my bad :( ).
 
Thanks,
R.


--
Razvan Dragomirescu
Chief Technology Officer
Cayenne Graphics SRL



--
To unsubscribe send email to bifferboard...@googlegroups.com

Andrew Scheller

unread,
Oct 14, 2011, 11:57:15 AM10/14/11
to biffe...@googlegroups.com
> Ok, so if I have a kernel + initramfs in the same file, I need to use both
> -firmware and -kernel pointing to this file? Like "qemu -kernel bzImage
> -firmware bzImage"?

I *think* in that case you'd just need to give the -kernel bzImage and
then skip the -firmware flag. I think the -firmware is only if you're
using mtd. But you'll need to make sure that the -kmax parameter
(equivalent to kernelmax in BiffBoot) is big enough to include your
whole kernel + initramfs bzImage file.
Hmm, but as you're testing writing-to-flash, you may want to give a
'blank' file to -firmware (which will get saved-on-qemu-exit).

> stuff on the actual hardware until now, but messing with the flash can brick
> the board (and no, I don't have BiffJTAG, my bad :( ).

As long as you don't overwrite/erase/blank biffboot (i.e. the top 64K
sector) you _should_ be okay...

Lurch

Razvan Dragomirescu

unread,
Oct 14, 2011, 4:43:24 PM10/14/11
to biffe...@googlegroups.com
Thanks Andrew, you were right, only -kernel is needed. I was able to boot up my firmware using the parameters from the "make run" target from https://github.com/bifferos/bb/blob/master/Makefile . Very nice...
 
Best,
Razvan


--
Razvan Dragomirescu
Chief Technology Officer
Cayenne Graphics SRL



Lurch

biff...@yahoo.co.uk

unread,
Oct 15, 2011, 7:25:46 AM10/15/11
to Bifferboard

On Oct 14, 4:57 pm, Andrew Scheller <ya...@loowis.durge.org> wrote:
> As long as you don't overwrite/erase/blank biffboot (i.e. the top 64K
> sector) you _should_ be okay...

Come to think of it I'm not sure there'll be any warning from Qemu if
you do try to write to that area. Might be worth giving it a try just
to see. Another feature I should probably add.

cheers,
Biff.
Reply all
Reply to author
Forward
0 new messages