summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorrin <rin@NetBSD.org>2022-05-30 14:05:36 +0000
committerrin <rin@NetBSD.org>2022-05-30 14:05:36 +0000
commitb09fa5ff99d9d0e576f6bfc1187b231d472be2b6 (patch)
tree63d1b061cf32217d9bb2e062273c421e0718414b /sys
parent6e817f0b6b6a879ae57afeacb8f8c3703fd4ed64 (diff)
Introduce PPC_NO_UNALIGNED flag to indicate that CPU cannot handle
unaligned memory access, and emulation should be provided to userland.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/powerpc/conf/files.powerpc4
-rw-r--r--sys/arch/powerpc/include/cpu.h7
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/arch/powerpc/conf/files.powerpc b/sys/arch/powerpc/conf/files.powerpc
index 9cc4d412905..e75b6f08436 100644
--- a/sys/arch/powerpc/conf/files.powerpc
+++ b/sys/arch/powerpc/conf/files.powerpc
@@ -1,14 +1,16 @@
-# $NetBSD: files.powerpc,v 1.101 2022/05/07 07:10:46 rin Exp $
+# $NetBSD: files.powerpc,v 1.102 2022/05/30 14:05:36 rin Exp $
defflag opt_altivec.h ALTIVEC K_ALTIVEC PPC_HAVE_SPE
defflag opt_openpic.h OPENPIC_DISTRIBUTE
defparam opt_ppcparam.h L2CR_CONFIG L3CR_CONFIG INTSTK CLOCKBASE VERBOSE_INITPPC PPC_CPU_FREQ
defflag opt_ppcarch.h PPC_OEA PPC_OEA601 PPC_OEA64 PPC_OEA64_BRIDGE PPC_MPC8XX PPC_IBM4XX PPC_IBM403 PPC_IBM440 PPC_BOOKE
defflag opt_ppccache.h CACHE_PROTO_MEI
+defflag opt_ppcopts.h PPC_NO_UNALIGNED
defflag opt_pmap.h PMAPDEBUG PMAPCHECK PMAPCOUNTERS PMAP_MINIMALTLB PMAP_TLBDEBUG
defparam opt_pmap.h PTEGCOUNT PMAP_MEMLIMIT
file arch/powerpc/powerpc/core_machdep.c coredump
+file arch/powerpc/powerpc/fix_unaligned.c ppc_no_unaligned
file arch/powerpc/powerpc/fixup.c
file arch/powerpc/powerpc/kgdb_machdep.c kgdb
file arch/powerpc/powerpc/kobj_machdep.c modular
diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h
index 094970d0267..f65d247c290 100644
--- a/sys/arch/powerpc/include/cpu.h
+++ b/sys/arch/powerpc/include/cpu.h
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.120 2021/11/02 11:26:04 ryo Exp $ */
+/* $NetBSD: cpu.h,v 1.121 2022/05/30 14:05:36 rin Exp $ */
/*
* Copyright (C) 1999 Wolfgang Solfrank.
@@ -49,6 +49,7 @@ struct cache_info {
#include "opt_modular.h"
#include "opt_multiprocessor.h"
#include "opt_ppcarch.h"
+#include "opt_ppcopts.h"
#endif
#ifdef _KERNEL
@@ -471,6 +472,10 @@ extern paddr_t msgbuf_paddr;
extern int cpu_altivec;
#endif
+#ifdef PPC_NO_UNALIGNED
+bool fix_unaligned(struct trapframe *, ksiginfo_t *);
+#endif
+
#endif /* _KERNEL */
/* XXX The below breaks unified pmap on ppc32 */