qemu-system-loongarch64 加载新固件运行linux 5.18内核,进入ramdisk命令行环境
qemu主程序、固件和内核下载地址:
https://github.com/yangxiaojuan-loongson/qemu-binary
运行信息节选:
固件启动部分
...
QemuLoadKernelImage: command line: "root=/dev/ram rdinit=/sbin/init console=ttyS0,115200 initrd=initrd"
[Bds]Stop Hotkey Service!
[Bds]UnregisterKeyNotify: 000C/0000 Success
[Bds]UnregisterKeyNotify: 0017/0000 Success
[Bds]UnregisterKeyNotify: 0000/000D Success
EFI stub: Booting Linux Kernel...
EFI stub: Generating empty DTB
EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path
EFI stub: Exiting boot services...
SetUefiImageMemoryAttributes - 0x000000017EEC0000 - 0x0000000000040000 (0x0000000000000000)
SetUefiImageMemoryAttributes - 0x000000017EE20000 - 0x0000000000040000 (0x0000000000000000)
SetUefiImageMemoryAttributes - 0x000000017ED80000 - 0x0000000000040000 (0x0000000000000000)
SetUefiImageMemoryAttributes - 0x000000017ECE0000 - 0x0000000000040000 (0x0000000000000000)
SetUefiImageMemoryAttributes - 0x000000017EBA0000 - 0x0000000000050000 (0x0000000000000000)
SetUefiImageMemoryAttributes - 0x000000017EAB0000 - 0x0000000000040000 (0x0000000000000000)
SetUefiImageMemoryAttributes - 0x000000017EA10000 - 0x0000000000040000 (0x0000000000000000)
SetUefiImageMemoryAttributes - 0x000000017E970000 - 0x0000000000040000 (0x0000000000000000)
SetUefiImageMemoryAttributes - 0x000000017E8D0000 - 0x0000000000040000 (0x0000000000000000)
[ 0.000000] Linux version 5.18.0+ (lixianglai@kvm-dev1) (loongarch64-unknown-linux-gnu-gcc (GCC) 12.1.0, GNU ld (GNU Binutils) 2.38.50.20220519) #12 SMP PREEMPT Fri Jun 10 17:21:36 CST 2022
[ 0.000000] cpu_probe_common 155 8073f2
[ 0.000000] cpu_probe_common 172 40 8073f2 ff0 4
[ 0.000000] Primary instruction cache 64kB, 4-way, VIPT, linesize 64 bytes.
[ 0.000000] Primary data cache 64kB, 4-way, VIPT, no aliases, linesize 64 bytes
[ 0.000000] Unified victim cache 256kB 16-way, linesize 64 bytes.
[ 0.000000] Unified secondary cache 1kB 16-way, linesize 1 bytes.
[ 0.000000] 64-bit Loongson Processor probed (LA464 Core)
[ 0.000000] CPU0 revision is: 0014c010 (Loongson-64bit)
[ 0.000000] FPU0 revision is: 00000001
[ 0.000000] efi: SMBIOS=0xffff0000 SMBIOS 3.0=0x17d590000 MEMATTR=0x17f3be018 ACPI 2.0=0x17eb00018 SINFO=0x17ffdbb98 MEMRESERVE=0x17d5a2f18
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 0x000000017EB00018 000024 (v02 BOCHS )
[ 0.000000] ACPI: XSDT 0x000000017EB0FE98 000044 (v01 BOCHS BXPC 00000001 01000013)
[ 0.000000] ACPI: FACP 0x000000017EB0FA98 0000F4 (v03 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.000000] ACPI: DSDT 0x000000017EB0E998 0008EF (v01 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACS 0x00000000FFFC0000 000040
[ 0.000000] ACPI: APIC 0x000000017EB0FC18 00007B (v01 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.000000] ACPI: SRAT 0x000000017EB0FD18 0000A0 (v01 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.000000] ACPI: MCFG 0x000000017EB0FE18 00003C (v01 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.000000] SRAT: PXM 0 -> CPU 0x00 -> Node 0
[ 0.000000] SRAT: PXM 0 -> CPU 0x01 -> Node 0
[ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x00000000-0x0fffffff]
[ 0.000000] ACPI: SRAT: Node 0 PXM 0 [mem 0x90000000-0x17fffffff]\
...
[ 0.133216] Booting physical CPU#0 data: 0...
[ 0.133332] csr_mail_send 106 80000004
[ 0.133390] csr_mail_send 114 80000000
[ 0.133489] Booting physical CPU#1 data: 0...
[ 0.133502] csr_mail_send 106 80010004
[ 0.133516] csr_mail_send 114 80010000
[ 0.159710] cblist_init_generic: Setting adjustable number of callback queues.
[ 0.160145] cblist_init_generic: Setting shift to 1 and lim to 1.
[ 0.160647] cblist_init_generic: Setting shift to 1 and lim to 1.
[ 0.164850] rcu: Hierarchical SRCU implementation.
[ 0.174528] smp: smp_init 1106
[ 0.178004] smp: smp_init 1108
[ 0.178546] smp: Bringing up secondary CPUs ...
[ 0.184303] Booting CPU#1...
[ 0.184363] Booting physical CPU#1 data: 9000000000fd10a4...
[ 0.184374] csr_mail_send 106 9000000080010004
[ 0.184389] csr_mail_send 114 fd10a480010000
[ 0.184716] start_secondary 586
[ 0.184842] start_secondary 591 1
[ 0.184969] cpu_probe_common 155 8073f2
[ 0.184985] cpu_probe_common 172 40 8073f2 ff0 4
[ 0.185521] Primary instruction cache 64kB, 4-way, VIPT, linesize 64 bytes.
[ 0.185554] Primary data cache 64kB, 4-way, VIPT, no aliases, linesize 64 bytes
[ 0.185569] Unified victim cache 256kB 16-way, linesize 64 bytes.
[ 0.185581] Unified secondary cache 1kB 16-way, linesize 1 bytes.
[ 0.185597] 64-bit Loongson Processor probed (LA464 Core)
[ 0.185644] CPU1 revision is: 0014c010 (Loongson-64bit)
[ 0.185660] FPU1 revision is: 00000001
[ 0.187572] CPU#1 finished
[ 0.196104] smp: Brought up 1 node, 2 CPUs
[ 0.238493] devtmpfs: initialized
[ 0.262175] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.262465] futex hash table entries: 512 (order: 1, 32768 bytes, linear)
[ 0.288919] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.297926] audit: initializing netlink subsys (disabled)
[ 0.303338] audit: type=2000 audit(0.296:1): state=initialized audit_enabled=0 res=1
[ 0.332079] thermal_sys: Registered thermal governor 'step_wise'
[ 0.404555] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.507147] raid6: int64x8 gen() 922 MB/s
[ 0.575720] raid6: int64x4 gen() 1946 MB/s
[ 0.644663] raid6: int64x2 gen() 1750 MB/s
[ 0.713334] raid6: int64x1 gen() 1312 MB/s
[ 0.713436] raid6: using algorithm int64x4 gen() 1946 MB/s
[ 0.782171] raid6: .... xor() 805 MB/s, rmw enabled
[ 0.782365] raid6: using intx1 recovery algorithm
[ 0.786574] ACPI: Added _OSI(Module Device)
[ 0.786638] ACPI: Added _OSI(Processor Device)
[ 0.786651] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 0.786662] ACPI: Added _OSI(Processor Aggregator Device)
[ 0.786949] ACPI: Added _OSI(Linux-Dell-Video)
[ 0.786968] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[ 0.786983] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
[ 0.824408] ACPI: 1 ACPI AML tables successfully acquired and loaded
[ 0.859396] ACPI: Interpreter enabled
[ 0.860858] ACPI: PM: (supports S0 S5)
[ 0.860987] ACPI: Using platform specific model for interrupt routing
[ 0.862686] ACPI: MCFG table detected, 1 entries
[ 0.893541] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-7f])
[ 0.895616] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig Segments MSI HPX-Type3]
[ 0.896201] acpi PNP0A08:00: _OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI]
[ 0.916406] acpi PNP0A08:00: ECAM at [mem 0x20000000-0x27ffffff] for [bus 00-7f]
[ 0.920868] ACPI: Remapped I/O 0x0000000018000000 to [io 0x0000-0xffff window]
[ 0.928625] PCI host bridge to bus 0000:00
[ 0.929107] pci_bus 0000:00: root bus resource [io 0x0000-0xffff window]
[ 0.929183] pci_bus 0000:00: root bus resource [mem 0x40000000-0x7fffffff window]
[ 0.929520] pci_bus 0000:00: root bus resource [bus 00-7f]
[ 0.934906] pci 0000:00:00.0: [1b36:0008] type 00 class 0x060000
[ 0.944702] pci 0000:00:01.0: [1af4:1000] type 00 class 0x020000
[ 0.946618] pci 0000:00:01.0: reg 0x10: [io 0x4000-0x401f]
[ 0.947884] pci 0000:00:01.0: reg 0x14: [mem 0x42045000-0x42045fff]
[ 0.951094] pci 0000:00:01.0: reg 0x20: [mem 0x42040000-0x42043fff 64bit pref]
[ 0.952475] pci 0000:00:01.0: reg 0x30: [mem 0xfffc0000-0xffffffff pref]
[ 0.953477] pci 0000:00:02.0: [1013:00b8] type 00 class 0x030000
[ 0.955402] pci 0000:00:02.0: reg 0x10: [mem 0x40000000-0x41ffffff pref]
[ 0.957511] pci 0000:00:02.0: reg 0x14: [mem 0x42044000-0x42044fff]
[ 0.966607] pci 0000:00:02.0: reg 0x30: [mem 0xffff0000-0xffffffff pref]
[ 0.967221] pci 0000:00:02.0: BAR 0: assigned to efifb
[ 0.972181] pci 0000:00:02.0: BAR 0: assigned [mem 0x40000000-0x41ffffff pref]
[ 0.972869] pci 0000:00:01.0: BAR 6: assigned [mem 0x42000000-0x4203ffff pref]
[ 0.973059] pci 0000:00:02.0: BAR 6: assigned [mem 0x42040000-0x4204ffff pref]
[ 0.973402] pci 0000:00:01.0: BAR 4: assigned [mem 0x42050000-0x42053fff 64bit pref]
[ 0.973691] pci 0000:00:01.0: BAR 1: assigned [mem 0x42054000-0x42054fff]
[ 0.973746] pci 0000:00:02.0: BAR 1: assigned [mem 0x42055000-0x42055fff]
[ 0.974784] pci 0000:00:01.0: BAR 0: assigned [io 0x4000-0x401f]
[ 0.983613] SCSI subsystem initialized
[ 0.987742] ACPI: bus type USB registered
[ 0.988937] usbcore: registered new interface driver usbfs
[ 0.989648] usbcore: registered new interface driver hub
[ 0.990106] usbcore: registered new device driver usb
[ 0.991603] pps_core: LinuxPPS API ver. 1 registered
[ 0.991637] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.991844] PTP clock support registered
[ 0.993947] Registered efivars operations
[ 0.997297] Advanced Linux Sound Architecture Driver Initialized.
[ 1.026558] pci 0000:00:02.0: vgaarb: setting as boot VGA device
[ 1.026827] pci 0000:00:02.0: vgaarb: bridge control possible
[ 1.027026] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[ 1.027193] vgaarb: loaded
[ 1.032491] clocksource: Switched to clocksource Constant
[ 1.039238] VFS: Disk quotas dquot_6.6.0
[ 1.039728] VFS: Dquot-cache hash table entries: 2048 (order 0, 16384 bytes)
[ 1.044346] FS-Cache: Loaded
[ 1.047737] pnp: PnP ACPI init
[ 1.053295] pnp: PnP ACPI: found 1 devices
[ 1.085497] NET: Registered PF_INET protocol family
[ 1.089821] IP idents hash table entries: 65536 (order: 5, 524288 bytes, linear)
[ 1.109444] tcp_listen_portaddr_hash hash table entries: 2048 (order: 1, 32768 bytes, linear)
[ 1.110169] TCP established hash table entries: 32768 (order: 4, 262144 bytes, linear)
[ 1.110933] TCP bind bhash tables hash table entries: 32768 (order: 5, 786432 bytes, linear)
[ 1.111837] TCP: Hash tables configured (established 32768 bind 32768)
[ 1.115223] UDP hash table entries: 2048 (order: 2, 65536 bytes, linear)
[ 1.115996] UDP-Lite hash table entries: 2048 (order: 2, 65536 bytes, linear)
[ 1.120369] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 1.128464] RPC: Registered named UNIX socket transport module.
[ 1.128604] RPC: Registered udp transport module.
[ 1.128630] RPC: Registered tcp transport module.
[ 1.128652] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 1.129287] PCI: CLS 0 bytes, default 0
[ 1.143675] Initialise system trusted keyrings
[ 1.143518] Trying to unpack rootfs image as initramfs start (____ptrval____) end (____ptrval____)...
[ 1.147743] workingset: timestamp_bits=40 max_order=18 bucket_order=0
[ 1.173647] zbud: loaded
[ 1.182213] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 1.187237] NFS: Registering the id_resolver key type
[ 1.188305] Key type id_resolver registered
[ 1.188415] Key type id_legacy registered
[ 1.189398] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 1.190315] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 1.190378] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[ 1.198030] SGI XFS with ACLs, security attributes, quota, no debug enabled
[ 1.209691] 9p: Installing v9fs 9p2000 file system support
[ 1.214163] xor: measuring software checksum speed
[ 1.218948] 8regs : 2479 MB/sec
[ 1.223337] 8regs_prefetch : 2472 MB/sec
[ 1.227846] 32regs : 2504 MB/sec
[ 1.232186] 32regs_prefetch : 2486 MB/sec
[ 1.232307] xor: using function: 32regs (2504 MB/sec)
[ 1.232402] Key type asymmetric registered
[ 1.232538] Asymmetric key parser 'x509' registered
[ 1.306391] Freeing initrd memory: 1216K
[ 1.488035] alg: self-tests for CTR-KDF (hmac(sha256)) passed
[ 1.489194] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[ 1.490397] io scheduler mq-deadline registered
[ 1.490616] io scheduler kyber registered
[ 1.491242] io scheduler bfq registered
[ 1.518627] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[ 1.520256] efifb: probing for efifb
[ 1.521385] efifb: framebuffer at 0x40000000, using 1888k, total 1875k
[ 1.521442] efifb: mode is 800x600x32, linelength=3200, pages=1
[ 1.521503] efifb: scrolling: redraw
[ 1.521670] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[ 1.821760] Console: switching to colour frame buffer device 100x37
[ 2.071923] fb0: EFI VGA frame buffer device
[ 2.077539] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
[ 2.079661] ACPI: button: Power Button [PWRF]
[ 2.096994] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 2.128644] 00:00: ttyS0 at MMIO 0x1fe001e0 (irq = 20, base_baud = 115200) is a 16550A
[ 2.133590] printk: console [ttyS0] printing thread started
[ 2.134317] printk: console [ttyS0] enabled
[ 2.146964] ACPI: bus type drm_connector registered
[ 2.213499] brd: module loaded
[ 2.239213] loop: module loaded
[ 2.241036] megaraid cmm: 2.20.2.7 (Release Date: Sun Jul 16 00:01:03 EST 2006)
[ 2.241645] megaraid: 2.20.5.1 (Release Date: Thu Nov 16 15:32:35 EST 2006)
[ 2.241970] megasas: 07.719.03.00-rc1
[ 2.242741] mpt3sas version 42.100.00.00 loaded
[ 2.264378] e1000: Intel(R) PRO/1000 Network Driver
[ 2.264417] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 2.264669] e1000e: Intel(R) PRO/1000 Network Driver
[ 2.264695] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 2.264890] igb: Intel(R) Gigabit Ethernet Network Driver
[ 2.264919] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 2.265092] ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver
[ 2.265124] ixgbe: Copyright (c) 1999-2016 Intel Corporation.
[ 2.265949] ixgb: Intel(R) PRO/10GbE Network Driver
[ 2.265980] ixgb: Copyright (c) 1999-2008 Intel Corporation.
[ 2.270144] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 2.270430] ehci-pci: EHCI PCI platform driver
[ 2.270998] ehci-platform: EHCI generic platform driver
[ 2.271208] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 2.271426] ohci-pci: OHCI PCI platform driver
[ 2.271911] ohci-platform: OHCI generic platform driver
[ 2.274132] i8042: No controller found
[ 2.277296] mousedev: PS/2 mouse device common for all mice
[ 2.287114] rtc-efi rtc-efi.0: registered as rtc0
[ 2.289396] rtc-efi rtc-efi.0: setting system clock to 2022-05-15T17:32:44 UTC (1652635964)
[ 2.290629] i2c_dev: i2c /dev entries driver
[ 2.293324] device-mapper: ioctl: 4.46.0-ioctl (2022-02-22) initialised: dm-devel@redhat.com
[ 2.294088] hid: raw HID events driver (C) Jiri Kosina
[ 2.294933] usbcore: registered new interface driver usbhid
[ 2.294983] usbhid: USB HID core driver
[ 2.302649] Initializing XFRM netlink socket
[ 2.305031] NET: Registered PF_INET6 protocol family
[ 2.326143] Segment Routing with IPv6
[ 2.326628] In-situ OAM (IOAM) with IPv6
[ 2.330128] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 2.336977] NET: Registered PF_PACKET protocol family
[ 2.337677] NET: Registered PF_KEY protocol family
[ 2.341005] NET: Registered PF_RDS protocol family
[ 2.343609] 9pnet: Installing 9P2000 support
[ 2.344029] Key type dns_resolver registered
[ 2.345594] registered taskstats version 1
[ 2.346101] Loading compiled-in X.509 certificates
[ 2.406234] zswap: loaded using pool zstd/zbud
[ 2.416435] Btrfs loaded, crc32c=crc32c-generic, zoned=no, fsverity=no
[ 3.607604] ALSA device list:
[ 3.607739] No soundcards found.
[ 4.676824] Freeing unused kernel image (initmem) memory: 512K
[ 4.676891] This architecture does not have kernel memory protection.
[ 4.677478] Run /sbin/init as init process
/ #