1178172Simp/*- 2178172Simp * Copyright (c) 1995 Bruce D. Evans. 3178172Simp * All rights reserved. 4178172Simp * 5178172Simp * Redistribution and use in source and binary forms, with or without 6178172Simp * modification, are permitted provided that the following conditions 7178172Simp * are met: 8178172Simp * 1. Redistributions of source code must retain the above copyright 9178172Simp * notice, this list of conditions and the following disclaimer. 10178172Simp * 2. Redistributions in binary form must reproduce the above copyright 11178172Simp * notice, this list of conditions and the following disclaimer in the 12178172Simp * documentation and/or other materials provided with the distribution. 13178172Simp * 3. Neither the name of the author nor the names of contributors 14178172Simp * may be used to endorse or promote products derived from this software 15178172Simp * without specific prior written permission. 16178172Simp * 17178172Simp * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18178172Simp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19178172Simp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20178172Simp * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21178172Simp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22178172Simp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23178172Simp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24178172Simp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25178172Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26178172Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27178172Simp * SUCH DAMAGE. 28178172Simp * 29178172Simp * from: src/sys/i386/include/md_var.h,v 1.35 2000/02/20 20:51:23 bsd 30178172Simp * JNPR: md_var.h,v 1.4 2006/10/16 12:30:34 katta 31178172Simp * $FreeBSD$ 32178172Simp */ 33178172Simp 34178172Simp#ifndef _MACHINE_MD_VAR_H_ 35178172Simp#define _MACHINE_MD_VAR_H_ 36178172Simp 37178172Simp#include <machine/reg.h> 38178172Simp 39178172Simp/* 40178172Simp * Miscellaneous machine-dependent declarations. 41178172Simp */ 42202031Simpextern long Maxmem; 43178172Simpextern char sigcode[]; 44232449Sjmallettextern int szsigcode; 45232449Sjmallett#if defined(__mips_n32) || defined(__mips_n64) 46232449Sjmallettextern char sigcode32[]; 47232449Sjmallettextern int szsigcode32; 48232449Sjmallett#endif 49214903Sgonzoextern uint32_t *vm_page_dump; 50214903Sgonzoextern int vm_page_dump_size; 51178172Simp 52178172Simpextern vm_offset_t kstack0; 53202909Sgonzoextern vm_offset_t kernel_kseg0_end; 54178172Simp 55178172Simpvoid MipsSaveCurFPState(struct thread *); 56178172Simpvoid fork_trampoline(void); 57202031Simpuintptr_t MipsEmulateBranch(struct trapframe *, uintptr_t, int, uintptr_t); 58202031Simpvoid MipsSwitchFPState(struct thread *, struct trapframe *); 59217345Sjchandraint is_cacheable_mem(vm_paddr_t addr); 60226517Sjchandravoid mips_wait(void); 61178172Simp 62178172Simp#define MIPS_DEBUG 0 63178172Simp 64178172Simp#if MIPS_DEBUG 65178172Simp#define MIPS_DEBUG_PRINT(fmt, args...) printf("%s: " fmt "\n" , __FUNCTION__ , ## args) 66178172Simp#else 67178172Simp#define MIPS_DEBUG_PRINT(fmt, args...) 68178172Simp#endif 69178172Simp 70178172Simpvoid mips_vector_init(void); 71178172Simpvoid mips_cpu_init(void); 72202031Simpvoid mips_pcpu0_init(void); 73178172Simpvoid mips_proc0_init(void); 74202909Sgonzovoid mips_postboot_fixup(void); 75178172Simp 76202031Simpextern int busdma_swi_pending; 77212532Sjchandravoid busdma_swi(void); 78214903Sgonzo 79216148Sjchandrastruct dumperinfo; 80216148Sjchandravoid dump_add_page(vm_paddr_t); 81216148Sjchandravoid dump_drop_page(vm_paddr_t); 82272766Smarkjint minidumpsys(struct dumperinfo *); 83276772Smarkj 84178172Simp#endif /* !_MACHINE_MD_VAR_H_ */ 85