diff --git a/arch/x86/linuxbios_table.c b/arch/x86/linuxbios_table.c index 982d335a98..9bfa3f4081 100644 --- a/arch/x86/linuxbios_table.c +++ b/arch/x86/linuxbios_table.c @@ -177,8 +177,8 @@ static void lb_memory_range(struct lb_memory *mem, { int entries; - printk(BIOS_DEBUG, "%s: start 0x%lx size 0x%lx\n", - __func__, (u32)start, (u32)size); + printk(BIOS_DEBUG, "%s: start 0x%Lx size 0x%Lx\n", + __func__, start, size); entries = (mem->size - sizeof(*mem))/sizeof(mem->map[0]); mem->map[entries].start = pack_lb64(start); @@ -231,7 +231,7 @@ unsigned long lb_table_fini(struct lb_header *head) head->table_checksum = compute_ip_checksum(first_rec, head->table_bytes); head->header_checksum = 0; head->header_checksum = compute_ip_checksum(head, sizeof(*head)); - printk(BIOS_DEBUG,"Wrote LinuxBIOS table at: %p - %p checksum %lx\n", + printk(BIOS_DEBUG,"Wrote LinuxBIOS table at: %p - %p checksum %x\n", head, rec, head->table_checksum); return (unsigned long)rec; } @@ -243,8 +243,8 @@ static void lb_cleanup_memory_ranges(struct lb_memory *mem) entries = (mem->size - sizeof(*mem))/sizeof(mem->map[0]); printk(BIOS_DEBUG, "%s: # entries %d\n", __func__, entries); for(i = 0; i < entries; i++) - printk(BIOS_INFO, " #%d: base 0x%x size 0x%x\n", - i, (u32)mem->map[i].start.lo, mem->map[i].size.lo); + printk(BIOS_INFO, " #%d: base 0x%08x size 0x%x\n", + i, mem->map[i].start.lo, mem->map[i].size.lo); /* Sort the lb memory ranges */ for(i = 0; i < entries; i++) { diff --git a/device/device.c b/device/device.c index 650b04f550..5e373d7f0e 100644 --- a/device/device.c +++ b/device/device.c @@ -130,10 +130,10 @@ struct constructor *find_constructor(struct device_id *id) int i; printk(BIOS_SPEW, "%s: find %s\n", __func__, dev_id_string(id)); for (i = 0; all_constructors[i]; i++) { - printk(BIOS_SPEW, "%s: check all_constructors[i] 0x%lx\n", + printk(BIOS_SPEW, "%s: check all_constructors[i] %p\n", __func__, all_constructors[i]); for (c = all_constructors[i]; c->ops; c++) { - printk(BIOS_SPEW, "%s: cons 0x%lx, cons id %s\n", + printk(BIOS_SPEW, "%s: cons %p, cons id %s\n", __func__, c, dev_id_string(&c->id)); if ((!c->ops) || (!c->ops->constructor)) { continue; @@ -164,7 +164,7 @@ void constructor(struct device *dev, struct device_id *id) struct constructor *c; c = find_constructor(id); - printk(BIOS_SPEW, "%s: constructor is 0x%lx\n", __func__, c); + printk(BIOS_SPEW, "%s: constructor is %p\n", __func__, c); if(c && c->ops && c->ops->constructor) c->ops->constructor(dev, c); @@ -485,7 +485,7 @@ void compute_allocate_resource(struct bus *bus, struct resource *bridge, base += size; printk(BIOS_SPEW, - "%s %02x * [0x%08Lx - 0x%08Lx] %s\n", + "%s %02lx * [0x%08Lx - 0x%08Lx] %s\n", dev_path(dev), resource->index, resource->base, diff --git a/device/device_util.c b/device/device_util.c index 69b4281fd4..0436873ae7 100644 --- a/device/device_util.c +++ b/device/device_util.c @@ -602,7 +602,7 @@ void report_resource_stored(struct device *dev, struct resource *resource, #endif } printk(BIOS_DEBUG, - "%s %02x <- [0x%010Lx - 0x%010Lx] %s%s%s\n", + "%s %02lx <- [0x%010Lx - 0x%010Lx] %s%s%s\n", dev_path(dev), resource->index, base, end, buf, resource_type(resource), comment); @@ -643,7 +643,7 @@ void search_global_resources(unsigned long type_mask, unsigned long type, resource_search_t search, void *gp) { struct device *curdev; - printk(BIOS_SPEW, "%s: mask %x type %x \n", __func__, type_mask, type); + printk(BIOS_SPEW, "%s: mask %lx type %lx \n", __func__, type_mask, type); for (curdev = all_devices; curdev; curdev = curdev->next) { int i; printk(BIOS_SPEW, @@ -656,9 +656,9 @@ void search_global_resources(unsigned long type_mask, unsigned long type, for (i = 0; i < curdev->resources; i++) { struct resource *resource = &curdev->resource[i]; printk(BIOS_SPEW, - "%s: dev %s, resource %d, flags %x base 0x%lx size 0x%lx\n", + "%s: dev %s, resource %d, flags %lx base 0x%Lx size 0x%Lx\n", __func__, curdev->dtsname, i, resource->flags, - (u32) resource->base, (u32) resource->size); + resource->base, resource->size); /* If it isn't the right kind of resource ignore it. */ if ((resource->flags & type_mask) != type) { continue; diff --git a/device/pci_device.c b/device/pci_device.c index e0920715e3..7f1b3696f7 100644 --- a/device/pci_device.c +++ b/device/pci_device.c @@ -210,7 +210,7 @@ struct resource *pci_get_resource(struct device *dev, unsigned long index) if (moving == 0) { if (value != 0) { printk(BIOS_DEBUG, - "%s register %02x(%08x), read-only ignoring it\n", + "%s register %02lx(%08lx), read-only ignoring it\n", dev_path(dev), index, value); } resource->flags = 0; @@ -309,7 +309,7 @@ static void pci_get_rom_resource(struct device *dev, unsigned long index) if (moving == 0) { if (value != 0) { printk(BIOS_DEBUG, - "%s register %02x(%08x), read-only ignoring it\n", + "%s register %02lx(%08lx), read-only ignoring it\n", dev_path(dev), index, value); } resource->flags = 0; @@ -456,7 +456,7 @@ static void pci_set_resource(struct device *dev, struct resource *resource) /* Make certain the resource has actually been set. */ if (!(resource->flags & IORESOURCE_ASSIGNED)) { printk(BIOS_ERR, - "ERROR: %s %02x %s size: 0x%010Lx not assigned\n", + "ERROR: %s %02lx %s size: 0x%010Lx not assigned\n", dev_path(dev), resource->index, resource_type(resource), resource->size); return; @@ -537,7 +537,7 @@ static void pci_set_resource(struct device *dev, struct resource *resource) } else { /* Don't let me think I stored the resource. */ resource->flags &= ~IORESOURCE_STORED; - printk(BIOS_ERR, "ERROR: invalid resource->index %x\n", + printk(BIOS_ERR, "ERROR: invalid resource->index %lx\n", resource->index); } report_resource_stored(dev, resource, ""); diff --git a/device/pci_rom.c b/device/pci_rom.c index e4a66055eb..18ac6db092 100644 --- a/device/pci_rom.c +++ b/device/pci_rom.c @@ -47,7 +47,7 @@ struct rom_header *pci_rom_probe(struct device *dev) return NULL; } - printk(BIOS_DEBUG, "ROM address for %s = %x\n", dev_path(dev), + printk(BIOS_DEBUG, "ROM address for %s = %lx\n", dev_path(dev), rom_address); if (!dev->on_mainboard) { @@ -131,7 +131,7 @@ struct rom_header *pci_rom_load(struct device *dev, return NULL; // Only one VGA supported. #endif printk(BIOS_DEBUG, - "Copying VGA ROM image from 0x%x to 0x%x, 0x%x bytes\n", + "Copying VGA ROM image from %p to 0x%x, 0x%x bytes\n", rom_header, PCI_VGA_RAM_IMAGE_START, rom_size); memcpy((void *)PCI_VGA_RAM_IMAGE_START, rom_header, rom_size); vga_inited = 1; @@ -139,7 +139,7 @@ struct rom_header *pci_rom_load(struct device *dev, #endif } else { printk(BIOS_DEBUG, - "Copying non-VGA ROM image from 0x%x to 0x%x, 0x%x bytes\n", + "Copying non-VGA ROM image from %p to %p, 0x%x bytes\n", rom_header, pci_ram_image_start, rom_size); memcpy(pci_ram_image_start, rom_header, rom_size); pci_ram_image_start += rom_size; diff --git a/device/pnp_device.c b/device/pnp_device.c index 8e5f4c4e5b..ff00fb9502 100644 --- a/device/pnp_device.c +++ b/device/pnp_device.c @@ -87,7 +87,7 @@ static void pnp_set_resource(struct device *dev, struct resource *resource) { if (!(resource->flags & IORESOURCE_ASSIGNED)) { printk(BIOS_ERR, - "ERROR: %s %02x %s size: 0x%010Lx not assigned\n", + "ERROR: %s %02lx %s size: 0x%010Lx not assigned\n", dev_path(dev), resource->index, resource_type(resource), resource->size); return; @@ -101,7 +101,7 @@ static void pnp_set_resource(struct device *dev, struct resource *resource) } else if (resource->flags & IORESOURCE_IRQ) { pnp_set_irq(dev, resource->index, resource->base); } else { - printk(BIOS_ERR, "ERROR: %s %02x unknown resource type\n", + printk(BIOS_ERR, "ERROR: %s %02lx unknown resource type\n", dev_path(dev), resource->index); return; } diff --git a/lib/elfboot.c b/lib/elfboot.c index 455c0e98fd..dd372614b3 100644 --- a/lib/elfboot.c +++ b/lib/elfboot.c @@ -36,14 +36,14 @@ #include static int valid_area(struct lb_memory *mem, - unsigned long start, unsigned long len) + u64 start, u64 len) { /* Check through all of the memory segments and ensure * the segment that was passed in is completely contained * in RAM. */ int i; - unsigned long end = start + len; + u64 end = start + len; unsigned long mem_entries = (mem->size - sizeof(*mem))/sizeof(mem->map[0]); /* Walk through the table of valid memory ranges and see if I @@ -61,7 +61,7 @@ static int valid_area(struct lb_memory *mem, } if (i == mem_entries) { printk(BIOS_ERR, "No matching RAM area found for range:\n"); - printk(BIOS_ERR, " [0x%016lx, 0x%016lx)\n", start, end); + printk(BIOS_ERR, " [0x%016Lx, 0x%016Lx)\n", start, end); printk(BIOS_ERR, "RAM areas\n"); for(i = 0; i < mem_entries; i++) { u64 mstart, mend; @@ -69,10 +69,8 @@ static int valid_area(struct lb_memory *mem, mtype = mem->map[i].type; mstart = unpack_lb64(mem->map[i].start); mend = mstart + unpack_lb64(mem->map[i].size); - printk(BIOS_ERR, " [0x%016lx, 0x%016lx) %s\n", - (unsigned long)mstart, - (unsigned long)mend, - (mtype == LB_MEM_RAM)?"RAM":"Reserved"); + printk(BIOS_ERR, " [0x%016Lx, 0x%016Lx) %s\n", + mstart, mend, (mtype == LB_MEM_RAM)?"RAM":"Reserved"); } return 0; @@ -101,14 +99,14 @@ static int load_elf_segments(struct lb_memory *mem,unsigned char *header, int he printk(BIOS_DEBUG, "Dropping empty segment\n"); continue; } - printk(BIOS_DEBUG, "New segment addr 0x%lx size 0x%lx offset 0x%lx filesize 0x%lx\n", + printk(BIOS_DEBUG, "New segment addr 0x%x size 0x%x offset 0x%x filesize 0x%x\n", phdr[i].p_paddr, phdr[i].p_memsz, phdr[i].p_offset, phdr[i].p_filesz); /* Clean up the values */ size = phdr[i].p_filesz; if (phdr[i].p_filesz > phdr[i].p_memsz) { size = phdr[i].p_memsz; } - printk(BIOS_DEBUG, "(cleaned up) New segment addr 0x%lx size 0x%lx offset 0x%lx\n", + printk(BIOS_DEBUG, "(cleaned up) New segment addr 0x%x size 0x%x offset 0x%x\n", phdr[i].p_paddr, size, phdr[i].p_offset); /* Verify the memory addresses in the segment are valid */ @@ -150,7 +148,7 @@ int elfload(struct lb_memory *mem, unsigned char *header, unsigned long header_s /* what the hell is boot_successful? */ //boot_successful(); - printk(BIOS_DEBUG, "Jumping to boot code at 0x%x\n", entry); + printk(BIOS_DEBUG, "Jumping to boot code at %p\n", entry); post_code(0xfe); /* Jump to kernel */ diff --git a/northbridge/intel/i440bxemulation/i440bx.c b/northbridge/intel/i440bxemulation/i440bx.c index ec1adf1d34..bd4f29c4c8 100644 --- a/northbridge/intel/i440bxemulation/i440bx.c +++ b/northbridge/intel/i440bxemulation/i440bx.c @@ -79,7 +79,7 @@ static void ram_resource(struct device *dev, unsigned long index, resource->size = ((resource_t) sizek) << 10; resource->flags = IORESOURCE_MEM | IORESOURCE_CACHEABLE | IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_ASSIGNED; - printk(BIOS_DEBUG, "%s: add ram resoource %d bytes\n", __func__, + printk(BIOS_DEBUG, "%s: add ram resoource %Ld bytes\n", __func__, resource->size); } diff --git a/superio/winbond/w83627hf/superio.c b/superio/winbond/w83627hf/superio.c index 04ba246c32..5cacb8e0b4 100644 --- a/superio/winbond/w83627hf/superio.c +++ b/superio/winbond/w83627hf/superio.c @@ -45,13 +45,13 @@ static void pnp_exit_ext_func_mode(struct device * dev) outb(0xaa, dev->path.u.pnp.port); } -static void pnp_write_index(unsigned long port_base, u8 reg, u8 value) +static void pnp_write_index(u16 port_base, u8 reg, u8 value) { outb(reg, port_base); outb(value, port_base + 1); } -static u8 pnp_read_index(unsigned long port_base, u8 reg) +static u8 pnp_read_index(u16 port_base, u8 reg) { outb(reg, port_base); return inb(port_base + 1); @@ -83,7 +83,7 @@ static void init_acpi(struct device * dev) pnp_exit_ext_func_mode(dev); } -static void init_hwm(unsigned long base) +static void init_hwm(u16 base) { u8 reg, value; int i; diff --git a/util/x86emu/vm86.c b/util/x86emu/vm86.c index 33e221e22a..60fe5d82b7 100644 --- a/util/x86emu/vm86.c +++ b/util/x86emu/vm86.c @@ -543,14 +543,14 @@ int biosint(unsigned long intnumber, eax, ebx, ecx, edx); printk(BIOS_DEBUG, "biosint: ebp 0x%lx esp 0x%lx edi 0x%lx esi 0x%lx\n", ebp, esp, edi, esi); - printk(BIOS_DEBUG, "biosint: ip 0x%x cs 0x%x flags 0x%x\n", + printk(BIOS_DEBUG, "biosint: ip 0x%lx cs 0x%lx flags 0x%lx\n", ip, cs, flags); // cases in a good compiler are just as good as your own tables. switch (intnumber) { case 0 ... 15: // These are not BIOS service, but the CPU-generated exceptions - printk(BIOS_INFO, "biosint: Oops, exception %u\n", intnumber); + printk(BIOS_INFO, "biosint: Oops, exception %lu\n", intnumber); if (esp < 0x1000) { printk(BIOS_DEBUG, "Stack contents: "); while (esp < 0x1000) { @@ -578,7 +578,7 @@ int biosint(unsigned long intnumber, &ebx, &edx, &ecx, &eax, &flags); break; default: - printk(BIOS_INFO, "BIOSINT: Unsupport int #0x%x\n", + printk(BIOS_INFO, "BIOSINT: Unsupport int #0x%lx\n", intnumber); break; }