diff options
| -rw-r--r-- | nvdebug_entry.c | 1 | ||||
| -rw-r--r-- | runlist.c | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/nvdebug_entry.c b/nvdebug_entry.c index 14ad6e9..0854b8b 100644 --- a/nvdebug_entry.c +++ b/nvdebug_entry.c | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | * - Add sysfs trigger for a preemption | 6 | * - Add sysfs trigger for a preemption |
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| 9 | #include <linux/device.h> // For struct device, bus_find_device*(), struct bus_type | ||
| 9 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
| 10 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| 11 | #include <linux/proc_fs.h> // So we can set up entries in /proc | 12 | #include <linux/proc_fs.h> // So we can set up entries in /proc |
| @@ -1,4 +1,4 @@ | |||
| 1 | #include <linux/device.h> // For struct device, bus_find_device*() | 1 | #include <linux/device.h> // For struct device, bus_find_device*(), struct bus_type |
| 2 | //#include <linux/iommu.h> // For struct iommu_domain | 2 | //#include <linux/iommu.h> // For struct iommu_domain |
| 3 | #include <linux/kernel.h> // Kernel types | 3 | #include <linux/kernel.h> // Kernel types |
| 4 | #include <asm/io.h> | 4 | #include <asm/io.h> |
| @@ -68,6 +68,11 @@ int get_runlist_iter(struct runlist_iter *rl_iter) { | |||
| 68 | runlist_iova = ((u64)rl_base.ptr) << 12; | 68 | runlist_iova = ((u64)rl_base.ptr) << 12; |
| 69 | printk(KERN_INFO "[nvdebug] Runlist ptr: %x, type: %d, raw: %x, IOVA: %px\n", | 69 | printk(KERN_INFO "[nvdebug] Runlist ptr: %x, type: %d, raw: %x, IOVA: %px\n", |
| 70 | rl_base.ptr, rl_base.type, rl_base.raw, (void*)runlist_iova); | 70 | rl_base.ptr, rl_base.type, rl_base.raw, (void*)runlist_iova); |
| 71 | // TODO: Support reading video memory | ||
| 72 | if (rl_base.type == TARGET_VID_MEM) { | ||
| 73 | printk(KERN_ERR "[nvdebug] Runlist is located in video memory. Access to video memory is unimplemented."); | ||
| 74 | return -ENOTSUPP; | ||
| 75 | } | ||
| 71 | // Segfaults | 76 | // Segfaults |
| 72 | //u32 attempted_read = ioread32(runlist_iova); | 77 | //u32 attempted_read = ioread32(runlist_iova); |
| 73 | //printk(KERN_INFO "[nvdebug] first word of runlist: %0x\n", attempted_read); | 78 | //printk(KERN_INFO "[nvdebug] first word of runlist: %0x\n", attempted_read); |
