source: trunk/third/sysinfo/sunos-obp.h @ 12269

Revision 12269, 2.4 KB checked in by ghudson, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12268, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2 * Copyright (c) 1992-1998 Michael A. Cooper.
3 * This software may be freely used and distributed provided it is not
4 * sold for profit or used in part or in whole for commercial gain
5 * without prior written agreement, and the author is credited
6 * appropriately.
7 */
8
9/*
10 * $Revision: 1.1.1.1 $
11 */
12
13/*
14 * SunOS OBP definetions
15 */
16#ifndef __sunos_obp_h__
17#define __sunos_obp_h__
18
19#if     defined(HAVE_OPENPROM)
20
21/*
22 * OBP device file
23 */
24#define _PATH_OPENPROM          "/dev/openprom"
25
26/*
27 * OBP keywords
28 */
29#define OBP_ALIASES             "aliases"
30#define OBP_BANNERNAME          "banner-name"
31#define OBP_BOARD               "board#"
32#define OBP_BOARDTYPE           "board-type"
33#define OBP_CLOCKFREQ           "clock-frequency"
34#define OBP_CPUID               "cpu-id"
35#define OBP_DCACHESIZE          "dcache-size"
36#define OBP_DEVICEID            "device-id"
37#define OBP_DEVTYPE             "device_type"
38#define OBP_DEVTYPE2            "device-type"
39#define OBP_ECACHESIZE          "ecache-size"
40#define OBP_EDID                "edid_data"
41#define OBP_FHC                 "fhc"
42#define OBP_KEYBOARD            "keyboard"
43#define OBP_MEMUNIT             "mem-unit"
44#define OBP_MODEL               "model"
45#define OBP_NAME                "name"
46#define OBP_SIZE                "size"
47#define OBP_SYSBOARD            "sysboard"
48#define OBP_VENDORID            "vendor-id"
49#ifndef OBP_CPU
50#define OBP_CPU                 "cpu"
51#endif
52
53/*
54 * OBPio_t is used to do I/O with openprom.
55 */
56typedef union {
57    char                        opio_buff[OPROMMAXPARAM];
58    struct openpromio           opio_oprom;
59} OBPio_t;
60
61/*
62 * OBPprop_t is used to store properties for OBP nodes.
63 */
64typedef struct _OBPprop {
65    char                       *Key;            /* Key as ASCII */
66    char                       *Value;          /* Value as ASCII string */
67    void                       *Raw;            /* Uninterpretted data */
68    size_t                      RawLen;         /* Length of Raw */
69    struct _OBPprop            *Next;   
70} OBPprop_t;
71
72/*
73 * OBP Node entry used to represent tree of all OBP nodes.
74 */
75typedef struct _obpnode {
76    char                       *Name;
77    OBPnodeid_t                 NodeID;
78    OBPnodeid_t                 ParentID;
79    char                       *ParentName;
80    OBPprop_t                  *PropTable;
81    struct _obpnode            *Children;
82    struct _obpnode            *Next;
83} OBPnode_t;
84
85/*
86 * Parameters for SubSys
87 */
88typedef struct _SubSysVar {
89    OBPnode_t                  *OBPtree;
90    int                         IntVal;
91    char                       *StrVal;
92} SubSysVar_t;
93
94/*
95 * Declarations
96 */
97extern OBPnode_t               *OBPfindNodeByID();
98extern OBPprop_t               *OBPfindProp();
99extern char                    *OBPfindPropVal();
100extern DevInfo_t               *OBPprobeCPU();
101
102#endif  /* HAVE_OPENPROM */
103
104#endif  /* __sunos_obp_h__ */
Note: See TracBrowser for help on using the repository browser.