Commit 87ebdd74 authored by Ton Damen's avatar Ton Damen
Browse files


parent 55e0a5b4
......@@ -6,24 +6,31 @@ Currently the IP of the SPEC7 presents two bars: bar0 (1MB) and bar4 (16MB).
When the kernel module (spec7.ko) is loaded, the following should be seen among the kernel messages:
spec7:probe_one: PCI device id: [10ee:7022], address: 0000:01:00.0
spec7:probe_one: size bar0 = 1048576, bar4 = 16777216
spec7:spec7_module_init: loaded
The PCI address is here "0000:01:00.0" which gives the following sysfs entries:
- /sys/bus/pci/devices/0000:01:00.0/deadbe
Writing either '0' or '1' will write this values into the SYSCON register of the LM32.
- /sys/bus/pci/devices/0000:01:00.0/lm32_mem
Gives file based access to the LM32 memory.
BAR interfaces
The module creates to file entries in /dev:
These character devices supports access to the memory regions of each bar in a stream-like fashion through systems calls read() and write(). The region boundaries are protected by returning EOF when reading and EFAULT (invalid address) when writing beyond.
......@@ -31,7 +38,7 @@ Both cp(3) and dd(3) can be used to transfer files to and from the bar memory re
The system call ioctl() can be used to query the size of the bar regions:
ioctl(fd, 0xdc01, 0)
`ioctl(fd, 0xdc01, 0)`
returns the size in bytes.
......@@ -46,19 +53,19 @@ This example gives users who are member of group “spec7” read-write access a
file 60-spec7.rules contents:
KERNEL=="spec7_*", MODE="0664", GROUP="spec7"
`KERNEL=="spec7_*", MODE="0664", GROUP="spec7"`
To reload the udev config:
\# udevadm control --reload
`# udevadm control --reload`
To add the group “spec7”
\# addgroup spec7
`# addgroup spec7`
To add a groups membership to an existing user the following command is given:
\# usermod -a -G spec7 username
`# usermod -a -G spec7 username`
Nb. reload the driver to effectuate the new configuration.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment