CBMEM CONSOLE: Add code using the new console driver.
[coreboot.git] / src / devices / pnp_device.c
index b2bca032326806a28cff19e673d97e9c1d5be4d3..fb6c9d68685b55d109e5155f0831346bbf0eaa30 100644 (file)
@@ -107,7 +107,7 @@ void pnp_read_resources(device_t dev)
 static void pnp_set_resource(device_t dev, struct resource *resource)
 {
        if (!(resource->flags & IORESOURCE_ASSIGNED)) {
-               printk(BIOS_ERR, "ERROR: %s %02lx %s size: 0x%010Lx "
+               printk(BIOS_ERR, "ERROR: %s %02lx %s size: 0x%010llx "
                       "not assigned\n", dev_path(dev), resource->index,
                       resource_type(resource), resource->size);
                return;
@@ -170,6 +170,12 @@ static void pnp_get_ioresource(device_t dev, u8 index, struct io_info *info)
        struct resource *resource;
        unsigned moving, gran, step;
 
+       if (!info->mask) {
+               printk(BIOS_ERR, "ERROR: device %s index %d has no mask.\n",
+                               dev_path(dev), index);
+               return;
+       }
+
        resource = new_resource(dev, index);
 
        /* Initilize the resource. */