diff --git a/README.md b/README.md index e9c37b2..e46dcad 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,15 @@ We use `printk` a lot, and it shows on the QEMU terminal by default. If that ann See also: +You can scroll up a bit on the default TTY with: + + Shift + PgUp + +How to increase the buffer: + +- +- + We use Buildroot's default kernel version, you can confirm it after build with: grep BR2_LINUX_KERNEL_VERSION buildroot/.config diff --git a/kernel_module/character_device.c b/kernel_module/character_device.c index 3587499..dea448a 100644 --- a/kernel_module/character_device.c +++ b/kernel_module/character_device.c @@ -15,6 +15,8 @@ conlicts with other devices. Then we need to check /proc/devices to find out the assigned number, and use that for the mknod. + +- https://unix.stackexchange.com/questions/37829/understanding-character-device-or-character-special-files/371758#371758 */ #include /* copy_from_user, copy_to_user */ diff --git a/rootfs_overlay/pci.sh b/rootfs_overlay/pci.sh index ae92ec6..d0dac08 100755 --- a/rootfs_overlay/pci.sh +++ b/rootfs_overlay/pci.sh @@ -17,8 +17,11 @@ dd bs=4 status=none if=/dev/lkmc_pci count=1 skip=1 | od -An -t x1 # => 0F0F0F0F # 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 printf '\x0C\x00\x00\x00' | dd bs=4 status=none of=/dev/lkmc_pci count=1 seek=2 +# => interrupt 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