These are type cleanups and a genuine bug fix.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@494 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Ronald G. Minnich 2007-09-05 15:17:20 +00:00
parent 7d944735be
commit 94864de286
4 changed files with 6 additions and 7 deletions

View file

@ -56,14 +56,13 @@ static void enable_rom(void)
int legacy(struct mem_file *archive, char *name, void *where, struct lb_memory *mem) int legacy(struct mem_file *archive, char *name, void *where, struct lb_memory *mem)
{ {
int ret; int ret;
struct mem_file result;
int elfboot_mem(struct lb_memory *mem, void *where, int size); int elfboot_mem(struct lb_memory *mem, void *where, int size);
ret = copy_file(archive, name, where); ret = copy_file(archive, name, where);
if (ret) { if (ret) {
printk(BIOS_ERR, "'%s' found, but could not load it.\n", name); printk(BIOS_ERR, "'%s' found, but could not load it.\n", name);
} }
ret = elfboot_mem(mem, where, result.reallen); ret = elfboot_mem(mem, where, archive->reallen);
printk(BIOS_ERR, "elfboot_mem returns %d\n", ret); printk(BIOS_ERR, "elfboot_mem returns %d\n", ret);
return -1; return -1;

View file

@ -661,7 +661,7 @@ void pci_dev_init(struct device *dev)
ram = pci_rom_load(dev, rom); ram = pci_rom_load(dev, rom);
if (ram == NULL) if (ram == NULL)
return; return;
run_bios(dev, ram); run_bios(dev, (unsigned long)ram);
#endif #endif
} }

View file

@ -107,8 +107,8 @@ int find_file(struct mem_file *archive, const char *filename, struct mem_file *r
result->len = ntohl(header->len); result->len = ntohl(header->len);
result->reallen = ntohl(header->reallen); result->reallen = ntohl(header->reallen);
result->compression = ntohl(header->compression); result->compression = ntohl(header->compression);
result->entry = (void *)ntohl(header->entry); result->entry = (void *)ntohl((u32)header->entry);
result->loadaddress = (void *)ntohl(header->loadaddress); result->loadaddress = (void *)ntohl((u32)header->loadaddress);
printk(BIOS_SPEW, printk(BIOS_SPEW,
"start %p len %d reallen %d compression %x entry %p loadaddress %p\n", "start %p len %d reallen %d compression %x entry %p loadaddress %p\n",
result->start, result->len, result->reallen, result->start, result->len, result->reallen,

View file

@ -79,7 +79,7 @@ int output_elf_segments(struct lar *lar, char *name, char *filebuf,
u32 entry; u32 entry;
int i; int i;
int size; int size;
unsigned char *header; char *header;
char ename[64]; char ename[64];
int headers; int headers;
char *temp; char *temp;
@ -101,7 +101,7 @@ int output_elf_segments(struct lar *lar, char *name, char *filebuf,
/* validate elf header */ /* validate elf header */
ehdr = (Elf32_Ehdr *)filebuf; ehdr = (Elf32_Ehdr *)filebuf;
headers = ehdr->e_phnum; headers = ehdr->e_phnum;
header = (unsigned char *)ehdr; header = (char *)ehdr;
if (verbose()) if (verbose())
fprintf(stderr, "Type %d machine %d version %d entry %p phoff %d shoff %d flags %#x hsize %d phentsize %d phnum %d s_hentsize %d s_shnum %d \n", fprintf(stderr, "Type %d machine %d version %d entry %p phoff %d shoff %d flags %#x hsize %d phentsize %d phnum %d s_hentsize %d s_shnum %d \n",
ehdr->e_type, ehdr->e_type,