mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Fix most print format warnings
git-svn-id: svn://coreboot.org/openbios/openbios-devel@272 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -106,11 +106,11 @@ int aout_load(struct sys_info *info, const char *filename, const char *cmdline)
|
||||
|
||||
if (N_MAGIC(ehdr) == NMAGIC) {
|
||||
if ((unsigned long)lfile_read((void *)start, ehdr.a_text) != ehdr.a_text) {
|
||||
printf("Can't read program text segment (size 0x%lx)\n", ehdr.a_text);
|
||||
printf("Can't read program text segment (size 0x%x)\n", ehdr.a_text);
|
||||
goto out;
|
||||
}
|
||||
if ((unsigned long)lfile_read((void *)(start + N_DATADDR(ehdr)), ehdr.a_data) != ehdr.a_data) {
|
||||
printf("Can't read program data segment (size 0x%lx)\n", ehdr.a_data);
|
||||
printf("Can't read program data segment (size 0x%x)\n", ehdr.a_data);
|
||||
goto out;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -145,7 +145,7 @@ static int load_segments(Elf_phdr *phdr, int phnum,
|
||||
for (i = 0; i < phnum; i++) {
|
||||
if (phdr[i].p_type != PT_LOAD)
|
||||
continue;
|
||||
debug("segment %d addr:%#lx file:%#lx mem:%#lx ",
|
||||
debug("segment %d addr:%#llx file:%#llx mem:%#llx ",
|
||||
i, addr_fixup(phdr[i].p_paddr), phdr[i].p_filesz, phdr[i].p_memsz);
|
||||
file_seek(offset + phdr[i].p_offset);
|
||||
debug("loading... ");
|
||||
@@ -377,7 +377,7 @@ int elf_load(struct sys_info *info, const char *filename, const char *cmdline)
|
||||
|
||||
//debug("current time: %lu\n", currticks());
|
||||
|
||||
debug("entry point is %#lx\n", addr_fixup(ehdr.e_entry));
|
||||
debug("entry point is %#llx\n", addr_fixup(ehdr.e_entry));
|
||||
printf("Jumping to entry point...\n");
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -574,7 +574,7 @@ static int start_linux(uint32_t kern_addr)
|
||||
ctx = switch_to(ctx);
|
||||
|
||||
/* It's impossible but... */
|
||||
printf("Returned with o0=%#lx\n", ctx->regs[REG_O0]);
|
||||
printf("Returned with o0=%#llx\n", ctx->regs[REG_O0]);
|
||||
|
||||
return ctx->regs[REG_O0];
|
||||
}
|
||||
|
||||
@@ -598,7 +598,7 @@ void arch_nvram_get(char *data)
|
||||
cmdline_size = size;
|
||||
boot_device = nv_info.boot_devices[0];
|
||||
|
||||
printk("kernel addr %lx size %lx\n", kernel_image, kernel_size);
|
||||
printk("kernel addr %llx size %llx\n", kernel_image, kernel_size);
|
||||
if (size)
|
||||
printk("kernel cmdline %s\n", obio_cmdline);
|
||||
|
||||
|
||||
@@ -938,7 +938,7 @@ static char get_fdc_version(void)
|
||||
if ((bytes = result(reply_buffer, MAX_REPLIES)) <= 0x00)
|
||||
return FDC_NONE; /* No FDC present ??? */
|
||||
if ((bytes==1) && (reply_buffer[0] == 0x80)){
|
||||
printk_info("FDC %d is an 8272A\n");
|
||||
printk_info("FDC is an 8272A\n");
|
||||
return FDC_8272A; /* 8272a/765 don't know DUMPREGS */
|
||||
}
|
||||
if (bytes != 10) {
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
#define target_ulong(value) (target_long(value))
|
||||
|
||||
#if BITS==32
|
||||
#define target_ucell(value) (target_long(value))
|
||||
#define target_cell(value) (target_long(value))
|
||||
#define target_ucell(value) ((ucell)target_long(value))
|
||||
#define target_cell(value) ((cell)target_long(value))
|
||||
#elif BITS==64
|
||||
#ifdef NATIVE_BITWIDTH_LARGER_THAN_HOST_BITWIDTH
|
||||
#define target_ucell(value) ( ((ucell)target_long((value)&0xffffffff))<<32 )
|
||||
@@ -108,8 +108,13 @@
|
||||
#ifdef NATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH
|
||||
#define pointer2cell(x) ((ucell)(x))
|
||||
#define cell2pointer(x) ((u8 *)(x))
|
||||
#if BITS==32
|
||||
#define FMT_CELL_x "x"
|
||||
#define FMT_CELL_d "d"
|
||||
#else
|
||||
#define FMT_CELL_x "lx"
|
||||
#define FMT_CELL_d "ld"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef NATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH
|
||||
|
||||
@@ -97,7 +97,7 @@ of_client_interface( int *params )
|
||||
if( (val=POP()) ) {
|
||||
dstackcnt = dstacksave;
|
||||
if( val == -1 )
|
||||
printk("Unimplemented service %s ([%d] -- [%d])\n",
|
||||
printk("Unimplemented service %s ([%ld] -- [%ld])\n",
|
||||
pb->service, pb->nargs, pb->nret );
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user