Re: [Qemu-devel] PMON2000 compilation and kernel question
Hello, On Mon, 18 Mar 2019, John Snow wrote: On 3/6/19 11:01 AM, Andrew Randrianasulu wrote: This could be some missing or buggy emulation. Maybe if you can get some debug logs from kernel that could tell what it's doing. Usually at least -d unimp,guest_errors options are recommended for debugging but if nothing is printed then it's harder to find out what's causing the hang. This was kernel dying in ata subsystem: I'm very late to the party here; but you could try enabling tracing for No you're not late, we still haven't figured it out. Thanks for your interest. the ATA code and that might give a better picture as to what's going wrong; warning that if you enable every last trace it does get QUITE chatty (it includes data IO dumps) but it might give us a better picture. See hw/ide/trace-events and try enabling everything except the events labeled "verbose" as a first step. I'm attaching logs of a command like this: qemu-system-mips64el -M fulong2e -vga std -kernel vmlinuz -append 'console=ttyS0' -cdrom debian-8.11.0-mipsel-netinst.iso -serial stdio -d guest_errors,unimp,trace:'ide*',trace:'bmdma*',trace:'cd*' with repeated lines replaced with "count line" as in uniq -c -u and removed things not related to ide for brevity. (The -vga std is needed to avoid a kernel oops before it touches ide which is discussed here: http://lists.nongnu.org/archive/html/qemu-devel/2019-03/msg05169.html) It looks like that PIO mode works but DMA doesn't. I've reproduced similar issue on another platform with via-ide and Andrew reported similar with the pmon formware on mips so it can be a bug in via-ide which might be something I did not implement correctly when trying to change it to emulate PCI native mode. Unfortunately I don't know what might be missing or wrong not knowing how bmdma works so if you can tell from the log or have some insight it is greatly appreciated. Thank you, BALATON Zoltan fu-ide-uniq.log.xz Description: Binary data
Re: [Qemu-devel] PMON2000 compilation and kernel question
On 3/6/19 11:01 AM, Andrew Randrianasulu wrote: >> This could be some missing or buggy emulation. Maybe if you can get some >> debug logs from kernel that could tell what it's doing. Usually at least -d >> unimp,guest_errors options are recommended for debugging but if nothing is >> printed then it's harder to find out what's causing the hang. > > This was kernel dying in ata subsystem: > I'm very late to the party here; but you could try enabling tracing for the ATA code and that might give a better picture as to what's going wrong; warning that if you enable every last trace it does get QUITE chatty (it includes data IO dumps) but it might give us a better picture. See hw/ide/trace-events and try enabling everything except the events labeled "verbose" as a first step. > [1.34] io scheduler noop registered > [1.34] io scheduler deadline registered > [1.34] io scheduler cfq registered (default) > [1.352000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled > [1.388000] console [ttyS0] disabled > [1.424000] serial8250.0: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) > is a 16550A > [1.432000] console [ttyS0] enabled > [1.432000] console [ttyS0] enabled > [1.432000] bootconsole [early0] disabled > [1.432000] bootconsole [early0] disabled > [1.472000] scsi0 : pata_via > [1.476000] scsi1 : pata_via > [1.48] ata1: PATA max UDMA/100 cmd 0x4450 ctl 0x4460 bmdma 0x4440 > [1.484000] ata2: PATA max UDMA/100 cmd 0x4458 ctl 0x4464 bmdma 0x4448 > [1.524000] serio: i8042 KBD port at 0x60,0x64 irq 1 > [1.524000] serio: i8042 AUX port at 0x60,0x64 irq 12 > [1.532000] mousedev: PS/2 mouse device common for all mice > [1.552000] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0 > [1.552000] rtc_cmos rtc_cmos: alarms up to one day, 114 bytes nvram > [1.556000] ledtrig-cpu: registered to indicate activity on CPUs > [1.556000] TCP: cubic registered > [1.56] NET: Registered protocol family 10 > [1.588000] mip6: Mobile IPv6 > [1.588000] NET: Registered protocol family 17 > [1.588000] mpls_gso: MPLS GSO support > [1.596000] registered taskstats version 1 > [1.612000] rtc_cmos rtc_cmos: setting system clock to 2019-03-06 15:48:12 > UTC (1551887292) > [1.684000] input: AT Raw Set 2 keyboard as > /devices/platform/i8042/serio0/input/input0 > [1.724000] ata1.00: ATA-7: QEMU HARDDISK, 2.5+, max UDMA/100 > [1.724000] ata1.00: 204800 sectors, multi 16: LBA48 > [1.728000] ata1.00: limited to UDMA/33 due to 40-wire cable > [1.736000] ata1.00: configured for UDMA/33 > [1.796000] scsi 0:0:0:0: Direct-Access ATA QEMU HARDDISK2.5+ > PQ: 0 ANSI: 5 > [1.82] sd 0:0:0:0: [sda] 204800 512-byte logical blocks: (104 MB/100 > MiB) > [1.832000] sd 0:0:0:0: [sda] Write Protect is off > [1.836000] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, > doesn't support DPO or FUA > [1.864000] Data bus error, epc == 804157d8, ra == 804f7ddc > [1.864000] Oops[#1]: > > for > > mips64el-softmmu/qemu-system-mips64el -M fulong2e -kernel > /dev/shm/boot/vmlinux-3.16.0-4-loongson-2e -hda /dev/shm/LONGSOON_disk > -cdrom /dev/shm/debian-8.0.0-mipsel-xfce-CD-1.iso -nographic -d > unimp,guest_errors -append "console=ttyS0" > VMLINUX_3.16.log 2>&1 > > and without ata disk but with just CD it moved into 'normal' panic (no root > device) > > [1.48] console [ttyS0] enabled > [1.48] console [ttyS0] enabled > [1.484000] bootconsole [early0] disabled > [1.484000] bootconsole [early0] disabled > [1.524000] scsi0 : pata_via > [1.528000] scsi1 : pata_via > [1.532000] ata1: PATA max UDMA/100 cmd 0x4450 ctl 0x4460 bmdma 0x4440 > [1.536000] ata2: PATA max UDMA/100 cmd 0x4458 ctl 0x4464 bmdma 0x4448 > [1.58] serio: i8042 KBD port at 0x60,0x64 irq 1 > [1.584000] serio: i8042 AUX port at 0x60,0x64 irq 12 > [1.596000] mousedev: PS/2 mouse device common for all mice > [1.616000] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0 > [1.616000] rtc_cmos rtc_cmos: alarms up to one day, 114 bytes nvram > [1.62] ledtrig-cpu: registered to indicate activity on CPUs > [1.624000] TCP: cubic registered > [1.624000] NET: Registered protocol family 10 > [1.648000] mip6: Mobile IPv6 > [1.652000] NET: Registered protocol family 17 > [1.652000] mpls_gso: MPLS GSO support > [1.656000] registered taskstats version 1 > [1.688000] rtc_cmos rtc_cmos: setting system clock to 2019-03-06 15:50:38 > UTC (1551887438) > [1.752000] input: AT Raw Set 2 keyboard as > /devices/platform/i8042/serio0/input/input0 > [1.912000] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100 > [1.916000] ata2.00: limited to UDMA/33 due to 40-wire cable > [1.924000] ata2.00: configured for UDMA/33 > [2.604000] input: ImExPS/2 Generic Explorer Mouse as >
Re: [Qemu-devel] PMON2000 compilation and kernel question
On Thu, 7 Mar 2019, Andrew Randrianasulu wrote: distorted screen was when I tried 800x600 or 32 bpp The screen resolution this binary tried to set was 640x480x16 but it used two screens, one at offset 0 which was not set up correctly due to flat panel registers not emulated and another for CRT at 0x500 which is outside VRAM. The window was switched to 640x480 but showed picture of the screen at 0 with wrong depth/stride so it showed at 4x size with dots instead of correct image. Maybe it could be fixed by emulating flat panel part of the chip but that's not used on the fulong2e so the pmon.bin should not set that up and should not put CRT outside of VRAM so I think config of this pmon was not correct for fulong2e. sha256sum /dev/shm/pmon-my/pmon/zloader.2edev/pmon.bin ecc82c621c33d140ac1ba01a70876f467e47a7cc9eb154a0647c227355d39e60 /dev/shm/pmon-my/pmon/zloader.2edev/pmon.bin The one you've sent to me was: $ sha256sum pmon.bin 4f2fdb964cb386a8ba5340b5be7744c974b76b521ce940105c0c76c6387b pmon.bin mac99 machine with your ati-vga device look like this (after upgrading X and r128 driver) https://ibin.co/4ZKLzg90dFZA.png note again, this is with NoAccel (while strangely overlay still around via xvinfo) NoAccel just disables 2D but not overlay I think. Chip supports overlay but it's not emulated yet (plan to look at that after 2D) so any guest driver using it will probably not get picture for overlay (if it's not crashing due to unexpected data from device). Regards, BALATON Zoltan
Re: [Qemu-devel] PMON2000 compilation and kernel question
> Checked off-list, just for the record: looks like your compiled binary tries > to set up a flat-panel display besides the CRT but flat-panel part of GPU is > not modelled and with both screens pmon tries to put CRT screen at an 80MB > offset which can't work as chip has only 16MB VRAM. This results in distorted > screen. I'm not sure why it does that but it shouldn't try to use flat-panel > display at the first place because fulong2e mini-pc QEMU tries to emulate is > not a laptop and has no flat panel. The pmon_2e.bin binary does not do this > and only creates a CRT screen at offset 0 so I think the config used to > compile pmon is not right yet. May be I send you wrong binary :/ sorry, will double-check distorted screen was when I tried 800x600 or 32 bpp sha256sum /dev/shm/pmon-my/pmon/zloader.2edev/pmon.bin ecc82c621c33d140ac1ba01a70876f467e47a7cc9eb154a0647c227355d39e60 /dev/shm/pmon-my/pmon/zloader.2edev/pmon.bin https://ibin.co/4ZKKU0t9xNDE.png - image I got. mac99 machine with your ati-vga device look like this (after upgrading X and r128 driver) https://ibin.co/4ZKLzg90dFZA.png note again, this is with NoAccel (while strangely overlay still around via xvinfo)
Re: [Qemu-devel] PMON2000 compilation and kernel question
On Thu, 7 Mar 2019, Andrew Randrianasulu wrote: To find out if the compiled firmware does something different with the GPU chip you can enable ati-vga traces with -trace enable="ati*" that should print register accesses (there's also a define for even more debug messages in ati_int.h). You could compare those to see if the binary does something else with the GPU. hm, did this, used 'diff -y' for comparing output. It seems my version does a lot more Checked off-list, just for the record: looks like your compiled binary tries to set up a flat-panel display besides the CRT but flat-panel part of GPU is not modelled and with both screens pmon tries to put CRT screen at an 80MB offset which can't work as chip has only 16MB VRAM. This results in distorted screen. I'm not sure why it does that but it shouldn't try to use flat-panel display at the first place because fulong2e mini-pc QEMU tries to emulate is not a laptop and has no flat panel. The pmon_2e.bin binary does not do this and only creates a CRT screen at offset 0 so I think the config used to compile pmon is not right yet. Regards, BALATON Zoltan
Re: [Qemu-devel] PMON2000 compilation and kernel question
> What do you mean by DIMM size not detected? Sorry, I mean "No DIMM in slot 1" message. PMON2000 MIPS Initializing. Standby... ERRORPC= CONFIG=00030932 PRID=6302 DIMM read read memory type read number of rows read blocks per ddrram read number of sides read width 0002 No DIMM in slot 1 DIMM SIZE=1000 sdcfg=2d5043df msize=1000 Init SDRAM Done! Sizing caches... Init caches... godson2 caches found Init caches done, cfg = 00030932 Copy PMON to execute location... start = 0x8100 s0 = 0x3ec0 a105 copy text section done. Copy PMON to execute location done. sp=80ffc000Uncompressing BiosOK,Booting Bios [...] with binary I got: PMON2000 MIPS Initializing. Standby... ERRORPC= CONFIG=00030932 PRID=6302 DIMM read 0080 read memory type read number of rows read memory size per side read blocks per ddrram read number of sides read width DIMM SIZE=1000 sdcfg=3d5043df msize=1000 Init SDRAM Done! Sizing caches... Init caches... godson2 caches found Init caches done, cfg = 00030932 Copy PMON to execute location... start = 0x8500 s0 = 0x3ac0 a504 copy text section done. Copy PMON to execute location done. sp=84ffc000Uncompressing BiosOK,Booting Bios As far as I understand those values come from Targets/Bonito2edev/Bonito/start.S #include "i2c.S" beqz msize,.nodimm nop b 2f nop .nodimm: movedbg,a0 PRINTSTR ("\r\nNo DIMM in all slots,use default configure\r\n") li msize,0x1000 li sdCfg,0x055043df /* zgj-8-7-14-13 */ 2: PRINTSTR("DIMM SIZE=") movea0,msize bal hexserial nop PRINTSTR("\r\n") li t0, 0xbff8 sd sdCfg, 0(t0) gx 2006-03-17: mode #li t1,0x20 li t1,0x28 li t0, 0xbff0 sw t1,0(t0) nop li t1,0x0 li t0, 0xbff0 sw t1,0x30(t0) nop and in turn i2c.S has this: Targets/Bonito2edev/Bonito/i2c.S #define i2cread newi2cread li msize,0 PRINTSTR("DIMM read\r\n") /* only one memory slot, slave address is 101b */ li sdCfg,0x0400 /*bit 26Н»·ўКЅ¶БРґК±µДїйДЪЛіРт*/ li a1, 0x0 li a0,0xa1 bal i2cread nop beq v0,0xff,1f nop beq v0,0x80,1f nop move a0,v0 bal hexserial nop PRINTSTR ("\r\nNo DIMM in slot 0 \r\n"); b 2f nop 1: or sdCfg, 0x1<<29 nop li a0,0xa1 bal ii2c_cfg nop 2: li a1, 0x0 li a0,0xa3 bal i2cread nop li a1,0x0 beq v0,0xff,1f nop beq v0,0x80,1f nop move a0,v0 bal hexserial nop PRINTSTR ("\r\nNo DIMM in slot 1 \r\n"); b 2f nop 1: li a0,0xa3 bal ii2c_cfg nop b 2f nop 2: b 211f nop == Ah, it talks about SLOT _1_ ! So, slot _0_ apparently read correctly but config info still not printed by pmon Sorry, I misread output!
Re: [Qemu-devel] PMON2000 compilation and kernel question
On Wed, 6 Mar 2019, Andrew Randrianasulu wrote: It worked fine with binary pmon_2e.bin, and not for my self-compiled version. Still, I'm not sure about what kind of config they used, and at that commit. In this sense newer pmon is more useful because it prints git commit and build date. Probably the binary is a release version maybe built from a stable branch not from the master git. But if a working firmware can be compiled from the git sources available that's probably good enough. To find out if the compiled firmware does something different with the GPU chip you can enable ati-vga traces with -trace enable="ati*" that should print register accesses (there's also a define for even more debug messages in ati_int.h). You could compare those to see if the binary does something else with the GPU. Provided binary talks about pmon 1.1.2 (?) in top left corner. I think one of my earlier self-compiled binaries behaved like this one (printing a lot of pci info), but yes, something still not right at my end because for example DIMM size not detected correctly in my version. What do you mean by DIMM size not detected? RAM in fulong2e is fixed at 256 MB as I wrote before so unless you remove that from mips_fulong2e.c you can't have different RAM size that. With the fixed value removed I got pmon print in env mem=256, highmem=the_rest but don't know where to map highmem so it probably won't work and the highmem area just overlaps io space so Linux will likely crash with this. Regards, BALATON Zoltan
Re: [Qemu-devel] PMON2000 compilation and kernel question
On Wed, 6 Mar 2019, Andrew Randrianasulu wrote: This was kernel dying in ata subsystem: [1.724000] ata1.00: ATA-7: QEMU HARDDISK, 2.5+, max UDMA/100 [1.724000] ata1.00: 204800 sectors, multi 16: LBA48 [1.728000] ata1.00: limited to UDMA/33 due to 40-wire cable [1.736000] ata1.00: configured for UDMA/33 [1.796000] scsi 0:0:0:0: Direct-Access ATA QEMU HARDDISK2.5+ PQ: 0 ANSI: 5 [1.82] sd 0:0:0:0: [sda] 204800 512-byte logical blocks: (104 MB/100 MiB) [1.832000] sd 0:0:0:0: [sda] Write Protect is off [1.836000] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [1.864000] Data bus error, epc == 804157d8, ra == 804f7ddc [1.864000] Oops[#1]: Not sure what is this. mips64el-softmmu/qemu-system-mips64el -M fulong2e -kernel /dev/shm/boot/vmlinux-3.16.0-4-loongson-2e -hda /dev/shm/LONGSOON_disk -cdrom /dev/shm/debian-8.0.0-mipsel-xfce-CD-1.iso -nographic -d unimp,guest_errors -append "console=ttyS0" > VMLINUX_3.16.log 2>&1 and without ata disk but with just CD it moved into 'normal' panic (no root device) [1.912000] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100 [1.916000] ata2.00: limited to UDMA/33 due to 40-wire cable [1.924000] ata2.00: configured for UDMA/33 [2.604000] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input2 [6.928000] ata2.00: qc timeout (cmd 0xa0) [6.928000] ata2.00: TEST_UNIT_READY failed (err_mask=0x4) [7.088000] ata2.00: configured for UDMA/33 [ 12.092000] ata2.00: qc timeout (cmd 0xa0) [ 12.096000] ata2.00: TEST_UNIT_READY failed (err_mask=0x4) [ 12.096000] ata2.00: limiting speed to UDMA/33:PIO3 [ 12.252000] ata2.00: configured for UDMA/33 [ 17.252000] ata2.00: qc timeout (cmd 0xa0) [ 17.252000] ata2.00: TEST_UNIT_READY failed (err_mask=0x4) [ 17.256000] ata2.00: disabled [ 17.26] ata2: soft resetting link [ 17.42] ata2: EH complete [ 17.428000] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6 As I've said I've also seen problems with DMA with via-ide and this also looks like a problem with DMA so it could be a problem with the device model. Previously this only modelled the legacy ide mode which did not work well with PMON, Linux nor what I'm trying to use it for so I've changed it to emulate native mode but could be it's not complete and still missing something for DMA to work. Unfortunately I don't know QEMU that much to tell what may be needed and had no time to try to debug it yet. My guess (which could be all wrong) is that maybe a PCI window is needed for DMA to work otherwise PCI device won't be able to write data to memory which would need mapping some memory region somewhere but I'm not sure how to do that. Maybe you could try enabling ide and bmdma related traces (or debug defines in these devices if any) to get more detailed output on what's happening. Then it's a matter of looking up docs and knowing how it should work and find what's different but that may not be easy for someone who don't know much about this like me. mips64el-softmmu/qemu-system-mips64el -M fulong2e -kernel /dev/shm/vmlinux-2e -cdrom /dev/shm/debian-8.0.0-mipsel-xfce-CD-1.iso -nographic -d unimp,guest_errors -append "console=ttyS0" Hm. Note I skipped adding ati-vga device in those tests, because Debian 3.16 kernel was panicing in radeon code too. The RV100 emulation in ati-vga is even less tested than the default rage128p so it's possible that the Linux radeon driver does not like it yet. I think Gerd Hoffmann has found and debugged a problem with it trying to get values from vgabios which we don't have that can cause a panic. He had some patches to fix that but it's in his own tree only yet. Hopefully the ati-vga can be merged soon and then we can include a better vgabios that works better with the Linux driver. Maybe you should wait for that before trying it more to avoid chasing already known problems. Regards, BALATON Zoltan
Re: [Qemu-devel] PMON2000 compilation and kernel question
> This could be some missing or buggy emulation. Maybe if you can get some > debug logs from kernel that could tell what it's doing. Usually at least -d > unimp,guest_errors options are recommended for debugging but if nothing is > printed then it's harder to find out what's causing the hang. This was kernel dying in ata subsystem: [1.34] io scheduler noop registered [1.34] io scheduler deadline registered [1.34] io scheduler cfq registered (default) [1.352000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [1.388000] console [ttyS0] disabled [1.424000] serial8250.0: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [1.432000] console [ttyS0] enabled [1.432000] console [ttyS0] enabled [1.432000] bootconsole [early0] disabled [1.432000] bootconsole [early0] disabled [1.472000] scsi0 : pata_via [1.476000] scsi1 : pata_via [1.48] ata1: PATA max UDMA/100 cmd 0x4450 ctl 0x4460 bmdma 0x4440 [1.484000] ata2: PATA max UDMA/100 cmd 0x4458 ctl 0x4464 bmdma 0x4448 [1.524000] serio: i8042 KBD port at 0x60,0x64 irq 1 [1.524000] serio: i8042 AUX port at 0x60,0x64 irq 12 [1.532000] mousedev: PS/2 mouse device common for all mice [1.552000] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0 [1.552000] rtc_cmos rtc_cmos: alarms up to one day, 114 bytes nvram [1.556000] ledtrig-cpu: registered to indicate activity on CPUs [1.556000] TCP: cubic registered [1.56] NET: Registered protocol family 10 [1.588000] mip6: Mobile IPv6 [1.588000] NET: Registered protocol family 17 [1.588000] mpls_gso: MPLS GSO support [1.596000] registered taskstats version 1 [1.612000] rtc_cmos rtc_cmos: setting system clock to 2019-03-06 15:48:12 UTC (1551887292) [1.684000] input: AT Raw Set 2 keyboard as /devices/platform/i8042/serio0/input/input0 [1.724000] ata1.00: ATA-7: QEMU HARDDISK, 2.5+, max UDMA/100 [1.724000] ata1.00: 204800 sectors, multi 16: LBA48 [1.728000] ata1.00: limited to UDMA/33 due to 40-wire cable [1.736000] ata1.00: configured for UDMA/33 [1.796000] scsi 0:0:0:0: Direct-Access ATA QEMU HARDDISK2.5+ PQ: 0 ANSI: 5 [1.82] sd 0:0:0:0: [sda] 204800 512-byte logical blocks: (104 MB/100 MiB) [1.832000] sd 0:0:0:0: [sda] Write Protect is off [1.836000] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [1.864000] Data bus error, epc == 804157d8, ra == 804f7ddc [1.864000] Oops[#1]: for mips64el-softmmu/qemu-system-mips64el -M fulong2e -kernel /dev/shm/boot/vmlinux-3.16.0-4-loongson-2e -hda /dev/shm/LONGSOON_disk -cdrom /dev/shm/debian-8.0.0-mipsel-xfce-CD-1.iso -nographic -d unimp,guest_errors -append "console=ttyS0" > VMLINUX_3.16.log 2>&1 and without ata disk but with just CD it moved into 'normal' panic (no root device) [1.48] console [ttyS0] enabled [1.48] console [ttyS0] enabled [1.484000] bootconsole [early0] disabled [1.484000] bootconsole [early0] disabled [1.524000] scsi0 : pata_via [1.528000] scsi1 : pata_via [1.532000] ata1: PATA max UDMA/100 cmd 0x4450 ctl 0x4460 bmdma 0x4440 [1.536000] ata2: PATA max UDMA/100 cmd 0x4458 ctl 0x4464 bmdma 0x4448 [1.58] serio: i8042 KBD port at 0x60,0x64 irq 1 [1.584000] serio: i8042 AUX port at 0x60,0x64 irq 12 [1.596000] mousedev: PS/2 mouse device common for all mice [1.616000] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0 [1.616000] rtc_cmos rtc_cmos: alarms up to one day, 114 bytes nvram [1.62] ledtrig-cpu: registered to indicate activity on CPUs [1.624000] TCP: cubic registered [1.624000] NET: Registered protocol family 10 [1.648000] mip6: Mobile IPv6 [1.652000] NET: Registered protocol family 17 [1.652000] mpls_gso: MPLS GSO support [1.656000] registered taskstats version 1 [1.688000] rtc_cmos rtc_cmos: setting system clock to 2019-03-06 15:50:38 UTC (1551887438) [1.752000] input: AT Raw Set 2 keyboard as /devices/platform/i8042/serio0/input/input0 [1.912000] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100 [1.916000] ata2.00: limited to UDMA/33 due to 40-wire cable [1.924000] ata2.00: configured for UDMA/33 [2.604000] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input2 [6.928000] ata2.00: qc timeout (cmd 0xa0) [6.928000] ata2.00: TEST_UNIT_READY failed (err_mask=0x4) [7.088000] ata2.00: configured for UDMA/33 [ 12.092000] ata2.00: qc timeout (cmd 0xa0) [ 12.096000] ata2.00: TEST_UNIT_READY failed (err_mask=0x4) [ 12.096000] ata2.00: limiting speed to UDMA/33:PIO3 [ 12.252000] ata2.00: configured for UDMA/33 [ 17.252000] ata2.00: qc timeout (cmd 0xa0) [ 17.252000] ata2.00: TEST_UNIT_READY failed (err_mask=0x4) [ 17.256000] ata2.00: disabled [ 17.26] ata2: soft resetting link [ 17.42] ata2: EH complet
Re: [Qemu-devel] PMON2000 compilation and kernel question
> It is ati-vga specific not fulong2e specific and it's entirely possible (even > likely) that my minimal ati-vga emulation is not correct for 2d acceleration > yet but I've tested it with the pmon_2e.bin binary from the same place and it > worked with that. So if it does not work with the binary pmon for you then > that's not the same what I see or if it works with the binary but not with > the one compiled then either you're compiling another version that does > something differently or there's a difference in config. There are several > Bonito configs in pmon and the fulong2e might use another one or different > options. It worked fine with binary pmon_2e.bin, and not for my self-compiled version. Still, I'm not sure about what kind of config they used, and at that commit. In this sense newer pmon is more useful because it prints git commit and build date. Provided binary talks about pmon 1.1.2 (?) in top left corner. I think one of my earlier self-compiled binaries behaved like this one (printing a lot of pci info), but yes, something still not right at my end because for example DIMM size not detected correctly in my version. But it gives prompt at serial console! :} Will look at machine emulation in qemu, and try to configure pmon correctly.
Re: [Qemu-devel] PMON2000 compilation and kernel question
On Wed, 6 Mar 2019, Philippe Mathieu-Daudé wrote: Oh, and sadly my little "disable bitblit" patch was still needed: diff --git a/fb/cfb_console.c b/fb/cfb_console.c index 6663ef7..f29c43f 100644 --- a/fb/cfb_console.c +++ b/fb/cfb_console.c @@ -113,7 +113,7 @@ CONFIG_VIDEO_HW_CURSOR: - Uses the hardware cursor capability of the #define CONFIG_VIDEO_LOGO #defineCONFIG_VIDEO_BMP_LOGO //#define DEBUG_CFG_CONSOLE -#define VIDEO_HW_BITBLT +//#define VIDEO_HW_BITBLT #elif defined(SMI712) #define CONFIG_VIDEO_SW_CURSOR //#define CONFIG_VIDEO_LOGO otherwise pmon was not scrolling help text or any messages up. This doesn't seem PMON related but a feature of the fulong2e that QEMU doesn't model yet. It is ati-vga specific not fulong2e specific and it's entirely possible (even likely) that my minimal ati-vga emulation is not correct for 2d acceleration yet but I've tested it with the pmon_2e.bin binary from the same place and it worked with that. So if it does not work with the binary pmon for you then that's not the same what I see or if it works with the binary but not with the one compiled then either you're compiling another version that does something differently or there's a difference in config. There are several Bonito configs in pmon and the fulong2e might use another one or different options. Regards, BALATON Zoltan
Re: [Qemu-devel] PMON2000 compilation and kernel question
On Wed, 6 Mar 2019, Andrew Randrianasulu wrote: I was compiling those pmons for last two days, and I happy to say most of my hackery was unnecessary. Thanks. Just a few quick notes. After this , I run resulted pmon like this (using Zoltan's patch for ati-vga device on top of current qemu): mips64el-softmmu/qemu-system-mips64el -M fulong2e -cpu Loongson-2E -m 1G -bios /dev/shm/pmon-my/pmon/zloader.2edev/pmon.bin -device ati-vga,model=rv100 -hda /dev/shm/LONGSOON_disk -cdrom /dev/shm/debian-8.0.0-mipsel-xfce-CD-1.iso -display sdl,gl=on I think you don't need -cpu option as board will set that anyway and probably does not work with anything else. Also -m 1G is useless as memory is currently fixed at 256 MB (see comment in mips_fulong2e.c:298) due to me not knowing where to map highmem on mips in general or this board in particular. If that's fixed and the line with the comment is removed you may be able to use more than 256 MB RAM but not yet. it can see both disk and CD, but sadly I was unable to find any working kernel?! vmlinux-2e just hangs early, and vmlinux-3.16.0-4-loongson-2e extracted from debian pkg hangs a litle latter in boot process. Tried without -m option, and with 2F CPU. I mean even with just -kernel, no bios involved. This could be some missing or buggy emulation. Maybe if you can get some debug logs from kernel that could tell what it's doing. Usually at least -d unimp,guest_errors options are recommended for debugging but if nothing is printed then it's harder to find out what's causing the hang. Also, while I was able to compile-in uhci support, adding usb-kbd device freezes pmon. And newly-added EHCI support apparently limited to only some CPUs/boards :/ At least I was unable to compile pmon in this config and with mod_usb_ehci. No idea about that but the default ps2 kbd and mouse that's set up by the board should work so maybe it's not important and you should not need usb for kbd. Regards, BALATON Zoltan
Re: [Qemu-devel] PMON2000 compilation and kernel question
On 3/6/19 11:21 AM, Andrew Randrianasulu wrote: > Hello, all. > > I was compiling those pmons for last two days, and I happy to say most of my > hackery was > unnecessary. > > Just unpack pmon_1c.tar.gz and toolchain-pmon.tar.bz2 > compile tools in pmon/tools (just make), create directory > /opt/pmon2000/tools, install tools, > be sure /opt/pmon2000/tools/bin in your $PATH, put compiler in > /usr/local/comp, put build.sh > script from unpacked toolchain tree into pmon.zloader dir, reset tree (git > checkout -b label) > to some known or desired commit Excellent! Helpful notes. > few of them I tested: > > 9048810a267835e8efb0496fd99884bd500c43a0 > > 17471780223332a7016959bcb9784ba249bd8660 > > dd26466da98371470af957993a600719466305f9 > > for last one you probably want to revert "move highmemcpy highset into lib.", > because it was breaking zloader.2edev compilation for me. > > Now, most of my hacks were unnecessary, you can just use this Bonito file > in Targets/Bonito2edev/conf/: > > == > # $Id: Bonito,v 1.1.1.1 2006/09/14 01:59:09 root Exp $ # # GENERIC > configuration for Galileo EV64240 # # This file is supposed to be included > by target file after # endian has been defined. > # > machine Bonito2edevmips# CPU Architecture, Platform > config pmon > > # > # Define target endian > # > makeoptions ENDIAN=EL # Little endian version. > > > #include "conf/GENERIC_ALL" > > # > # System Name and Target Name > # > option SYSTYPE="\"Bonito\"" > option TARGETNAME="\"Bonito\"" > > # > # Platform options > # > option BONITOEL > option DEVBD2E > option MIPS > option INET > > select mod_flash_amd # AMD flash device programming > select mod_flash_intel # intel flash device programming > select mod_flash_sst # intel flash device programming > select mod_debugger# Debugging module > select mod_symbols # Symbol table handling > select mod_s3load # Srecord loading > #select mod_fastload# LSI Fastload > select mod_elfload # ELF loading > > # > # Command selection. Selects pmon commands > # > select cmd_newmt > select cmd_setup > select mod_display > select cmd_about # Display info about PMON > select cmd_boot# Boot wrapper > select cmd_mycmd > select cmd_xmodem > select ramfiles > select cmd_newmt > select cmd_cache # Cache enabling > #select cmd_call# Call a function command > select cmd_date# Time of day command > select cmd_env # Full blown environment command set > select cmd_flash # Flash programming cmds > select cmd_hist# Command history > select cmd_ifaddr # Interface address command > select cmd_l # Disassemble > select cmd_mem # Memory manipulation commands > select cmd_more# More paginator > select cmd_mt # Simple memory test command > select cmd_misc# Reboot & Flush etc. > #select cmd_stty# TTY setings command > select cmd_tr # Host port-through command > select cmd_devls # Device list > select cmd_set # As cmd_env but not req. cmd_hist > select cmd_testdisk > select cmd_test > select pmon_zmodem_rz > # > select cmd_shell # Shell commands, vers, help, eval > # > # > # Platform options > # > select mod_uart_ns16550# Standard UART driver > #option CONS_BAUD=B9600 > option CONS_BAUD=B115200 > select ext2 > select fatfs > #select mod_x86emu # X86 emulation for VGA > option MY40IO > #select mod_x86emu_int10 > select mod_vgacon > select mod_framebuffer > option X640x480 > option CONFIG_VIDEO_16BPP > option NOPCINAMES # Save some space for x86emu > #option FASTBOOT > select vt82c686#via686a/b code > > # > # Functional options. > # > option NOSNOOP # Caches are no-snooping > > # > # HAVE options. What tgt level provide > # > option HAVE_TOD# Time-Of-Day clock > option HAVE_NVENV # Platform has non-volatile env mem > option HAVE_LOGO # Output splash logo > option USE_SUPERIO_UART > #option USE_LEGACY_RTC > #option GODSONEV2A > #option LINUX_PC > #option LONGMENG > option RADEON7
[Qemu-devel] PMON2000 compilation and kernel question
Hello, all. I was compiling those pmons for last two days, and I happy to say most of my hackery was unnecessary. Just unpack pmon_1c.tar.gz and toolchain-pmon.tar.bz2 compile tools in pmon/tools (just make), create directory /opt/pmon2000/tools, install tools, be sure /opt/pmon2000/tools/bin in your $PATH, put compiler in /usr/local/comp, put build.sh script from unpacked toolchain tree into pmon.zloader dir, reset tree (git checkout -b label) to some known or desired commit few of them I tested: 9048810a267835e8efb0496fd99884bd500c43a0 17471780223332a7016959bcb9784ba249bd8660 dd26466da98371470af957993a600719466305f9 for last one you probably want to revert "move highmemcpy highset into lib.", because it was breaking zloader.2edev compilation for me. Now, most of my hacks were unnecessary, you can just use this Bonito file in Targets/Bonito2edev/conf/: == # $Id: Bonito,v 1.1.1.1 2006/09/14 01:59:09 root Exp $ # # GENERIC configuration for Galileo EV64240 # # This file is supposed to be included by target file after # endian has been defined. # machine Bonito2edevmips# CPU Architecture, Platform config pmon # # Define target endian # makeoptions ENDIAN=EL # Little endian version. #include "conf/GENERIC_ALL" # # System Name and Target Name # option SYSTYPE="\"Bonito\"" option TARGETNAME="\"Bonito\"" # # Platform options # option BONITOEL option DEVBD2E option MIPS option INET select mod_flash_amd # AMD flash device programming select mod_flash_intel # intel flash device programming select mod_flash_sst # intel flash device programming select mod_debugger# Debugging module select mod_symbols # Symbol table handling select mod_s3load # Srecord loading #select mod_fastload# LSI Fastload select mod_elfload # ELF loading # # Command selection. Selects pmon commands # select cmd_newmt select cmd_setup select mod_display select cmd_about # Display info about PMON select cmd_boot# Boot wrapper select cmd_mycmd select cmd_xmodem select ramfiles select cmd_newmt select cmd_cache # Cache enabling #select cmd_call# Call a function command select cmd_date# Time of day command select cmd_env # Full blown environment command set select cmd_flash # Flash programming cmds select cmd_hist# Command history select cmd_ifaddr # Interface address command select cmd_l # Disassemble select cmd_mem # Memory manipulation commands select cmd_more# More paginator select cmd_mt # Simple memory test command select cmd_misc# Reboot & Flush etc. #select cmd_stty# TTY setings command select cmd_tr # Host port-through command select cmd_devls # Device list select cmd_set # As cmd_env but not req. cmd_hist select cmd_testdisk select cmd_test select pmon_zmodem_rz # select cmd_shell # Shell commands, vers, help, eval # # # Platform options # select mod_uart_ns16550# Standard UART driver #option CONS_BAUD=B9600 option CONS_BAUD=B115200 select ext2 select fatfs #select mod_x86emu # X86 emulation for VGA option MY40IO #select mod_x86emu_int10 select mod_vgacon select mod_framebuffer option X640x480 option CONFIG_VIDEO_16BPP option NOPCINAMES # Save some space for x86emu #option FASTBOOT select vt82c686#via686a/b code # # Functional options. # option NOSNOOP # Caches are no-snooping # # HAVE options. What tgt level provide # option HAVE_TOD# Time-Of-Day clock option HAVE_NVENV # Platform has non-volatile env mem option HAVE_LOGO # Output splash logo option USE_SUPERIO_UART #option USE_LEGACY_RTC #option GODSONEV2A #option LINUX_PC #option LONGMENG option RADEON7000 #option DEBUG_EMU_VGA option AUTOLOAD #option CONFIG_PCI0_LARGE_MEM #option CONFIG_PCI0_HUGE_MEM #option CONFIG_PCI0_GAINT_MEM option CONFIG_CACHE_64K_4WAY option NVRAM_IN_FLASH # # Now the Machine specification # mainbus0at root localbus0 at mainbus0 #fd0 at mainbu