1204635Sgnn/*- 2204635Sgnn * Copyright (c) 2010, George V. Neville-Neil <gnn@freebsd.org> 3204635Sgnn * All rights reserved. 4204635Sgnn * 5204635Sgnn * Redistribution and use in source and binary forms, with or without 6204635Sgnn * modification, are permitted provided that the following conditions 7204635Sgnn * are met: 8204635Sgnn * 1. Redistributions of source code must retain the above copyright 9204635Sgnn * notice, this list of conditions and the following disclaimer. 10204635Sgnn * 2. Redistributions in binary form must reproduce the above copyright 11204635Sgnn * notice, this list of conditions and the following disclaimer in the 12204635Sgnn * documentation and/or other materials provided with the distribution. 13204635Sgnn * 14204635Sgnn * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15204635Sgnn * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16204635Sgnn * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17204635Sgnn * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18204635Sgnn * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19204635Sgnn * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20204635Sgnn * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21204635Sgnn * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22204635Sgnn * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23204635Sgnn * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24204635Sgnn * SUCH DAMAGE. 25204635Sgnn * 26204635Sgnn */ 27204635Sgnn 28204635Sgnn#include <sys/cdefs.h> 29204635Sgnn__FBSDID("$FreeBSD$"); 30204635Sgnn 31204635Sgnn#include <sys/param.h> 32204635Sgnn#include <sys/pmc.h> 33204635Sgnn#include <sys/systm.h> 34204635Sgnn 35204635Sgnn#include <machine/pmc_mdep.h> 36204635Sgnn#include <machine/md_var.h> 37204635Sgnn 38204635Sgnnstruct pmc_mdep * 39204635Sgnnpmc_md_initialize() 40204635Sgnn{ 41204635Sgnn /* if (cpu_class == CPU_CLASS_MIPS24K)*/ 42204635Sgnn return pmc_mips24k_initialize(); 43204635Sgnn /* else 44204635Sgnn return NULL;*/ 45204635Sgnn} 46204635Sgnn 47204635Sgnnvoid 48204635Sgnnpmc_md_finalize(struct pmc_mdep *md) 49204635Sgnn{ 50204635Sgnn /* if (cpu_class == CPU_CLASS_MIPS24K) */ 51204635Sgnn pmc_mips24k_finalize(md); 52204635Sgnn /* else 53204635Sgnn KASSERT(0, ("[mips,%d] Unknown CPU Class 0x%x", __LINE__, 54204635Sgnn cpu_class));*/ 55204635Sgnn} 56204635Sgnn 57204635Sgnnint 58204635Sgnnpmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, 59204635Sgnn struct trapframe *tf) 60204635Sgnn{ 61204635Sgnn (void) cc; 62204635Sgnn (void) maxsamples; 63204635Sgnn (void) tf; 64204635Sgnn return (0); 65204635Sgnn} 66204635Sgnn 67204635Sgnnint 68204635Sgnnpmc_save_user_callchain(uintptr_t *cc, int maxsamples, 69204635Sgnn struct trapframe *tf) 70204635Sgnn{ 71204635Sgnn (void) cc; 72204635Sgnn (void) maxsamples; 73204635Sgnn (void) tf; 74204635Sgnn return (0); 75204635Sgnn} 76