summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nvlib.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/nvlib.h b/nvlib.h
index 5330b28..482817f 100644
--- a/nvlib.h
+++ b/nvlib.h
@@ -343,11 +343,13 @@ struct nv_device : public nv_region
nv_linear_ramin(struct nv_device* dev)
: nv_region(dev)
{
+ size = 1 * 1024 * 1024;
+ ptr = dev->ptr + NV_RAMIN;
// XXX: OUCH!
- size = dev->vram_mappable_size;
- pci_device_map_range(dev->pci, dev->pci->regions[1].base_addr, size, PCI_DEV_MAP_FLAG_WRITABLE, (void**)&ptr);
- if (!ptr)
- throw std::runtime_error("Failed to init linear RAMIN mapping");
+ //size = dev->vram_mappable_size;
+ //pci_device_map_range(dev->pci, dev->pci->regions[1].base_addr, size, PCI_DEV_MAP_FLAG_WRITABLE, (void**)&ptr);
+ //if (!ptr)
+ // throw std::runtime_error("Failed to init linear RAMIN mapping");
}
};