1#ifndef __ACTBL2_H__
2#define __ACTBL2_H__
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#define ACPI_SIG_ASF "ASF!"
22#define ACPI_SIG_BOOT "BOOT"
23#define ACPI_SIG_DBGP "DBGP"
24#define ACPI_SIG_DMAR "DMAR"
25#define ACPI_SIG_HPET "HPET"
26#define ACPI_SIG_IBFT "IBFT"
27#define ACPI_SIG_IVRS "IVRS"
28#define ACPI_SIG_MCFG "MCFG"
29#define ACPI_SIG_SLIC "SLIC"
30#define ACPI_SIG_SPCR "SPCR"
31#define ACPI_SIG_SPMI "SPMI"
32#define ACPI_SIG_TCPA "TCPA"
33#define ACPI_SIG_UEFI "UEFI"
34#define ACPI_SIG_WAET "WAET"
35#define ACPI_SIG_WDAT "WDAT"
36#define ACPI_SIG_WDRT "WDRT"
37
38
39
40
41
42#pragma pack(1)
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59struct acpi_table_asf {
60 struct acpi_table_header header;
61};
62
63
64
65struct acpi_asf_header {
66 u8 type;
67 u8 reserved;
68 u16 length;
69};
70
71
72
73enum acpi_asf_type {
74 ACPI_ASF_TYPE_INFO = 0,
75 ACPI_ASF_TYPE_ALERT = 1,
76 ACPI_ASF_TYPE_CONTROL = 2,
77 ACPI_ASF_TYPE_BOOT = 3,
78 ACPI_ASF_TYPE_ADDRESS = 4,
79 ACPI_ASF_TYPE_RESERVED = 5
80};
81
82
83
84
85
86
87
88struct acpi_asf_info {
89 struct acpi_asf_header header;
90 u8 min_reset_value;
91 u8 min_poll_interval;
92 u16 system_id;
93 u32 mfg_id;
94 u8 flags;
95 u8 reserved2[3];
96};
97
98
99
100#define ACPI_ASF_SMBUS_PROTOCOLS (1)
101
102
103
104struct acpi_asf_alert {
105 struct acpi_asf_header header;
106 u8 assert_mask;
107 u8 deassert_mask;
108 u8 alerts;
109 u8 data_length;
110};
111
112struct acpi_asf_alert_data {
113 u8 address;
114 u8 command;
115 u8 mask;
116 u8 value;
117 u8 sensor_type;
118 u8 type;
119 u8 offset;
120 u8 source_type;
121 u8 severity;
122 u8 sensor_number;
123 u8 entity;
124 u8 instance;
125};
126
127
128
129struct acpi_asf_remote {
130 struct acpi_asf_header header;
131 u8 controls;
132 u8 data_length;
133 u16 reserved2;
134};
135
136struct acpi_asf_control_data {
137 u8 function;
138 u8 address;
139 u8 command;
140 u8 value;
141};
142
143
144
145struct acpi_asf_rmcp {
146 struct acpi_asf_header header;
147 u8 capabilities[7];
148 u8 completion_code;
149 u32 enterprise_id;
150 u8 command;
151 u16 parameter;
152 u16 boot_options;
153 u16 oem_parameters;
154};
155
156
157
158struct acpi_asf_address {
159 struct acpi_asf_header header;
160 u8 eprom_address;
161 u8 devices;
162};
163
164
165
166
167
168
169
170
171
172
173struct acpi_table_boot {
174 struct acpi_table_header header;
175 u8 cmos_index;
176 u8 reserved[3];
177};
178
179
180
181
182
183
184
185
186
187
188struct acpi_table_dbgp {
189 struct acpi_table_header header;
190 u8 type;
191 u8 reserved[3];
192 struct acpi_generic_address debug_port;
193};
194
195
196
197
198
199
200
201
202
203
204
205struct acpi_table_dmar {
206 struct acpi_table_header header;
207 u8 width;
208 u8 flags;
209 u8 reserved[10];
210};
211
212
213
214#define ACPI_DMAR_INTR_REMAP (1)
215
216
217
218struct acpi_dmar_header {
219 u16 type;
220 u16 length;
221};
222
223
224
225enum acpi_dmar_type {
226 ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
227 ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
228 ACPI_DMAR_TYPE_ATSR = 2,
229 ACPI_DMAR_HARDWARE_AFFINITY = 3,
230 ACPI_DMAR_TYPE_RESERVED = 4
231};
232
233
234
235struct acpi_dmar_device_scope {
236 u8 entry_type;
237 u8 length;
238 u16 reserved;
239 u8 enumeration_id;
240 u8 bus;
241};
242
243
244
245enum acpi_dmar_scope_type {
246 ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
247 ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
248 ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
249 ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
250 ACPI_DMAR_SCOPE_TYPE_HPET = 4,
251 ACPI_DMAR_SCOPE_TYPE_RESERVED = 5
252};
253
254struct acpi_dmar_pci_path {
255 u8 dev;
256 u8 fn;
257};
258
259
260
261
262
263
264
265struct acpi_dmar_hardware_unit {
266 struct acpi_dmar_header header;
267 u8 flags;
268 u8 reserved;
269 u16 segment;
270 u64 address;
271};
272
273
274
275#define ACPI_DMAR_INCLUDE_ALL (1)
276
277
278
279struct acpi_dmar_reserved_memory {
280 struct acpi_dmar_header header;
281 u16 reserved;
282 u16 segment;
283 u64 base_address;
284 u64 end_address;
285};
286
287
288
289#define ACPI_DMAR_ALLOW_ALL (1)
290
291
292
293struct acpi_dmar_atsr {
294 struct acpi_dmar_header header;
295 u8 flags;
296 u8 reserved;
297 u16 segment;
298};
299
300
301
302#define ACPI_DMAR_ALL_PORTS (1)
303
304
305
306struct acpi_dmar_rhsa {
307 struct acpi_dmar_header header;
308 u32 reserved;
309 u64 base_address;
310 u32 proximity_domain;
311};
312
313
314
315
316
317
318
319
320
321
322
323struct acpi_table_hpet {
324 struct acpi_table_header header;
325 u32 id;
326 struct acpi_generic_address address;
327 u8 sequence;
328 u16 minimum_tick;
329 u8 flags;
330};
331
332
333
334#define ACPI_HPET_PAGE_PROTECT_MASK (3)
335
336
337
338enum acpi_hpet_page_protect {
339 ACPI_HPET_NO_PAGE_PROTECT = 0,
340 ACPI_HPET_PAGE_PROTECT4 = 1,
341 ACPI_HPET_PAGE_PROTECT64 = 2
342};
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357struct acpi_table_ibft {
358 struct acpi_table_header header;
359 u8 reserved[12];
360};
361
362
363
364struct acpi_ibft_header {
365 u8 type;
366 u8 version;
367 u16 length;
368 u8 index;
369 u8 flags;
370};
371
372
373
374enum acpi_ibft_type {
375 ACPI_IBFT_TYPE_NOT_USED = 0,
376 ACPI_IBFT_TYPE_CONTROL = 1,
377 ACPI_IBFT_TYPE_INITIATOR = 2,
378 ACPI_IBFT_TYPE_NIC = 3,
379 ACPI_IBFT_TYPE_TARGET = 4,
380 ACPI_IBFT_TYPE_EXTENSIONS = 5,
381 ACPI_IBFT_TYPE_RESERVED = 6
382};
383
384
385
386struct acpi_ibft_control {
387 struct acpi_ibft_header header;
388 u16 extensions;
389 u16 initiator_offset;
390 u16 nic0_offset;
391 u16 target0_offset;
392 u16 nic1_offset;
393 u16 target1_offset;
394};
395
396struct acpi_ibft_initiator {
397 struct acpi_ibft_header header;
398 u8 sns_server[16];
399 u8 slp_server[16];
400 u8 primary_server[16];
401 u8 secondary_server[16];
402 u16 name_length;
403 u16 name_offset;
404};
405
406struct acpi_ibft_nic {
407 struct acpi_ibft_header header;
408 u8 ip_address[16];
409 u8 subnet_mask_prefix;
410 u8 origin;
411 u8 gateway[16];
412 u8 primary_dns[16];
413 u8 secondary_dns[16];
414 u8 dhcp[16];
415 u16 vlan;
416 u8 mac_address[6];
417 u16 pci_address;
418 u16 name_length;
419 u16 name_offset;
420};
421
422struct acpi_ibft_target {
423 struct acpi_ibft_header header;
424 u8 target_ip_address[16];
425 u16 target_ip_socket;
426 u8 target_boot_lun[8];
427 u8 chap_type;
428 u8 nic_association;
429 u16 target_name_length;
430 u16 target_name_offset;
431 u16 chap_name_length;
432 u16 chap_name_offset;
433 u16 chap_secret_length;
434 u16 chap_secret_offset;
435 u16 reverse_chap_name_length;
436 u16 reverse_chap_name_offset;
437 u16 reverse_chap_secret_length;
438 u16 reverse_chap_secret_offset;
439};
440
441
442
443
444
445
446
447
448
449
450
451struct acpi_table_ivrs {
452 struct acpi_table_header header;
453 u32 info;
454 u64 reserved;
455};
456
457
458
459#define ACPI_IVRS_PHYSICAL_SIZE 0x00007F00
460#define ACPI_IVRS_VIRTUAL_SIZE 0x003F8000
461#define ACPI_IVRS_ATS_RESERVED 0x00400000
462
463
464
465struct acpi_ivrs_header {
466 u8 type;
467 u8 flags;
468 u16 length;
469 u16 device_id;
470};
471
472
473
474enum acpi_ivrs_type {
475 ACPI_IVRS_TYPE_HARDWARE = 0x10,
476 ACPI_IVRS_TYPE_MEMORY1 = 0x20,
477 ACPI_IVRS_TYPE_MEMORY2 = 0x21,
478 ACPI_IVRS_TYPE_MEMORY3 = 0x22
479};
480
481
482
483#define ACPI_IVHD_TT_ENABLE (1)
484#define ACPI_IVHD_PASS_PW (1<<1)
485#define ACPI_IVHD_RES_PASS_PW (1<<2)
486#define ACPI_IVHD_ISOC (1<<3)
487#define ACPI_IVHD_IOTLB (1<<4)
488
489
490
491#define ACPI_IVMD_UNITY (1)
492#define ACPI_IVMD_READ (1<<1)
493#define ACPI_IVMD_WRITE (1<<2)
494#define ACPI_IVMD_EXCLUSION_RANGE (1<<3)
495
496
497
498
499
500
501
502struct acpi_ivrs_hardware {
503 struct acpi_ivrs_header header;
504 u16 capability_offset;
505 u64 base_address;
506 u16 pci_segment_group;
507 u16 info;
508 u32 reserved;
509};
510
511
512
513#define ACPI_IVHD_MSI_NUMBER_MASK 0x001F
514#define ACPI_IVHD_UNIT_ID_MASK 0x1F00
515
516
517
518
519
520
521
522struct acpi_ivrs_de_header {
523 u8 type;
524 u16 id;
525 u8 data_setting;
526};
527
528
529
530#define ACPI_IVHD_ENTRY_LENGTH 0xC0
531
532
533
534enum acpi_ivrs_device_entry_type {
535
536
537 ACPI_IVRS_TYPE_PAD4 = 0,
538 ACPI_IVRS_TYPE_ALL = 1,
539 ACPI_IVRS_TYPE_SELECT = 2,
540 ACPI_IVRS_TYPE_START = 3,
541 ACPI_IVRS_TYPE_END = 4,
542
543
544
545 ACPI_IVRS_TYPE_PAD8 = 64,
546 ACPI_IVRS_TYPE_NOT_USED = 65,
547 ACPI_IVRS_TYPE_ALIAS_SELECT = 66,
548 ACPI_IVRS_TYPE_ALIAS_START = 67,
549 ACPI_IVRS_TYPE_EXT_SELECT = 70,
550 ACPI_IVRS_TYPE_EXT_START = 71,
551 ACPI_IVRS_TYPE_SPECIAL = 72
552};
553
554
555
556#define ACPI_IVHD_INIT_PASS (1)
557#define ACPI_IVHD_EINT_PASS (1<<1)
558#define ACPI_IVHD_NMI_PASS (1<<2)
559#define ACPI_IVHD_SYSTEM_MGMT (3<<4)
560#define ACPI_IVHD_LINT0_PASS (1<<6)
561#define ACPI_IVHD_LINT1_PASS (1<<7)
562
563
564
565struct acpi_ivrs_device4 {
566 struct acpi_ivrs_de_header header;
567};
568
569
570
571struct acpi_ivrs_device8a {
572 struct acpi_ivrs_de_header header;
573 u8 reserved1;
574 u16 used_id;
575 u8 reserved2;
576};
577
578
579
580struct acpi_ivrs_device8b {
581 struct acpi_ivrs_de_header header;
582 u32 extended_data;
583};
584
585
586
587#define ACPI_IVHD_ATS_DISABLED (1<<31)
588
589
590
591struct acpi_ivrs_device8c {
592 struct acpi_ivrs_de_header header;
593 u8 handle;
594 u16 used_id;
595 u8 variety;
596};
597
598
599
600#define ACPI_IVHD_IOAPIC 1
601#define ACPI_IVHD_HPET 2
602
603
604
605struct acpi_ivrs_memory {
606 struct acpi_ivrs_header header;
607 u16 aux_data;
608 u64 reserved;
609 u64 start_address;
610 u64 memory_length;
611};
612
613
614
615
616
617
618
619
620
621
622struct acpi_table_mcfg {
623 struct acpi_table_header header;
624 u8 reserved[8];
625};
626
627
628
629struct acpi_mcfg_allocation {
630 u64 address;
631 u16 pci_segment;
632 u8 start_bus_number;
633 u8 end_bus_number;
634 u32 reserved;
635};
636
637
638
639
640
641
642
643
644
645
646
647struct acpi_table_spcr {
648 struct acpi_table_header header;
649 u8 interface_type;
650 u8 reserved[3];
651 struct acpi_generic_address serial_port;
652 u8 interrupt_type;
653 u8 pc_interrupt;
654 u32 interrupt;
655 u8 baud_rate;
656 u8 parity;
657 u8 stop_bits;
658 u8 flow_control;
659 u8 terminal_type;
660 u8 reserved1;
661 u16 pci_device_id;
662 u16 pci_vendor_id;
663 u8 pci_bus;
664 u8 pci_device;
665 u8 pci_function;
666 u32 pci_flags;
667 u8 pci_segment;
668 u32 reserved2;
669};
670
671
672
673#define ACPI_SPCR_DO_NOT_DISABLE (1)
674
675
676
677
678
679
680
681
682
683
684
685
686struct acpi_table_spmi {
687 struct acpi_table_header header;
688 u8 interface_type;
689 u8 reserved;
690 u16 spec_revision;
691 u8 interrupt_type;
692 u8 gpe_number;
693 u8 reserved1;
694 u8 pci_device_flag;
695 u32 interrupt;
696 struct acpi_generic_address ipmi_register;
697 u8 pci_segment;
698 u8 pci_bus;
699 u8 pci_device;
700 u8 pci_function;
701 u8 reserved2;
702};
703
704
705
706enum acpi_spmi_interface_types {
707 ACPI_SPMI_NOT_USED = 0,
708 ACPI_SPMI_KEYBOARD = 1,
709 ACPI_SPMI_SMI = 2,
710 ACPI_SPMI_BLOCK_TRANSFER = 3,
711 ACPI_SPMI_SMBUS = 4,
712 ACPI_SPMI_RESERVED = 5
713};
714
715
716
717
718
719
720
721
722
723
724
725struct acpi_table_tcpa {
726 struct acpi_table_header header;
727 u16 reserved;
728 u32 max_log_length;
729 u64 log_address;
730};
731
732
733
734
735
736
737
738
739
740
741
742struct acpi_table_uefi {
743 struct acpi_table_header header;
744 u8 identifier[16];
745 u16 data_offset;
746};
747
748
749
750
751
752
753
754
755
756
757struct acpi_table_waet {
758 struct acpi_table_header header;
759 u32 flags;
760};
761
762
763
764#define ACPI_WAET_RTC_NO_ACK (1)
765#define ACPI_WAET_TIMER_ONE_READ (1<<1)
766
767
768
769
770
771
772
773
774
775
776
777struct acpi_table_wdat {
778 struct acpi_table_header header;
779 u32 header_length;
780 u16 pci_segment;
781 u8 pci_bus;
782 u8 pci_device;
783 u8 pci_function;
784 u8 reserved[3];
785 u32 timer_period;
786 u32 max_count;
787 u32 min_count;
788 u8 flags;
789 u8 reserved2[3];
790 u32 entries;
791};
792
793
794
795#define ACPI_WDAT_ENABLED (1)
796#define ACPI_WDAT_STOPPED 0x80
797
798
799
800struct acpi_wdat_entry {
801 u8 action;
802 u8 instruction;
803 u16 reserved;
804 struct acpi_generic_address register_region;
805 u32 value;
806 u32 mask;
807};
808
809
810
811enum acpi_wdat_actions {
812 ACPI_WDAT_RESET = 1,
813 ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
814 ACPI_WDAT_GET_COUNTDOWN = 5,
815 ACPI_WDAT_SET_COUNTDOWN = 6,
816 ACPI_WDAT_GET_RUNNING_STATE = 8,
817 ACPI_WDAT_SET_RUNNING_STATE = 9,
818 ACPI_WDAT_GET_STOPPED_STATE = 10,
819 ACPI_WDAT_SET_STOPPED_STATE = 11,
820 ACPI_WDAT_GET_REBOOT = 16,
821 ACPI_WDAT_SET_REBOOT = 17,
822 ACPI_WDAT_GET_SHUTDOWN = 18,
823 ACPI_WDAT_SET_SHUTDOWN = 19,
824 ACPI_WDAT_GET_STATUS = 32,
825 ACPI_WDAT_SET_STATUS = 33,
826 ACPI_WDAT_ACTION_RESERVED = 34
827};
828
829
830
831enum acpi_wdat_instructions {
832 ACPI_WDAT_READ_VALUE = 0,
833 ACPI_WDAT_READ_COUNTDOWN = 1,
834 ACPI_WDAT_WRITE_VALUE = 2,
835 ACPI_WDAT_WRITE_COUNTDOWN = 3,
836 ACPI_WDAT_INSTRUCTION_RESERVED = 4,
837 ACPI_WDAT_PRESERVE_REGISTER = 0x80
838};
839
840
841
842
843
844
845
846
847
848
849
850struct acpi_table_wdrt {
851 struct acpi_table_header header;
852 struct acpi_generic_address control_register;
853 struct acpi_generic_address count_register;
854 u16 pci_device_id;
855 u16 pci_vendor_id;
856 u8 pci_bus;
857 u8 pci_device;
858 u8 pci_function;
859 u8 pci_segment;
860 u16 max_count;
861 u8 units;
862};
863
864
865
866#pragma pack()
867
868#endif
869