Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Move booke_fixup_stubs() to fixup.c and rename it t...
details: https://anonhg.NetBSD.org/src/rev/fa037640d685
branches: trunk
changeset: 766103:fa037640d685
user: matt <matt%NetBSD.org@localhost>
date: Wed Jun 15 15:18:20 2011 +0000
description:
Move booke_fixup_stubs() to fixup.c and rename it to cpu_fixup_stubs().
This makes it easier for other PPC variants to use it.
diffstat:
sys/arch/evbppc/mpc85xx/machdep.c | 4 ++--
sys/arch/powerpc/include/booke/cpuvar.h | 3 +--
sys/arch/powerpc/include/cpu.h | 4 +++-
sys/arch/powerpc/powerpc/fixup.c | 13 +++++++++++--
4 files changed, 17 insertions(+), 7 deletions(-)
diffs (84 lines):
diff -r a8ee08ec69be -r fa037640d685 sys/arch/evbppc/mpc85xx/machdep.c
--- a/sys/arch/evbppc/mpc85xx/machdep.c Wed Jun 15 15:11:50 2011 +0000
+++ b/sys/arch/evbppc/mpc85xx/machdep.c Wed Jun 15 15:18:20 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.10 2011/06/14 05:32:59 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.11 2011/06/15 15:18:20 matt Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -912,7 +912,7 @@
* Let's take all the indirect calls via our stubs and patch
* them to be direct calls.
*/
- booke_fixup_stubs();
+ cpu_fixup_stubs();
#if 0
/*
* As a debug measure we can change the TLB entry that maps all of
diff -r a8ee08ec69be -r fa037640d685 sys/arch/powerpc/include/booke/cpuvar.h
--- a/sys/arch/powerpc/include/booke/cpuvar.h Wed Jun 15 15:11:50 2011 +0000
+++ b/sys/arch/powerpc/include/booke/cpuvar.h Wed Jun 15 15:18:20 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpuvar.h,v 1.7 2011/06/14 22:36:12 matt Exp $ */
+/* $NetBSD: cpuvar.h,v 1.8 2011/06/15 15:18:20 matt Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -161,7 +161,6 @@
struct trapframe;
void booke_sstep(struct trapframe *);
-void booke_fixup_stubs(void);
void booke_cpu_startup(const char *); /* model name */
struct powerpc_bus_dma_tag booke_bus_dma_tag;
diff -r a8ee08ec69be -r fa037640d685 sys/arch/powerpc/include/cpu.h
--- a/sys/arch/powerpc/include/cpu.h Wed Jun 15 15:11:50 2011 +0000
+++ b/sys/arch/powerpc/include/cpu.h Wed Jun 15 15:18:20 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.80 2011/06/14 22:36:12 matt Exp $ */
+/* $NetBSD: cpu.h,v 1.81 2011/06/15 15:18:20 matt Exp $ */
/*
* Copyright (C) 1999 Wolfgang Solfrank.
@@ -404,6 +404,8 @@
void cpu_need_proftick(struct lwp *);
#define cpu_did_resched(l) ((l)->l_md.md_astpending = 0)
+void cpu_fixup_stubs(void);
+
#if !defined(PPC_IBM4XX) && !defined(PPC_BOOKE)
void oea_init(void (*)(void));
void oea_startup(const char *);
diff -r a8ee08ec69be -r fa037640d685 sys/arch/powerpc/powerpc/fixup.c
--- a/sys/arch/powerpc/powerpc/fixup.c Wed Jun 15 15:11:50 2011 +0000
+++ b/sys/arch/powerpc/powerpc/fixup.c Wed Jun 15 15:18:20 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fixup.c,v 1.3 2011/02/12 18:23:10 matt Exp $ */
+/* $NetBSD: fixup.c,v 1.4 2011/06/15 15:18:20 matt Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fixup.c,v 1.3 2011/02/12 18:23:10 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fixup.c,v 1.4 2011/06/15 15:18:20 matt Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -209,3 +209,12 @@
cycles);
#endif
}
+
+void
+cpu_fixup_stubs(void)
+{
+ extern uint32_t _ftext[];
+ extern uint32_t _etext[];
+
+ powerpc_fixup_stubs(_ftext, _etext, NULL, NULL);
+}
Home |
Main Index |
Thread Index |
Old Index