summaryrefslogtreecommitdiff
path: root/lib_i386
diff options
context:
space:
mode:
Diffstat (limited to 'lib_i386')
-rw-r--r--lib_i386/i386_linux.c4
-rw-r--r--lib_i386/pci_type1.c8
-rw-r--r--lib_i386/realmode.c7
3 files changed, 10 insertions, 9 deletions
diff --git a/lib_i386/i386_linux.c b/lib_i386/i386_linux.c
index c37a0d8..5a596ff 100644
--- a/lib_i386/i386_linux.c
+++ b/lib_i386/i386_linux.c
@@ -47,7 +47,7 @@ image_header_t *fake_header(image_header_t *hdr, void *ptr, int size)
void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
ulong addr, ulong *len_ptr, int verify)
{
- ulong base_ptr;
+ void *base_ptr;
ulong len = 0, checksum;
ulong initrd_start, initrd_end;
@@ -150,7 +150,7 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
initrd_end = 0;
}
- base_ptr = load_zimage(addr + sizeof(image_header_t), ntohl(hdr->ih_size),
+ base_ptr = load_zimage((void*)addr + sizeof(image_header_t), ntohl(hdr->ih_size),
initrd_start, initrd_end-initrd_start, 0);
if (NULL == base_ptr) {
diff --git a/lib_i386/pci_type1.c b/lib_i386/pci_type1.c
index 8d35716..5dfa8ab 100644
--- a/lib_i386/pci_type1.c
+++ b/lib_i386/pci_type1.c
@@ -17,16 +17,16 @@
#include <asm/io.h>
#include <pci.h>
-#define cfg_read(val, addr, type, op) *val = op((type)(addr))
-#define cfg_write(val, addr, type, op) op((val), (type *)(addr))
+#define cfg_read(val, addr, op) *val = op((int)(addr))
+#define cfg_write(val, addr, op) op((val), (int)(addr))
#define TYPE1_PCI_OP(rw, size, type, op, mask) \
static int \
type1_##rw##_config_##size(struct pci_controller *hose, \
pci_dev_t dev, int offset, type val) \
{ \
- outl(dev | (offset & 0xfc) | 0x80000000, hose->cfg_addr); \
- cfg_##rw(val, hose->cfg_data + (offset & mask), type, op); \
+ outl(dev | (offset & 0xfc) | 0x80000000, (int)hose->cfg_addr); \
+ cfg_##rw(val, hose->cfg_data + (offset & mask), op); \
return 0; \
}
diff --git a/lib_i386/realmode.c b/lib_i386/realmode.c
index 372147c..27d4693 100644
--- a/lib_i386/realmode.c
+++ b/lib_i386/realmode.c
@@ -24,6 +24,7 @@
#include <common.h>
#include <asm/io.h>
#include <asm/ptrace.h>
+#include <asm/realmode.h>
#define REALMODE_BASE ((char*)0x7c0)
@@ -44,16 +45,16 @@ int enter_realmode(u16 seg, u16 off, struct pt_regs *in, struct pt_regs *out)
/* copy the realmode switch code */
if (i386boot_realmode_size > (REALMODE_MAILBOX-REALMODE_BASE)) {
printf("realmode switch too large (%ld bytes, max is %d)\n",
- i386boot_realmode_size, (REALMODE_MAILBOX-REALMODE_BASE));
+ i386boot_realmode_size, (int)(REALMODE_MAILBOX-REALMODE_BASE));
return -1;
}
- memcpy(REALMODE_BASE, i386boot_realmode, i386boot_realmode_size);
+ memcpy(REALMODE_BASE, (void*)i386boot_realmode, i386boot_realmode_size);
in->eip = off;
in->xcs = seg;
- if (3>in->esp & 0xffff) {
+ if (3>(in->esp & 0xffff)) {
printf("Warning: entering realmode with sp < 4 will fail\n");
}