diff options
Diffstat (limited to 'stand/powerpc/kboot')
-rw-r--r-- | stand/powerpc/kboot/Makefile | 3 | ||||
-rw-r--r-- | stand/powerpc/kboot/host_syscall.h | 2 | ||||
-rw-r--r-- | stand/powerpc/kboot/hostdisk.c | 2 | ||||
-rw-r--r-- | stand/powerpc/kboot/kbootfdt.c | 4 | ||||
-rw-r--r-- | stand/powerpc/kboot/main.c | 5 | ||||
-rw-r--r-- | stand/powerpc/kboot/ppc64_elf_freebsd.c | 4 |
6 files changed, 10 insertions, 10 deletions
diff --git a/stand/powerpc/kboot/Makefile b/stand/powerpc/kboot/Makefile index b51a068..e91421d 100644 --- a/stand/powerpc/kboot/Makefile +++ b/stand/powerpc/kboot/Makefile @@ -28,7 +28,6 @@ SRCS+= ucmpdi2.c CFLAGS+= -mcpu=powerpc64 # Always add MI sources -HELP_FILES= # Disable .include "${BOOTSRC}/loader.mk" .PATH: ${SYSDIR}/libkern @@ -45,6 +44,4 @@ CFLAGS+= -Wa,-mppc64bridge DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA} LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA} -HELP_FILES+= ${FDTSRC}/help.fdt - .include <bsd.prog.mk> diff --git a/stand/powerpc/kboot/host_syscall.h b/stand/powerpc/kboot/host_syscall.h index 0d47bd5..349c54e 100644 --- a/stand/powerpc/kboot/host_syscall.h +++ b/stand/powerpc/kboot/host_syscall.h @@ -33,7 +33,7 @@ ssize_t host_read(int fd, void *buf, size_t nbyte); ssize_t host_write(int fd, const void *buf, size_t nbyte); ssize_t host_seek(int fd, int64_t offset, int whence); -int host_open(char *path, int flags, int mode); +int host_open(const char *path, int flags, int mode); int host_close(int fd); void *host_mmap(void *addr, size_t len, int prot, int flags, int fd, int); #define host_getmem(size) host_mmap(0, size, 3 /* RW */, 0x22 /* ANON */, -1, 0); diff --git a/stand/powerpc/kboot/hostdisk.c b/stand/powerpc/kboot/hostdisk.c index 22f5406..26d3959 100644 --- a/stand/powerpc/kboot/hostdisk.c +++ b/stand/powerpc/kboot/hostdisk.c @@ -94,7 +94,7 @@ hostdisk_open(struct open_file *f, ...) if (desc->d_unit <= 0) { printf("hostdisk_open: couldn't open %s: %d\n", - desc->d_opendata, desc->d_unit); + (char *)desc->d_opendata, desc->d_unit); return (ENOENT); } diff --git a/stand/powerpc/kboot/kbootfdt.c b/stand/powerpc/kboot/kbootfdt.c index 5ab3c3d..67a2082 100644 --- a/stand/powerpc/kboot/kbootfdt.c +++ b/stand/powerpc/kboot/kbootfdt.c @@ -119,7 +119,7 @@ fdt_linux_fixups(void *fdtp) offset = fdt_path_offset(fdtp, "/ibm,opal"); if (offset > 0) { - uint64_t *base, *size; + const uint64_t *base, *size; base = fdt_getprop(fdtp, offset, "opal-base-address", &len); size = fdt_getprop(fdtp, offset, "opal-runtime-size", @@ -130,7 +130,7 @@ fdt_linux_fixups(void *fdtp) } offset = fdt_path_offset(fdtp, "/rtas"); if (offset > 0) { - uint32_t *base, *size; + const uint32_t *base, *size; base = fdt_getprop(fdtp, offset, "linux,rtas-base", &len); size = fdt_getprop(fdtp, offset, "rtas-size", &len); if (base != NULL && size != NULL) diff --git a/stand/powerpc/kboot/main.c b/stand/powerpc/kboot/main.c index 7a24c16..cbd1161 100644 --- a/stand/powerpc/kboot/main.c +++ b/stand/powerpc/kboot/main.c @@ -122,7 +122,7 @@ main(int argc, const char **argv) setenv("loaddev", bootdev, 1); setenv("LINES", "24", 1); - interact(NULL); /* doesn't return */ + interact(); /* doesn't return */ return (0); } @@ -130,7 +130,8 @@ main(int argc, const char **argv) void exit(int code) { - /* XXX: host_exit */ + while (1); /* XXX: host_exit */ + __unreachable(); } void diff --git a/stand/powerpc/kboot/ppc64_elf_freebsd.c b/stand/powerpc/kboot/ppc64_elf_freebsd.c index 22fa7b5..987565e 100644 --- a/stand/powerpc/kboot/ppc64_elf_freebsd.c +++ b/stand/powerpc/kboot/ppc64_elf_freebsd.c @@ -46,6 +46,8 @@ extern size_t szkerneltramp; extern int nkexec_segments; extern void * loaded_segments; +vm_offset_t md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb); + int ppc64_elf_loadfile(char *filename, u_int64_t dest, struct preloaded_file **result) @@ -96,7 +98,7 @@ ppc64_elf_exec(struct preloaded_file *fp) trampoline[3] = dtb; trampoline[6] = mdp; - trampoline[7] = sizeof(mdp); + trampoline[7] = 0xfb5d104d; printf("Kernel entry at %#jx (%#x) ...\n", e->e_entry, trampoline[2]); printf("DTB at %#x, mdp at %#x\n", dtb, mdp); |