mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-29 13:04:27 +01:00
Document PgUp, pci.sh request fact irq
This commit is contained in:
@@ -57,6 +57,15 @@ We use `printk` a lot, and it shows on the QEMU terminal by default. If that ann
|
|||||||
|
|
||||||
See also: <https://superuser.com/questions/351387/how-to-stop-kernel-messages-from-flooding-my-console>
|
See also: <https://superuser.com/questions/351387/how-to-stop-kernel-messages-from-flooding-my-console>
|
||||||
|
|
||||||
|
You can scroll up a bit on the default TTY with:
|
||||||
|
|
||||||
|
Shift + PgUp
|
||||||
|
|
||||||
|
How to increase the buffer:
|
||||||
|
|
||||||
|
- <https://askubuntu.com/questions/709697/how-to-increase-scrollback-lines-in-ubuntu14-04-2-server-edition>
|
||||||
|
- <https://unix.stackexchange.com/questions/346018/how-to-increase-the-scrollback-buffer-size-for-tty>
|
||||||
|
|
||||||
We use Buildroot's default kernel version, you can confirm it after build with:
|
We use Buildroot's default kernel version, you can confirm it after build with:
|
||||||
|
|
||||||
grep BR2_LINUX_KERNEL_VERSION buildroot/.config
|
grep BR2_LINUX_KERNEL_VERSION buildroot/.config
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ conlicts with other devices.
|
|||||||
|
|
||||||
Then we need to check /proc/devices to find out the assigned number,
|
Then we need to check /proc/devices to find out the assigned number,
|
||||||
and use that for the mknod.
|
and use that for the mknod.
|
||||||
|
|
||||||
|
- https://unix.stackexchange.com/questions/37829/understanding-character-device-or-character-special-files/371758#371758
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <asm/uaccess.h> /* copy_from_user, copy_to_user */
|
#include <asm/uaccess.h> /* copy_from_user, copy_to_user */
|
||||||
|
|||||||
@@ -17,8 +17,11 @@ dd bs=4 status=none if=/dev/lkmc_pci count=1 skip=1 | od -An -t x1
|
|||||||
# => 0F0F0F0F
|
# => 0F0F0F0F
|
||||||
|
|
||||||
# Factorial calculator.
|
# Factorial calculator.
|
||||||
|
# Request interrupt when the computation is over.
|
||||||
|
printf '\x80\x00\x00\x00' | dd bs=4 status=none of=/dev/lkmc_pci count=1 seek=8
|
||||||
# factorial(0xC) = 0x1c8cfc00
|
# factorial(0xC) = 0x1c8cfc00
|
||||||
printf '\x0C\x00\x00\x00' | dd bs=4 status=none of=/dev/lkmc_pci count=1 seek=2
|
printf '\x0C\x00\x00\x00' | dd bs=4 status=none of=/dev/lkmc_pci count=1 seek=2
|
||||||
|
# => interrupt
|
||||||
sleep 1
|
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=2 | od -An -t x1
|
||||||
dd bs=4 status=none if=/dev/lkmc_pci count=1 skip=8 | od -An -t x1
|
dd bs=4 status=none if=/dev/lkmc_pci count=1 skip=8 | od -An -t x1
|
||||||
|
|||||||
Reference in New Issue
Block a user