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 /runlist.c | |
parent | 0596e479ffcca43957f8d32127cea5527460b983 (diff) |
Comment fixup and abort if runlist is stored in VRAM
Diffstat (limited to 'runlist.c')
-rw-r--r-- | runlist.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); |