| Current File : //usr/share/src/uts/i86pc/sys/psm.h |
/*
* Copyright (c) 1993, 2012, Oracle and/or its affiliates. All rights reserved.
*/
#ifndef _SYS_PSM_H
#define _SYS_PSM_H
/*
* Platform Specific Module (PSM)
*/
/*
* Include the loadable module wrapper.
*/
#include <sys/types.h>
#include <sys/conf.h>
#include <sys/modctl.h>
#include <sys/sunddi.h>
#include <sys/kmem.h>
#include <sys/psm_defs.h>
#include <sys/psm_types.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* PSM External Interfaces
*/
extern int psm_mod_init(void **, struct psm_info *);
extern int psm_mod_fini(void **, struct psm_info *);
extern int psm_mod_info(void **, struct psm_info *, struct modinfo *);
extern int psm_add_nmintr(int, avfunc, char *, caddr_t);
extern processorid_t psm_get_cpu_id(void);
/* map physical address */
/*
* XX64: Changing psm_map() to take a paddr_t rather than a uint32_t will
* be a flag day. Other drivers in the WOS use the psm_map() interface, so
* we need this hack to get them to coexist for pre-integration testing.
*/
extern caddr_t psm_map_new(paddr_t, size_t, int);
#define psm_map psm_map_new
/* unmap the physical address return from psm_map_phys() */
extern void psm_unmap(caddr_t, size_t);
#define PSM_PROT_READ 0x0000
#define PSM_PROT_WRITE 0x0001
/* handle memory error */
extern void psm_handle_memerror(uint32_t);
/* kernel debugger present? */
extern int psm_debugger(void);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_PSM_H */