18d7e7a98SRuslan Bukin /*-
28d7e7a98SRuslan Bukin * Copyright (c) 2004 Marcel Moolenaar
38d7e7a98SRuslan Bukin * All rights reserved.
48d7e7a98SRuslan Bukin *
58d7e7a98SRuslan Bukin * Redistribution and use in source and binary forms, with or without
68d7e7a98SRuslan Bukin * modification, are permitted provided that the following conditions
78d7e7a98SRuslan Bukin * are met:
88d7e7a98SRuslan Bukin *
98d7e7a98SRuslan Bukin * 1. Redistributions of source code must retain the above copyright
108d7e7a98SRuslan Bukin * notice, this list of conditions and the following disclaimer.
118d7e7a98SRuslan Bukin * 2. Redistributions in binary form must reproduce the above copyright
128d7e7a98SRuslan Bukin * notice, this list of conditions and the following disclaimer in the
138d7e7a98SRuslan Bukin * documentation and/or other materials provided with the distribution.
148d7e7a98SRuslan Bukin *
158d7e7a98SRuslan Bukin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
168d7e7a98SRuslan Bukin * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
178d7e7a98SRuslan Bukin * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
188d7e7a98SRuslan Bukin * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
198d7e7a98SRuslan Bukin * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
208d7e7a98SRuslan Bukin * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
218d7e7a98SRuslan Bukin * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
228d7e7a98SRuslan Bukin * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
238d7e7a98SRuslan Bukin * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
248d7e7a98SRuslan Bukin * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
258d7e7a98SRuslan Bukin */
268d7e7a98SRuslan Bukin
278d7e7a98SRuslan Bukin #ifndef _MACHINE_KDB_H_
288d7e7a98SRuslan Bukin #define _MACHINE_KDB_H_
298d7e7a98SRuslan Bukin
308d7e7a98SRuslan Bukin #include <machine/cpufunc.h>
318d7e7a98SRuslan Bukin
328d7e7a98SRuslan Bukin static __inline void
kdb_cpu_clear_singlestep(void)338d7e7a98SRuslan Bukin kdb_cpu_clear_singlestep(void)
348d7e7a98SRuslan Bukin {
358d7e7a98SRuslan Bukin }
368d7e7a98SRuslan Bukin
378d7e7a98SRuslan Bukin static __inline void
kdb_cpu_set_singlestep(void)388d7e7a98SRuslan Bukin kdb_cpu_set_singlestep(void)
398d7e7a98SRuslan Bukin {
408d7e7a98SRuslan Bukin }
418d7e7a98SRuslan Bukin
428d7e7a98SRuslan Bukin static __inline void
kdb_cpu_sync_icache(unsigned char * addr,size_t size)438d7e7a98SRuslan Bukin kdb_cpu_sync_icache(unsigned char *addr, size_t size)
448d7e7a98SRuslan Bukin {
458d7e7a98SRuslan Bukin
4673efa2fbSJohn Baldwin /*
4773efa2fbSJohn Baldwin * Other CPUs flush their instruction cache when resuming from
4873efa2fbSJohn Baldwin * IPI_STOP.
4973efa2fbSJohn Baldwin */
5073efa2fbSJohn Baldwin fence_i();
518d7e7a98SRuslan Bukin }
528d7e7a98SRuslan Bukin
538d7e7a98SRuslan Bukin static __inline void
kdb_cpu_trap(int type,int code)548d7e7a98SRuslan Bukin kdb_cpu_trap(int type, int code)
558d7e7a98SRuslan Bukin {
568d7e7a98SRuslan Bukin }
578d7e7a98SRuslan Bukin
58763107f2SMitchell Horne static __inline int
kdb_cpu_set_watchpoint(vm_offset_t addr,vm_size_t size,int access)59763107f2SMitchell Horne kdb_cpu_set_watchpoint(vm_offset_t addr, vm_size_t size, int access)
60763107f2SMitchell Horne {
61763107f2SMitchell Horne
62763107f2SMitchell Horne return (ENXIO);
63763107f2SMitchell Horne }
64763107f2SMitchell Horne
65763107f2SMitchell Horne static __inline int
kdb_cpu_clr_watchpoint(vm_offset_t addr,vm_size_t size)66763107f2SMitchell Horne kdb_cpu_clr_watchpoint(vm_offset_t addr, vm_size_t size)
67763107f2SMitchell Horne {
68763107f2SMitchell Horne
69763107f2SMitchell Horne return (0);
70763107f2SMitchell Horne }
71763107f2SMitchell Horne
728d7e7a98SRuslan Bukin #endif /* _MACHINE_KDB_H_ */
73