This patch removes all printk format warnings from my LBv3 build (Qemu
x86 config). This was tested with gcc 4.1.0 on x86 and gcc 4.2.1 on x86_64. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@466 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
bb4744c740
commit
0598fd602a
10 changed files with 37 additions and 39 deletions
|
|
@ -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++) {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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, "");
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,14 +36,14 @@
|
|||
#include <elf_boot.h>
|
||||
|
||||
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 */
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue