diff options
Diffstat (limited to 'sys/boot/ofw/libofw/elf_freebsd.c')
-rw-r--r-- | sys/boot/ofw/libofw/elf_freebsd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/boot/ofw/libofw/elf_freebsd.c b/sys/boot/ofw/libofw/elf_freebsd.c index 4a8855b..624e9fa 100644 --- a/sys/boot/ofw/libofw/elf_freebsd.c +++ b/sys/boot/ofw/libofw/elf_freebsd.c @@ -54,7 +54,12 @@ __elfN(ofw_loadfile)(char *filename, u_int64_t dest, return (r); #if defined(__powerpc__) - __syncicache((void *) (*result)->f_addr, (*result)->f_size); + /* + * No need to sync the icache for modules: this will + * be done by the kernel after relocation. + */ + if (!strcmp((*result)->f_type, "elf kernel")) + __syncicache((void *) (*result)->f_addr, (*result)->f_size); #endif return (0); } |