mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
qemumonitor helper, extra_append from CLI, pci_rescan.sh
This commit is contained in:
@@ -21,8 +21,8 @@ dd bs=4 status=none if=/dev/lkmc_pci count=1 skip=1 | od -An -t x1
|
||||
printf '\x80\x00\x00\x00' | dd bs=4 status=none of=/dev/lkmc_pci count=1 seek=8
|
||||
# factorial(0xC) = 0x1c8cfc00
|
||||
printf '\x0C\x00\x00\x00' | dd bs=4 status=none of=/dev/lkmc_pci count=1 seek=2
|
||||
# => interrupt
|
||||
# Yes, we should the interrupt to notify poll, but lazy.
|
||||
# => irq_handler .*
|
||||
# Yes, we should use the interrupt to notify poll, but lazy.
|
||||
sleep 1
|
||||
dd bs=4 status=none if=/dev/lkmc_pci count=1 skip=2 | od -An -t x1
|
||||
dd bs=4 status=none if=/dev/lkmc_pci count=1 skip=8 | od -An -t x1
|
||||
@@ -30,10 +30,10 @@ dd bs=4 status=none if=/dev/lkmc_pci count=1 skip=8 | od -An -t x1
|
||||
|
||||
# Manual IRQ raising.
|
||||
printf '\x04\x03\x02\x01' | dd bs=4 status=none of=/dev/lkmc_pci count=1 seek=24
|
||||
# => interrupt
|
||||
# => irq_handler .*
|
||||
sleep 1
|
||||
printf '\x08\x07\x06\x05' | dd bs=4 status=none of=/dev/lkmc_pci count=1 seek=24
|
||||
# => interrupt
|
||||
# => irq_handler .*
|
||||
sleep 1
|
||||
|
||||
# Teardown.
|
||||
|
||||
2
rootfs_overlay/pci_rescan.sh
Executable file
2
rootfs_overlay/pci_rescan.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo 1 > /sys/bus/pci/rescan
|
||||
Reference in New Issue
Block a user