sb_scd.h revision 203697
1195333Simp/*- 2195333Simp * Copyright (c) 2009 Neelkanth Natu 3195333Simp * All rights reserved. 4195333Simp * 5195333Simp * Redistribution and use in source and binary forms, with or without 6195333Simp * modification, are permitted provided that the following conditions 7195333Simp * are met: 8195333Simp * 1. Redistributions of source code must retain the above copyright 9195333Simp * notice, this list of conditions and the following disclaimer. 10195333Simp * 2. Redistributions in binary form must reproduce the above copyright 11195333Simp * notice, this list of conditions and the following disclaimer in the 12195333Simp * documentation and/or other materials provided with the distribution. 13195333Simp * 14195333Simp * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15195333Simp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16195333Simp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17195333Simp * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18195333Simp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19195333Simp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20195333Simp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21195333Simp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22195333Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23195333Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24195333Simp * SUCH DAMAGE. 25203509Sneel * 26203509Sneel * $FreeBSD: head/sys/mips/sibyte/sb_scd.h 203697 2010-02-09 06:24:43Z neel $ 27195333Simp */ 28195333Simp 29195333Simp#ifndef _SB_SCD_H_ 30195333Simp#define _SB_SCD_H_ 31195333Simp 32195333Simp#define NUM_INTSRC 64 /* total number of interrupt sources */ 33195333Simp 34195333Simpuint64_t sb_cpu_speed(void); 35195333Simpvoid sb_system_reset(void); 36195333Simp 37195333Simpint sb_route_intsrc(int src); 38203509Sneelvoid sb_enable_intsrc(int cpu, int src); 39203509Sneelvoid sb_disable_intsrc(int cpu, int src); 40203509Sneeluint64_t sb_read_intsrc_mask(int cpu); 41203509Sneelvoid sb_write_intsrc_mask(int cpu, uint64_t mask); 42203509Sneelvoid sb_write_intmap(int cpu, int intsrc, int intrnum); 43203509Sneelint sb_read_intmap(int cpu, int intsrc); 44195333Simp 45203697Sneel#ifdef SMP 46203697Sneel#define INTSRC_MAILBOX3 29 47203697Sneelvoid sb_set_mailbox(int cpuid, uint64_t val); 48203697Sneelvoid sb_clear_mailbox(int cpuid, uint64_t val); 49203697Sneel#endif 50203697Sneel 51195333Simp#endif /* _SB_SCD_H_ */ 52