Table of Contents

Piotr Jaroszyński: Usermode debugging under Linux

Week 9 [ Jul 19 - Jul 25 2010 ]

drivers in userspace

I have just pushed my drivers in userspace branch. It's still a bit rough but it gets the job done. See next week's report for an issue that particularly bugs me. Before getting into details of the implementation let's see a quick HOWTO first:

make bin-$ARCH-linux/gpxe.linux
$ ./configure --with-kernel=... && make
# insmod kmod/uio-dma.ko
# insmod kmod/uio-dma-pci.ko
# echo -n "0000:00:04.0" > /sys/bus/pci/drivers/$driver/unbind
# echo "8086 100e" > /sys/bus/pci/drivers/uio-dma-pci/new_id
# echo -n "0000:00:04.0" > /sys/bus/pci/drivers/uio-dma-pci/bind
UIO DMA kernel backend - version 2.0
Copyright (c) 2009 Qualcomm Inc. Written by Max Krasnyansky <maxk@qualcomm.com>
Driver enabling UIO-DMA for a device version: 0.0.0
ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 10
uio-dma-pci 0000:00:04.0: PCI INT A -> Link[LNKD] -> GSI 10 (level, high) -> IRQ 10
uio-dma: added device. id 0 0000:00:04.0
# ./gpxe.linux --net lpci,dev=00:04.0
# lspci -nn | grep 04
00:04.0 Ethernet controller [0200]: Intel Corporation 82540EM Gigabit Ethernet Controller [8086:100e] (rev 03)
# ./gpxe.linux --net lpci,dev=00:04.0
gPXE initialising devices...ok



gPXE 1.0.1+ -- Open Source Boot Firmware -- http://etherboot.org
Features: HTTP DNS TFTP
DHCP (net0 52:54:00:12:34:58).... ok
net0: 52:54:00:12:34:58 on PCI00:04.0 (open)
  [Link:up, TX:3 TXE:0 RX:10 RXE:0]
http://root.piotrj.org/files/gpxe/100mb................ ok
time: 15s