summaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/device_util.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/devices/device_util.c b/src/devices/device_util.c
index 7c1cde9895..81d679a206 100644
--- a/src/devices/device_util.c
+++ b/src/devices/device_util.c
@@ -810,6 +810,21 @@ void ram_resource(device_t dev, unsigned long index,
IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_ASSIGNED;
}
+void uma_resource(device_t dev, unsigned long index,
+ unsigned long basek, unsigned long sizek)
+{
+ struct resource *resource;
+
+ if (!sizek)
+ return;
+
+ resource = new_resource(dev, index);
+ resource->base = ((resource_t)basek) << 10;
+ resource->size = ((resource_t)sizek) << 10;
+ resource->flags = IORESOURCE_MEM | IORESOURCE_RESERVE |
+ IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_ASSIGNED;
+}
+
void tolm_test(void *gp, struct device *dev, struct resource *new)
{
struct resource **best_p = gp;