mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
pci_min driver
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
1. [dep2](dep2.c)
|
||||
1. [character_device](character_device.c)
|
||||
1. Hardware device drivers
|
||||
1. [pci_min](pci_min.c)
|
||||
1. [pci](pci.c)
|
||||
1. [platform_device](platform_device.c)
|
||||
1. [user](user/)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
Only tested in x86.
|
||||
|
||||
PCI driver for our minimal pci_min.c QEMU fork device.
|
||||
|
||||
probe already does a mmio write, which generates an IRQ and tests everything.
|
||||
*/
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
@@ -77,8 +77,8 @@ static int lkmc_platform_device_probe(struct platform_device *pdev)
|
||||
dev_err(dev, "of_iomap");
|
||||
return -EINVAL;
|
||||
}
|
||||
dev_info(dev, "res.start = %u resource_size = %llx\n",
|
||||
res.start, (unsigned long long)resource_size(&res));
|
||||
dev_info(dev, "res.start = %llx resource_size = %llx\n",
|
||||
(unsigned long long)res.start, (unsigned long long)resource_size(&res));
|
||||
|
||||
/* Test MMIO and IRQ. */
|
||||
iowrite32(0x12345678, map);
|
||||
|
||||
2
qemu
2
qemu
Submodule qemu updated: 577f4633f1...22e7e210d6
1
run
1
run
@@ -44,6 +44,7 @@ env \
|
||||
HOST_QEMU_OPTS="--enable-debug --enable-sdl --extra-cflags='-DDEBUG_PL061=1' --with-sdlabi=2.0" \
|
||||
host-qemu-rebuild \
|
||||
linux-rebuild \
|
||||
kernel_module-rebuild \
|
||||
all \
|
||||
;
|
||||
cd ..
|
||||
|
||||
Reference in New Issue
Block a user