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#ifndef __ACTBL2_H__
45#define __ACTBL2_H__
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64#define ACPI_SIG_ASF "ASF!"
65#define ACPI_SIG_BOOT "BOOT"
66#define ACPI_SIG_CSRT "CSRT"
67#define ACPI_SIG_DBG2 "DBG2"
68#define ACPI_SIG_DBGP "DBGP"
69#define ACPI_SIG_DMAR "DMAR"
70#define ACPI_SIG_HPET "HPET"
71#define ACPI_SIG_IBFT "IBFT"
72#define ACPI_SIG_IVRS "IVRS"
73#define ACPI_SIG_LPIT "LPIT"
74#define ACPI_SIG_MCFG "MCFG"
75#define ACPI_SIG_MCHI "MCHI"
76#define ACPI_SIG_MTMR "MTMR"
77#define ACPI_SIG_SLIC "SLIC"
78#define ACPI_SIG_SPCR "SPCR"
79#define ACPI_SIG_SPMI "SPMI"
80#define ACPI_SIG_TCPA "TCPA"
81#define ACPI_SIG_TPM2 "TPM2"
82#define ACPI_SIG_UEFI "UEFI"
83#define ACPI_SIG_VRTC "VRTC"
84#define ACPI_SIG_WAET "WAET"
85#define ACPI_SIG_WDAT "WDAT"
86#define ACPI_SIG_WDDT "WDDT"
87#define ACPI_SIG_WDRT "WDRT"
88#define ACPI_SIG_WSMT "WSMT"
89
90#ifdef ACPI_UNDEFINED_TABLES
91
92
93
94#define ACPI_SIG_ATKG "ATKG"
95#define ACPI_SIG_GSCI "GSCI"
96#define ACPI_SIG_IEIT "IEIT"
97#endif
98
99
100
101
102
103#pragma pack(1)
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126struct acpi_table_asf {
127 struct acpi_table_header header;
128};
129
130
131
132struct acpi_asf_header {
133 u8 type;
134 u8 reserved;
135 u16 length;
136};
137
138
139
140enum acpi_asf_type {
141 ACPI_ASF_TYPE_INFO = 0,
142 ACPI_ASF_TYPE_ALERT = 1,
143 ACPI_ASF_TYPE_CONTROL = 2,
144 ACPI_ASF_TYPE_BOOT = 3,
145 ACPI_ASF_TYPE_ADDRESS = 4,
146 ACPI_ASF_TYPE_RESERVED = 5
147};
148
149
150
151
152
153
154
155struct acpi_asf_info {
156 struct acpi_asf_header header;
157 u8 min_reset_value;
158 u8 min_poll_interval;
159 u16 system_id;
160 u32 mfg_id;
161 u8 flags;
162 u8 reserved2[3];
163};
164
165
166
167#define ACPI_ASF_SMBUS_PROTOCOLS (1)
168
169
170
171struct acpi_asf_alert {
172 struct acpi_asf_header header;
173 u8 assert_mask;
174 u8 deassert_mask;
175 u8 alerts;
176 u8 data_length;
177};
178
179struct acpi_asf_alert_data {
180 u8 address;
181 u8 command;
182 u8 mask;
183 u8 value;
184 u8 sensor_type;
185 u8 type;
186 u8 offset;
187 u8 source_type;
188 u8 severity;
189 u8 sensor_number;
190 u8 entity;
191 u8 instance;
192};
193
194
195
196struct acpi_asf_remote {
197 struct acpi_asf_header header;
198 u8 controls;
199 u8 data_length;
200 u16 reserved2;
201};
202
203struct acpi_asf_control_data {
204 u8 function;
205 u8 address;
206 u8 command;
207 u8 value;
208};
209
210
211
212struct acpi_asf_rmcp {
213 struct acpi_asf_header header;
214 u8 capabilities[7];
215 u8 completion_code;
216 u32 enterprise_id;
217 u8 command;
218 u16 parameter;
219 u16 boot_options;
220 u16 oem_parameters;
221};
222
223
224
225struct acpi_asf_address {
226 struct acpi_asf_header header;
227 u8 eprom_address;
228 u8 devices;
229};
230
231
232
233
234
235
236
237
238
239
240struct acpi_table_boot {
241 struct acpi_table_header header;
242 u8 cmos_index;
243 u8 reserved[3];
244};
245
246
247
248
249
250
251
252
253
254
255struct acpi_table_csrt {
256 struct acpi_table_header header;
257};
258
259
260
261struct acpi_csrt_group {
262 u32 length;
263 u32 vendor_id;
264 u32 subvendor_id;
265 u16 device_id;
266 u16 subdevice_id;
267 u16 revision;
268 u16 reserved;
269 u32 shared_info_length;
270
271
272};
273
274
275
276struct acpi_csrt_shared_info {
277 u16 major_version;
278 u16 minor_version;
279 u32 mmio_base_low;
280 u32 mmio_base_high;
281 u32 gsi_interrupt;
282 u8 interrupt_polarity;
283 u8 interrupt_mode;
284 u8 num_channels;
285 u8 dma_address_width;
286 u16 base_request_line;
287 u16 num_handshake_signals;
288 u32 max_block_size;
289
290
291};
292
293
294
295struct acpi_csrt_descriptor {
296 u32 length;
297 u16 type;
298 u16 subtype;
299 u32 uid;
300
301
302};
303
304
305
306#define ACPI_CSRT_TYPE_INTERRUPT 0x0001
307#define ACPI_CSRT_TYPE_TIMER 0x0002
308#define ACPI_CSRT_TYPE_DMA 0x0003
309
310
311
312#define ACPI_CSRT_XRUPT_LINE 0x0000
313#define ACPI_CSRT_XRUPT_CONTROLLER 0x0001
314#define ACPI_CSRT_TIMER 0x0000
315#define ACPI_CSRT_DMA_CHANNEL 0x0000
316#define ACPI_CSRT_DMA_CONTROLLER 0x0001
317
318
319
320
321
322
323
324
325
326
327struct acpi_table_dbg2 {
328 struct acpi_table_header header;
329 u32 info_offset;
330 u32 info_count;
331};
332
333
334
335struct acpi_dbg2_device {
336 u8 revision;
337 u16 length;
338 u8 register_count;
339 u16 namepath_length;
340 u16 namepath_offset;
341 u16 oem_data_length;
342 u16 oem_data_offset;
343 u16 port_type;
344 u16 port_subtype;
345 u16 reserved;
346 u16 base_address_offset;
347 u16 address_size_offset;
348
349
350
351
352
353
354
355};
356
357
358
359#define ACPI_DBG2_SERIAL_PORT 0x8000
360#define ACPI_DBG2_1394_PORT 0x8001
361#define ACPI_DBG2_USB_PORT 0x8002
362#define ACPI_DBG2_NET_PORT 0x8003
363
364
365
366#define ACPI_DBG2_16550_COMPATIBLE 0x0000
367#define ACPI_DBG2_16550_SUBSET 0x0001
368
369#define ACPI_DBG2_1394_STANDARD 0x0000
370
371#define ACPI_DBG2_USB_XHCI 0x0000
372#define ACPI_DBG2_USB_EHCI 0x0001
373
374
375
376
377
378
379
380
381
382
383struct acpi_table_dbgp {
384 struct acpi_table_header header;
385 u8 type;
386 u8 reserved[3];
387 struct acpi_generic_address debug_port;
388};
389
390
391
392
393
394
395
396
397
398
399
400struct acpi_table_dmar {
401 struct acpi_table_header header;
402 u8 width;
403 u8 flags;
404 u8 reserved[10];
405};
406
407
408
409#define ACPI_DMAR_INTR_REMAP (1)
410
411
412
413struct acpi_dmar_header {
414 u16 type;
415 u16 length;
416};
417
418
419
420enum acpi_dmar_type {
421 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
422 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
423 ACPI_DMAR_TYPE_ROOT_ATS = 2,
424 ACPI_DMAR_TYPE_HARDWARE_AFFINITY = 3,
425 ACPI_DMAR_TYPE_NAMESPACE = 4,
426 ACPI_DMAR_TYPE_RESERVED = 5
427};
428
429
430
431struct acpi_dmar_device_scope {
432 u8 entry_type;
433 u8 length;
434 u16 reserved;
435 u8 enumeration_id;
436 u8 bus;
437};
438
439
440
441enum acpi_dmar_scope_type {
442 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
443 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
444 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
445 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
446 ACPI_DMAR_SCOPE_TYPE_HPET = 4,
447 ACPI_DMAR_SCOPE_TYPE_NAMESPACE = 5,
448 ACPI_DMAR_SCOPE_TYPE_RESERVED = 6
449};
450
451struct acpi_dmar_pci_path {
452 u8 device;
453 u8 function;
454};
455
456
457
458
459
460
461
462struct acpi_dmar_hardware_unit {
463 struct acpi_dmar_header header;
464 u8 flags;
465 u8 reserved;
466 u16 segment;
467 u64 address;
468};
469
470
471
472#define ACPI_DMAR_INCLUDE_ALL (1)
473
474
475
476struct acpi_dmar_reserved_memory {
477 struct acpi_dmar_header header;
478 u16 reserved;
479 u16 segment;
480 u64 base_address;
481 u64 end_address;
482};
483
484
485
486#define ACPI_DMAR_ALLOW_ALL (1)
487
488
489
490struct acpi_dmar_atsr {
491 struct acpi_dmar_header header;
492 u8 flags;
493 u8 reserved;
494 u16 segment;
495};
496
497
498
499#define ACPI_DMAR_ALL_PORTS (1)
500
501
502
503struct acpi_dmar_rhsa {
504 struct acpi_dmar_header header;
505 u32 reserved;
506 u64 base_address;
507 u32 proximity_domain;
508};
509
510
511
512struct acpi_dmar_andd {
513 struct acpi_dmar_header header;
514 u8 reserved[3];
515 u8 device_number;
516 char device_name[1];
517};
518
519
520
521
522
523
524
525
526
527
528
529struct acpi_table_hpet {
530 struct acpi_table_header header;
531 u32 id;
532 struct acpi_generic_address address;
533 u8 sequence;
534 u16 minimum_tick;
535 u8 flags;
536};
537
538
539
540#define ACPI_HPET_PAGE_PROTECT_MASK (3)
541
542
543
544enum acpi_hpet_page_protect {
545 ACPI_HPET_NO_PAGE_PROTECT = 0,
546 ACPI_HPET_PAGE_PROTECT4 = 1,
547 ACPI_HPET_PAGE_PROTECT64 = 2
548};
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563struct acpi_table_ibft {
564 struct acpi_table_header header;
565 u8 reserved[12];
566};
567
568
569
570struct acpi_ibft_header {
571 u8 type;
572 u8 version;
573 u16 length;
574 u8 index;
575 u8 flags;
576};
577
578
579
580enum acpi_ibft_type {
581 ACPI_IBFT_TYPE_NOT_USED = 0,
582 ACPI_IBFT_TYPE_CONTROL = 1,
583 ACPI_IBFT_TYPE_INITIATOR = 2,
584 ACPI_IBFT_TYPE_NIC = 3,
585 ACPI_IBFT_TYPE_TARGET = 4,
586 ACPI_IBFT_TYPE_EXTENSIONS = 5,
587 ACPI_IBFT_TYPE_RESERVED = 6
588};
589
590
591
592struct acpi_ibft_control {
593 struct acpi_ibft_header header;
594 u16 extensions;
595 u16 initiator_offset;
596 u16 nic0_offset;
597 u16 target0_offset;
598 u16 nic1_offset;
599 u16 target1_offset;
600};
601
602struct acpi_ibft_initiator {
603 struct acpi_ibft_header header;
604 u8 sns_server[16];
605 u8 slp_server[16];
606 u8 primary_server[16];
607 u8 secondary_server[16];
608 u16 name_length;
609 u16 name_offset;
610};
611
612struct acpi_ibft_nic {
613 struct acpi_ibft_header header;
614 u8 ip_address[16];
615 u8 subnet_mask_prefix;
616 u8 origin;
617 u8 gateway[16];
618 u8 primary_dns[16];
619 u8 secondary_dns[16];
620 u8 dhcp[16];
621 u16 vlan;
622 u8 mac_address[6];
623 u16 pci_address;
624 u16 name_length;
625 u16 name_offset;
626};
627
628struct acpi_ibft_target {
629 struct acpi_ibft_header header;
630 u8 target_ip_address[16];
631 u16 target_ip_socket;
632 u8 target_boot_lun[8];
633 u8 chap_type;
634 u8 nic_association;
635 u16 target_name_length;
636 u16 target_name_offset;
637 u16 chap_name_length;
638 u16 chap_name_offset;
639 u16 chap_secret_length;
640 u16 chap_secret_offset;
641 u16 reverse_chap_name_length;
642 u16 reverse_chap_name_offset;
643 u16 reverse_chap_secret_length;
644 u16 reverse_chap_secret_offset;
645};
646
647
648
649
650
651
652
653
654
655
656
657struct acpi_table_ivrs {
658 struct acpi_table_header header;
659 u32 info;
660 u64 reserved;
661};
662
663
664
665#define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00
666#define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000
667#define ACPI_IVRS_ATS_RESERVED 0x00400000
668
669
670
671struct acpi_ivrs_header {
672 u8 type;
673 u8 flags;
674 u16 length;
675 u16 device_id;
676};
677
678
679
680enum acpi_ivrs_type {
681 ACPI_IVRS_TYPE_HARDWARE = 0x10,
682 ACPI_IVRS_TYPE_MEMORY1 = 0x20,
683 ACPI_IVRS_TYPE_MEMORY2 = 0x21,
684 ACPI_IVRS_TYPE_MEMORY3 = 0x22
685};
686
687
688
689#define ACPI_IVHD_TT_ENABLE (1)
690#define ACPI_IVHD_PASS_PW (1<<1)
691#define ACPI_IVHD_RES_PASS_PW (1<<2)
692#define ACPI_IVHD_ISOC (1<<3)
693#define ACPI_IVHD_IOTLB (1<<4)
694
695
696
697#define ACPI_IVMD_UNITY (1)
698#define ACPI_IVMD_READ (1<<1)
699#define ACPI_IVMD_WRITE (1<<2)
700#define ACPI_IVMD_EXCLUSION_RANGE (1<<3)
701
702
703
704
705
706
707
708struct acpi_ivrs_hardware {
709 struct acpi_ivrs_header header;
710 u16 capability_offset;
711 u64 base_address;
712 u16 pci_segment_group;
713 u16 info;
714 u32 reserved;
715};
716
717
718
719#define ACPI_IVHD_MSI_NUMBER_MASK 0x001F
720#define ACPI_IVHD_UNIT_ID_MASK 0x1F00
721
722
723
724
725
726
727
728struct acpi_ivrs_de_header {
729 u8 type;
730 u16 id;
731 u8 data_setting;
732};
733
734
735
736#define ACPI_IVHD_ENTRY_LENGTH 0xC0
737
738
739
740enum acpi_ivrs_device_entry_type {
741
742
743 ACPI_IVRS_TYPE_PAD4 = 0,
744 ACPI_IVRS_TYPE_ALL = 1,
745 ACPI_IVRS_TYPE_SELECT = 2,
746 ACPI_IVRS_TYPE_START = 3,
747 ACPI_IVRS_TYPE_END = 4,
748
749
750
751 ACPI_IVRS_TYPE_PAD8 = 64,
752 ACPI_IVRS_TYPE_NOT_USED = 65,
753 ACPI_IVRS_TYPE_ALIAS_SELECT = 66,
754 ACPI_IVRS_TYPE_ALIAS_START = 67,
755 ACPI_IVRS_TYPE_EXT_SELECT = 70,
756 ACPI_IVRS_TYPE_EXT_START = 71,
757 ACPI_IVRS_TYPE_SPECIAL = 72
758};
759
760
761
762#define ACPI_IVHD_INIT_PASS (1)
763#define ACPI_IVHD_EINT_PASS (1<<1)
764#define ACPI_IVHD_NMI_PASS (1<<2)
765#define ACPI_IVHD_SYSTEM_MGMT (3<<4)
766#define ACPI_IVHD_LINT0_PASS (1<<6)
767#define ACPI_IVHD_LINT1_PASS (1<<7)
768
769
770
771struct acpi_ivrs_device4 {
772 struct acpi_ivrs_de_header header;
773};
774
775
776
777struct acpi_ivrs_device8a {
778 struct acpi_ivrs_de_header header;
779 u8 reserved1;
780 u16 used_id;
781 u8 reserved2;
782};
783
784
785
786struct acpi_ivrs_device8b {
787 struct acpi_ivrs_de_header header;
788 u32 extended_data;
789};
790
791
792
793#define ACPI_IVHD_ATS_DISABLED (1<<31)
794
795
796
797struct acpi_ivrs_device8c {
798 struct acpi_ivrs_de_header header;
799 u8 handle;
800 u16 used_id;
801 u8 variety;
802};
803
804
805
806#define ACPI_IVHD_IOAPIC 1
807#define ACPI_IVHD_HPET 2
808
809
810
811struct acpi_ivrs_memory {
812 struct acpi_ivrs_header header;
813 u16 aux_data;
814 u64 reserved;
815 u64 start_address;
816 u64 memory_length;
817};
818
819
820
821
822
823
824
825
826
827struct acpi_table_lpit {
828 struct acpi_table_header header;
829};
830
831
832
833struct acpi_lpit_header {
834 u32 type;
835 u32 length;
836 u16 unique_id;
837 u16 reserved;
838 u32 flags;
839};
840
841
842
843enum acpi_lpit_type {
844 ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
845 ACPI_LPIT_TYPE_SIMPLE_IO = 0x01
846};
847
848
849
850#define ACPI_LPIT_STATE_DISABLED (1)
851#define ACPI_LPIT_NO_COUNTER (1<<1)
852
853
854
855
856
857
858
859struct acpi_lpit_native {
860 struct acpi_lpit_header header;
861 struct acpi_generic_address entry_trigger;
862 u32 residency;
863 u32 latency;
864 struct acpi_generic_address residency_counter;
865 u64 counter_frequency;
866};
867
868
869
870struct acpi_lpit_io {
871 struct acpi_lpit_header header;
872 struct acpi_generic_address entry_trigger;
873 u32 trigger_action;
874 u64 trigger_value;
875 u64 trigger_mask;
876 struct acpi_generic_address minimum_idle_state;
877 u32 residency;
878 u32 latency;
879 struct acpi_generic_address residency_counter;
880 u64 counter_frequency;
881};
882
883
884
885
886
887
888
889
890
891
892struct acpi_table_mcfg {
893 struct acpi_table_header header;
894 u8 reserved[8];
895};
896
897
898
899struct acpi_mcfg_allocation {
900 u64 address;
901 u16 pci_segment;
902 u8 start_bus_number;
903 u8 end_bus_number;
904 u32 reserved;
905};
906
907
908
909
910
911
912
913
914
915
916
917struct acpi_table_mchi {
918 struct acpi_table_header header;
919 u8 interface_type;
920 u8 protocol;
921 u64 protocol_data;
922 u8 interrupt_type;
923 u8 gpe;
924 u8 pci_device_flag;
925 u32 global_interrupt;
926 struct acpi_generic_address control_register;
927 u8 pci_segment;
928 u8 pci_bus;
929 u8 pci_device;
930 u8 pci_function;
931};
932
933
934
935
936
937
938
939
940
941
942
943
944struct acpi_table_mtmr {
945 struct acpi_table_header header;
946};
947
948
949
950struct acpi_mtmr_entry {
951 struct acpi_generic_address physical_address;
952 u32 frequency;
953 u32 irq;
954};
955
956
957
958
959
960
961
962
963
964
965
966
967
968struct acpi_table_slic {
969 struct acpi_table_header header;
970};
971
972
973
974struct acpi_slic_header {
975 u32 type;
976 u32 length;
977};
978
979
980
981enum acpi_slic_type {
982 ACPI_SLIC_TYPE_PUBLIC_KEY = 0,
983 ACPI_SLIC_TYPE_WINDOWS_MARKER = 1,
984 ACPI_SLIC_TYPE_RESERVED = 2
985};
986
987
988
989
990
991
992
993struct acpi_slic_key {
994 struct acpi_slic_header header;
995 u8 key_type;
996 u8 version;
997 u16 reserved;
998 u32 algorithm;
999 char magic[4];
1000 u32 bit_length;
1001 u32 exponent;
1002 u8 modulus[128];
1003};
1004
1005
1006
1007struct acpi_slic_marker {
1008 struct acpi_slic_header header;
1009 u32 version;
1010 char oem_id[ACPI_OEM_ID_SIZE];
1011 char oem_table_id[ACPI_OEM_TABLE_ID_SIZE];
1012 char windows_flag[8];
1013 u32 slic_version;
1014 u8 reserved[16];
1015 u8 signature[128];
1016};
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028struct acpi_table_spcr {
1029 struct acpi_table_header header;
1030 u8 interface_type;
1031 u8 reserved[3];
1032 struct acpi_generic_address serial_port;
1033 u8 interrupt_type;
1034 u8 pc_interrupt;
1035 u32 interrupt;
1036 u8 baud_rate;
1037 u8 parity;
1038 u8 stop_bits;
1039 u8 flow_control;
1040 u8 terminal_type;
1041 u8 reserved1;
1042 u16 pci_device_id;
1043 u16 pci_vendor_id;
1044 u8 pci_bus;
1045 u8 pci_device;
1046 u8 pci_function;
1047 u32 pci_flags;
1048 u8 pci_segment;
1049 u32 reserved2;
1050};
1051
1052
1053
1054#define ACPI_SPCR_DO_NOT_DISABLE (1)
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067struct acpi_table_spmi {
1068 struct acpi_table_header header;
1069 u8 interface_type;
1070 u8 reserved;
1071 u16 spec_revision;
1072 u8 interrupt_type;
1073 u8 gpe_number;
1074 u8 reserved1;
1075 u8 pci_device_flag;
1076 u32 interrupt;
1077 struct acpi_generic_address ipmi_register;
1078 u8 pci_segment;
1079 u8 pci_bus;
1080 u8 pci_device;
1081 u8 pci_function;
1082 u8 reserved2;
1083};
1084
1085
1086
1087enum acpi_spmi_interface_types {
1088 ACPI_SPMI_NOT_USED = 0,
1089 ACPI_SPMI_KEYBOARD = 1,
1090 ACPI_SPMI_SMI = 2,
1091 ACPI_SPMI_BLOCK_TRANSFER = 3,
1092 ACPI_SPMI_SMBUS = 4,
1093 ACPI_SPMI_RESERVED = 5
1094};
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110struct acpi_table_tcpa_client {
1111 struct acpi_table_header header;
1112 u16 platform_class;
1113 u32 minimum_log_length;
1114 u64 log_address;
1115};
1116
1117struct acpi_table_tcpa_server {
1118 struct acpi_table_header header;
1119 u16 platform_class;
1120 u16 reserved;
1121 u64 minimum_log_length;
1122 u64 log_address;
1123 u16 spec_revision;
1124 u8 device_flags;
1125 u8 interrupt_flags;
1126 u8 gpe_number;
1127 u8 reserved2[3];
1128 u32 global_interrupt;
1129 struct acpi_generic_address address;
1130 u32 reserved3;
1131 struct acpi_generic_address config_address;
1132 u8 group;
1133 u8 bus;
1134 u8 device;
1135 u8 function;
1136};
1137
1138
1139
1140#define ACPI_TCPA_PCI_DEVICE (1)
1141#define ACPI_TCPA_BUS_PNP (1<<1)
1142#define ACPI_TCPA_ADDRESS_VALID (1<<2)
1143
1144
1145
1146#define ACPI_TCPA_INTERRUPT_MODE (1)
1147#define ACPI_TCPA_INTERRUPT_POLARITY (1<<1)
1148#define ACPI_TCPA_SCI_VIA_GPE (1<<2)
1149#define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3)
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162struct acpi_table_tpm2 {
1163 struct acpi_table_header header;
1164 u16 platform_class;
1165 u16 reserved;
1166 u64 control_address;
1167 u32 start_method;
1168
1169
1170};
1171
1172
1173
1174#define ACPI_TPM2_NOT_ALLOWED 0
1175#define ACPI_TPM2_START_METHOD 2
1176#define ACPI_TPM2_MEMORY_MAPPED 6
1177#define ACPI_TPM2_COMMAND_BUFFER 7
1178#define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8
1179#define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC 11
1180
1181
1182
1183struct acpi_tpm2_trailer {
1184 u32 minimum_log_length;
1185 u64 log_address;
1186};
1187
1188
1189
1190
1191
1192
1193
1194struct acpi_tpm2_arm_smc {
1195 u32 global_interrupt;
1196 u8 interrupt_flags;
1197 u8 operation_flags;
1198 u16 reserved;
1199 u32 function_id;
1200};
1201
1202
1203
1204#define ACPI_TPM2_INTERRUPT_SUPPORT (1)
1205
1206
1207
1208#define ACPI_TPM2_IDLE_SUPPORT (1)
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220struct acpi_table_uefi {
1221 struct acpi_table_header header;
1222 u8 identifier[16];
1223 u16 data_offset;
1224};
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237struct acpi_table_vrtc {
1238 struct acpi_table_header header;
1239};
1240
1241
1242
1243struct acpi_vrtc_entry {
1244 struct acpi_generic_address physical_address;
1245 u32 irq;
1246};
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257struct acpi_table_waet {
1258 struct acpi_table_header header;
1259 u32 flags;
1260};
1261
1262
1263
1264#define ACPI_WAET_RTC_NO_ACK (1)
1265#define ACPI_WAET_TIMER_ONE_READ (1<<1)
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277struct acpi_table_wdat {
1278 struct acpi_table_header header;
1279 u32 header_length;
1280 u16 pci_segment;
1281 u8 pci_bus;
1282 u8 pci_device;
1283 u8 pci_function;
1284 u8 reserved[3];
1285 u32 timer_period;
1286 u32 max_count;
1287 u32 min_count;
1288 u8 flags;
1289 u8 reserved2[3];
1290 u32 entries;
1291};
1292
1293
1294
1295#define ACPI_WDAT_ENABLED (1)
1296#define ACPI_WDAT_STOPPED 0x80
1297
1298
1299
1300struct acpi_wdat_entry {
1301 u8 action;
1302 u8 instruction;
1303 u16 reserved;
1304 struct acpi_generic_address register_region;
1305 u32 value;
1306 u32 mask;
1307};
1308
1309
1310
1311enum acpi_wdat_actions {
1312 ACPI_WDAT_RESET = 1,
1313 ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
1314 ACPI_WDAT_GET_COUNTDOWN = 5,
1315 ACPI_WDAT_SET_COUNTDOWN = 6,
1316 ACPI_WDAT_GET_RUNNING_STATE = 8,
1317 ACPI_WDAT_SET_RUNNING_STATE = 9,
1318 ACPI_WDAT_GET_STOPPED_STATE = 10,
1319 ACPI_WDAT_SET_STOPPED_STATE = 11,
1320 ACPI_WDAT_GET_REBOOT = 16,
1321 ACPI_WDAT_SET_REBOOT = 17,
1322 ACPI_WDAT_GET_SHUTDOWN = 18,
1323 ACPI_WDAT_SET_SHUTDOWN = 19,
1324 ACPI_WDAT_GET_STATUS = 32,
1325 ACPI_WDAT_SET_STATUS = 33,
1326 ACPI_WDAT_ACTION_RESERVED = 34
1327};
1328
1329
1330
1331enum acpi_wdat_instructions {
1332 ACPI_WDAT_READ_VALUE = 0,
1333 ACPI_WDAT_READ_COUNTDOWN = 1,
1334 ACPI_WDAT_WRITE_VALUE = 2,
1335 ACPI_WDAT_WRITE_COUNTDOWN = 3,
1336 ACPI_WDAT_INSTRUCTION_RESERVED = 4,
1337 ACPI_WDAT_PRESERVE_REGISTER = 0x80
1338};
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350struct acpi_table_wddt {
1351 struct acpi_table_header header;
1352 u16 spec_version;
1353 u16 table_version;
1354 u16 pci_vendor_id;
1355 struct acpi_generic_address address;
1356 u16 max_count;
1357 u16 min_count;
1358 u16 period;
1359 u16 status;
1360 u16 capability;
1361};
1362
1363
1364
1365#define ACPI_WDDT_AVAILABLE (1)
1366#define ACPI_WDDT_ACTIVE (1<<1)
1367#define ACPI_WDDT_TCO_OS_OWNED (1<<2)
1368#define ACPI_WDDT_USER_RESET (1<<11)
1369#define ACPI_WDDT_WDT_RESET (1<<12)
1370#define ACPI_WDDT_POWER_FAIL (1<<13)
1371#define ACPI_WDDT_UNKNOWN_RESET (1<<14)
1372
1373
1374
1375#define ACPI_WDDT_AUTO_RESET (1)
1376#define ACPI_WDDT_ALERT_SUPPORT (1<<1)
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388struct acpi_table_wdrt {
1389 struct acpi_table_header header;
1390 struct acpi_generic_address control_register;
1391 struct acpi_generic_address count_register;
1392 u16 pci_device_id;
1393 u16 pci_vendor_id;
1394 u8 pci_bus;
1395 u8 pci_device;
1396 u8 pci_function;
1397 u8 pci_segment;
1398 u16 max_count;
1399 u8 units;
1400};
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412struct acpi_table_wsmt {
1413 struct acpi_table_header header;
1414 u32 protection_flags;
1415};
1416
1417
1418
1419#define ACPI_WSMT_FIXED_COMM_BUFFERS (1)
1420#define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION (2)
1421#define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION (4)
1422
1423
1424
1425#pragma pack()
1426
1427#endif
1428