Author: rminnich
Date: 2007-09-05 17:17:20 +0200 (Wed, 05 Sep 2007)
New Revision: 494
Modified:
LinuxBIOSv3/arch/x86/stage1.c
LinuxBIOSv3/device/pci_device.c
LinuxBIOSv3/lib/lar.c
LinuxBIOSv3/util/lar/stream.c
Log:
These are type cleanups and a genuine bug fix.
Signed-off-by: Ronald G. Minnich <rminnich(a)gmail.com>
Acked-by: Stefan Reinauer <stepan(a)coresystems.de>
Modified: LinuxBIOSv3/arch/x86/stage1.c
===================================================================
--- LinuxBIOSv3/arch/x86/stage1.c 2007-09-05 02:10:45 UTC (rev 493)
+++ LinuxBIOSv3/arch/x86/stage1.c 2007-09-05 15:17:20 UTC (rev 494)
@@ -56,14 +56,13 @@
int legacy(struct mem_file *archive, char *name, void *where, struct lb_memory *mem)
{
int ret;
- struct mem_file result;
int elfboot_mem(struct lb_memory *mem, void *where, int size);
ret = copy_file(archive, name, where);
if (ret) {
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);
return -1;
Modified: LinuxBIOSv3/device/pci_device.c
===================================================================
--- LinuxBIOSv3/device/pci_device.c 2007-09-05 02:10:45 UTC (rev 493)
+++ LinuxBIOSv3/device/pci_device.c 2007-09-05 15:17:20 UTC (rev 494)
@@ -661,7 +661,7 @@
ram = pci_rom_load(dev, rom);
if (ram == NULL)
return;
- run_bios(dev, ram);
+ run_bios(dev, (unsigned long)ram);
#endif
}
Modified: LinuxBIOSv3/lib/lar.c
===================================================================
--- LinuxBIOSv3/lib/lar.c 2007-09-05 02:10:45 UTC (rev 493)
+++ LinuxBIOSv3/lib/lar.c 2007-09-05 15:17:20 UTC (rev 494)
@@ -107,8 +107,8 @@
result->len = ntohl(header->len);
result->reallen = ntohl(header->reallen);
result->compression = ntohl(header->compression);
- result->entry = (void *)ntohl(header->entry);
- result->loadaddress = (void *)ntohl(header->loadaddress);
+ result->entry = (void *)ntohl((u32)header->entry);
+ result->loadaddress = (void *)ntohl((u32)header->loadaddress);
printk(BIOS_SPEW,
"start %p len %d reallen %d compression %x entry %p loadaddress %p\n",
result->start, result->len, result->reallen,
Modified: LinuxBIOSv3/util/lar/stream.c
===================================================================
--- LinuxBIOSv3/util/lar/stream.c 2007-09-05 02:10:45 UTC (rev 493)
+++ LinuxBIOSv3/util/lar/stream.c 2007-09-05 15:17:20 UTC (rev 494)
@@ -79,7 +79,7 @@
u32 entry;
int i;
int size;
- unsigned char *header;
+ char *header;
char ename[64];
int headers;
char *temp;
@@ -101,7 +101,7 @@
/* validate elf header */
ehdr = (Elf32_Ehdr *)filebuf;
headers = ehdr->e_phnum;
- header = (unsigned char *)ehdr;
+ header = (char *)ehdr;
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",
ehdr->e_type,