-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsahpi.i
More file actions
9530 lines (9052 loc) · 435 KB
/
sahpi.i
File metadata and controls
9530 lines (9052 loc) · 435 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*******************************************************************************
**
** FILE:
** SaHpi.h
**
** DESCRIPTION:
** This file provides the C language binding for the Service
** Availability(TM) Forum Platform Interface. It contains all of
** the prototypes and type definitions. Note, this file was
** generated from the Platform Interface specification document.
**
** SPECIFICATION VERSION:
** SAI-HPI-B.02.01
**
** DATE:
** Wed Jan 17 2007 11:33
**
** LEGAL:
** OWNERSHIP OF SPECIFICATION AND COPYRIGHTS.
** The Specification and all worldwide copyrights therein are
** the exclusive property of Licensor. You may not remove, obscure, or
** alter any copyright or other proprietary rights notices that are in or
** on the copy of the Specification you download. You must reproduce all
** such notices on all copies of the Specification you make. Licensor
** may make changes to the Specification, or to items referenced therein,
** at any time without notice. Licensor is not obligated to support or
** update the Specification.
**
** Copyright(c) 2004, 2007, Service Availability(TM) Forum. All rights
** reserved.
**
** Permission to use, copy, modify, and distribute this software for any
** purpose without fee is hereby granted, provided that this entire notice
** is included in all copies of any software which is or includes a copy
** or modification of this software and in all copies of the supporting
** documentation for such software.
**
** THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
** WARRANTY. IN PARTICULAR, THE SERVICE AVAILABILITY FORUM DOES NOT MAKE ANY
** REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
** OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
**
*******************************************************************************/
#ifndef __SAHPI_H
#define __SAHPI_H
/*******************************************************************************
********************************************************************************
********** **********
********** Basic Data Types and Values **********
********** **********
********************************************************************************
*******************************************************************************/
/* General Types - need to be specified correctly for the host architecture */
/*
** It is recommended that these types be defined such that the data sizes
** and alignment of each data type are as indicated. The only requirement
** for source compatibility is that the types be defined to be able to
** contain at least the required data (e.g., at least signed 8-bit values
** must be contained in the data type defined as SaHpiInt8T, etc.)
** Following the full recommendations for data size and alignment, however,
** may promote more binary compatibility.
*/
/* The following definitions produce the recommended sizes and alignments
** using the gcc compiler for the i386 (IA-32) platform.
*/
/* unsigned 8-bit data, 1-byte alignment */
typedef unsigned char SaHpiUint8T;
/* unsigned 16-bit data, 2-byte alignment */
typedef unsigned short SaHpiUint16T;
/* unsigned 32-bit data, 4-byte alignment */
typedef unsigned int SaHpiUint32T;
/* unsigned 64-bit data, 8-byte alignment */
typedef unsigned long long int SaHpiUint64T;
/* signed 8-bit data, 1-byte alignment */
typedef signed char SaHpiInt8T;
/* signed 16-bit data, 2-byte alignment */
typedef signed short SaHpiInt16T;
/* signed 32-bit data, 4-byte alignment */
typedef signed int SaHpiInt32T;
/* signed 64-bit data, 8-byte alignment */
typedef signed long long int SaHpiInt64T;
/* 64-bit floating point, 8-byte alignment */
typedef double SaHpiFloat64T;
/* enum types are recommended to be 32-bit values, with 4-byte alignment */
typedef SaHpiUint8T SaHpiBoolT;
#define SAHPI_TRUE 1 /* While SAHPI_TRUE = 1, any non-zero
value is also considered to be True
and HPI Users/Implementers of this
specification should not test for
equality against SAHPI_TRUE. */
#define SAHPI_FALSE 0
/* Platform, O/S, or Vendor dependent */
#ifndef SAHPI_API
#define SAHPI_API
#endif
#ifndef SAHPI_IN
#define SAHPI_IN
#endif
#ifndef SAHPI_OUT
#define SAHPI_OUT
#endif
#ifndef SAHPI_INOUT
#define SAHPI_INOUT
#endif
/*
** Identifier for the manufacturer
**
** This is the IANA-assigned private enterprise number for the
** manufacturer of the resource or FRU, or of the manufacturer
** defining an OEM Control or event type. A list of current
** IANA-assigned private enterprise numbers may be obtained at
**
** http://www.iana.org/assignments/enterprise-numbers
**
** If a manufacturer does not currently have an assigned number, one
** may be obtained by following the instructions located at
**
** http://www.iana.org/cgi-bin/enterprise.pl
*/
typedef SaHpiUint32T SaHpiManufacturerIdT;
const SaHpiManufacturerIdT SAHPI_MANUFACTURER_ID_UNSPECIFIED = 0;
/* Version Types */
typedef SaHpiUint32T SaHpiVersionT;
/*
** Interface Version
**
** The interface version is the version of the actual interface and not the
** version of the implementation. It is a 24 bit value where
** the most significant 8 bits represent the compatibility level
** (with letters represented as the corresponding numbers);
** the next 8 bits represent the major version number; and
** the least significant 8 bits represent the minor version number.
*/
const SaHpiVersionT SAHPI_INTERFACE_VERSION = 0x020201 ;/* B.02.01 */
/*
** Return Codes
**
** SaErrorT is defined in the HPI specification. In the future a
** common SAF types definition may be created to contain this type. At
** that time, this typedef should be removed. Each of the return codes
** is defined in Section 4.1 of the specification.
**
** Future version of the specification may add new return codes. User
** programs should accept unknown return codes as indicating an unknown
** error.
**
*/
typedef SaHpiInt32T SaErrorT; /* Return code */
/*
** SA_OK:
*/
const SaErrorT SA_OK = 0x0000;
/* This value is the base for all HPI-specific error codes. */
#define SA_HPI_ERR_BASE -1000
const SaErrorT SA_ERR_HPI_ERROR = (SA_HPI_ERR_BASE - 1);
const SaErrorT SA_ERR_HPI_UNSUPPORTED_API = (SA_HPI_ERR_BASE - 2);
const SaErrorT SA_ERR_HPI_BUSY = (SA_HPI_ERR_BASE - 3);
const SaErrorT SA_ERR_HPI_INTERNAL_ERROR = (SA_HPI_ERR_BASE - 4);
const SaErrorT SA_ERR_HPI_INVALID_CMD = (SA_HPI_ERR_BASE - 5);
const SaErrorT SA_ERR_HPI_TIMEOUT = (SA_HPI_ERR_BASE - 6);
const SaErrorT SA_ERR_HPI_OUT_OF_SPACE = (SA_HPI_ERR_BASE - 7);
const SaErrorT SA_ERR_HPI_OUT_OF_MEMORY = (SA_HPI_ERR_BASE - 8);
const SaErrorT SA_ERR_HPI_INVALID_PARAMS = (SA_HPI_ERR_BASE - 9);
const SaErrorT SA_ERR_HPI_INVALID_DATA = (SA_HPI_ERR_BASE - 10);
const SaErrorT SA_ERR_HPI_NOT_PRESENT = (SA_HPI_ERR_BASE - 11);
const SaErrorT SA_ERR_HPI_NO_RESPONSE = (SA_HPI_ERR_BASE - 12);
const SaErrorT SA_ERR_HPI_DUPLICATE = (SA_HPI_ERR_BASE - 13);
const SaErrorT SA_ERR_HPI_INVALID_SESSION = (SA_HPI_ERR_BASE - 14);
const SaErrorT SA_ERR_HPI_INVALID_DOMAIN = (SA_HPI_ERR_BASE - 15);
const SaErrorT SA_ERR_HPI_INVALID_RESOURCE = (SA_HPI_ERR_BASE - 16);
const SaErrorT SA_ERR_HPI_INVALID_REQUEST = (SA_HPI_ERR_BASE - 17);
const SaErrorT SA_ERR_HPI_ENTITY_NOT_PRESENT = (SA_HPI_ERR_BASE - 18);
const SaErrorT SA_ERR_HPI_READ_ONLY = (SA_HPI_ERR_BASE - 19);
const SaErrorT SA_ERR_HPI_CAPABILITY = (SA_HPI_ERR_BASE - 20);
const SaErrorT SA_ERR_HPI_UNKNOWN = (SA_HPI_ERR_BASE - 21);
const SaErrorT SA_ERR_HPI_INVALID_STATE = (SA_HPI_ERR_BASE - 22);
const SaErrorT SA_ERR_HPI_UNSUPPORTED_PARAMS = (SA_HPI_ERR_BASE - 23);
/*
** Domain, Session and Resource Type Definitions
*/
/* Domain ID. */
typedef SaHpiUint32T SaHpiDomainIdT;
/* The SAHPI_UNSPECIFIED_DOMAIN_ID value is used to specify the default
** domain.
*/
const SaHpiDomainIdT SAHPI_UNSPECIFIED_DOMAIN_ID = 0xFFFFFFFF;
/* Session ID. */
typedef SaHpiUint32T SaHpiSessionIdT;
/* Resource identifier. */
typedef SaHpiUint32T SaHpiResourceIdT;
/* The SAHPI_UNSPECIFIED_RESOURCE_ID value is used to specify the Domain
** Event Log and to specify that there is no resource for such things as HPI
** User events/alarms.
*/
const SaHpiResourceIdT SAHPI_UNSPECIFIED_RESOURCE_ID = 0xFFFFFFFF;
/* Table Related Type Definitions */
typedef SaHpiUint32T SaHpiEntryIdT;
const SaHpiEntryIdT SAHPI_FIRST_ENTRY = 0x00000000;
const SaHpiEntryIdT SAHPI_LAST_ENTRY = 0xFFFFFFFF;
#define SAHPI_ENTRY_UNSPECIFIED SAHPI_FIRST_ENTRY
/*
** Time Related Type Definitions
**
** An HPI time value represents time as either the number of nanoseconds
** since startup (called "relative time") or as the number of
** nanoseconds since 00:00:00, January 1, 1970 (called "absolute time").
** Any time value less than or equal to 0x0C00000000000000 is
** interpreted as "relative time". Any time value greater than this
** value is interpreted as "absolute time".
**
** When reporting a relative time, the specific meaning of "startup"
** is implementation dependent. It may mean, for example, system boot,
** startup of the HPI implementation, startup of a particular resource, etc.
**
** With the exception of event log entry timestamps, it is implementation-
** dependent whether absolute or relative time is used for each time value
** passed to an HPI User. For event log entry timestamps, the default
** representation is implementation-specific. However, an HPI User can
** change the representation used on subsequent event log entries by calling
** saHpiEventLogTimeSet().
**
** HPI time values can represent relative times in a range of 0 to 27 years
** and absolute times from 1997 through 2262. Specific HPI implementations
** may not be able to support these entire ranges. However, all HPI
** implementations must be able to report appropriate time values during the
** life of the system.
**
** For event log timestamps, all HPI implementations must support relative
** times in the range of 0 to the longest time since "startup" that is ever
** expected to be encountered and absolute times representing current time
** throughout the expected life of the system.
**
** It should be noted that although nano-second resolution is supported
** in the data type, the actual resolution provided by an implementation
** may be more limited than this.
**
** The value -2**63, which is 0x8000000000000000, is used to indicate
** "unknown/unspecified time".
**
** Conversion to/from POSIX and other common time representations is
** relatively straightforward. The following code framgment converts
** between SaHpiTimeT and time_t:
**
** time_t tt1, tt2;
** SaHpiTimeT saHpiTime;
**
** time(&tt1);
** saHpiTime = (SaHpiTimeT) tt1 * 1000000000;
** tt2 = saHpiTime / 1000000000;
**
** The following fragment converts between SaHpiTimeT and a struct timeval:
**
** struct timeval tv1, tv2;
** SaHpiTimeT saHpiTime;
**
** gettimeofday(&tv1, NULL);
** saHpiTime = (SaHpiTimeT) tv1.tv_sec * 1000000000 + tv1.tv_usec * 1000;
** tv2.tv_sec = saHpiTime / 1000000000;
** tv2.tv_usec = saHpiTime % 1000000000 / 1000;
**
** The following fragment converts between SaHpiTimeT and a struct timespec:
**
** struct timespec ts1, ts2;
** SaHpiTimeT saHpiTime;
**
** clock_gettime(CLOCK_REALTIME, &ts1);
** saHpiTime = (SaHpiTimeT) ts1.tv_sec * 1000000000 + ts1.tv_nsec;
** ts2.tv_sec = saHpiTime / 1000000000;
** ts2.tv_nsec = saHpiTime % 1000000000;
**
** Note, however, that since time_t is (effectively) universally 32 bits,
** all of these conversions will cease to work on January 18, 2038.
** In any of these conversions, if the SaHpiTimeT value is less than or
** equal to 0x0C00000000000000, then the POSIX time structure represents
** time since startup. If the SaHpiTimeT value is greater than this
** value, then the POSIX time structure represents absolute time of day.
**
*/
typedef SaHpiInt64T SaHpiTimeT; /* Time in nanoseconds */
/* Unspecified or unknown time */
const SaHpiTimeT SAHPI_TIME_UNSPECIFIED = 0x8000000000000000LL;
/* Maximum time that can be specified as relative */
const SaHpiTimeT SAHPI_TIME_MAX_RELATIVE = 0x0C00000000000000LL;
typedef SaHpiInt64T SaHpiTimeoutT; /* Timeout in nanoseconds */
/* Non-blocking call */
const SaHpiTimeoutT SAHPI_TIMEOUT_IMMEDIATE = 0x0000000000000000LL;
/* Blocking call, wait indefinitely for call to complete */
const SaHpiTimeoutT SAHPI_TIMEOUT_BLOCK = -1LL;
/*
** Language
**
** This enumeration lists all of the languages that can be associated with text.
**
** SAHPI_LANG_UNDEF indicates that the language is unspecified or
** unknown.
**
** This enumerated list may grow in future versions of this specification
** as more languages are added. Legacy HPI Users should consider these new
** languages "valid but unknown".
*/
typedef enum {
SAHPI_LANG_UNDEF = 0, SAHPI_LANG_AFAR, SAHPI_LANG_ABKHAZIAN,
SAHPI_LANG_AFRIKAANS, SAHPI_LANG_AMHARIC, SAHPI_LANG_ARABIC,
SAHPI_LANG_ASSAMESE, SAHPI_LANG_AYMARA, SAHPI_LANG_AZERBAIJANI,
SAHPI_LANG_BASHKIR, SAHPI_LANG_BYELORUSSIAN, SAHPI_LANG_BULGARIAN,
SAHPI_LANG_BIHARI, SAHPI_LANG_BISLAMA, SAHPI_LANG_BENGALI,
SAHPI_LANG_TIBETAN, SAHPI_LANG_BRETON, SAHPI_LANG_CATALAN,
SAHPI_LANG_CORSICAN, SAHPI_LANG_CZECH, SAHPI_LANG_WELSH,
SAHPI_LANG_DANISH, SAHPI_LANG_GERMAN, SAHPI_LANG_BHUTANI,
SAHPI_LANG_GREEK, SAHPI_LANG_ENGLISH, SAHPI_LANG_ESPERANTO,
SAHPI_LANG_SPANISH, SAHPI_LANG_ESTONIAN, SAHPI_LANG_BASQUE,
SAHPI_LANG_PERSIAN, SAHPI_LANG_FINNISH, SAHPI_LANG_FIJI,
SAHPI_LANG_FAEROESE, SAHPI_LANG_FRENCH, SAHPI_LANG_FRISIAN,
SAHPI_LANG_IRISH, SAHPI_LANG_SCOTSGAELIC, SAHPI_LANG_GALICIAN,
SAHPI_LANG_GUARANI, SAHPI_LANG_GUJARATI, SAHPI_LANG_HAUSA,
SAHPI_LANG_HINDI, SAHPI_LANG_CROATIAN, SAHPI_LANG_HUNGARIAN,
SAHPI_LANG_ARMENIAN, SAHPI_LANG_INTERLINGUA, SAHPI_LANG_INTERLINGUE,
SAHPI_LANG_INUPIAK, SAHPI_LANG_INDONESIAN, SAHPI_LANG_ICELANDIC,
SAHPI_LANG_ITALIAN, SAHPI_LANG_HEBREW, SAHPI_LANG_JAPANESE,
SAHPI_LANG_YIDDISH, SAHPI_LANG_JAVANESE, SAHPI_LANG_GEORGIAN,
SAHPI_LANG_KAZAKH, SAHPI_LANG_GREENLANDIC, SAHPI_LANG_CAMBODIAN,
SAHPI_LANG_KANNADA, SAHPI_LANG_KOREAN, SAHPI_LANG_KASHMIRI,
SAHPI_LANG_KURDISH, SAHPI_LANG_KIRGHIZ, SAHPI_LANG_LATIN,
SAHPI_LANG_LINGALA, SAHPI_LANG_LAOTHIAN, SAHPI_LANG_LITHUANIAN,
SAHPI_LANG_LATVIANLETTISH, SAHPI_LANG_MALAGASY, SAHPI_LANG_MAORI,
SAHPI_LANG_MACEDONIAN, SAHPI_LANG_MALAYALAM, SAHPI_LANG_MONGOLIAN,
SAHPI_LANG_MOLDAVIAN, SAHPI_LANG_MARATHI, SAHPI_LANG_MALAY,
SAHPI_LANG_MALTESE, SAHPI_LANG_BURMESE, SAHPI_LANG_NAURU,
SAHPI_LANG_NEPALI, SAHPI_LANG_DUTCH, SAHPI_LANG_NORWEGIAN,
SAHPI_LANG_OCCITAN, SAHPI_LANG_AFANOROMO, SAHPI_LANG_ORIYA,
SAHPI_LANG_PUNJABI, SAHPI_LANG_POLISH, SAHPI_LANG_PASHTOPUSHTO,
SAHPI_LANG_PORTUGUESE, SAHPI_LANG_QUECHUA, SAHPI_LANG_RHAETOROMANCE,
SAHPI_LANG_KIRUNDI, SAHPI_LANG_ROMANIAN, SAHPI_LANG_RUSSIAN,
SAHPI_LANG_KINYARWANDA, SAHPI_LANG_SANSKRIT, SAHPI_LANG_SINDHI,
SAHPI_LANG_SANGRO, SAHPI_LANG_SERBOCROATIAN, SAHPI_LANG_SINGHALESE,
SAHPI_LANG_SLOVAK, SAHPI_LANG_SLOVENIAN, SAHPI_LANG_SAMOAN,
SAHPI_LANG_SHONA, SAHPI_LANG_SOMALI, SAHPI_LANG_ALBANIAN,
SAHPI_LANG_SERBIAN, SAHPI_LANG_SISWATI, SAHPI_LANG_SESOTHO,
SAHPI_LANG_SUDANESE, SAHPI_LANG_SWEDISH, SAHPI_LANG_SWAHILI,
SAHPI_LANG_TAMIL, SAHPI_LANG_TELUGU, SAHPI_LANG_TAJIK,
SAHPI_LANG_THAI, SAHPI_LANG_TIGRINYA, SAHPI_LANG_TURKMEN,
SAHPI_LANG_TAGALOG, SAHPI_LANG_SETSWANA, SAHPI_LANG_TONGA,
SAHPI_LANG_TURKISH, SAHPI_LANG_TSONGA, SAHPI_LANG_TATAR,
SAHPI_LANG_TWI, SAHPI_LANG_UKRAINIAN, SAHPI_LANG_URDU,
SAHPI_LANG_UZBEK, SAHPI_LANG_VIETNAMESE, SAHPI_LANG_VOLAPUK,
SAHPI_LANG_WOLOF, SAHPI_LANG_XHOSA, SAHPI_LANG_YORUBA,
SAHPI_LANG_CHINESE, SAHPI_LANG_ZULU
} SaHpiLanguageT;
/*
** Text Buffers
**
** These structures are used for defining the type of data in the text buffer
** and the length of the buffer. Text buffers are used in many places for
** variable length strings of data.
**
** The encoding of the Data field in the SaHpiTextBufferT structure is defined
** by the value of the DataType field in the buffer. The following table
** describes the various encodings:
**
** DataType Encoding
** -------- --------
**
** SAHPI_TL_TYPE_UNICODE 16-bit Unicode. See Note 3 below.
**
** SAHPI_TL_TYPE_BCDPLUS 8-bit ASCII, "0"-"9" or space, dash, period,
** colon, comma, or underscore only.
** See Note 2 below.
**
** SAHPI_TL_TYPE_ASCII6 8-bit ASCII, reduced set, 0x20=0x5f only.
** See Note 2 below.
**
** SAHPI_TL_TYPE_TEXT 8-bit ASCII+Latin 1. See Note 1 below.
**
** SAHPI_TL_TYPE_BINARY 8-bit bytes, any values legal
**
** Note 1: "ASCII+Latin 1" is derived from the first 256 characters of
** Unicode 2.0. The first 256 codes of Unicode follow ISO 646 (ASCII)
** and ISO 8859/1 (Latin 1). The Unicode "C0 Controls and Basic Latin"
** set defines the first 128 8-bit characters (00h-7Fh) and the
** "C1 Controls and Latin 1 Supplement" defines the second 128 (80h-FFh).
**
** Note 2: The SAHPI_TL_TYPE_BCDPLUS and SAHPI_TL_TYPE_ASCII6 encodings
** use normal ASCII character encodings, but restrict the allowed
** characters to a subset of the entire ASCII character set. These
** encodings are used when the target device contains restrictions
** on which characters it can store or display. SAHPI_TL_TYPE_BCDPLUS
** data may be stored externally as 4-bit values, and
** SAHPI_TL_TYPE_ASCII6 may be stored externally as 6-bit values.
** But, regardless of how the data is stored externally, it is
** encoded as 8-bit ASCII in the SaHpiTextBufferT structure passed
** across the HPI.
**
** Note 3: Unicode data is encoded according to the UTF-16LE encoding scheme
** as defined in the UNICODE 4.0 standard. This encoding scheme stores
** 21-bit UNICODE code points in a series of 16-bit values stored
** least-siginficant-byte first in the SaHpiTextBufferT Data field.
** The SaHpiTextBufferT DataLength field contains the number of bytes,
** so must always be an even number (maximum 0xFE) when the DataType is
** SAHPI_TL_TYPE_UNICODE. In addition to containing an even number of
** bytes, the text buffer must also contain a well-formed UTF-16LE
** sequence (meaning no "unmatched surrogates" may be present), and
** must not include encodings of any UNICODE "Non-Characters" in order
** to be considered valid. More details can be found in the Unicode
** specification available at www.unicode.org.
*/
#define SAHPI_MAX_TEXT_BUFFER_LENGTH 255
typedef enum {
SAHPI_TL_TYPE_UNICODE = 0, /* 2-byte UNICODE characters; DataLength
must be even. */
SAHPI_TL_TYPE_BCDPLUS, /* String of ASCII characters, "0"-"9", space,
dash, period, colon, comma or underscore
ONLY */
SAHPI_TL_TYPE_ASCII6, /* Reduced ASCII character set: 0x20-0x5F
ONLY */
SAHPI_TL_TYPE_TEXT, /* ASCII+Latin 1 */
SAHPI_TL_TYPE_BINARY /* Binary data, any values legal */
} SaHpiTextTypeT;
typedef struct {
SaHpiTextTypeT DataType;
SaHpiLanguageT Language; /* Language the text is in. */
SaHpiUint8T DataLength; /* Bytes used in Data buffer */
SaHpiUint8T Data[SAHPI_MAX_TEXT_BUFFER_LENGTH]; /* Data buffer */
} SaHpiTextBufferT;
/*
** Instrument Id
**
** The following data type is used for all management instrument identifiers -
** Sensor numbers, Control numbers, Watchdog Timer numbers, etc.
**
*/
typedef SaHpiUint32T SaHpiInstrumentIdT;
/*******************************************************************************
********************************************************************************
********** **********
********** Entities **********
********** **********
********************************************************************************
*******************************************************************************/
/*
** Entity Types
**
** An Entity is a physical hardware component of the system. Entities are
** defined with an entity type enumeration, and an entity location number
** (to identify the physical location of a particular type of entity).
**
** Entities are uniquely identified in a system with an ordered series of
** Entity Type / Entity Location pairs called an "Entity Path". Each subsequent
** Entity Type/Entity Location in the path is the next higher "containing"
** entity. The "root" of the Entity Path (the outermost level of containment)
** is designated with an Entity Type of SAHPI_ENT_ROOT if the entire Entity Path
** is fewer than SAHPI_MAX_ENTITY_PATH entries in length.
**
** Enumerated Entity Types include those types enumerated by the IPMI Consortium
** for IPMI-managed entities, as well as additional types defined by the
** HPI specification.
** Future versions of this specification may add new Entity Types to this
** enumerated type. Room is left in the enumeration for the inclusion of Entity
** Types taken from other lists, if needed in the future.
** Legacy HPI Users should consider these new entity types "valid but unknown".
*/
/* Base values for entity types from various sources. */
#define SAHPI_ENT_IPMI_GROUP 0
#define SAHPI_ENT_SAFHPI_GROUP 0x10000
#define SAHPI_ENT_ROOT_VALUE 0xFFFF
typedef enum {
SAHPI_ENT_UNSPECIFIED = SAHPI_ENT_IPMI_GROUP,
SAHPI_ENT_OTHER,
SAHPI_ENT_UNKNOWN,
SAHPI_ENT_PROCESSOR,
SAHPI_ENT_DISK_BAY, /* Disk or disk bay */
SAHPI_ENT_PERIPHERAL_BAY,
SAHPI_ENT_SYS_MGMNT_MODULE, /* System management module */
SAHPI_ENT_SYSTEM_BOARD, /* Main system board, may also be
processor board and/or internal
expansion board */
SAHPI_ENT_MEMORY_MODULE, /* Board holding memory devices */
SAHPI_ENT_PROCESSOR_MODULE, /* Holds processors, use this
designation when processors are not
mounted on system board */
SAHPI_ENT_POWER_SUPPLY, /* Main power supply (supplies) for the
system */
SAHPI_ENT_ADD_IN_CARD,
SAHPI_ENT_FRONT_PANEL_BOARD, /* Control panel */
SAHPI_ENT_BACK_PANEL_BOARD,
SAHPI_ENT_POWER_SYSTEM_BOARD,
SAHPI_ENT_DRIVE_BACKPLANE,
SAHPI_ENT_SYS_EXPANSION_BOARD, /* System internal expansion board
(contains expansion slots). */
SAHPI_ENT_OTHER_SYSTEM_BOARD, /* Part of board set */
SAHPI_ENT_PROCESSOR_BOARD, /* Holds 1 or more processors. Includes
boards that hold SECC modules */
SAHPI_ENT_POWER_UNIT, /* Power unit / power domain (typically
used as a pre-defined logical entity
for grouping power supplies)*/
SAHPI_ENT_POWER_MODULE, /* Power module / DC-to-DC converter.
Use this value for internal
converters. Note: You should use
entity ID (power supply) for the
main power supply even if the main
supply is a DC-to-DC converter */
SAHPI_ENT_POWER_MGMNT, /* Power management/distribution
board */
SAHPI_ENT_CHASSIS_BACK_PANEL_BOARD,
SAHPI_ENT_SYSTEM_CHASSIS,
SAHPI_ENT_SUB_CHASSIS,
SAHPI_ENT_OTHER_CHASSIS_BOARD,
SAHPI_ENT_DISK_DRIVE_BAY,
SAHPI_ENT_PERIPHERAL_BAY_2,
SAHPI_ENT_DEVICE_BAY,
SAHPI_ENT_COOLING_DEVICE, /* Fan/cooling device */
SAHPI_ENT_COOLING_UNIT, /* Can be used as a pre-defined logical
entity for grouping fans or other
cooling devices. */
SAHPI_ENT_INTERCONNECT, /* Cable / interconnect */
SAHPI_ENT_MEMORY_DEVICE, /* This Entity ID should be used for
replaceable memory devices, e.g.
DIMM/SIMM. It is recommended that
Entity IDs not be used for
individual non-replaceable memory
devices. Rather, monitoring and
error reporting should be associated
with the FRU [e.g. memory card]
holding the memory. */
SAHPI_ENT_SYS_MGMNT_SOFTWARE, /* System Management Software */
SAHPI_ENT_BIOS,
SAHPI_ENT_OPERATING_SYSTEM,
SAHPI_ENT_SYSTEM_BUS,
SAHPI_ENT_GROUP, /* This is a logical entity for use with
Entity Association records. It is
provided to allow a Sensor data
record to point to an entity-
association record when there is no
appropriate pre-defined logical
entity for the entity grouping.
This Entity should not be used as a
physical entity. */
SAHPI_ENT_REMOTE, /* Out of band management communication
device */
SAHPI_ENT_EXTERNAL_ENVIRONMENT,
SAHPI_ENT_BATTERY,
SAHPI_ENT_RESERVED_1,
SAHPI_ENT_RESERVED_2,
SAHPI_ENT_RESERVED_3,
SAHPI_ENT_RESERVED_4,
SAHPI_ENT_RESERVED_5,
SAHPI_ENT_MC_FIRMWARE, /* Management Controller Firmware,
represents firmware or software
running on a management controller */
SAHPI_ENT_IPMI_CHANNEL, /* This Entity ID enables associating
Sensors with the IPMI communication
channels - for example a Redundancy
Sensor could be used to report
redundancy status for a channel that
is composed of multiple physical
links. By convention, the Entity
Instance corresponds to the channel
number. */
SAHPI_ENT_PCI_BUS,
SAHPI_ENT_PCI_EXPRESS_BUS,
SAHPI_ENT_SCSI_BUS,
SAHPI_ENT_SATA_BUS,
SAHPI_ENT_PROC_FSB, /* Processor, front side bus */
SAHPI_ENT_CLOCK, /* e.g. Real Time Clock (RTC) */
SAHPI_ENT_SYSTEM_FIRMWARE, /* e.g. BIOS/ EFI */
/* The range from
SAHPI_ENT_SYSTEM_FIRMWARE + 1 to
SAHPI_ENT_CHASSIS_SPECIFIC - 1 is
Reserved for future use by this
specification */
SAHPI_ENT_CHASSIS_SPECIFIC = SAHPI_ENT_IPMI_GROUP + 0x90,
SAHPI_ENT_BOARD_SET_SPECIFIC = SAHPI_ENT_IPMI_GROUP + 0xB0,
SAHPI_ENT_OEM_SYSINT_SPECIFIC = SAHPI_ENT_IPMI_GROUP + 0xD0,
SAHPI_ENT_ROOT = SAHPI_ENT_ROOT_VALUE,
SAHPI_ENT_RACK = SAHPI_ENT_SAFHPI_GROUP,
SAHPI_ENT_SUBRACK,
SAHPI_ENT_COMPACTPCI_CHASSIS,
SAHPI_ENT_ADVANCEDTCA_CHASSIS,
SAHPI_ENT_RACK_MOUNTED_SERVER,
SAHPI_ENT_SYSTEM_BLADE,
SAHPI_ENT_SWITCH, /* Network switch, such as a
rack-mounted ethernet or fabric
switch. */
SAHPI_ENT_SWITCH_BLADE, /* Network switch, as above, but in
a bladed system. */
SAHPI_ENT_SBC_BLADE,
SAHPI_ENT_IO_BLADE,
SAHPI_ENT_DISK_BLADE,
SAHPI_ENT_DISK_DRIVE,
SAHPI_ENT_FAN,
SAHPI_ENT_POWER_DISTRIBUTION_UNIT,
SAHPI_ENT_SPEC_PROC_BLADE, /* Special Processing Blade,
including DSP */
SAHPI_ENT_IO_SUBBOARD, /* I/O Sub-Board, including
PMC I/O board */
SAHPI_ENT_SBC_SUBBOARD, /* SBC Sub-Board, including PMC
SBC board */
SAHPI_ENT_ALARM_MANAGER, /* Chassis alarm manager board */
SAHPI_ENT_SHELF_MANAGER, /* Blade-based shelf manager */
SAHPI_ENT_DISPLAY_PANEL, /* Display panel, such as an
alarm display panel. */
SAHPI_ENT_SUBBOARD_CARRIER_BLADE, /* Includes PMC Carrier Blade --
Use only if "carrier" is only
function of blade. Else use
primary function (SBC_BLADE,
SPEC_PROC_BLADE, etc.). */
SAHPI_ENT_PHYSICAL_SLOT, /* Indicates the physical slot into
which a FRU is inserted. */
SAHPI_ENT_PICMG_FRONT_BLADE, /* Any blade conforming to a PICMG
Standard. E.g. AdvancedTCA */
SAHPI_ENT_SYSTEM_INVENTORY_DEVICE, /* Inventory storage device for
storing system definitions */
SAHPI_ENT_FILTRATION_UNIT, /* E.g. a fan filter */
SAHPI_ENT_AMC, /* Advanced Mezzannine Card */
/* The range from
SAHPI_ENT_AMC + 0x01 to
SAHPI_ENT_SAFHPI_GROUP + 0x2F is
reserved for future use by this
specification */
SAHPI_ENT_BMC = SAHPI_ENT_SAFHPI_GROUP + 0x30, /* Baseboard Management
Controller */
SAHPI_ENT_IPMC, /* IPM controller */
SAHPI_ENT_MMC, /* Module Management controller */
SAHPI_ENT_SHMC, /* Shelf Mangement Controller */
SAHPI_ENT_CPLD, /* Complex Programmable Logic Device */
SAHPI_ENT_EPLD, /* Electrically Programmable
Logic Device */
SAHPI_ENT_FPGA, /* Field Prorammable Gate Array */
SAHPI_ENT_DASD, /* Direct Access Storage Device */
SAHPI_ENT_NIC, /* Network Interface Card */
SAHPI_ENT_DSP, /* Digital Signal Processor */
SAHPI_ENT_UCODE, /* Microcode */
SAHPI_ENT_NPU, /* Network Processor */
SAHPI_ENT_OEM /* Proprietary device */
/* The range from
SAHPI_ENT_OEM + 0x01 to
SAHPI_ENT_SAFHPI_GROUP + 0xFF is
reserved for future use by this
specification */
} SaHpiEntityTypeT;
typedef SaHpiUint32T SaHpiEntityLocationT;
typedef struct {
SaHpiEntityTypeT EntityType;
SaHpiEntityLocationT EntityLocation;
} SaHpiEntityT;
#define SAHPI_MAX_ENTITY_PATH 16
typedef struct {
SaHpiEntityT Entry[SAHPI_MAX_ENTITY_PATH];
} SaHpiEntityPathT;
/*******************************************************************************
********************************************************************************
********** **********
********** Sensor Event States **********
********** **********
********************************************************************************
*******************************************************************************/
/*
** Category
**
** Sensor events contain an event category and event state. Depending on the
** event category, the event states take on different meanings for events
** generated by specific Sensors.
**
** It is recommended that implementations map their Sensor specific
** event categories into the set of categories listed here. When such a mapping
** is impractical or impossible, the SAHPI_EC_SENSOR_SPECIFIC category should
** be used.
**
** The SAHPI_EC_GENERIC category can be used for discrete Sensors which have
** state meanings other than those identified with other event categories.
**
** Future versions of this specification may add new event categories to this
** list. Legacy HPI Users should consider these new event categories as being
** equivalent to SAHPI_EC_GENERIC.
*/
typedef SaHpiUint8T SaHpiEventCategoryT;
const SaHpiEventCategoryT SAHPI_EC_UNSPECIFIED = 0x00 ;/* Unspecified */
const SaHpiEventCategoryT SAHPI_EC_THRESHOLD = 0x01 ;/* Threshold
events */
const SaHpiEventCategoryT SAHPI_EC_USAGE = 0x02 ;/* Usage state
events */
const SaHpiEventCategoryT SAHPI_EC_STATE = 0x03 ;/* Generic state
events */
const SaHpiEventCategoryT SAHPI_EC_PRED_FAIL = 0x04 ;/* Predictive fail
events */
const SaHpiEventCategoryT SAHPI_EC_LIMIT = 0x05 ;/* Limit events */
const SaHpiEventCategoryT SAHPI_EC_PERFORMANCE = 0x06 ;/* Performance
events */
const SaHpiEventCategoryT SAHPI_EC_SEVERITY = 0x07 ;/* Severity
indicating
events */
const SaHpiEventCategoryT SAHPI_EC_PRESENCE = 0x08 ;/* Device presence
events */
const SaHpiEventCategoryT SAHPI_EC_ENABLE = 0x09 ;/* Device enabled
events */
const SaHpiEventCategoryT SAHPI_EC_AVAILABILITY = 0x0A ;/* Availability
state events */
const SaHpiEventCategoryT SAHPI_EC_REDUNDANCY = 0x0B ;/* Redundancy
state events */
const SaHpiEventCategoryT SAHPI_EC_SENSOR_SPECIFIC = 0x7E ;/* Sensor-
specific events */
const SaHpiEventCategoryT SAHPI_EC_GENERIC = 0x7F ;/* OEM defined
events */
/*
** Event States
**
** The following event states are specified relative to the categories listed
** above. The event types are only valid for their given category. Each set of
** events is labeled as to which category it belongs to.
** Each event has only one event state associated with it. When retrieving
** the event status or event enabled status a bit mask of all applicable event
** states is used. Similarly, when setting the event enabled status a bit mask
** of all applicable event states is used.
*/
typedef SaHpiUint16T SaHpiEventStateT;
/*
** SaHpiEventCategoryT == <any>
*/
const SaHpiEventStateT SAHPI_ES_UNSPECIFIED = 0x0000;
/*
** SaHpiEventCategoryT == SAHPI_EC_THRESHOLD
** When using these event states, the event state should match
** the event severity (for example SAHPI_ES_LOWER_MINOR should have an
** event severity of SAHPI_MINOR).
*/
const SaHpiEventStateT SAHPI_ES_LOWER_MINOR = 0x0001;
const SaHpiEventStateT SAHPI_ES_LOWER_MAJOR = 0x0002;
const SaHpiEventStateT SAHPI_ES_LOWER_CRIT = 0x0004;
const SaHpiEventStateT SAHPI_ES_UPPER_MINOR = 0x0008;
const SaHpiEventStateT SAHPI_ES_UPPER_MAJOR = 0x0010;
const SaHpiEventStateT SAHPI_ES_UPPER_CRIT = 0x0020;
/* SaHpiEventCategoryT == SAHPI_EC_USAGE */
const SaHpiEventStateT SAHPI_ES_IDLE = 0x0001;
const SaHpiEventStateT SAHPI_ES_ACTIVE = 0x0002;
const SaHpiEventStateT SAHPI_ES_BUSY = 0x0004;
/* SaHpiEventCategoryT == SAHPI_EC_STATE */
const SaHpiEventStateT SAHPI_ES_STATE_DEASSERTED = 0x0001;
const SaHpiEventStateT SAHPI_ES_STATE_ASSERTED = 0x0002;
/* SaHpiEventCategoryT == SAHPI_EC_PRED_FAIL */
const SaHpiEventStateT SAHPI_ES_PRED_FAILURE_DEASSERT = 0x0001;
const SaHpiEventStateT SAHPI_ES_PRED_FAILURE_ASSERT = 0x0002;
/* SaHpiEventCategoryT == SAHPI_EC_LIMIT */
const SaHpiEventStateT SAHPI_ES_LIMIT_NOT_EXCEEDED = 0x0001;
const SaHpiEventStateT SAHPI_ES_LIMIT_EXCEEDED = 0x0002;
/* SaHpiEventCategoryT == SAHPI_EC_PERFORMANCE */
const SaHpiEventStateT SAHPI_ES_PERFORMANCE_MET = 0x0001;
const SaHpiEventStateT SAHPI_ES_PERFORMANCE_LAGS = 0x0002;
/*
** SaHpiEventCategoryT == SAHPI_EC_SEVERITY
** When using these event states, the event state should match
** the event severity
*/
const SaHpiEventStateT SAHPI_ES_OK = 0x0001;
const SaHpiEventStateT SAHPI_ES_MINOR_FROM_OK = 0x0002;
const SaHpiEventStateT SAHPI_ES_MAJOR_FROM_LESS = 0x0004;
const SaHpiEventStateT SAHPI_ES_CRITICAL_FROM_LESS = 0x0008;
const SaHpiEventStateT SAHPI_ES_MINOR_FROM_MORE = 0x0010;
const SaHpiEventStateT SAHPI_ES_MAJOR_FROM_CRITICAL = 0x0020;
const SaHpiEventStateT SAHPI_ES_CRITICAL = 0x0040;
const SaHpiEventStateT SAHPI_ES_MONITOR = 0x0080;
const SaHpiEventStateT SAHPI_ES_INFORMATIONAL = 0x0100;
/* SaHpiEventCategoryT == SAHPI_EC_PRESENCE */
const SaHpiEventStateT SAHPI_ES_ABSENT = 0x0001;
const SaHpiEventStateT SAHPI_ES_PRESENT = 0x0002;
/* SaHpiEventCategoryT == SAHPI_EC_ENABLE */
const SaHpiEventStateT SAHPI_ES_DISABLED = 0x0001;
const SaHpiEventStateT SAHPI_ES_ENABLED = 0x0002;
/* SaHpiEventCategoryT == SAHPI_EC_AVAILABILITY */
const SaHpiEventStateT SAHPI_ES_RUNNING = 0x0001;
const SaHpiEventStateT SAHPI_ES_TEST = 0x0002;
const SaHpiEventStateT SAHPI_ES_POWER_OFF = 0x0004;
const SaHpiEventStateT SAHPI_ES_ON_LINE = 0x0008;
const SaHpiEventStateT SAHPI_ES_OFF_LINE = 0x0010;
const SaHpiEventStateT SAHPI_ES_OFF_DUTY = 0x0020;
const SaHpiEventStateT SAHPI_ES_DEGRADED = 0x0040;
const SaHpiEventStateT SAHPI_ES_POWER_SAVE = 0x0080;
const SaHpiEventStateT SAHPI_ES_INSTALL_ERROR = 0x0100;
/* SaHpiEventCategoryT == SAHPI_EC_REDUNDANCY */
const SaHpiEventStateT SAHPI_ES_FULLY_REDUNDANT = 0x0001;
const SaHpiEventStateT SAHPI_ES_REDUNDANCY_LOST = 0x0002;
const SaHpiEventStateT SAHPI_ES_REDUNDANCY_DEGRADED = 0x0004;
const SaHpiEventStateT SAHPI_ES_REDUNDANCY_LOST_SUFFICIENT_RESOURCES = 0x0008;
const SaHpiEventStateT SAHPI_ES_NON_REDUNDANT_SUFFICIENT_RESOURCES = 0x0010;
const SaHpiEventStateT SAHPI_ES_NON_REDUNDANT_INSUFFICIENT_RESOURCES = 0x0020;
const SaHpiEventStateT SAHPI_ES_REDUNDANCY_DEGRADED_FROM_FULL = 0x0040;
const SaHpiEventStateT SAHPI_ES_REDUNDANCY_DEGRADED_FROM_NON = 0x0080;
/*
** SaHpiEventCategoryT == SAHPI_EC_GENERIC || SAHPI_EC_SENSOR_SPECIFIC
** These event states are implementation-specific.
*/
const SaHpiEventStateT SAHPI_ES_STATE_00 = 0x0001;
const SaHpiEventStateT SAHPI_ES_STATE_01 = 0x0002;
const SaHpiEventStateT SAHPI_ES_STATE_02 = 0x0004;
const SaHpiEventStateT SAHPI_ES_STATE_03 = 0x0008;
const SaHpiEventStateT SAHPI_ES_STATE_04 = 0x0010;
const SaHpiEventStateT SAHPI_ES_STATE_05 = 0x0020;
const SaHpiEventStateT SAHPI_ES_STATE_06 = 0x0040;
const SaHpiEventStateT SAHPI_ES_STATE_07 = 0x0080;
const SaHpiEventStateT SAHPI_ES_STATE_08 = 0x0100;
const SaHpiEventStateT SAHPI_ES_STATE_09 = 0x0200;
const SaHpiEventStateT SAHPI_ES_STATE_10 = 0x0400;
const SaHpiEventStateT SAHPI_ES_STATE_11 = 0x0800;
const SaHpiEventStateT SAHPI_ES_STATE_12 = 0x1000;
const SaHpiEventStateT SAHPI_ES_STATE_13 = 0x2000;
const SaHpiEventStateT SAHPI_ES_STATE_14 = 0x4000;
/*******************************************************************************
********************************************************************************
********** **********
********** Sensors **********
********** **********
********************************************************************************
*******************************************************************************/
/* Sensor Number */
typedef SaHpiInstrumentIdT SaHpiSensorNumT;
/*
** The following specifies the named range for Sensor numbers reserved
** by the HPI specification.
** HPI Implementations shall not assign Sensor numbers within this
** number range, except for the specific Sensors identified in the
** specification. For example, currently, three aggregate Sensors are named in
** this range. Other Sensors exposed by the HPI Implementation (e.g., a
** temperature Sensor) must be assigned a number outside of this range.
**/
const SaHpiSensorNumT SAHPI_STANDARD_SENSOR_MIN = 0x00000100;
const SaHpiSensorNumT SAHPI_STANDARD_SENSOR_MAX = 0x000001FF;
#define SAHPI_SENSOR_TYPE_SAFHPI_GROUP 0x10000
/* Type of Sensor
** Future versions of this specification may add new Sensor types as required.
** Legacy HPI Users should consider these new types "valid but unknown".
*/
typedef enum {
SAHPI_TEMPERATURE = 0x01,
SAHPI_VOLTAGE,
SAHPI_CURRENT,
SAHPI_FAN,
SAHPI_PHYSICAL_SECURITY,
SAHPI_PLATFORM_VIOLATION,
SAHPI_PROCESSOR,
SAHPI_POWER_SUPPLY,
SAHPI_POWER_UNIT,
SAHPI_COOLING_DEVICE,
SAHPI_OTHER_UNITS_BASED_SENSOR,
SAHPI_MEMORY,
SAHPI_DRIVE_SLOT,
SAHPI_POST_MEMORY_RESIZE,
SAHPI_SYSTEM_FW_PROGRESS,
SAHPI_EVENT_LOGGING_DISABLED,
SAHPI_RESERVED1,
SAHPI_SYSTEM_EVENT,
SAHPI_CRITICAL_INTERRUPT,
SAHPI_BUTTON,
SAHPI_MODULE_BOARD,
SAHPI_MICROCONTROLLER_COPROCESSOR,
SAHPI_ADDIN_CARD,
SAHPI_CHASSIS,
SAHPI_CHIP_SET,
SAHPI_OTHER_FRU,
SAHPI_CABLE_INTERCONNECT,
SAHPI_TERMINATOR,
SAHPI_SYSTEM_BOOT_INITIATED,
SAHPI_BOOT_ERROR,
SAHPI_OS_BOOT,
SAHPI_OS_CRITICAL_STOP,
SAHPI_SLOT_CONNECTOR,
SAHPI_SYSTEM_ACPI_POWER_STATE,
SAHPI_RESERVED2,
SAHPI_PLATFORM_ALERT,
SAHPI_ENTITY_PRESENCE,
SAHPI_MONITOR_ASIC_IC,
SAHPI_LAN,
SAHPI_MANAGEMENT_SUBSYSTEM_HEALTH,
SAHPI_BATTERY,
SAHPI_SESSION_AUDIT,
SAHPI_VERSION_CHANGE,
SAHPI_OPERATIONAL = 0xA0,
SAHPI_OEM_SENSOR=0xC0,
SAHPI_COMM_CHANNEL_LINK_STATE = SAHPI_SENSOR_TYPE_SAFHPI_GROUP + 0x1,
SAHPI_MANAGEMENT_BUS_STATE
} SaHpiSensorTypeT;
/*
** Sensor Reading Type
**
** These definitions list the available data types that can be
** used for Sensor readings.
**
*/
#define SAHPI_SENSOR_BUFFER_LENGTH 32
typedef enum {
SAHPI_SENSOR_READING_TYPE_INT64,
SAHPI_SENSOR_READING_TYPE_UINT64,
SAHPI_SENSOR_READING_TYPE_FLOAT64,
SAHPI_SENSOR_READING_TYPE_BUFFER /* 32 byte array. The format of
the buffer is implementation-
specific. Sensors that use
this reading type may not have
thresholds that are settable
or readable. */
} SaHpiSensorReadingTypeT;
typedef union {
SaHpiInt64T SensorInt64;
SaHpiUint64T SensorUint64;
SaHpiFloat64T SensorFloat64;
SaHpiUint8T SensorBuffer[SAHPI_SENSOR_BUFFER_LENGTH];
} SaHpiSensorReadingUnionT;
/*
** Sensor Reading
**
** The Sensor reading data structure is returned from a call to get
** Sensor reading. The structure is also used when setting and getting Sensor
** threshold values and reporting Sensor ranges.
**
** IsSupported is set to True if a Sensor reading/threshold value is available.
** Otherwise, if no reading or threshold is supported, this flag is set to
** False.
**
*/