驅動程式 - Linux Device Driver (LDD) - 使用範例 - C/C++ (QEMU) - 開發環境(x86_64)



參考資訊:
https://busybox.net/downloads
https://cdn.kernel.org/pub/linux/kernel/
https://www.kernel.org/pub/linux/kernel/v6.x/
https://www.qemu.org/docs/master/system/riscv/virt.html
https://gist.github.com/ncmiller/d61348b27cb17debd2a6c20966409e86
https://jasonblog.github.io/note/arm_emulation/compiling_linux_kernel_for_qemu_arm_emulator.html

$ cd
$ wget https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.1.57.tar.gz
$ tar xvf linux-6.1.57.tar.gz
$ cd linux-6.1.57
$ make x86_64_defconfig
$ make -j4

$ cd
$ wet https://busybox.net/downloads/busybox-1.37.0.tar.bz2
$ tar xvf busybox-1.37.0.tar.bz2
$ cd busybox-1.37.0
$ mkdir out
$ make O=out defconfig
$ make O=out menuconfig
    Settings --> [V] Build static binary (no shared libs)

$ make O=out -j4
$ make O=out install

$ cd out/_install/
$ vim init
    #!/bin/sh
    mount -t proc none /proc
    mount -t sysfs none /sys
    echo -e "\nBoot took $(cut -d' ' -f1 /proc/uptime) seconds\n"
    exec /bin/sh

$ chmod +x init
$ mkdir -pv {bin,sbin,etc,proc,sys,usr/{bin,sbin}}
$ find . -print0 | cpio --null -ov --format=newc | gzip -9 > ../initramfs-busybox-x86.cpio.gz
$ cd ..

$ cp ~/linux-6.1.57/arch/x86_64/boot/bzImage .
$ qemu-system-x86_64 -m 1024M -kernel bzImage -initrd initramfs-busybox-x86.cpio.gz -append "console=ttyS0" -nographic
    [    0.000000] Linux version 6.1.57 (steward@debian) (gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Wed Jun 11 21:43:55 CST 2025
    [    0.000000] Command line: console=ttyS0
    [    0.000000] BIOS-provided physical RAM map:
    [    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
    [    0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
    [    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
    [    0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000007fdffff] usable
    [    0.000000] BIOS-e820: [mem 0x0000000007fe0000-0x0000000007ffffff] reserved
    [    0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
    [    0.000000] BIOS-e820: [mem 0x000000fd00000000-0x000000ffffffffff] reserved
    [    0.000000] NX (Execute Disable) protection: active
    [    0.000000] SMBIOS 2.8 present.
    [    0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
    [    0.000000] tsc: Fast TSC calibration using PIT
    [    0.000000] tsc: Detected 2893.348 MHz processor
    [    0.011140] last_pfn = 0x7fe0 max_arch_pfn = 0x400000000
    [    0.012096] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WP  UC- WT  
    [    0.029929] found SMP MP-table at [mem 0x000f5ba0-0x000f5baf]
    [    0.036456] RAMDISK: [mem 0x07eb3000-0x07fdffff]
    [    0.037061] ACPI: Early table checksum verification disabled
    [    0.037516] ACPI: RSDP 0x00000000000F59D0 000014 (v00 BOCHS )
    [    0.037917] ACPI: RSDT 0x0000000007FE1AC6 000034 (v01 BOCHS  BXPC     00000001 BXPC 00000001)
    [    0.038596] ACPI: FACP 0x0000000007FE197A 000074 (v01 BOCHS  BXPC     00000001 BXPC 00000001)
    [    0.039445] ACPI: DSDT 0x0000000007FE0040 00193A (v01 BOCHS  BXPC     00000001 BXPC 00000001)
    [    0.039556] ACPI: FACS 0x0000000007FE0000 000040
    [    0.039646] ACPI: APIC 0x0000000007FE19EE 000078 (v01 BOCHS  BXPC     00000001 BXPC 00000001)
    [    0.039689] ACPI: HPET 0x0000000007FE1A66 000038 (v01 BOCHS  BXPC     00000001 BXPC 00000001)
    [    0.039728] ACPI: WAET 0x0000000007FE1A9E 000028 (v01 BOCHS  BXPC     00000001 BXPC 00000001)
    [    0.039839] ACPI: Reserving FACP table memory at [mem 0x7fe197a-0x7fe19ed]
    [    0.039880] ACPI: Reserving DSDT table memory at [mem 0x7fe0040-0x7fe1979]
    [    0.039894] ACPI: Reserving FACS table memory at [mem 0x7fe0000-0x7fe003f]
    [    0.039904] ACPI: Reserving APIC table memory at [mem 0x7fe19ee-0x7fe1a65]
    [    0.039914] ACPI: Reserving HPET table memory at [mem 0x7fe1a66-0x7fe1a9d]
    [    0.039924] ACPI: Reserving WAET table memory at [mem 0x7fe1a9e-0x7fe1ac5]
    [    0.042799] No NUMA configuration found
    [    0.042832] Faking a node at [mem 0x0000000000000000-0x0000000007fdffff]
    [    0.043597] NODE_DATA(0) allocated [mem 0x07eaf000-0x07eb2fff]
    [    0.046012] Zone ranges:
    [    0.046054]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
    [    0.046156]   DMA32    [mem 0x0000000001000000-0x0000000007fdffff]
    [    0.046176]   Normal   empty
    [    0.046208] Movable zone start for each node
    [    0.046249] Early memory node ranges
    [    0.046287]   node   0: [mem 0x0000000000001000-0x000000000009efff]
    [    0.046466]   node   0: [mem 0x0000000000100000-0x0000000007fdffff]
    [    0.046728] Initmem setup node 0 [mem 0x0000000000001000-0x0000000007fdffff]
    [    0.047920] On node 0, zone DMA: 1 pages in unavailable ranges
    [    0.048218] On node 0, zone DMA: 97 pages in unavailable ranges
    [    0.049189] On node 0, zone DMA32: 32 pages in unavailable ranges
    [    0.049641] ACPI: PM-Timer IO Port: 0x608
    [    0.050205] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
    [    0.050659] IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
    [    0.050832] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
    [    0.051142] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
    [    0.051217] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
    [    0.051324] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
    [    0.051341] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
    [    0.051579] ACPI: Using ACPI (MADT) for SMP configuration information
    [    0.051644] ACPI: HPET id: 0x8086a201 base: 0xfed00000
    [    0.052077] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
    [    0.053126] PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff]
    [    0.053191] PM: hibernation: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
    [    0.053225] PM: hibernation: Registered nosave memory: [mem 0x000a0000-0x000effff]
    [    0.053237] PM: hibernation: Registered nosave memory: [mem 0x000f0000-0x000fffff]
    [    0.053371] [mem 0x08000000-0xfffbffff] available for PCI devices
    [    0.053411] Booting paravirtualized kernel on bare hardware
    [    0.053795] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
    [    0.068929] setup_percpu: NR_CPUS:64 nr_cpumask_bits:1 nr_cpu_ids:1 nr_node_ids:1
    [    0.076542] percpu: Embedded 53 pages/cpu s176360 r8192 d32536 u2097152
    [    0.079599] Fallback order for Node 0: 0 
    [    0.080042] Built 1 zonelists, mobility grouping on.  Total pages: 31968
    [    0.080092] Policy zone: DMA32
    [    0.080380] Kernel command line: console=ttyS0
    [    0.082157] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
    [    0.082496] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
    [    0.084208] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
    [    0.090600] Memory: 89004K/130552K available (16397K kernel code, 2737K rwdata, 5224K rodata, 1524K init, 2856K bss, 41288K reserved, 0K cma-reserved)
    [    0.095403] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.112136] Dynamic Preempt: voluntary
    [    0.116161] rcu: Preemptible hierarchical RCU implementation.
    [    0.116182] rcu: 	RCU event tracing is enabled.
    [    0.116400] rcu: 	RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=1.
    [    0.116557] 	Trampoline variant of Tasks RCU enabled.
    [    0.116694] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.
    [    0.116751] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
    [    0.130260] NR_IRQS: 4352, nr_irqs: 256, preallocated irqs: 16
    [    0.137001] rcu: srcu_init: Setting srcu_struct sizes based on contention.
    [    0.144623] Console: colour VGA+ 80x25
    [    0.166007] printk: console [ttyS0] enabled
    [    0.167519] ACPI: Core revision 20220331
    [    0.174093] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
    [    0.181391] APIC: Switch to symmetric I/O mode setup
    [    0.186743] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
    [    0.193091] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x29b4b6e5e55, max_idle_ns: 440795245218 ns
    [    0.194026] Calibrating delay loop (skipped), value calculated using timer frequency.. 5786.69 BogoMIPS (lpj=2893348)
    [    0.198268] process: using AMD E400 aware idle routine
    [    0.198628] Last level iTLB entries: 4KB 512, 2MB 255, 4MB 127
    [    0.198778] Last level dTLB entries: 4KB 512, 2MB 255, 4MB 127, 1GB 0
    [    0.199374] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
    [    0.199921] Spectre V2 : Mitigation: Retpolines
    [    0.200119] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch
    [    0.200409] Spectre V2 : Spectre v2 / SpectreRSB : Filling RSB on VMEXIT
    [    0.201741] x86/fpu: x87 FPU will use FXSAVE
    [    0.739801] Freeing SMP alternatives memory: 44K
    [    0.741254] pid_max: default: 32768 minimum: 301
    [    0.746159] LSM: Security Framework initializing
    [    0.747880] SELinux:  Initializing.
    [    0.755647] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
    [    0.756133] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
    [    0.891741] smpboot: CPU0: AMD QEMU Virtual CPU version 2.5+ (family: 0xf, model: 0x6b, stepping: 0x1)
    [    0.901807] cblist_init_generic: Setting adjustable number of callback queues.
    [    0.902137] cblist_init_generic: Setting shift to 0 and lim to 1.
    [    0.903623] Performance Events: PMU not available due to virtualization, using software events only.
    [    0.905260] signal: max sigframe size: 1440
    [    0.905741] rcu: Hierarchical SRCU implementation.
    [    0.906774] rcu: 	Max phase no-delay instances is 400.
    [    0.912976] smp: Bringing up secondary CPUs ...
    [    0.913343] smp: Brought up 1 node, 1 CPU
    [    0.913572] smpboot: Max logical packages: 1
    [    0.913850] smpboot: Total of 1 processors activated (5786.69 BogoMIPS)
    [    0.932280] devtmpfs: initialized
    [    0.944967] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
    [    0.946004] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
    [    0.950943] PM: RTC time: 13:48:49, date: 2025-06-11
    [    0.958741] NET: Registered PF_NETLINK/PF_ROUTE protocol family
    [    0.958741] audit: initializing netlink subsys (disabled)
    [    0.962290] audit: type=2000 audit(1749649729.779:1): state=initialized audit_enabled=0 res=1
    [    0.966859] thermal_sys: Registered thermal governor 'step_wise'
    [    0.966949] thermal_sys: Registered thermal governor 'user_space'
    [    0.972026] cpuidle: using governor menu
    [    0.980429] PCI: Using configuration type 1 for base access
    [    1.041591] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible.
    [    1.607161] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
    [    1.607466] HugeTLB: 28 KiB vmemmap can be freed for a 2.00 MiB page
    [    1.619567] ACPI: Added _OSI(Module Device)
    [    1.619872] ACPI: Added _OSI(Processor Device)
    [    1.620044] ACPI: Added _OSI(3.0 _SCP Extensions)
    [    1.620277] ACPI: Added _OSI(Processor Aggregator Device)
    [    1.644987] ACPI: 1 ACPI AML tables successfully acquired and loaded
    [    1.663917] ACPI: Interpreter enabled
    [    1.665780] ACPI: PM: (supports S0 S3 S4 S5)
    [    1.666044] ACPI: Using IOAPIC for interrupt routing
    [    1.666938] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
    [    1.667336] PCI: Using E820 reservations for host bridge windows
    [    1.669718] ACPI: Enabled 2 GPEs in block 00 to 0F
    [    1.721998] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
    [    1.723454] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3]
    [    1.724177] acpi PNP0A03:00: _OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI]
    [    1.725861] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
    [    1.731199] PCI host bridge to bus 0000:00
    [    1.731653] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
    [    1.732024] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
    [    1.732286] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
    [    1.732768] pci_bus 0000:00: root bus resource [mem 0x08000000-0xfebfffff window]
    [    1.733080] pci_bus 0000:00: root bus resource [mem 0x100000000-0x17fffffff window]
    [    1.733577] pci_bus 0000:00: root bus resource [bus 00-ff]
    [    1.735741] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000
    [    1.749254] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100
    [    1.755819] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180
    [    1.758886] pci 0000:00:01.1: reg 0x20: [io  0xc040-0xc04f]
    [    1.760083] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io  0x01f0-0x01f7]
    [    1.760345] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io  0x03f6]
    [    1.760571] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io  0x0170-0x0177]
    [    1.760741] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io  0x0376]
    [    1.762334] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000
    [    1.763390] pci 0000:00:01.3: quirk: [io  0x0600-0x063f] claimed by PIIX4 ACPI
    [    1.763823] pci 0000:00:01.3: quirk: [io  0x0700-0x070f] claimed by PIIX4 SMB
    [    1.765401] pci 0000:00:02.0: [1234:1111] type 00 class 0x030000
    [    1.766227] pci 0000:00:02.0: reg 0x10: [mem 0xfd000000-0xfdffffff pref]
    [    1.768773] pci 0000:00:02.0: reg 0x18: [mem 0xfebf0000-0xfebf0fff]
    [    1.771778] pci 0000:00:02.0: reg 0x30: [mem 0xfebe0000-0xfebeffff pref]
    [    1.772941] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
    [    1.780663] pci 0000:00:03.0: [8086:100e] type 00 class 0x020000
    [    1.781741] pci 0000:00:03.0: reg 0x10: [mem 0xfebc0000-0xfebdffff]
    [    1.782531] pci 0000:00:03.0: reg 0x14: [io  0xc000-0xc03f]
    [    1.785814] pci 0000:00:03.0: reg 0x30: [mem 0xfeb80000-0xfebbffff pref]
    [    1.803826] ACPI: PCI: Interrupt link LNKA configured for IRQ 10
    [    1.805206] ACPI: PCI: Interrupt link LNKB configured for IRQ 10
    [    1.806329] ACPI: PCI: Interrupt link LNKC configured for IRQ 11
    [    1.807346] ACPI: PCI: Interrupt link LNKD configured for IRQ 11
    [    1.807996] ACPI: PCI: Interrupt link LNKS configured for IRQ 9
    [    1.813671] iommu: Default domain type: Translated 
    [    1.814010] iommu: DMA domain TLB invalidation policy: lazy mode 
    [    1.816228] SCSI subsystem initialized
    [    1.818672] ACPI: bus type USB registered
    [    1.819451] usbcore: registered new interface driver usbfs
    [    1.820224] usbcore: registered new interface driver hub
    [    1.820854] usbcore: registered new device driver usb
    [    1.821644] pps_core: LinuxPPS API ver. 1 registered
    [    1.821761] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    1.822176] PTP clock support registered
    [    1.825439] Advanced Linux Sound Architecture Driver Initialized.
    [    1.836786] NetLabel: Initializing
    [    1.837016] NetLabel:  domain hash size = 128
    [    1.837185] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
    [    1.838817] NetLabel:  unlabeled traffic allowed by default
    [    1.844647] PCI: Using ACPI for IRQ routing
    [    1.847331] pci 0000:00:02.0: vgaarb: setting as boot VGA device
    [    1.847663] pci 0000:00:02.0: vgaarb: bridge control possible
    [    1.847741] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
    [    1.847817] vgaarb: loaded
    [    1.850221] hpet: 3 channels of 0 reserved for per-cpu timers
    [    1.850855] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
    [    1.851165] hpet0: 3 comparators, 64-bit 100.000000 MHz counter
    [    1.857585] clocksource: Switched to clocksource tsc-early
    [    1.866917] VFS: Disk quotas dquot_6.6.0
    [    1.868535] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
    [    1.871552] pnp: PnP ACPI init
    [    1.879421] pnp: PnP ACPI: found 6 devices
    [    1.910870] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
    [    1.912367] NET: Registered PF_INET protocol family
    [    1.914056] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
    [    1.923216] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
    [    1.923830] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
    [    1.924655] TCP established hash table entries: 1024 (order: 1, 8192 bytes, linear)
    [    1.925242] TCP bind hash table entries: 1024 (order: 3, 32768 bytes, linear)
    [    1.925701] TCP: Hash tables configured (established 1024 bind 1024)
    [    1.927387] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
    [    1.927921] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
    [    1.930463] NET: Registered PF_UNIX/PF_LOCAL protocol family
    [    1.935349] RPC: Registered named UNIX socket transport module.
    [    1.935777] RPC: Registered udp transport module.
    [    1.935982] RPC: Registered tcp transport module.
    [    1.936380] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    1.941416] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7 window]
    [    1.941774] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff window]
    [    1.942026] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
    [    1.942375] pci_bus 0000:00: resource 7 [mem 0x08000000-0xfebfffff window]
    [    1.942651] pci_bus 0000:00: resource 8 [mem 0x100000000-0x17fffffff window]
    [    1.943890] pci 0000:00:01.0: PIIX3: Enabling Passive Release
    [    1.944373] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
    [    1.944832] PCI: CLS 0 bytes, default 64
    [    1.960197] Unpacking initramfs...
    [    2.116460] Freeing initrd memory: 1204K
    [    2.307547] Initialise system trusted keyrings
    [    2.312509] workingset: timestamp_bits=56 max_order=15 bucket_order=0
    [    2.341007] NFS: Registering the id_resolver key type
    [    2.341630] Key type id_resolver registered
    [    2.341845] Key type id_legacy registered
    [    2.343002] 9p: Installing v9fs 9p2000 file system support
    [    2.388737] Key type asymmetric registered
    [    2.389102] Asymmetric key parser 'x509' registered
    [    2.389745] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
    [    2.390557] io scheduler mq-deadline registered
    [    2.390805] io scheduler kyber registered
    [    2.395498] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
    [    2.399984] ACPI: button: Power Button [PWRF]
    [    2.406275] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    [    2.409664] 00:04: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
    [    2.417829] Non-volatile memory driver v1.3
    [    2.418133] Linux agpgart interface v0.103
    [    2.420626] ACPI: bus type drm_connector registered
    [    2.453477] loop: module loaded
    [    2.466181] scsi host0: ata_piix
    [    2.470210] scsi host1: ata_piix
    [    2.471217] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc040 irq 14
    [    2.471619] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc048 irq 15
    [    2.480863] e100: Intel(R) PRO/100 Network Driver
    [    2.481178] e100: Copyright(c) 1999-2006 Intel Corporation
    [    2.481521] e1000: Intel(R) PRO/1000 Network Driver
    [    2.481708] e1000: Copyright (c) 1999-2006 Intel Corporation.
    [    2.635842] ata2: found unknown device (class 0)
    [    2.646151] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
    [    2.668562] scsi 1:0:0:0: CD-ROM            QEMU     QEMU DVD-ROM     2.5+ PQ: 0 ANSI: 5
    [    2.710436] sr 1:0:0:0: [sr0] scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
    [    2.711010] cdrom: Uniform CD-ROM driver Revision: 3.20
    [    2.735549] sr 1:0:0:0: Attached scsi generic sg0 type 5
    [    2.824896] ACPI: \_SB_.LNKC: Enabled at IRQ 11
    [    2.965204] tsc: Refined TSC clocksource calibration: 2893.315 MHz
    [    2.965909] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x29b497e60c8, max_idle_ns: 440795285230 ns
    [    2.966439] clocksource: Switched to clocksource tsc
    [    3.117619] e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 52:54:00:12:34:56
    [    3.118463] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection
    [    3.119470] e1000e: Intel(R) PRO/1000 Network Driver
    [    3.119652] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
    [    3.120029] sky2: driver version 1.30
    [    3.123354] usbcore: registered new interface driver usblp
    [    3.124134] usbcore: registered new interface driver usb-storage
    [    3.125393] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
    [    3.129550] serio: i8042 KBD port at 0x60,0x64 irq 1
    [    3.129981] serio: i8042 AUX port at 0x60,0x64 irq 12
    [    3.136900] rtc_cmos 00:05: RTC can wake from S4
    [    3.140524] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
    [    3.148847] rtc_cmos 00:05: registered as rtc0
    [    3.150196] rtc_cmos 00:05: alarms up to one day, y3k, 242 bytes nvram, hpet irqs
    [    3.152989] fail to initialize ptp_kvm
    [    3.155020] device-mapper: ioctl: 4.47.0-ioctl (2022-07-28) initialised: dm-devel@redhat.com
    [    3.156529] hid: raw HID events driver (C) Jiri Kosina
    [    3.159614] usbcore: registered new interface driver usbhid
    [    3.159834] usbhid: USB HID core driver
    [    3.170739] Initializing XFRM netlink socket
    [    3.172922] NET: Registered PF_INET6 protocol family
    [    3.183283] Segment Routing with IPv6
    [    3.183734] In-situ OAM (IOAM) with IPv6
    [    3.185422] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    3.189428] NET: Registered PF_PACKET protocol family
    [    3.191119] 9pnet: Installing 9P2000 support
    [    3.191633] Key type dns_resolver registered
    [    3.194111] IPI shorthand broadcast: enabled
    [    3.194938] sched_clock: Marking stable (3153047565, 41040442)->(3264529612, -70441605)
    [    3.197545] registered taskstats version 1
    [    3.197748] Loading compiled-in X.509 certificates
    [    3.206312] cryptomgr_test (44) used greatest stack depth: 15664 bytes left
    [    3.216875] PM:   Magic number: 13:990:836
    [    3.218523] printk: console [netcon0] enabled
    [    3.218797] netconsole: network logging started
    [    3.223881] cfg80211: Loading compiled-in X.509 certificates for regulatory database
    [    3.307450] modprobe (66) used greatest stack depth: 14000 bytes left
    [    3.325743] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
    [    3.328537] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
    [    3.329380] cfg80211: failed to load regulatory.db
    [    3.331172] ALSA device list:
    [    3.331389]   No soundcards found.
    [    3.419568] Freeing unused kernel image (initmem) memory: 1524K
    [    3.421598] Write protecting the kernel read-only data: 24576k
    [    3.427528] Freeing unused kernel image (text/rodata gap) memory: 2032K
    [    3.429274] Freeing unused kernel image (rodata/data gap) memory: 920K
    [    3.633951] x86/mm: Checked W+X mappings: passed, no W+X pages found.
    [    3.635674] Run /init as init process

    Boot took 3.65 seconds
    ~ #