Deleted Added
full compact
machdep.c (187149) machdep.c (189100)
1/*-
2 * Copyright (C) 2006 Semihalf, Marian Balakowicz <m8@semihalf.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 65 unchanged lines hidden (view full) ---

74 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
75 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
76 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
77 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
78 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
79 */
80
81#include <sys/cdefs.h>
1/*-
2 * Copyright (C) 2006 Semihalf, Marian Balakowicz <m8@semihalf.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 65 unchanged lines hidden (view full) ---

74 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
75 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
76 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
77 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
78 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
79 */
80
81#include <sys/cdefs.h>
82__FBSDID("$FreeBSD: head/sys/powerpc/booke/machdep.c 187149 2009-01-13 15:41:58Z raj $");
82__FBSDID("$FreeBSD: head/sys/powerpc/booke/machdep.c 189100 2009-02-27 12:08:24Z raj $");
83
84#include "opt_compat.h"
85#include "opt_kstack_pages.h"
86
87#include <sys/cdefs.h>
88#include <sys/types.h>
89#include <sys/param.h>
90#include <sys/proc.h>

--- 710 unchanged lines hidden (view full) ---

801
802 return (0);
803}
804
805int
806ptrace_single_step(struct thread *td)
807{
808 struct trapframe *tf;
83
84#include "opt_compat.h"
85#include "opt_kstack_pages.h"
86
87#include <sys/cdefs.h>
88#include <sys/types.h>
89#include <sys/param.h>
90#include <sys/proc.h>

--- 710 unchanged lines hidden (view full) ---

801
802 return (0);
803}
804
805int
806ptrace_single_step(struct thread *td)
807{
808 struct trapframe *tf;
809 u_int reg;
810
809
811 reg = mfspr(SPR_DBCR0);
812 reg |= DBCR0_IC | DBCR0_IDM;
813 mtspr(SPR_DBCR0, reg);
814
815 tf = td->td_frame;
816 tf->srr1 |= PSL_DE;
810 tf = td->td_frame;
811 tf->srr1 |= PSL_DE;
812 tf->cpu.booke.dbcr0 |= (DBCR0_IDM | DBCR0_IC);
817 return (0);
818}
819
820int
821ptrace_clear_single_step(struct thread *td)
822{
823 struct trapframe *tf;
824
825 tf = td->td_frame;
826 tf->srr1 &= ~PSL_DE;
813 return (0);
814}
815
816int
817ptrace_clear_single_step(struct thread *td)
818{
819 struct trapframe *tf;
820
821 tf = td->td_frame;
822 tf->srr1 &= ~PSL_DE;
823 tf->cpu.booke.dbcr0 &= ~(DBCR0_IDM | DBCR0_IC);
827 return (0);
828}
829
830void
831kdb_cpu_clear_singlestep(void)
832{
833 register_t r;
834

--- 179 unchanged lines hidden ---
824 return (0);
825}
826
827void
828kdb_cpu_clear_singlestep(void)
829{
830 register_t r;
831

--- 179 unchanged lines hidden ---