diff options
| author | Joshua Bakita <jbakita@cs.unc.edu> | 2021-10-03 21:49:00 -0400 |
|---|---|---|
| committer | Joshua Bakita <jbakita@cs.unc.edu> | 2021-10-03 21:49:00 -0400 |
| commit | f4b83713672acaf88a526b930b8e417453f6edc5 (patch) | |
| tree | 92d4588c7aaec19bfe626a21ea887cd1d4dca2ec | |
| parent | 0596e479ffcca43957f8d32127cea5527460b983 (diff) | |
Comment fixup and abort if runlist is stored in VRAM
| -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); |
