From nobody Tue Feb 10 20:48:18 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) client-ip=209.85.128.53; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f53.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1613936554; cv=none; d=zohomail.com; s=zohoarc; b=i03GU3wFJ/uHe6QIV0tJ263Q275EW3dqfgo2j2ZwB+vI75NiBxlSQhrVBRjKmLGx+UABtsFUv3Y96DYwO+5p3L1MgOqdJhO3EAE4FULL8NJco8z53R18SjeD6gvZ9o06F4WSCpyOs46xQ4Qo28fNk5CJVn2DBI3l//W/Uw9IavU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613936554; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Mz2JvmknQ3dcMHeKvY6Ttas9KYnc1Ho2yP2kBlQDSJ8=; b=Ww/JB7FgrR9zA5Ai2WAb0MKcnk/Qy7tafpFXHsITD4DQn0em2rEWxYZnyki1d57HuszaJIMQvOJv8J5mmYxFnk+Uk0U4HwY38cn+0pEUoJw0ftEovnt8MzCjkjNpvuECNDNo+fJPaSWyYl4YacoWj3AMLx6Un/atRi5XDFi8gGU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mx.zohomail.com with SMTPS id 16139365544899.264884730697645; Sun, 21 Feb 2021 11:42:34 -0800 (PST) Received: by mail-wm1-f53.google.com with SMTP id l13so2947575wmg.5 for ; Sun, 21 Feb 2021 11:42:33 -0800 (PST) Return-Path: Return-Path: Received: from localhost.localdomain (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id j2sm2966848wrt.81.2021.02.21.11.42.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Feb 2021 11:42:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mz2JvmknQ3dcMHeKvY6Ttas9KYnc1Ho2yP2kBlQDSJ8=; b=t7pRm7XLFR3vjLjBmJ3VmWSSt49tj+sfgsBEyVgItTOlnzuDtwYPe4zg9miBcn9fjA +24/wN1nPn7y/QJoK3fhBfAVc9mEqFqrT/wBY3jYPUfwsVdNVpzHe15EpCmnD74qJ/I6 VtY/vYqhMNglxRJuEQtrPAP2JJ80dF9w0v5T9fgYZnfaobz0a0WJP2AZC22e9XdY4hVm GFshAp41r5NBwCXCYu7N1YeDvpbSipVic5p6+2y3WDE73vS3E0pOOiLQnPpuFddR5apA 9YjYtwR4Ercsd3B9N72V6OMFY+T6AjDasJpvnS9LpJsjPMOZUbbUavU/3kOTRB2R0X/H 9D6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Mz2JvmknQ3dcMHeKvY6Ttas9KYnc1Ho2yP2kBlQDSJ8=; b=MOw7d4c8XiOvx2ZavxRe/FgNub3kTGHtKqH0oZTGkq2kiqqh/OCCyY/hYw0Co0huFH hOsfwW+Wt/AOLAteZFInp0RulhN09vAtw6E0et6L0hn31LDmcs+xkR8feirARuRs7I6n 2HXQ190sgZKpEhqvx2sZkIwp7cw/5FcxEv6gbbCtH1Y7i7k6y+H2WsFe47molM4qc13t BNmwH+qoRXxsL8vA90EzRevWZYftUYMgY+Mw63PJVqFIW7hhqwwmeTY/4eKi0lJ+aB3/ AaBElZtE7+V3NPwwDmETOMajKconh5Op16JTOwHEv0RCiBpVzNkppypTfn4ja7k1xo8c DvvQ== X-Gm-Message-State: AOAM532FZWXj3INprKv6d+chUtFtFINaUuQ8lKyRY5z3FTWnnZlMb419 psDrqyqT15A6krwrmkaUUJw= X-Google-Smtp-Source: ABdhPJza39cHYpw86X7FELRXhwuoRsx2csXWKxoOQ+6NZZItthSF5z5KSqIzubgVlprIUJ7ajK2t5g== X-Received: by 2002:a1c:c388:: with SMTP id t130mr17211658wmf.107.1613936552545; Sun, 21 Feb 2021 11:42:32 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , BALATON Zoltan , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cleber Rosa , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta Subject: [PULL v2 07/43] tests/acceptance: Test PMON with Loongson-3A1000 CPU Date: Sun, 21 Feb 2021 20:38:51 +0100 Message-Id: <20210221193851.2528045-3-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210221193851.2528045-1-f4bug@amsat.org> References: <20210221193851.2528045-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) From: Jiaxun Yang Test booting of PMON bootloader on loongson3-virt platform. $ (venv) AVOCADO_ALLOW_UNTRUSTED_CODE=3D1 \ avocado --show=3Dapp,console \ run -t machine:loongson3-virt tests/acceptance Fetching asset from tests/acceptance/machine_mips_loongson3v.py:MipsLoongso= n3v.test_pmon_serial_console JOB ID : 8e202b3727847c9104d0d3d6546ed225d35f6706 JOB LOG : /home/flygoat/avocado/job-results/job-2021-01-12T10.02-8e202b3= /job.log (1/1) tests/acceptance/machine_mips_loongson3v.py:MipsLoongson3v.test_pmon= _serial_console: console: PMON2000 MIPS Initializing. Standby... console: 00000000Jump to 9fc console: Init Memory done. console: The uncache data is: console: 00000000: 5555555555555555 console: 00000008: aaaaaaaaaaaaaaaa console: 00000010: 3333333333333333 console: 00000018: cccccccccccccccc console: 00000020: 7777777777777777 console: 00000028: 8888888888888888 console: 00000030: 1111111111111111 console: 00000038: eeeeeeeeeeeeeeee console: The cached data is: console: 00000000: 5555555555555555 console: 00000008: aaaaaaaaaaaaaaaa console: 00000010: 3333333333333333 console: 00000018: cccccccccccccccc console: 00000020: 7777777777777777 console: 00000028: 8888888888888888 console: 00000030: 1111111111111111 console: 00000038: eeeeeeeeeeeeeeee console: Copy PMON to execute location... console: start =3D 0x8f900000 console: s0 =3D 0x30300000 console: _edata =3D 0x8f989010 console: _end =3D 0x8f98a028copy text section done. console: Copy PMON to execute location done. console: sp=3D8f8fc000 console: Uncompressing Bios................................................= ............................OK,Booting Bios console: FREQ console: DONE console: DEVI console: ENVI console: MAPV console: NVRAM@8f7ff898 console: STDV console: 80100000: memory between 8f7ff400-8f800000 is already been alloc= ated,heap is already above this point console: SBDD console: P12PCIH console: PCIH console: PCID console: setting up 1 bus console: PCI bus 0 slot 1: probe...completed console: PCI bus 0 slot 1/0: vendor/product: 0x106b/0x003f (serialbus, USB,= interface: 0x10, revision: 0x00) console: PCI bus 0 slot 1/0: reg 0x10 =3D 0xffffff00 console: PCI bus 0 slot 2: probe...completed console: PCI bus 0 slot 2/0: vendor/product: 0x1af4/0x1000 (network, ethern= et, interface: 0x00, revision: 0x00) console: PCI bus 0 slot 2/0: reg 0x10 =3D 0xffffffe1 console: PCI bus 0 slot 2/0: reg 0x14 =3D 0xfffff000 console: PCI bus 0 slot 2/0: reg 0x20 =3D 0xffffc00c console: PCI bus 0 slot 2/0: reg 0x30 =3D 0xfffc0000 console: PCI bus 0 slot 3: probe...completed console: PCI bus 0 slot 4: probe...completed console: PCI bus 0 slot 5: probe...completed console: PCI bus 0 slot 6: probe...completed console: PCI bus 0 slot 7: probe...completed console: PCI bus 0 slot 8: probe...completed console: PCI bus 0 slot 9: probe...completed console: PCI bus 0 slot 10: probe...completed console: PCI bus 0 slot 11: probe...completed console: PCI bus 0 slot 12: probe...completed console: PCI bus 0 slot 13: probe...completed console: PCI bus 0 slot 14: probe...completed console: PCI bus 0 slot 15: probe...completed console: PCI bus 0 slot 16: probe...completed console: PCI bus 0 slot 17: probe...completed console: PCI bus 0 slot 18: probe...completed console: PCI bus 0 slot 19: probe...completed console: PCI bus 0 slot 20: probe...completed console: PCI bus 0 slot 21: probe...completed console: PCI bus 0 slot 22: probe...completed console: PCI bus 0 slot 23: probe...completed console: PCI bus 0 slot 24: probe...completed console: PCI bus 0 slot 25: probe...completed console: PCI bus 0 slot 26: probe...completed console: PCI bus 0 slot 27: probe...completed console: PCI bus 0 slot 28: probe...completed console: PCI bus 0 slot 29: probe...completed console: PCI bus 0 slot 30: probe...completed console: PCI bus 0 slot 31: probe...completed console: PCIS console: PCIR console: PCIW console: PCI bus 0 slot 2/0: mem @0x40000000, reg 0x30 262144 bytes console: PCI bus 0 slot 2/0: mem @0x40040000, reg 0x20 16384 bytes console: PCI bus 0 slot 2/0: mem @0x40044000, reg 0x14 4096 bytes console: PCI bus 0 slot 1/0: mem @0x40045000, reg 0x10 256 bytes console: PCI bus 0 slot 2/0: exp @0x40000000, 262144 bytes console: PCI bus 0 slot 2/0: i/o @0x00004000, reg 0x10 32 bytes console: NETI console: RTCL console: PCID console: VGAI console: memorysize=3Dc000000,base=3D8f6ff508,sysMem=3D8f6ef500 console: in setup_int_vect!done!VESA console: vga bios init failed, rc=3D-1 console: in configure console: mainbus0 (root) console: localbus0 at mainbus0 console: loopdev0 at mainbus0pcibr0 at mainbus0 console: pci0 at pcibr0 bus 0 console: ohci0 at pci0 dev 1 function 0 vendor/product: 0x106b/0x003f (seri= albus, USB, interface: 0x10, revision: 0x00)usb base addr : 0xc0045000, bus= _base is : 0xc0000000 console: OHCI revision: 0x00000010 console: RH: a: 0x00000203 b: 0x00000000 console: early period(0x0) console: OHCI 8c01ec00 initialized ok console: New Device 0 console: usb_get_descriptor console: bLength =3D 12 console: bDescriptorType =3D1 console: bcdUSB =3D 110 console: bDeviceClass =3D9 console: bDeviceSubClass =3D0 console: bDeviceProtocol =3D0 console: bMaxPacketSize0 =3D8 console: set address 1 console: usb_get_descriptor console: bLength =3D 12 console: bDescriptorType =3D1 console: bcdUSB =3D 110 console: bDeviceClass =3D9 console: bDeviceSubClass =3D0 console: bDeviceProtocol =3D0 console: bMaxPacketSize0 =3D8 console: idVendor =3D0 console: idProduct =3D0 console: bcdDevice =3D0 console: iManufacturer=3D0 console: iProduct =3D1 console: iSerialNumber=3D0 console: bNumConfigurations=3D1 console: usb_get_descriptor console: usb_get_descriptor console: get_conf_no 0 Result 25, wLength 25 console: if 0, ep 0 console: bLength=3D9 console: bDescriptorType=3D2 console: wTotalLength=3D19 console: bNumInterfaces=3D1 console: bConfigurationValue=3D1 console: iConfiguration=3D0 console: bmAttributes=3D40 console: MaxPower=3D0 console: 09 04 00 00 01 09 00 00 00 07 05 81 03 02 00 ff console: ##EP epmaxpacketin[1] =3D 2 console: set configuration 1 console: new device strings: Mfr=3D0, Product=3D1, SerialNumber=3D0 console: USB device number 1 default language ID 0x409 console: Manufacturer console: Product OHCI Root Hub console: SerialNumber console: New Device 1 console: usb_get_descriptor console: bLength =3D 12 console: bDescriptorType =3D1 console: bcdUSB =3D 200 console: bDeviceClass =3D0 console: bDeviceSubClass =3D0 console: bDeviceProtocol =3D0 console: bMaxPacketSize0 =3D8 console: set address 2 console: usb_get_descriptor console: bLength =3D 12 console: bDescriptorType =3D1 console: bcdUSB =3D 200 console: bDeviceClass =3D0 console: bDeviceSubClass =3D0 console: bDeviceProtocol =3D0 console: bMaxPacketSize0 =3D8 console: idVendor =3D627 console: idProduct =3D1 console: bcdDevice =3D0 console: iManufacturer=3D1 console: iProduct =3D4 console: iSerialNumber=3Db console: bNumConfigurations=3D1 console: usb_get_descriptor console: usb_get_descriptor console: get_conf_no 0 Result 34, wLength 34 console: unknown Description Type : 21 console: 09 21 11 01 00 01 22 3F 00 console: if 0, ep 0 console: bLength=3D9 console: bDescriptorType=3D2 console: wTotalLength=3D22 console: bNumInterfaces=3D1 console: bConfigurationValue=3D1 console: iConfiguration=3D8 console: bmAttributes=3Da0 console: MaxPower=3D32 console: 09 04 00 00 01 03 01 01 00 09 21 11 01 00 01 22 3f 00 07 05 81 03 = 08 00 0a console: ##EP epmaxpacketin[1] =3D 8 console: set configuration 1 console: new device strings: Mfr=3D1, Product=3D4, SerialNumber=3D11 console: USB device number 2 default language ID 0x409 console: Manufacturer QEMU console: Product QEMU USB Keyboard console: SerialNumber 68284-0000:00:01.0-1 console: drive at ohci0 devnum 2, Product QEMU USB Keyboard console: not configured console: New Device 2 console: usb_get_descriptor console: bLength =3D 12 console: bDescriptorType =3D1 console: bcdUSB =3D 200 console: bDeviceClass =3D0 console: bDeviceSubClass =3D0 console: bDeviceProtocol =3D0 console: bMaxPacketSize0 =3D8 console: set address 3 console: usb_get_descriptor console: bLength =3D 12 console: bDescriptorType =3D1 console: bcdUSB =3D 200 console: bDeviceClass =3D0 console: bDeviceSubClass =3D0 console: bDeviceProtocol =3D0 console: bMaxPacketSize0 =3D8 console: idVendor =3D627 console: idProduct =3D1 console: bcdDevice =3D0 console: iManufacturer=3D1 console: iProduct =3D3 console: iSerialNumber=3Da console: bNumConfigurations=3D1 console: usb_get_descriptor console: usb_get_descriptor console: get_conf_no 0 Result 34, wLength 34 console: unknown Description Type : 21 console: 09 21 01 00 00 01 22 4A 00 console: if 0, ep 0 console: bLength=3D9 console: bDescriptorType=3D2 console: wTotalLength=3D22 console: bNumInterfaces=3D1 console: bConfigurationValue=3D1 console: iConfiguration=3D7 console: bmAttributes=3Da0 console: MaxPower=3D32 console: 09 04 00 00 01 03 00 00 00 09 21 01 00 00 01 22 4a 00 07 05 81 03 = 08 00 0a console: ##EP epmaxpacketin[1] =3D 8 console: set configuration 1 console: new device strings: Mfr=3D1, Product=3D3, SerialNumber=3D10 console: USB device number 3 default language ID 0x409 console: Manufacturer QEMU console: Product QEMU USB Tablet console: SerialNumber 28754-0000:00:01.0-2 console: drive at ohci0 devnum 3, Product QEMU USB Tablet console: not configured console: drive at ohci0 devnum 1, Product OHCI Root Hub console: not configured console: vendor/product: 0x1af4/0x1000 (network, ethernet, interface: 0x00,= revision: 0x00) at pci0 dev 2 function 0 not configured console: out configure console: Press to set BIOS,waiting for 3 seconds here..... console: devconfig done. console: ifinit done. console: domaininit done. console: init_proc.... console: HSTI console: SYMI console: SBDE console: [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[= [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ console: [[ [[[[[[[[[ [[[[[ [[[[ [[[[[ [[[[[ [[[[[ = [[[[[ [[[[ [[[[[ [[ console: [[ [[[[[[[[ [[[[ [[[ [[[[ [[[ [[[[ [[[[ [[[[ [[[ [[= [[ [[[ [[[[ [[[ [[[[ [[ console: [[ [[[[[[[[ [[[[[[ [[[ [[[[[[ [[[ [ [[[ [[[ [[[[[[[[[[[[ = [[[[[[[ [[[[[[ [[[ [ [[[ [[ console: [[ [[[[[[[[ [[[[[[ [[[ [[[[[[ [[[ [[ [[ [[[ [[[ [[[[[[[ = [[[[ [[[[[[ [[[ [[ [[ [[ console: [[ [[[[[[[[ [[[[[[ [[[ [[[[[[ [[[ [[[ [ [[[ [[[[[ [[[[[[[[= [[ [[[ [[[[[[ [[[ [[[ [ [[ console: [[ [[[[[[[[ [[[[ [[[ [[[[ [[[ [[[[ [[[ [[[[ [[[ [[= [ [[[[ [[[[ [[[ [[[[ [[ console: [[ [[[[ [[[[[ [[[[ [[[[[ [[[[ [[[[[ = [[[[[[ [[[[ [[[[[ [[ console: [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[2011 Loongson][[[[[[[[[[[[= [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ console: Configuration [Bonito,EL,NET,SCSI,IDE] console: Version: PMON2000 3.3 (Bonito) #0: Tue Dec 22 01:58:09 UTC 2020 co= mmit b3ece66234adbf7d4e453f0ba4f326c099ac2a76 Author: Jiaxun Yang Date: Tue Dec 22 09:51:10 2020 +0800 . console: Supported loaders [txt, srec, elf, bin] console: Supported filesystems [net, fat, fs, disk, iso9660, socket, tty, r= am] console: This software may be redistributed under the BSD copyright. console: Copyright 2000-2002, Opsycon AB, Sweden. console: Copyright 2005, ICT CAS. console: CPU GODSON3 BogoMIPS: 1327 PASS (3.89 s) RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CA= NCEL 0 JOB TIME : 4.38 s Signed-off-by: Jiaxun Yang Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210112020708.62922-1-jiaxun.yang@flygoat.com> [PMD: Set timeout to 60sec, simply test for ''CPU GODSON3 BogoMIPS'] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 1 + tests/acceptance/machine_mips_loongson3v.py | 39 +++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 tests/acceptance/machine_mips_loongson3v.py diff --git a/MAINTAINERS b/MAINTAINERS index 5eeba79c5a3..ac411c27f93 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1183,6 +1183,7 @@ F: hw/intc/loongson_liointc.c F: hw/mips/loongson3_bootp.c F: hw/mips/loongson3_bootp.h F: hw/mips/loongson3_virt.c +F: tests/acceptance/machine_mips_loongson3v.py =20 Boston M: Paul Burton diff --git a/tests/acceptance/machine_mips_loongson3v.py b/tests/acceptance= /machine_mips_loongson3v.py new file mode 100644 index 00000000000..85b131a40f0 --- /dev/null +++ b/tests/acceptance/machine_mips_loongson3v.py @@ -0,0 +1,39 @@ +# Functional tests for the Generic Loongson-3 Platform. +# +# Copyright (c) 2021 Jiaxun Yang +# +# This work is licensed under the terms of the GNU GPL, version 2 or later. +# See the COPYING file in the top-level directory. +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os +import time + +from avocado import skipUnless +from avocado_qemu import Test +from avocado_qemu import wait_for_console_pattern + +class MipsLoongson3v(Test): + timeout =3D 60 + + @skipUnless(os.getenv('AVOCADO_ALLOW_UNTRUSTED_CODE'), 'untrusted code= ') + def test_pmon_serial_console(self): + """ + :avocado: tags=3Darch:mips64el + :avocado: tags=3Dendian:little + :avocado: tags=3Dmachine:loongson3-virt + :avocado: tags=3Dcpu:Loongson-3A1000 + :avocado: tags=3Ddevice:liointc + :avocado: tags=3Ddevice:goldfish_rtc + """ + + pmon_hash =3D '7c8b45dd81ccfc55ff28f5aa267a41c3' + pmon_path =3D self.fetch_asset('https://github.com/loongson-commun= ity/pmon/' + 'releases/download/20210112/pmon-3avir= t.bin', + asset_hash=3Dpmon_hash, algorithm=3D'= md5') + + self.vm.set_console() + self.vm.add_args('-bios', pmon_path) + self.vm.launch() + wait_for_console_pattern(self, 'CPU GODSON3 BogoMIPS:') --=20 2.26.2