xref: /netbsd-src/sys/arch/playstation2/include/kloader.h (revision 95f94af30137064a6d8123b816fa7a480569ab55)
1*95f94af3Sandvar /*	$NetBSD: kloader.h,v 1.8 2023/03/26 19:10:33 andvar Exp $	*/
2aad6ef8bSmartin 
3aad6ef8bSmartin /*-
4aad6ef8bSmartin  * Copyright (c) 2004 The NetBSD Foundation, Inc.
5aad6ef8bSmartin  * All rights reserved.
6aad6ef8bSmartin  *
7aad6ef8bSmartin  * Redistribution and use in source and binary forms, with or without
8aad6ef8bSmartin  * modification, are permitted provided that the following conditions
9aad6ef8bSmartin  * are met:
10aad6ef8bSmartin  * 1. Redistributions of source code must retain the above copyright
11aad6ef8bSmartin  *    notice, this list of conditions and the following disclaimer.
12aad6ef8bSmartin  * 2. Redistributions in binary form must reproduce the above copyright
13aad6ef8bSmartin  *    notice, this list of conditions and the following disclaimer in the
14aad6ef8bSmartin  *    documentation and/or other materials provided with the distribution.
15aad6ef8bSmartin  *
16aad6ef8bSmartin  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17aad6ef8bSmartin  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18aad6ef8bSmartin  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19aad6ef8bSmartin  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20aad6ef8bSmartin  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21aad6ef8bSmartin  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22aad6ef8bSmartin  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23aad6ef8bSmartin  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24aad6ef8bSmartin  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25aad6ef8bSmartin  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26aad6ef8bSmartin  * POSSIBILITY OF SUCH DAMAGE.
27aad6ef8bSmartin  */
28aad6ef8bSmartin 
29541ff757Sriastradh #ifndef	_PLAYSTATION2_KLOADER_H_
30541ff757Sriastradh #define	_PLAYSTATION2_KLOADER_H_
31541ff757Sriastradh 
32541ff757Sriastradh #include <uvm/uvm_extern.h>
33541ff757Sriastradh #include <uvm/uvm_page.h>
34541ff757Sriastradh 
35541ff757Sriastradh #include <mips/cpuregs.h>
36541ff757Sriastradh 
37*95f94af3Sandvar /* Playstation 2 port kloader don't need bootinfo */
38aad6ef8bSmartin #define	KLOADER_NO_BOOTINFO
39aad6ef8bSmartin #define PG_VADDR(pg)	MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(pg))
40aad6ef8bSmartin #include <dev/kloader.h>
41c525e41fSmatt 
42c525e41fSmatt /* XXX: kludge: MI kloader.c assumes avail_start and avail_end are common */
43c525e41fSmatt #define avail_start	pmap_limits.avail_start
44c525e41fSmatt #define avail_end	pmap_limits.avail_end
45541ff757Sriastradh 
46541ff757Sriastradh #endif	/* _PLAYSTATION2_KLOADER_H_ */
47