From 01032004f7b2d6f7d1b6ef58bb0f99b75eeeadad Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Fri, 23 Jun 2017 17:58:06 +0100 Subject: [PATCH] Monitor, PCI DMA and BAR --- kernel_module/pci.c | 9 ++++++++- runqemu | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/kernel_module/pci.c b/kernel_module/pci.c index d6c5651..b2828ab 100644 --- a/kernel_module/pci.c +++ b/kernel_module/pci.c @@ -19,6 +19,11 @@ Grep QEMU source for the device description, and keep it open at all times! - https://is.muni.cz/el/1433/podzim2016/PB173/um/65218991/ course given by the creator of the edu device. In Czech, and only describes API - http://nairobi-embedded.org/linux_pci_device_driver.html + +DMA: + +- https://stackoverflow.com/questions/32592734/are-there-any-dma-driver-example-pcie-and-fpga/44716747#44716747 +- https://stackoverflow.com/questions/17913679/how-to-instantiate-and-use-a-dma-driver-linux-module */ #include /* put_user */ @@ -30,7 +35,9 @@ Grep QEMU source for the device description, and keep it open at all times! #include #include -/* Each PCI device has 6 BAR IOs (base address register) as per the PCI spec. +/* https://stackoverflow.com/questions/30190050/what-is-base-address-register-bar-in-pcie/44716618#44716618 + * + * Each PCI device has 6 BAR IOs (base address register) as per the PCI spec. * * Each BAR corresponds to an address range that can be used to communicate with the PCI. * diff --git a/runqemu b/runqemu index 19b4cb5..d5492a3 100755 --- a/runqemu +++ b/runqemu @@ -49,9 +49,9 @@ case "$arch" in cmd="$debug_qemu ./buildroot/output/host/usr/bin/qemu-system-x86_64 \ -M pc \ -append 'root=/dev/vda $extra_append' \ - -device edu \ -drive file=${images_dir}/rootfs.ext2,if=virtio,format=raw \ -kernel ${images_dir}/bzImage \ + -monitor telnet::45454,server,nowait \ -m 128M \ -net nic,model=virtio \ -net user \ @@ -70,6 +70,7 @@ case "$arch" in -dtb ${images_dir}/versatile-pb.dtb \ -kernel ${images_dir}/zImage \ -m 128M \ + -monitor telnet::45454,server,nowait \ -net nic,model=rtl8139 \ -net user \ -serial stdio \