4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
30 #pragma ident "%Z%%M% %I% %E% SMI"
33 * Platform Specific Module (PSM)
37 * Include the loadable module wrapper.
39 #include <sys/types.h>
41 #include <sys/modctl.h>
42 #include <sys/sunddi.h>
44 #include <sys/psm_defs.h>
45 #include <sys/psm_types.h>
52 * PSM External Interfaces
54 extern int psm_mod_init(void **, struct psm_info
*);
55 extern int psm_mod_fini(void **, struct psm_info
*);
56 extern int psm_mod_info(void **, struct psm_info
*, struct modinfo
*);
58 extern int psm_add_intr(int, avfunc
, char *, int, caddr_t
);
59 extern int psm_add_nmintr(int, avfunc
, char *, caddr_t
);
60 extern processorid_t
psm_get_cpu_id(void);
62 /* map physical address */
64 * XX64: Changing psm_map() to take a paddr_t rather than a uint32_t will
65 * be a flag day. Other drivers in the WOS use the psm_map() interface, so
66 * we need this hack to get them to coexist for pre-integration testing.
68 extern caddr_t
psm_map_new(paddr_t
, size_t, int);
69 #define psm_map psm_map_new
71 /* unmap the physical address return from psm_map_phys() */
72 extern void psm_unmap(caddr_t
, size_t);
74 #define PSM_PROT_READ 0x0000
75 #define PSM_PROT_WRITE 0x0001
77 /* handle memory error */
78 extern void psm_handle_memerror(uint32_t);
80 /* kernel debugger present? */
81 extern int psm_debugger(void);
87 #endif /* _SYS_PSM_H */