0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef __ACTBL3_H__
0011 #define __ACTBL3_H__
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #define ACPI_SIG_SLIC "SLIC"
0028 #define ACPI_SIG_SLIT "SLIT"
0029 #define ACPI_SIG_SPCR "SPCR"
0030 #define ACPI_SIG_SPMI "SPMI"
0031 #define ACPI_SIG_SRAT "SRAT"
0032 #define ACPI_SIG_STAO "STAO"
0033 #define ACPI_SIG_TCPA "TCPA"
0034 #define ACPI_SIG_TPM2 "TPM2"
0035 #define ACPI_SIG_UEFI "UEFI"
0036 #define ACPI_SIG_VIOT "VIOT"
0037 #define ACPI_SIG_WAET "WAET"
0038 #define ACPI_SIG_WDAT "WDAT"
0039 #define ACPI_SIG_WDDT "WDDT"
0040 #define ACPI_SIG_WDRT "WDRT"
0041 #define ACPI_SIG_WPBT "WPBT"
0042 #define ACPI_SIG_WSMT "WSMT"
0043 #define ACPI_SIG_XENV "XENV"
0044 #define ACPI_SIG_XXXX "XXXX"
0045
0046
0047
0048
0049
0050 #pragma pack(1)
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075 struct acpi_table_slic {
0076 struct acpi_table_header header;
0077 };
0078
0079
0080
0081
0082
0083
0084
0085
0086 struct acpi_table_slit {
0087 struct acpi_table_header header;
0088 u64 locality_count;
0089 u8 entry[1];
0090 };
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102 struct acpi_table_spcr {
0103 struct acpi_table_header header;
0104 u8 interface_type;
0105 u8 reserved[3];
0106 struct acpi_generic_address serial_port;
0107 u8 interrupt_type;
0108 u8 pc_interrupt;
0109 u32 interrupt;
0110 u8 baud_rate;
0111 u8 parity;
0112 u8 stop_bits;
0113 u8 flow_control;
0114 u8 terminal_type;
0115 u8 reserved1;
0116 u16 pci_device_id;
0117 u16 pci_vendor_id;
0118 u8 pci_bus;
0119 u8 pci_device;
0120 u8 pci_function;
0121 u32 pci_flags;
0122 u8 pci_segment;
0123 u32 reserved2;
0124 };
0125
0126
0127
0128 #define ACPI_SPCR_DO_NOT_DISABLE (1)
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143 struct acpi_table_spmi {
0144 struct acpi_table_header header;
0145 u8 interface_type;
0146 u8 reserved;
0147 u16 spec_revision;
0148 u8 interrupt_type;
0149 u8 gpe_number;
0150 u8 reserved1;
0151 u8 pci_device_flag;
0152 u32 interrupt;
0153 struct acpi_generic_address ipmi_register;
0154 u8 pci_segment;
0155 u8 pci_bus;
0156 u8 pci_device;
0157 u8 pci_function;
0158 u8 reserved2;
0159 };
0160
0161
0162
0163 enum acpi_spmi_interface_types {
0164 ACPI_SPMI_NOT_USED = 0,
0165 ACPI_SPMI_KEYBOARD = 1,
0166 ACPI_SPMI_SMI = 2,
0167 ACPI_SPMI_BLOCK_TRANSFER = 3,
0168 ACPI_SPMI_SMBUS = 4,
0169 ACPI_SPMI_RESERVED = 5
0170 };
0171
0172
0173
0174
0175
0176
0177
0178
0179 struct acpi_table_srat {
0180 struct acpi_table_header header;
0181 u32 table_revision;
0182 u64 reserved;
0183 };
0184
0185
0186
0187 enum acpi_srat_type {
0188 ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
0189 ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
0190 ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
0191 ACPI_SRAT_TYPE_GICC_AFFINITY = 3,
0192 ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4,
0193 ACPI_SRAT_TYPE_GENERIC_AFFINITY = 5,
0194 ACPI_SRAT_TYPE_GENERIC_PORT_AFFINITY = 6,
0195 ACPI_SRAT_TYPE_RESERVED = 7
0196 };
0197
0198
0199
0200
0201
0202
0203
0204 struct acpi_srat_cpu_affinity {
0205 struct acpi_subtable_header header;
0206 u8 proximity_domain_lo;
0207 u8 apic_id;
0208 u32 flags;
0209 u8 local_sapic_eid;
0210 u8 proximity_domain_hi[3];
0211 u32 clock_domain;
0212 };
0213
0214
0215
0216 #define ACPI_SRAT_CPU_USE_AFFINITY (1)
0217
0218
0219
0220 struct acpi_srat_mem_affinity {
0221 struct acpi_subtable_header header;
0222 u32 proximity_domain;
0223 u16 reserved;
0224 u64 base_address;
0225 u64 length;
0226 u32 reserved1;
0227 u32 flags;
0228 u64 reserved2;
0229 };
0230
0231
0232
0233 #define ACPI_SRAT_MEM_ENABLED (1)
0234 #define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1)
0235 #define ACPI_SRAT_MEM_NON_VOLATILE (1<<2)
0236
0237
0238
0239 struct acpi_srat_x2apic_cpu_affinity {
0240 struct acpi_subtable_header header;
0241 u16 reserved;
0242 u32 proximity_domain;
0243 u32 apic_id;
0244 u32 flags;
0245 u32 clock_domain;
0246 u32 reserved2;
0247 };
0248
0249
0250
0251 #define ACPI_SRAT_CPU_ENABLED (1)
0252
0253
0254
0255 struct acpi_srat_gicc_affinity {
0256 struct acpi_subtable_header header;
0257 u32 proximity_domain;
0258 u32 acpi_processor_uid;
0259 u32 flags;
0260 u32 clock_domain;
0261 };
0262
0263
0264
0265 #define ACPI_SRAT_GICC_ENABLED (1)
0266
0267
0268
0269 struct acpi_srat_gic_its_affinity {
0270 struct acpi_subtable_header header;
0271 u32 proximity_domain;
0272 u16 reserved;
0273 u32 its_id;
0274 };
0275
0276
0277
0278
0279
0280
0281
0282 struct acpi_srat_generic_affinity {
0283 struct acpi_subtable_header header;
0284 u8 reserved;
0285 u8 device_handle_type;
0286 u32 proximity_domain;
0287 u8 device_handle[16];
0288 u32 flags;
0289 u32 reserved1;
0290 };
0291
0292
0293
0294 #define ACPI_SRAT_GENERIC_AFFINITY_ENABLED (1)
0295 #define ACPI_SRAT_ARCHITECTURAL_TRANSACTIONS (1<<1)
0296
0297
0298
0299
0300
0301
0302
0303
0304
0305
0306
0307 struct acpi_table_stao {
0308 struct acpi_table_header header;
0309 u8 ignore_uart;
0310 };
0311
0312
0313
0314
0315
0316
0317
0318
0319
0320
0321
0322
0323
0324
0325
0326
0327
0328
0329 struct acpi_table_tcpa_hdr {
0330 struct acpi_table_header header;
0331 u16 platform_class;
0332 };
0333
0334
0335
0336
0337
0338 #define ACPI_TCPA_CLIENT_TABLE 0
0339 #define ACPI_TCPA_SERVER_TABLE 1
0340
0341 struct acpi_table_tcpa_client {
0342 u32 minimum_log_length;
0343 u64 log_address;
0344 };
0345
0346 struct acpi_table_tcpa_server {
0347 u16 reserved;
0348 u64 minimum_log_length;
0349 u64 log_address;
0350 u16 spec_revision;
0351 u8 device_flags;
0352 u8 interrupt_flags;
0353 u8 gpe_number;
0354 u8 reserved2[3];
0355 u32 global_interrupt;
0356 struct acpi_generic_address address;
0357 u32 reserved3;
0358 struct acpi_generic_address config_address;
0359 u8 group;
0360 u8 bus;
0361 u8 device;
0362 u8 function;
0363 };
0364
0365
0366
0367 #define ACPI_TCPA_PCI_DEVICE (1)
0368 #define ACPI_TCPA_BUS_PNP (1<<1)
0369 #define ACPI_TCPA_ADDRESS_VALID (1<<2)
0370
0371
0372
0373 #define ACPI_TCPA_INTERRUPT_MODE (1)
0374 #define ACPI_TCPA_INTERRUPT_POLARITY (1<<1)
0375 #define ACPI_TCPA_SCI_VIA_GPE (1<<2)
0376 #define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3)
0377
0378
0379
0380
0381
0382
0383
0384
0385
0386
0387
0388
0389
0390
0391
0392
0393 struct acpi_table_tpm23 {
0394 struct acpi_table_header header;
0395 u32 reserved;
0396 u64 control_address;
0397 u32 start_method;
0398 };
0399
0400
0401
0402 #define ACPI_TPM23_ACPI_START_METHOD 2
0403
0404
0405
0406
0407
0408 struct acpi_tmp23_trailer {
0409 u32 reserved;
0410 };
0411
0412
0413
0414 struct acpi_table_tpm2 {
0415 struct acpi_table_header header;
0416 u16 platform_class;
0417 u16 reserved;
0418 u64 control_address;
0419 u32 start_method;
0420
0421
0422 };
0423
0424
0425 struct acpi_tpm2_phy {
0426 u8 start_method_specific[12];
0427 u32 log_area_minimum_length;
0428 u64 log_area_start_address;
0429 };
0430
0431
0432
0433 #define ACPI_TPM2_NOT_ALLOWED 0
0434 #define ACPI_TPM2_RESERVED1 1
0435 #define ACPI_TPM2_START_METHOD 2
0436 #define ACPI_TPM2_RESERVED3 3
0437 #define ACPI_TPM2_RESERVED4 4
0438 #define ACPI_TPM2_RESERVED5 5
0439 #define ACPI_TPM2_MEMORY_MAPPED 6
0440 #define ACPI_TPM2_COMMAND_BUFFER 7
0441 #define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8
0442 #define ACPI_TPM2_RESERVED9 9
0443 #define ACPI_TPM2_RESERVED10 10
0444 #define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC 11
0445 #define ACPI_TPM2_RESERVED 12
0446
0447
0448
0449 struct acpi_tpm2_trailer {
0450 u8 method_parameters[12];
0451 u32 minimum_log_length;
0452 u64 log_address;
0453 };
0454
0455
0456
0457
0458
0459
0460
0461 struct acpi_tpm2_arm_smc {
0462 u32 global_interrupt;
0463 u8 interrupt_flags;
0464 u8 operation_flags;
0465 u16 reserved;
0466 u32 function_id;
0467 };
0468
0469
0470
0471 #define ACPI_TPM2_INTERRUPT_SUPPORT (1)
0472
0473
0474
0475 #define ACPI_TPM2_IDLE_SUPPORT (1)
0476
0477
0478
0479
0480
0481
0482
0483
0484
0485
0486
0487 struct acpi_table_uefi {
0488 struct acpi_table_header header;
0489 u8 identifier[16];
0490 u16 data_offset;
0491 };
0492
0493
0494
0495
0496
0497
0498
0499
0500 struct acpi_table_viot {
0501 struct acpi_table_header header;
0502 u16 node_count;
0503 u16 node_offset;
0504 u8 reserved[8];
0505 };
0506
0507
0508
0509 struct acpi_viot_header {
0510 u8 type;
0511 u8 reserved;
0512 u16 length;
0513 };
0514
0515
0516
0517 enum acpi_viot_node_type {
0518 ACPI_VIOT_NODE_PCI_RANGE = 0x01,
0519 ACPI_VIOT_NODE_MMIO = 0x02,
0520 ACPI_VIOT_NODE_VIRTIO_IOMMU_PCI = 0x03,
0521 ACPI_VIOT_NODE_VIRTIO_IOMMU_MMIO = 0x04,
0522 ACPI_VIOT_RESERVED = 0x05
0523 };
0524
0525
0526
0527 struct acpi_viot_pci_range {
0528 struct acpi_viot_header header;
0529 u32 endpoint_start;
0530 u16 segment_start;
0531 u16 segment_end;
0532 u16 bdf_start;
0533 u16 bdf_end;
0534 u16 output_node;
0535 u8 reserved[6];
0536 };
0537
0538 struct acpi_viot_mmio {
0539 struct acpi_viot_header header;
0540 u32 endpoint;
0541 u64 base_address;
0542 u16 output_node;
0543 u8 reserved[6];
0544 };
0545
0546 struct acpi_viot_virtio_iommu_pci {
0547 struct acpi_viot_header header;
0548 u16 segment;
0549 u16 bdf;
0550 u8 reserved[8];
0551 };
0552
0553 struct acpi_viot_virtio_iommu_mmio {
0554 struct acpi_viot_header header;
0555 u8 reserved[4];
0556 u64 base_address;
0557 };
0558
0559
0560
0561
0562
0563
0564
0565
0566
0567
0568 struct acpi_table_waet {
0569 struct acpi_table_header header;
0570 u32 flags;
0571 };
0572
0573
0574
0575 #define ACPI_WAET_RTC_NO_ACK (1)
0576 #define ACPI_WAET_TIMER_ONE_READ (1<<1)
0577
0578
0579
0580
0581
0582
0583
0584
0585
0586
0587
0588 struct acpi_table_wdat {
0589 struct acpi_table_header header;
0590 u32 header_length;
0591 u16 pci_segment;
0592 u8 pci_bus;
0593 u8 pci_device;
0594 u8 pci_function;
0595 u8 reserved[3];
0596 u32 timer_period;
0597 u32 max_count;
0598 u32 min_count;
0599 u8 flags;
0600 u8 reserved2[3];
0601 u32 entries;
0602 };
0603
0604
0605
0606 #define ACPI_WDAT_ENABLED (1)
0607 #define ACPI_WDAT_STOPPED 0x80
0608
0609
0610
0611 struct acpi_wdat_entry {
0612 u8 action;
0613 u8 instruction;
0614 u16 reserved;
0615 struct acpi_generic_address register_region;
0616 u32 value;
0617 u32 mask;
0618 };
0619
0620
0621
0622 enum acpi_wdat_actions {
0623 ACPI_WDAT_RESET = 1,
0624 ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
0625 ACPI_WDAT_GET_COUNTDOWN = 5,
0626 ACPI_WDAT_SET_COUNTDOWN = 6,
0627 ACPI_WDAT_GET_RUNNING_STATE = 8,
0628 ACPI_WDAT_SET_RUNNING_STATE = 9,
0629 ACPI_WDAT_GET_STOPPED_STATE = 10,
0630 ACPI_WDAT_SET_STOPPED_STATE = 11,
0631 ACPI_WDAT_GET_REBOOT = 16,
0632 ACPI_WDAT_SET_REBOOT = 17,
0633 ACPI_WDAT_GET_SHUTDOWN = 18,
0634 ACPI_WDAT_SET_SHUTDOWN = 19,
0635 ACPI_WDAT_GET_STATUS = 32,
0636 ACPI_WDAT_SET_STATUS = 33,
0637 ACPI_WDAT_ACTION_RESERVED = 34
0638 };
0639
0640
0641
0642 enum acpi_wdat_instructions {
0643 ACPI_WDAT_READ_VALUE = 0,
0644 ACPI_WDAT_READ_COUNTDOWN = 1,
0645 ACPI_WDAT_WRITE_VALUE = 2,
0646 ACPI_WDAT_WRITE_COUNTDOWN = 3,
0647 ACPI_WDAT_INSTRUCTION_RESERVED = 4,
0648 ACPI_WDAT_PRESERVE_REGISTER = 0x80
0649 };
0650
0651
0652
0653
0654
0655
0656
0657
0658
0659
0660
0661 struct acpi_table_wddt {
0662 struct acpi_table_header header;
0663 u16 spec_version;
0664 u16 table_version;
0665 u16 pci_vendor_id;
0666 struct acpi_generic_address address;
0667 u16 max_count;
0668 u16 min_count;
0669 u16 period;
0670 u16 status;
0671 u16 capability;
0672 };
0673
0674
0675
0676 #define ACPI_WDDT_AVAILABLE (1)
0677 #define ACPI_WDDT_ACTIVE (1<<1)
0678 #define ACPI_WDDT_TCO_OS_OWNED (1<<2)
0679 #define ACPI_WDDT_USER_RESET (1<<11)
0680 #define ACPI_WDDT_WDT_RESET (1<<12)
0681 #define ACPI_WDDT_POWER_FAIL (1<<13)
0682 #define ACPI_WDDT_UNKNOWN_RESET (1<<14)
0683
0684
0685
0686 #define ACPI_WDDT_AUTO_RESET (1)
0687 #define ACPI_WDDT_ALERT_SUPPORT (1<<1)
0688
0689
0690
0691
0692
0693
0694
0695
0696
0697
0698
0699 struct acpi_table_wdrt {
0700 struct acpi_table_header header;
0701 struct acpi_generic_address control_register;
0702 struct acpi_generic_address count_register;
0703 u16 pci_device_id;
0704 u16 pci_vendor_id;
0705 u8 pci_bus;
0706 u8 pci_device;
0707 u8 pci_function;
0708 u8 pci_segment;
0709 u16 max_count;
0710 u8 units;
0711 };
0712
0713
0714
0715
0716
0717
0718
0719
0720
0721
0722 struct acpi_table_wpbt {
0723 struct acpi_table_header header;
0724 u32 handoff_size;
0725 u64 handoff_address;
0726 u8 layout;
0727 u8 type;
0728 u16 arguments_length;
0729 };
0730
0731 struct acpi_wpbt_unicode {
0732 u16 *unicode_string;
0733 };
0734
0735
0736
0737
0738
0739
0740
0741
0742
0743
0744
0745 struct acpi_table_wsmt {
0746 struct acpi_table_header header;
0747 u32 protection_flags;
0748 };
0749
0750
0751
0752 #define ACPI_WSMT_FIXED_COMM_BUFFERS (1)
0753 #define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION (2)
0754 #define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION (4)
0755
0756
0757
0758
0759
0760
0761
0762
0763
0764
0765 struct acpi_table_xenv {
0766 struct acpi_table_header header;
0767 u64 grant_table_address;
0768 u64 grant_table_size;
0769 u32 event_interrupt;
0770 u8 event_flags;
0771 };
0772
0773
0774
0775 #pragma pack()
0776
0777 #endif