Commit fb58fa34 authored by Paul Mackerras's avatar Paul Mackerras

PPC32: remove some compile warnings in the CHRP and powermac boot

wrappers by prototyping the function pointers we use.
parent c39143b5
......@@ -46,6 +46,8 @@ char *avail_high;
static char scratch[SCRATCH_SIZE]; /* 1MB of scratch space for gunzip */
typedef void (*kernel_start_t)(int, int, void *, unsigned int, unsigned int);
void
chrpboot(int a1, int a2, void *prom)
{
......@@ -93,10 +95,10 @@ chrpboot(int a1, int a2, void *prom)
make_bi_recs(((unsigned long) dst + len), "chrpboot", _MACH_chrp,
(PROG_START + PROG_SIZE));
sa = (unsigned long)PROG_START;
sa = PROG_START;
printf("start address = 0x%x\n\r", sa);
(*(void (*)())sa)(a1, a2, prom, initrd_start, initrd_size);
(*(kernel_start_t)sa)(a1, a2, prom, initrd_start, initrd_size);
printf("returned?\n\r");
......
......@@ -41,6 +41,8 @@ char *avail_high;
#define SCRATCH_SIZE (128 << 10)
typedef void (*kernel_start_t)(int, int, void *);
void boot(int a1, int a2, void *prom)
{
unsigned sa, len;
......@@ -90,7 +92,7 @@ void boot(int a1, int a2, void *prom)
sa = (unsigned long)PROG_START;
printf("start address = 0x%x\n", sa);
(*(void (*)())sa)(a1, a2, prom);
(*(kernel_start_t)sa)(a1, a2, prom);
printf("returned?\n");
......
......@@ -47,6 +47,8 @@ char *avail_high;
static char heap[SCRATCH_SIZE];
typedef void (*kernel_start_t)(int, int, void *);
void boot(int a1, int a2, void *prom)
{
unsigned sa, len;
......@@ -95,7 +97,7 @@ void boot(int a1, int a2, void *prom)
sa = (unsigned long)PROG_START;
printf("start address = 0x%x\n", sa);
(*(void (*)())sa)(a1, a2, prom);
(*(kernel_start_t)sa)(a1, a2, prom);
printf("returned?\n");
......
/*
* BK Id: SCCS/s.start.c 1.10 07/25/01 18:13:07 trini
* BK Id: %F% %I% %G% %U% %#%
*/
/*
* Copyright (C) Paul Mackerras 1997.
......@@ -14,7 +14,7 @@
extern int strlen(const char *s);
extern void boot(int a1, int a2, void *prom);
int (*prom)();
int (*prom)(void *);
void *chosen_handle;
void *stdin;
......@@ -29,7 +29,7 @@ void printk(char *fmt, ...);
void
start(int a1, int a2, void *promptr)
{
prom = (int (*)()) promptr;
prom = (int (*)(void *)) promptr;
chosen_handle = finddevice("/chosen");
if (chosen_handle == (void *) -1)
exit();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment