MIPS patches for 2021-01-04
The following changes since commit e551455f1e7a3d7eee9e11e2903e4050bc5511ae:
Merge remote-tracking branch 'remotes/stefanha-gitlab/tags/block-pull-request' into staging (2021-01-04 15:02:53 +0000)
are available in the Git repository at:
https://gitlab.com/philmd/qemu.git tags/mips-20210104
for you to fetch changes up to 457027298749333047bf81a856ce95ea5f9dccd9:
tests/acceptance: Test boot_linux_console for fuloong2e (2021-01-04 23:36:03 +0100)
Since v1:
- Fixed memory leak reported by Peter
----------------------------------------------------------------
MIPS patches queue
- Use PCI macros (Philippe Mathieu-Daudé)
- Clean up VT82C686B south bridge (BALATON Zoltan)
- Introduce clock_ticks_to_ns() (Peter Maydell)
- Add Loongson-3 machine (Huacai Chen)
- Make addresses used by bootloader unsigned (Jiaxun Yang)
- Clean fuloong2e PROM environment (Jiaxun Yang)
- Add integration test of fuloong2e booting Linux (Jiaxun Yang)
----------------------------------------------------------------
BALATON Zoltan (12):
vt82c686: Rename AC97/MC97 parts from VT82C686B to VIA
vt82c686: Remove unnecessary _DEVICE suffix from type macros
vt82c686: Rename VT82C686B to VT82C686B_ISA
vt82c686: Remove vt82c686b_[am]c97_init() functions
vt82c686: Split off via-[am]c97 into separate file in hw/audio audio/via-ac97: Simplify code and set user_creatable to false
vt82c686: Remove legacy vt82c686b_isa_init() function
vt82c686: Remove legacy vt82c686b_pm_init() function
vt82c686: Convert debug printf to trace points
vt82c686: Remove unneeded includes and defines
vt82c686: Use shorter name for local variable holding object state
vt82c686: Rename superio config related parts
Huacai Chen (5):
hw/intc: Rework Loongson LIOINTC
hw/mips: Implement fw_cfg_arch_key_name()
hw/mips: Add Loongson-3 boot parameter helpers
hw/mips: Add Loongson-3 machine support
docs/system: Update MIPS machine documentation
Jiaxun Yang (8):
hw/mips: Make bootloader addresses unsigned hw/mips/malta: Use address translation helper to calculate
bootloader_run_addr
hw/mips: Use address translation helper to handle ENVP_ADDR hw/mips/fuloong2e: Remove define DEBUG_FULOONG2E_INIT hw/mips/fuloong2e: Replace faulty documentation links hw/mips/fuloong2e: Remove unused env entry hw/mips/fuloong2e: Correct cpuclock in PROM environment tests/acceptance: Test boot_linux_console for fuloong2e
Peter Maydell (4):
clock: Introduce clock_ticks_to_ns()
target/mips: Don't use clock_get_ns() in clock period calculation
clock: Remove clock_get_ns()
clock: Define and use new clock_display_freq()
Philippe Mathieu-Daudé (6):
hw/pci-host: Use the PCI_BUILD_BDF() macro from 'hw/pci/pci.h' hw/pci-host/uninorth: Use the PCI_FUNC() macro from 'hw/pci/pci.h'
hw: Use the PCI_SLOT() macro from 'hw/pci/pci.h'
hw: Use the PCI_DEVFN() macro from 'hw/pci/pci.h' hw/pci-host/bonito: Display hexadecimal value with '0x' prefix hw/pci-host/bonito: Use pci_config_set_interrupt_pin()
docs/devel/clocks.rst | 51 +- docs/system/target-mips.rst | 10 + default-configs/devices/mips64el-softmmu.mak | 1 + hw/mips/fw_cfg.h | 19 + hw/mips/loongson3_bootp.h | 241 +++++++ include/hw/clock.h | 53 +- include/hw/intc/loongson_liointc.h | 22 + include/hw/isa/vt82c686.h | 12 +- hw/arm/virt.c | 3 +- hw/audio/via-ac97.c | 93 +++ hw/core/clock.c | 6 + hw/hppa/dino.c | 2 +- hw/i386/xen/xen-hvm.c | 2 +- hw/intc/loongson_liointc.c | 36 +- hw/isa/piix3.c | 2 +- hw/isa/vt82c686.c | 267 ++------ hw/mips/fuloong2e.c | 69 +- hw/mips/fw_cfg.c | 35 + hw/mips/gt64xxx_pci.c | 2 +- hw/mips/loongson3_bootp.c | 151 +++++ hw/mips/loongson3_virt.c | 638 +++++++++++++++++++ hw/mips/malta.c | 88 +-- hw/mips/mipssim.c | 8 +- hw/pci-host/bonito.c | 14 +- hw/pci-host/pnv_phb4.c | 2 +- hw/pci-host/ppce500.c | 2 +- hw/pci-host/uninorth.c | 8 +- hw/ppc/ppc4xx_pci.c | 2 +- hw/sh4/sh_pci.c | 2 +- softmmu/qdev-monitor.c | 6 +- target/mips/cpu.c | 4 +- MAINTAINERS | 3 + hw/audio/meson.build | 1 + hw/isa/trace-events | 6 + hw/mips/Kconfig | 15 + hw/mips/meson.build | 2 + tests/acceptance/boot_linux_console.py | 21 + 37 files changed, 1537 insertions(+), 362 deletions(-) create mode 100644 hw/mips/fw_cfg.h create mode 100644 hw/mips/loongson3_bootp.h create mode 100644 include/hw/intc/loongson_liointc.h create mode 100644 hw/audio/via-ac97.c create mode 100644 hw/mips/fw_cfg.c create mode 100644 hw/mips/loongson3_bootp.c create mode 100644 hw/mips/loongson3_virt.c
Signature · 1 line
2.26.2
[PULL v2 26/35] hw/mips: Add Loongson-3 machine support
From: Huacai Chen <[email protected]>
Add Loongson-3 based machine support, it use liointc as the interrupt controler and use GPEX as the pci controller. Currently it can work with both TCG and KVM.
As the machine model is not based on any exiting physical hardware, the name of the machine is "loongson3-virt". It may be superseded in future by a real machine model. If this happens, then a regular deprecation procedure shall occur for "loongson3-virt" machine.
We now already have a full functional Linux kernel (based on Linux-5.4.x LTS) here:
https://github.com/chenhuacai/linux
Of course the upstream kernel is also usable (the kvm host side and guest side have both been upstream in Linux-5.9):
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
How to use QEMU/Loongson-3?
1, Download kernel source from the above URL;
2, Build a kernel with arch/mips/configs/loongson3_defconfig;
3, Boot a Loongson-3A4000 host with this kernel (for KVM mode);
4, Build QEMU-master with this patchset;
5, modprobe kvm (only necessary for KVM mode);
6, Use QEMU with TCG:
qemu-system-mips64el -M loongson3-virt,accel=tcg -cpu Loongson-3A1000 -kernel <path_to_kernel> -append ...
Use QEMU with KVM:
qemu-system-mips64el -M loongson3-virt,accel=kvm -cpu Loongson-3A4000 -kernel <path_to_kernel> -append ...
The "-cpu" parameter is optional here and QEMU will use the correct type for TCG/KVM automatically.
Message-Id: <[email protected]>
[PMD: Set TYPE_LOONGSON_MACHINE instance_size in TypeInfo,
select FW_CFG_MIPS in Kconfig]
--- default-configs/devices/mips64el-softmmu.mak | 1 + hw/mips/loongson3_virt.c | 638 +++++++++++++++++++ MAINTAINERS | 1 + hw/mips/Kconfig | 12 + hw/mips/meson.build | 2 +- 5 files changed, 653 insertions(+), 1 deletion(-) create mode 100644 hw/mips/loongson3_virt.c
default-configs/devices/mips64el-softmmu.mak +1 -0
@@ -3,6 +3,7 @@ include mips-softmmu-common.mak CONFIG_IDE_VIA=y CONFIG_FULOONG=y +CONFIG_LOONGSON3V=y CONFIG_ATI_VGA=y CONFIG_RTL8139_PCI=y CONFIG_JAZZ=y
hw/mips/loongson3_virt.c new file +638 -0
638 lines not on this page · raw message
MAINTAINERS +1 -0
@@ -1161,6 +1161,7 @@ S: Maintained F: hw/intc/loongson_liointc.c F: hw/mips/loongson3_bootp.c F: hw/mips/loongson3_bootp.h +F: hw/mips/loongson3_virt.c Boston M: Paul Burton <[email protected]>
hw/mips/Kconfig +12 -0
@@ -32,6 +32,18 @@ config FULOONG bool select PCI_BONITO +config LOONGSON3V + bool + imply VIRTIO_VGA + imply QXL if SPICE + select SERIAL + select GOLDFISH_RTC + select LOONGSON_LIOINTC + select PCI_DEVICES + select PCI_EXPRESS_GENERIC_BRIDGE + select MSI_NONBROKEN + select FW_CFG_MIPS + config MIPS_CPS bool select PTIMER
hw/mips/meson.build +1 -1
@@ -2,7 +2,7 @@ mips_ss.add(files('mips_int.c')) mips_ss.add(when: 'CONFIG_FW_CFG_MIPS', if_true: files('fw_cfg.c')) mips_ss.add(when: 'CONFIG_FULOONG', if_true: files('fuloong2e.c')) -mips_ss.add(when: 'CONFIG_LOONGSON3V', if_true: files('loongson3_bootp.c')) +mips_ss.add(when: 'CONFIG_LOONGSON3V', if_true: files('loongson3_bootp.c', 'loongson3_virt.c')) mips_ss.add(when: 'CONFIG_JAZZ', if_true: files('jazz.c')) mips_ss.add(when: 'CONFIG_MALTA', if_true: files('gt64xxx_pci.c', 'malta.c')) mips_ss.add(when: 'CONFIG_MIPSSIM', if_true: files('mipssim.c'))
Signature · 1 line
2.26.2
Peter Maydell
AppliedQuoted 27 lines · Philippe Mathieu-Daudé
The following changes since commit
e551455f1e7a3d7eee9e11e2903e4050bc5511ae:Merge remote-tracking branch 'remotes/stefanha-gitlab/tags/block-pull-request' into staging (2021-01-04 15:02:53 +0000)
are available in the Git repository at:
https://gitlab.com/philmd/qemu.git tags/mips-20210104
for you to fetch changes up to
457027298749333047bf81a856ce95ea5f9dccd9:tests/acceptance: Test
boot_linux_consolefor fuloong2e (2021-01-04 23:36:03 +0100)Since v1:
- Fixed memory leak reported by Peter----------------------------------------------------------------
MIPS patches queue- Use PCI macros (Philippe Mathieu-Daudé)
- Clean up VT82C686B south bridge (BALATON Zoltan)
- Introduceclock_ticks_to_ns()(Peter Maydell)
- Add Loongson-3 machine (Huacai Chen)
- Make addresses used by bootloader unsigned (Jiaxun Yang)
- Clean fuloong2e PROM environment (Jiaxun Yang)
- Add integration test of fuloong2e booting Linux (Jiaxun Yang)
Quoted 1 line
----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/6.0
for any user-visible changes.
-- PMM