Module Name:    src
Committed By:   rin
Date:           Mon May 30 14:05:36 UTC 2022

Modified Files:
        src/sys/arch/powerpc/conf: files.powerpc
        src/sys/arch/powerpc/include: cpu.h

Log Message:
Introduce PPC_NO_UNALIGNED flag to indicate that CPU cannot handle
unaligned memory access, and emulation should be provided to userland.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/powerpc/conf/files.powerpc
cvs rdiff -u -r1.120 -r1.121 src/sys/arch/powerpc/include/cpu.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/powerpc/conf/files.powerpc
diff -u src/sys/arch/powerpc/conf/files.powerpc:1.101 src/sys/arch/powerpc/conf/files.powerpc:1.102
--- src/sys/arch/powerpc/conf/files.powerpc:1.101	Sat May  7 07:10:46 2022
+++ src/sys/arch/powerpc/conf/files.powerpc	Mon May 30 14:05:36 2022
@@ -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

Index: src/sys/arch/powerpc/include/cpu.h
diff -u src/sys/arch/powerpc/include/cpu.h:1.120 src/sys/arch/powerpc/include/cpu.h:1.121
--- src/sys/arch/powerpc/include/cpu.h:1.120	Tue Nov  2 11:26:04 2021
+++ src/sys/arch/powerpc/include/cpu.h	Mon May 30 14:05:36 2022
@@ -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 */

Reply via email to